Support parsing .kml files from ADSBExchange#2
Open
stbentia wants to merge 1 commit intodscpsyl:mainfrom
Open
Conversation
ADSBExchange exported .kml files have two idiosyncrasies that require minor adjustments so FlightawareToForeflight will create valid ForeFlight G1000 files from ADSBExchange exports. 1) ADSBExchange lat/long have 6 decimal places but ForeFlight will not process files with more than 4 decimal places. 2) ADSBExchange time stamps have fractional seconds. The prior kml2g1000.py would crash with fractional seconds in input data. Also, the time that is exported time needs to not have fractional seconds for ForeFlight to be able to import the data properly. Note that currently option 2. "Find files directly on flightaware.com and option" 3. "Input a URL" fail to properly download and parse data from FlightAware.com. Although these changes do not attempt to fix those issues, they should not harm it either. Instead, with the code changes, one can use the Export KML feature on ADSBExchange to obtain similar results.
Author
|
Also, the groundspeed calculation is not accurate. It can be off by 35% or more especially if going east/west for calculations further from the equator. math.hypot(*[b - a for a, b in zip(fm, to)]) * 60.0 # nautical miles <-- this is not a good approximation because the distance of 1 degree of longitude shrinks as you move away from the equator toward the poles. Much better would be to use the Haversine formula: Or scale longitude delta as a function of latitude, such as: |
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.
ADSBExchange exported .kml files have two idiosyncrasies that require minor adjustments so FlightawareToForeflight will create valid ForeFlight G1000 files from ADSBExchange exports.
Note that currently option 2. "Find files directly on flightaware.com and option" 3. "Input a URL" fail to properly download and parse data from FlightAware.com. Although these changes do not attempt to fix those issues, they should not harm it either. Instead, with the code changes, one can use the Export KML feature on ADSBExchange to obtain similar results.