Aircraft Tracking - davewalker5/ADS-B-BaseStationReader GitHub Wiki

Adding and Updating Tracking Objects

  • Aircraft are identified by their ICAO 24-bit address
  • When a new aircraft is seen for the first time in a session, it is added to the collection of tracked aircraft
  • In the first instance, the tracking object is populated with data from the initial message that caused it to be added to the tracking collection
  • As new messages come in for that aircraft, the existing tracking object is updated with new/updated information from each new message

Event Model

  • The AircraftTracker exposes the following events that subscribers can subscribe to to receive updates on tracked aircraft:
    • Aircraft added
    • Aircraft updated
    • Aircraft removed
  • The event notification for each event includes the current tracking object for the aircraft

Tracked Aircraft Statuses

  • Tracked aircraft pass through the following set of statuses from the point where they are added:
Status Value Meaning
Active 0 The aircraft has just been added and ongoing messages are being received
Inactive 1 Messages have been received recently but are not currently being received
Stale 2 Messages have not been received for a while - scheduled for removal
Locked 3 Aircraft's database record has been locked against further updates
  • Changes in status are communicated to AircraftTracker subscribers via the "aircraft updated" event (see above), with the status as a property of the tracking object

Message Parsing

  • The AircraftTracker is supplied with a dictionary of message parsers, each associated with a Basestation message type
  • As messages are received, the tracker selects the appropriate parser based on the message type
  • Currently, the only parser that has been implemented is for the MSG message type