pyModeS.decoder.bds.bds06 module

pyModeS.decoder.bds.bds06.surface_position(msg0, msg1, t0, t1, lat_ref, lon_ref)[source]

Decode surface position from a pair of even and odd position message, the lat/lon of receiver must be provided to yield the correct solution.

Parameters
  • msg0 (string) – even message (28 hexdigits)

  • msg1 (string) – odd message (28 hexdigits)

  • t0 (int) – timestamps for the even message

  • t1 (int) – timestamps for the odd message

  • lat_ref (float) – latitude of the receiver

  • lon_ref (float) – longitude of the receiver

Returns

(latitude, longitude) of the aircraft

Return type

(float, float)

pyModeS.decoder.bds.bds06.surface_position_with_ref(msg, lat_ref, lon_ref)[source]

Decode surface position with only one message, knowing reference nearby location, such as previously calculated location, ground station, or airport location, etc. The reference position shall be with in 45NM of the true position.

Parameters
  • msg (str) – even message (28 hexdigits)

  • lat_ref – previous known latitude

  • lon_ref – previous known longitude

Returns

(latitude, longitude) of the aircraft

Return type

(float, float)

pyModeS.decoder.bds.bds06.surface_velocity(msg, source=False)[source]

Decode surface velocity from a surface position message

Parameters
  • msg (str) – 28 hexdigits string

  • source (boolean) – Include direction and vertical rate sources in return. Default to False. If set to True, the function will return six value instead of four.

Returns

Four or six parameters, including:
  • Speed (kt)

  • Angle (degree), ground track

  • Vertical rate, always 0

  • Speed type (‘GS’ for ground speed, ‘AS’ for airspeed)

  • [Optional] Direction source (‘TRUE_NORTH’)

  • [Optional] Vertical rate source (None)

Return type

int, float, int, string, [string], [string]