How It Works
The protocol sends a UDP datagram containing 6DOF tracking data to FlightGear’s property system:- Packages position (X, Y, Z in meters) and rotation (heading, pitch, roll in degrees) into a binary structure
- Sends the data via UDP to a configurable IP address and port
- FlightGear reads the data and updates the view camera accordingly
Data Structure
Compatible Simulators
FlightGear
Open-source flight simulator - all versions that support UDP property input
This protocol is specifically designed for FlightGear. For other flight simulators:
- FSX/Prepar3D: Use SimConnect
- X-Plane: Use FreeTrack with X-Camera plugin
- MSFS 2020: Use FreeTrack
Setup Instructions
Configure network settings
Click the settings button next to the Output dropdown.Network configuration:
- IP Address: Where FlightGear is running
- Default:
127.0.0.1(same computer) - For networked setup: Enter FlightGear PC’s IP address
- Default:
- Port: UDP port number
- Default:
5542 - Must match FlightGear’s configured port
- Default:
Configure FlightGear
Start FlightGear with UDP input enabled. Add this to your FlightGear command line or launcher settings:Or in the FlightGear launcher:
- Go to Settings → Additional Settings
- Add:
--generic=socket,in,25,127.0.0.1,5542,udp,opentrack
Create FlightGear protocol file
FlightGear needs a protocol definition file to parse OpenTrack data.Create a file named
opentrack.xml in FlightGear’s Protocol directory:Location:- Windows:
<FG Install>\data\Protocol\opentrack.xml - Linux:
~/.fgfs/Protocol/opentrack.xmlor/usr/share/games/flightgear/Protocol/opentrack.xml - macOS:
/Applications/FlightGear.app/data/Protocol/opentrack.xml
Configuration
Default Settings
Network Configuration
For running OpenTrack and FlightGear on different computers:Find FlightGear PC IP
On the computer running FlightGear, find its local IP address:
- Windows:
ipconfigin command prompt - Linux/Mac:
ifconfigorip addr
Coordinate Transformations
OpenTrack coordinates are converted for FlightGear:Troubleshooting
”Can’t bind to [IP:Port]” Error
Cause: OpenTrack cannot bind to the UDP socket. Solution:- Check if another application is using the port
- Verify IP address format is correct (e.g.,
192.168.1.100) - Try changing the port number
- Run OpenTrack as administrator
FlightGear Doesn’t Respond to Tracking
Symptoms: OpenTrack is running but view doesn’t move in FlightGear. Solution:- Verify protocol file exists: Check
opentrack.xmlis in Protocol folder - Check command line: Ensure
--generic=socket,in,25,127.0.0.1,5542,udp,opentrackis in FlightGear launch options - Match IP and port: Settings must match between OpenTrack and FlightGear
- Firewall: Add exception for UDP port 5542
- Test connectivity: Use Wireshark or tcpdump to verify UDP packets are being sent
View Jumps or Jitters
Cause: Network latency or packet loss. Solution:- If networked: Use wired connection instead of WiFi
- Reduce OpenTrack filter smoothing
- Check for network congestion
- Ensure FlightGear frame rate is stable
Wrong Axis Movement
Cause: Coordinate system mismatch. Solution:- Verify
opentrack.xmlmaps chunks to correct view properties - Check OpenTrack mapping settings
- May need to invert specific axes in OpenTrack mapping
FlightGear View Configuration
View System Properties
The protocol controls these FlightGear properties:/sim/current-view/x-offset-m- X position offset/sim/current-view/y-offset-m- Y position offset/sim/current-view/z-offset-m- Z position offset/sim/current-view/heading-offset-deg- Heading offset/sim/current-view/pitch-offset-deg- Pitch offset/sim/current-view/roll-offset-deg- Roll offset
Compatible View Types
Head tracking works best with these FlightGear views:- Cockpit View (default)
- Helicopter View
- Chase View
Advanced Usage
Custom Update Rate
FlightGear’s command line specifies update rate (25 Hz in example):- 25 Hz - Standard
- 30 Hz - Smoother
- 60 Hz - Very smooth (requires fast tracking source)
Multiple Tracking Sources
To use multiple UDP inputs in FlightGear, use different ports:The FlightGear protocol is designed for dedicated FlightGear users who want native integration. For casual use or multiple simulators, consider using FreeTrack protocol with appropriate plugins.
Technical Details
Binary Protocol
The protocol sends binary data in host byte order:- 6 doubles (8 bytes each) = 48 bytes
- 1 integer (4 bytes) = 4 bytes
- Total packet size: 52 bytes per update
Network Performance
At 25 Hz update rate:- Bandwidth: ~10 Kbps
- Packets per second: 25
- Latency: Typically <1ms on local network