Changes to the Airport App (airport display, search options, prefer ICAO over id)#225
Open
sfrsfrsfr wants to merge 27 commits intofpw:masterfrom
Open
Changes to the Airport App (airport display, search options, prefer ICAO over id)#225sfrsfrsfr wants to merge 27 commits intofpw:masterfrom
sfrsfrsfr wants to merge 27 commits intofpw:masterfrom
Conversation
this fixes fpw#208 (RPLK - Bicol Intl) and improves Charts search (id is icao) change airports from std::map to std::multimap as id is not guaranteed to be unique findAirport now using airports.equal_range findAirportByID remains unchanged set/get FAA/ICAO/Local Code added to models/airport/Airport.cpp
keyWord <= 4 -> findAirportByCode keyWord > 4 || res < MAX -> findAirportByName
add dummy method to SqlWorld (findAirportByCode is needed to improve/fix NearestAirport search but requires other changes in the findAirport branch)
with a max of 10 a nearby airport may not be found
Collaborator
|
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. |
This reverts commit 366357b.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.