vatplanner / dataformats-vatsim-public

library for parsing and processing publicly accessible VATSIM data formats
MIT License
1 stars 0 forks source link

flight plans: add support for new style of type information #9

Open dneuge opened 4 years ago

dneuge commented 4 years ago

Up until August 2020 VATSIM used simplified type information in flight plans, such as B738/L or H/B789/L.

With the new prefiling form at https://my.vatsim.net/pilots/flightplan full real-world equipment and transponder codes are now used and wake category has moved behind aircraft ICAO code such as:

B789/H-SDE1E2E3FGHIJ2J3J4J5M1RWXY/LB1D1 B738/M-SDE2E3FGHIRWXY/LB1

dneuge commented 4 years ago

Support may be critical as the old parser will probably be very confused when reading the new format. Adding bug label to signify importance.

dneuge commented 4 years ago

It turns out the assumingly simple change propagates quite a lot through the whole library:

dneuge commented 4 years ago

Added basic support for parsing in 59987d7a84a87a15be9eb634d5e93990b6899f96. AircraftTypeExtractor can be continued to be used as before except that getEquipmentCode now returns multiple characters in case of ICAO-style flight plans.

Graph import does not support accepting such codes yet, imports will currently fail.

Parsing results need to be checked further. While everything works fine for expected input and some known old error cases there are plenty of oddities in data collected during August, not sure if we want to support processing such input to meaningful results (ICAO field 10 data in FAA-style format incl. leaks of equipment codes to FAA wake category, duplicate copied information, ...). This will most-likely require a few more days of observation. I keep wondering which client/web form allows such obvious garbage to be submitted to VATSIM and why it is not being rejected on server-side (unless that was actually test data of the new official form)...

dneuge commented 4 years ago

Basic workaround to restore graph import added in 76340bd8728a771aa54c4d2f2fbd029bca38e687 - don't parse full ICAO equipment codes yet, just ignore equipment in case of new flight plan format.

dneuge commented 3 years ago

... got the wrong issue number on those commits, not really related to this task (but fields for VATSIM-side FAA reformatting and ICAO code extraction have been added).