flightgear_python.fg_if.FDMConnection
- class flightgear_python.fg_if.FDMConnection(fdm_version)
Bases:
FGConnectionFlightGear Flight Dynamics Model Connection
- Parameters
fdm_version (int) – Net FDM version (24 or 25)
Methods
connect_rx(fg_host, fg_port, rx_cb)Connect to a UDP output of FlightGear
connect_tx(fg_host, fg_port)Connect to a UDP input of FlightGear
start()Start the RX/TX loop with FlightGear
stop()Stop the RX/TX loop
Attributes
- connect_rx(fg_host, fg_port, rx_cb)
Connect to a UDP output of FlightGear
- Parameters
fg_host (str) – IP address of FG (usually localhost)
fg_port (int) – Port of the output socket (i.e. the
5501from--native-fdm=socket,out,30,,5501,udp)rx_cb (Callable[[Container, EventPipe], Optional[construct.lib.containers.Container]]) – Callback function, called whenever we receive data from FG. Function signature should follow
rx_callback_type
- Returns
EventPipeso that data can be passed from the parent process to the callback process- Return type
- connect_tx(fg_host, fg_port)
Connect to a UDP input of FlightGear
- start()
Start the RX/TX loop with FlightGear
- stop()
Stop the RX/TX loop