3.4.4 Connect with Flight Simulators
It is possible to connect Horizon with the flight simulators XPlane(R) (closed source) or FlightGear (free and open source) via sending the required data over a network. This makes it possible to see the visualizations of Horizon like in a real flight. The device running Horizon and the device running the flight simulator need to be located in the same subnetwork (e.g. connected to the same router).
Set up Horizon
First you need to set up Horizon to receive the data of your flight simulator:
- Goto "Menu" (most right button) -> "Setup" -> "Sensor Setup"
- Select "Flight Gear Flight Simulator" or "XPlane Flight Simulator" from the list
- Press "Use" and afterwards "Ok"
This has been tested with XPlane 10 and 11 and FlightGear v3.0.0 and v3.4.0 but might also work with other versions. In case you want to disable some input such as localizer/glideslope or traffic data you can disable it by selecting the "NullSensor" in the "Advanced Setup" for the corresponding data types.
Set up XPlane
In XPlane you need to manually specify the data types which shall be sent and the target ip address. The target ip address is the ip address of the device running Horizon in the same subnet. (XPlane 10: "Settings" -> "Net Connections" -> "Data" tab.) Please also set the UDP rate to 25 Hz (smoother experience). (Fyi: The UDP broadcast address 255.255.255.255 does not seem to work, so please use your device ip address or the specific broadcast address of your subnet.)
Please make sure not to alter the port (default port: 49000).
The following data needs to be enabled (see "Settings" -> "Data Input & Output" in XPlane 10):
- 1 times
- 3 speeds
- 6 atmosphere aircraft
- 16 angular velocities
- 17 pitch, roll, headings
- 18 AoA, side-slip, paths
- 20 lat, lon, altitude
- 21 loca, vel, dist traveled
- 22, 23, 24 all planes latitude, longitude, altitude
- 99 NAV 1 deflections
(In XPlane 11 you can find all settings in "Settings" -> "Data Output".)
Set up FlightGear
1. Get the protocol definition from https://helios-avionics.com/downloads/
2. Copy the protocol definition "FGHorizonCom.xml" to your Protocols folder of FlightGear.
The Protocols folder is located within your installation path, for example:
Windows: C:/Program Files/FlightGear 3.4.0/data/Protocol
Depending on your setup, operating system or version of FlightGear this path might by slightly different.
3. Start FlightGear from the command line to use the new protocol defintion:
As an alternative you can use the scripts runFlightGear.sh (Linux) or runFlightGear.bat (Windows). In case of Windows it is necessary to alter the script using a text editor for using the correct installation path.
(Fyi: 255.255.255.255 is the UDP broadcast address which can be replaced by the ip address of your device running Horizon.)