ntilley905 / faadelays

A Python package to retrieve FAA airport status
MIT License
3 stars 0 forks source link

IATA vs FAA Code Dilemma #3

Open ntilley905 opened 3 years ago

ntilley905 commented 3 years ago

While doing some work on implementing a new feature, I noticed that while the API explicitly refers to the returned IATA code as IATA, it appears to actually be returning the FAA code. An example can be seen with State College, PA which has UNV FAA code vs SCE IATA code. If you call the API using SCE it does not recognize the airport. If you call it with UNV, you receive the correct State College data with UNV returned as the IATA code. I've reached out to the API contact email address for clarification.

FWIW, this is outside of the "supported" functionality of the API, as State College is not listed as a supported airport. I do think that all of the supported airports have matching FAA and IATA codes, and so this may be a known (and not intended to be fixed) issue. If so I'll have to update documentation to resolve the discrepancy. While the FAA only supports data within the supported airports list, my aim is to support all airports for which the API returns data.

ntilley905 commented 3 years ago

In the ASWS source code, the IATA is just the code passed in in upper case, and the ICAO just adds a "K" to that. The source code also hasn't seen an update since 2017, so might just have to do a workaround here. I'll wait for a response from the API contact email to see if they have thoughts.