You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Jon Beniston 068cfca547 Add Aircraft feature 3 months ago
..
icons Add Aircraft feature 3 months ago
sqlite Add Aircraft feature 3 months ago
CMakeLists.txt Add Aircraft feature 3 months ago
aircraft.cpp Add Aircraft feature 3 months ago
aircraft.h Add Aircraft feature 3 months ago
aircraftdb.cpp Add Aircraft feature 3 months ago
aircraftgui.cpp Add Aircraft feature 3 months ago
aircraftgui.h Add Aircraft feature 3 months ago
aircraftgui.ui Add Aircraft feature 3 months ago
aircrafticons.qrc Add Aircraft feature 3 months ago
aircraftnotificationdialog.cpp Add Aircraft feature 3 months ago
aircraftnotificationdialog.h Add Aircraft feature 3 months ago
aircraftnotificationdialog.ui Add Aircraft feature 3 months ago
aircraftplugin.cpp Add Aircraft feature 3 months ago
aircraftplugin.h Add Aircraft feature 3 months ago
aircraftsettings.cpp Add Aircraft feature 3 months ago
aircraftsettings.h Add Aircraft feature 3 months ago
aircraftsettingsdialog.cpp Add Aircraft feature 3 months ago
aircraftsettingsdialog.h Add Aircraft feature 3 months ago
aircraftsettingsdialog.ui Add Aircraft feature 3 months ago
aircrafttablemodels.cpp Add Aircraft feature 3 months ago
aircrafttablemodels.h Add Aircraft feature 3 months ago
aircrafttracker.cpp Add Aircraft feature 3 months ago
aircrafttracker.h Add Aircraft feature 3 months ago
aircraftwebapiadapter.cpp Add Aircraft feature 3 months ago
aircraftwebapiadapter.h Add Aircraft feature 3 months ago
readme.md Add Aircraft feature 3 months ago

readme.md

Aircraft Feature Plugin

Introduction

The Aircraft feature collates aircraft data from multiple demodulators into a single aircraft list, and sends the combined aircraft to the Map feature.

Sightings are received from the ADS-B demodulator and the ACARS demodulator (VHF ACARS, VDL Mode 2 HFDL and Aero modes), from any number of channels in any device set.

Combining protocols matters because each sees a different slice of a flight: ADS-B gives continuous positions in VHF range, VDL-2 sees logons and CPDLC near airports, and HFDL/Aero can report an aircraft's position from thousands of kilometres away, hours after it left ADS-B range. The feature merges these into one aircraft with one track.

Aircraft identity

Reports may identify an aircraft by any of:

  • 24-bit ICAO address (ADS-B/HFDL/VDL-2 logons),
  • registration (VHF ACARS header, or looked up from the ICAO address via the aircraft database),
  • flight number / callsign.

The feature merges reports under whichever identities it has seen, cross referencing registration and ICAO address through the aircraft database. A flight number is remembered as the aircraft's most recent flight (flights change; the airframe does not).

Tables and tabs

The upper half of the window holds the traffic:

  • Aircraft - every airframe currently being heard, one row each. See the column list under Interface below
  • Old Aircraft - airframes that have gone quiet for longer than the archive timeout. They are not forgotten, only no longer current, and they come off the Map
  • Flights - the flights seen this session, current and past: flight number, aircraft, departure and arrival, the four OOOI times, when it was first and last heard, which documents it has produced, and which protocols heard it
  • Old Flights - flights that have finished, and those restored from the last session
  • Weather - METARs, TAFs, D-ATIS, TWIPs, NOTAMs, PIREPs and SIGMETs carried by ACARS. They arrive through whichever aircraft asked for them but describe an airport, not that aircraft, so they are kept for the session rather than against a flight. Selecting a row shows the full report

The lower half describes whatever is selected above:

  • Aircraft - the photograph and the airframe's details. See Photo below
  • Documents - flight plans, oceanic clearances, loadsheets, logons and OOOI events, collected against the flight they belong to. Selecting one displays its full text below the table. The log is kept even after the aircraft it came from has been removed. Plain ACARS messages are not collected. CPDLC messages go to the ATC tab instead
  • ATC - CPDLC (controller-pilot data link) messages across all channels, with the protocol, direction (uplink from ATC, downlink from the aircraft), source and recipient where known, and the concise message text (e.g. "WILCO")
  • Past Flights - every flight the selected aircraft has operated. Shown only while an aircraft is selected. Selecting one of its rows charts that flight's profile and draws its track
  • Past Aircraft - every airframe that has operated the selected flight number. Shown only while a flight is selected
  • Flight Profile - see below

Selecting an aircraft or a flight filters the Documents and ATC tables to it. Route information comes from messages - flight plans, OOOI events, oceanic clearances - or, where none has revealed it, from the callsign-to-route database.

Flight profile

The Flight Profile tab charts the selected flight's altitude (left axis) and speed (right axis) against time, showing the flight profile - climb, cruise and descent - built from all protocols and kept with the flight in the session database.

Photo

The first of the message tabs, titled Aircraft, shows a photograph of the selected aircraft from planespotters.net headed by its registration and the country flag, with the airline's logo beneath it and a table of what the OpenSky database knows about the airframe beside it. Clicking the photograph opens it on planespotters.net

Chart

The chart plots the message rate per protocol (and in total) over time. Click a legend entry to show or hide a series. It is shown and hidden with the chart button, and appears at the bottom of the splitter beneath the tables rather than in a tab, so the rate can be watched at the same time as the traffic producing it. Right click the button to clear the data.

Statistics

The statistics table can be shown and hidden with the statistic button. Right click the button to reset the records.

Every figure is given twice, side by side: for this session and for all time, each with who set it and when.

  • Maximum range, one row per protocol - the furthest aircraft heard on ADS-B, ACARS, VDL-2, HFDL and Aero. Per protocol rather than as one figure because the protocols are not comparable: line of sight VHF, HF skywave and an L band satellite downlink have nothing to do with one another, and a single "maximum range" would only ever show the satellite
  • Fastest ground speed and Highest altitude, with the aircraft that set each
  • Most aircraft at once - the largest number heard within any 15 minute window
  • Aircraft heard - how many different airframes
  • Total messages, then one row per protocol giving that protocol's count and its share of the total. The share is of that scope's own total, so a protocol that has been quiet today shows its reduced share against its long run one rather than against nothing
  • Listening time and Messages per minute

Ranges depend on the receiver position being right: see the Dist (km) column below for where that comes from.

Settings

The gear button opens the settings dialog.

Timeouts

  • Archive after (mins) - how long without a report before an aircraft moves to the Old Aircraft table and comes off the Map.
  • Keep for (days) - how long archived aircraft and their flights are kept in the session database before being discarded. Zero keeps them forever, at the cost of a database that grows without limit
  • ADS-B position for (mins) - how long an aircraft stays on the Map after its last ADS-B position
  • ACARS position for (mins) - the same for a position from ACARS, VDL-2, HFDL or Aero. Two figures rather than one because the protocols report at wildly different rates: ADS-B about once a second, where an oceanic position report can be the only one for many minutes.

Session database - the file the aircraft, flights and messages are saved in.

Receive aircraft data from - which demodulators this feature accepts reports from. Unticked ones are ignored.

Use airline callsigns in Map labels - writes the flight on the Map the way it is spoken on the radio rather than the way it is transmitted: SPEEDBIRD 123 instead of BAW123, using the airline's radio callsign from the airline database.

Show the maximum range record on the Map - keeps the aircraft that set the all time maximum range record permanently on the Map, drawn at the position it was in when it set it rather than wherever it is now. The bubble names the aircraft, the distance, the protocol it was heard on and when. It is the best record across all protocols, and it stays until the record is beaten, the records are reset, or this is turned off.

A record set before positions were kept alongside them has nowhere to be drawn, and in that case nothing is drawn until the record is beaten. Not the furthest record that could be placed: that would put a marker on the Map giving one distance while the statistics table gave another. The log says so when it happens.

Favour airline livery over aircraft type (3D map) - when no 3D model exists of the right type in the right livery, prefer a similar aircraft in the correct livery over an exact type in the wrong one.

Livery aircraft icons (2D map) - display aircraft on the 2D map using icons showing their airline's livery, instead of black icons. The icon follows the aircraft's matched 3D model, so this requires the 3D models to have been downloaded via the Map feature. Aircraft without a matching model are displayed with a white version of the plain icon.

Notifications

The notifications dialog holds rules matched against each aircraft's ICAO address, registration, flight or type with a regular expression. When an aircraft first matches a rule, the rule's speech text is read aloud and/or its command is executed, with ${icao} ${reg} ${flight} ${type} ${protocol} substituted. Each rule fires at most once per aircraft.

Session persistence

The collated aircraft, flights, documents and ATC log are saved to a SQLite database (aircraft.db in the application data directory) every minute and on exit, and restored when the feature is next opened. On restore, aircraft that have not been heard within the removal timeout are pruned, while the document and ATC logs are restored in full; restored aircraft with positions reappear on the Map with their full tracks.

The all time figures are kept in the preset rather than in that database, because they are a property of the receiving setup rather than of the traffic.

The one exception is the all time aircraft count, which cannot be a running total: the same airframe heard on two days has to count once, so it needs the set of which airframes have been heard rather than a number. That set is a table in the database, and it is the only thing there that is never pruned - so the count keeps growing after the aircraft themselves have aged out.

Right clicking the statistics button offers to reset either half. Resetting the session starts it again from that moment without touching the all time figures. Resetting all time also clears the record of which airframes have been heard.

Finding things

The Find box highlights the next row matching what is typed, stepping through the matches on each press of Enter. It searches the ICAO address, registration, type, flight number, airline and departure and arrival airports at once, or a single one of them when the column selector beside it is set to something other than All. The text turns red when nothing matches.

Context menus

Right clicking a cell in any of the tables offers, as they apply to that cell:

  • Copy the cell's contents to the clipboard
  • Find on map - centre the Map on that aircraft
  • Display flight - jump to that flight in the Flights table, from the aircraft flying it
  • Display aircraft - jump the other way, to the airframe operating a flight

Map

Aircraft with a position are sent to the Map feature, named by registration when known.

When an Aircraft feature is present, the ADS-B and ACARS demodulators stop sending aircraft to the Map themselves - this feature is the single source, so each aircraft appears once, with data combined from every demodulator that hears it. ADS-B sightings pass through the demodulator's fully-built map item, so the 3D model, animations and the complete aircraft state driving the Map's PFD display are preserved, with the combined track and route information added. Without an Aircraft feature, the demodulators send to the Map directly, as before.

The map item carries:

  • An icon matching the aircraft type, rotated to point along the track,
  • The full track accumulated across all protocols - the whole history survives coverage gaps, so a flight tracked on ADS-B and picked up again hours later on HFDL shows one continuous track,
  • A popup headed by a side view of the type in the operator's livery and the country flag, followed by registration, flight, aircraft type, departure/arrival airports and the route where messages have revealed them, and the protocols and frequencies the current flight has been heard on.

The routes an aircraft has been given are drawn too - a filed flight plan and an oceanic clearance alike - as a line through the waypoints with a marker at each one. A flight plan comes from an FPN message or a position report's route insert; a clearance from an oceanic clearance or its readback. Both are bookended with the departure and arrival airports so the line starts and finishes somewhere recognisable, and the route's popup carries the message that filed it, which is where the clearance number, entry time, flight level and Mach are.

Each name is resolved against the airport, waypoint and navaid databases - four characters is an airport, five a waypoint, three a VOR or NDB ident, and seven an oceanic position such as 5530N - and any that cannot be resolved is dropped. A route is drawn once, when it is filed, and is left on the Map after the flight is archived: it is a record of where the aircraft was going.

Stale positions from stored performance log dumps (seen with HFDL) are ignored: a position timestamped well before the newest known position for that aircraft does not move it.

Aircraft are removed from the table and the Map after a configurable number of minutes without a report.

Interface

Aircraft feature plugin GUI

1: Find column

Which field the Find box looks in - All, ICAO, Reg, Type or Flight.

2: Find

Highlights the next row matching the text. See Finding things above.

3: Delete aircraft

Deletes all aircraft from the tables and removes them from the Map.

4: Notifications

Opens the notifications dialog. See Notifications above.

5: ATC

When checked, aircraft labels on the Map show route, flight level, speed and type in an ATC style, like the ADS-B demodulator's ATC button; when unchecked just the flight number or registration is shown.

6: Statistics

Shows and hides the statistics table, which appears in the splitter beside the aircraft and flight tables. Right click to reset the session figures or the all time ones.

7: Chart

Shows and hides the message rate chart, at the bottom of the splitter. Right click to clear the data.

8: Settings

Opens the settings dialog - timeouts, the session database, which demodulators to accept reports from, and the Map options. See Settings above.

Aircraft table

The table shows one row per aircraft:

  • ICAO - 24-bit ICAO address, when known
  • Reg - Aircraft registration
  • Type - Aircraft type (ICAO type designator) from the OpenSky database
  • Flight - Most recent flight number / callsign
  • Airline - Airline logo, or operator name when no logo is available
  • Sideview - Aircraft silhouette, coloured per airline where available
  • Country - Flag of the country of registration
  • Lat, Lon - Latest position in degrees
  • Dist (km) - Great circle distance from the receiver to the aircraft. Measured from the position of the device the report arrived on when that device knows where it is - a remote SDR reports the position of the server, not of you - and from Preferences > My Position otherwise. So the figure always means "from the antenna that heard it", which matters when receiving from somewhere other than where you are
  • Alt (ft) - Altitude in feet
  • Hdg - Heading or track in degrees
  • Spd (kn) - Speed in knots
  • Protocols - Every protocol and frequency the airframe has been received on (e.g. "ACARS 131.725; HFDL 5.720"), over every flight it has made and for as long as it is kept. The Flights table has a column of the same name holding the same thing for a single flight, and that is the one the Map shows - an airframe heard on HFDL over the Atlantic last month is not being heard on HFDL now, so naming it beside the aircraft on the Map would be wrong.
  • Msgs - Number of messages received
  • Last seen - Time of the last report

Flights table

The table shows one row per flight, and the Old Flights table the same columns for flights that have finished:

  • Flight - Flight number / callsign
  • Reg - Registration of the airframe that flew it
  • From, To - Departure and arrival airports
  • Out, Off, On, In - The four OOOI times: off the gate, airborne, landed, on the gate
  • First seen, Last seen - When the flight was first and last heard
  • LS, OC, FP - A tick where the flight has produced a loadsheet, an oceanic clearance or a flight plan. Blank where it has not, rather than a cross: a column of crosses is as loud as a column of ticks, which makes the ticks harder to pick out
  • Docs - Number of documents collected
  • Protocols - Protocols and frequencies this flight has been heard on. The Aircraft table's column of the same name is the airframe's, over every flight it has made

Columns in either table can be reordered by dragging, hidden via the right-click header menu, and either table sorted by clicking a header. Widths and order are saved with the preset.

Attribution

Aircraft and route data from the OpenSky Network.

Aircraft photographs from PlaneSpotters.

Airline logos, sideviews and flags are by Steve Hibberd from RadarSpotting.

Airports from OurAirports, and navaids and waypoints from OpenAIP - used to place the waypoints of a filed route.

Some code written by AI.