Flight Simulator GPS Integration (UDP Protocol)

Developers of flight simulators that would like to integrate their GPS and/or traffic feed into ForeFlight Mobile  can do so with v5.2 or newer.  ForeFlight Mobile 6.0 added an Attitude Indicator to show pitch/bank.  

The simulator will need to send GPS info packets on UDP port 49002 once per second in the form of a string message like this:

     XGPSMy Sim,-80.11,34.55,1200.1,359.05,55.6

The "words" are separated by a comma (no word may contain a comma). The required words are:

XGPS followed by a name/ID of the simulator type sending the data (that might be "My Sim" without quotes)

     • Longitude

     • Latitude

     • Altitude in meters MSL

     • Track-along-ground from true north

     • Groundspeed in meters/sec

XGPS messages should come in at 1Hz (one per second, evenly spaced in time). There is a maximum size limit for the message, so don't use a very long name as part of the XGPS word. 2-3 decimals of precision is appropriate for the lat/lon and track values. Speed and altitude are fine with just 1 decimal of precision.

For traffic data, the simulator will need to send packets in the form of a string message like this:

XTRAFFICMy Sim,168,33.85397339,-118.32486725,3749.9,-213.0,1,68.2,126.0,KS6

The "words" are separated by a comma (no word may contain a comma). The required words are:

     • XTRAFFIC followed by a name/ID of the simulator type sending the data (that might be "My Sim" without quotes)

     • ICAO address, an integer ID

     • Traffic latitude - float

     • Traffic longitude - float

     • Traffic geometric altitude - float (feet)

     • Traffic vertical speed - float (ft/min)

     • Airborne boolean flag - 1 or 0: 1=airborne; 0=surface

     • Heading - float, degrees true

     • Velocity knots - float

     • Callsign - string

There is a maximum size limit for the message, so don't use a very long name as part of the XTRAFFIC word. 2-3 decimals of precision is appropriate for the lat/lon and track values. Speed and altitude are fine with just 1 decimal of precision.

For attitude data, the simulator will need to send packets in the form of a string message like this (at 4-10Hz rate, evenly spaced in time):

XATTMy Sim,180.2,0.1,0.2

The "words" are separated by a comma (no word may contain a comma). The required words are:

     • XATT followed by a name/ID of the simulator type sending the data (that might be "My Sim" without quotes)

     • True Heading - float

     • Pitch - degrees, float, up is positive

     • Roll - degrees, float, right is positive

Sending a broadcast packet, which will be seen by all iPads on the network, is a nice way to prevent the user from having to provide the IP address of their iPad. However, that transmission method is not appropriate for all simulator setups or network/firewall configurations.