avitab icon indicating copy to clipboard operation
avitab copied to clipboard

Changes to the Airport App (airport display, search options, prefer ICAO over id)

Open sfrsfrsfr opened this issue 8 months ago • 1 comments

This PR includes various changes to the Airport App. The ICAO,FAA and Local codes are added to the airport data and the apt.dat based AirportLoader. The ICAO code will be used for loading Charts & METAR (fallback to id if ICAO is unset). Search results will display either ICAO, FAA, Local or id (in this order, see getDisplayID). The airport information has been reformatted, showing the field name, code, elevation, distance & course to user aircraft in the window caption. Threshold elevation has been removed and 'Recorded Messages' shortened with ATIS instead.

AirportApp_EDDH

The airport search has been reworked. findAirport will now search ICAO, FAA, Local, id and the airport name. Also it will return up to 50 matches (MAX_SEARCH_RESULTS) whereas the GUI will only display 10 (MAX_DISPLAY_RESULTS). The reason is that search results are now optionally sorted (by distance to user aircraft) and in ascending/descending order. After sorting the 50 results only the most relevant 10 will be shown. The sort options have also been added to the preferences file. By default sorting in ascending order (nearest match first) is enabled.

A new method findAirportByCode has been added that could replace findAirportByID in the future (not used currently) Without working Charts functionality this has not been looked into. A dummy findAirportByCode (copy of findAirportByID) method has been added to the SqlWorld.

I did not look at the SQL code at all but assume the SQL based NavWorld needs to be updated to include the ICAO, FAA and Local codes and a working implementation of findAirportByCode.

This PR should fix #208 (at least partially)

With the last changes the Helipad size is also loaded. ATC/Runway/Helipad info will be shown only if the data exists (no more lone 'ATC frequencies:' line).

All length data is displayed in ft to follow current practice (like in the Overlay too). A 'unit' setting could possibly be added in the future.

sfrsfrsfr avatar Jul 30 '25 11:07 sfrsfrsfr

The SQL variant of the NAV database is not (currently) used with the Xplane version of Avitab. It is used by the experimental/prototype version used with MSFS, and the code for this is in my Avitab fork and has not yet been submitted to this repo for merge.

I will make whatever updates are required to the SQL subsystem (and the MSFS use of this) once this PR has been adopted.

mjh65 avatar Jul 30 '25 15:07 mjh65