Simulator GPS/Traffic/Attitude Integration

If you are the developer of a flight simulator this page describes how to integrate simulated GPS, AHRS, and/or simulated traffic feed into ForeFlight Mobile.

The simulator must send the simulated GPS position 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, positive value
  • 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 (unique integer for each traffic target)
  • 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
  • Track - float, positive, 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.

Using a Simulator in ForeFlight Mobile

In order for ForeFlight Mobile to show data from a Simulator, the Simulator must be enabled by tapping the Simulator name "tile" on the More > Devices > [Simulator name] page, and sliding the "Enabled" switch ON. 

Example:

Before enabling Simulator, on the More > Devices page:

Enabling Simulator:

After enabling Simulator: