jpretori / SoaringCoach

Soaring Coach aims to help pilots improve their soaring performance by intelligently analysing IGC files.
GNU Affero General Public License v3.0
4 stars 3 forks source link

Invalid fixes are not flitered out #60

Closed jpretori closed 6 years ago

jpretori commented 6 years ago

The file referenced in Issue #59, when analysed by Soaring Coach results in a reported flight track distance of over 6000km, and the first straight phase of a distance over 5500km. This is because the first few B records in the IGC file are recorded with all zero's latitude and longitude while the device initialises.

According to the FAI IGC spec, valid records will have "A" set as the fix validity flag:

Use A for a 3D fix and V for a 2D fix (noGPSaltitude)orfornoGPSdata (pressure altitude data must continue to be recorded using UTC times from the RTC)

Therefore, all records that have any value other than "A" in there should be discarded.

The attached flight demonstrates this problem: 768v19a2.igc.zip

IGC file used: https://skylines.aero/files/768v19a2.igc Flight: https://skylines.aero/flights/77585