alistairmgreen / jsigc

A browser-based viewer for gliding flight recorder logs.
https://alistairmgreen.github.io/jsigc/
MIT License
25 stars 11 forks source link

Cannot handle position fixes that appear out of time sequence #19

Closed alistairmgreen closed 8 years ago

alistairmgreen commented 8 years ago

Reported by @brisbori:

I've found another bug, but it could be someone else's. The attached file from the recent Queensland state championships shows it- load it in any version and look at the barogram.

To see what's happening, just load the IGC file into a text editor and search for "F0158232307160908271948". The surrounding B records show a negative time difference between successive fixes, which of course causes the parsePosition function to move the date on a day. This happens again during the flight.

Rather than think too hard about a fix I've taken a closer look. It looks like a group of six spurious fixes filling in in place of what should be six fixes in normal sequence. Position shown is identical in all the spurious fixes and the recording interval is 1 second, and consistent with where the glider was at the preceding fix, not where it was at the time shown on the iffy fix. I'm sure this is not how an approved logger should behave.

Other points: there are a lot of "V" fixes round there, suggesting the GPS is struggling. The Clearnav manual says it records and saves internally in a binary format so we could be looking at an artefact of the download software.

I've no access to SeeYou, but Tasknav shows the file normally with a gap at where the interpolation takes place. I've looked at other files from the competition (same pilot different days) and they are normal.

Possible actions:

  1. (Very easy). Ignore. Non-compliant files aren't our problem and it could be a one-off. Maybe put on the back burner in case it happens again.
  2. (Easy). Instead of just checking for a negative time change in the parsePosition function, check for a large negative change. Result will be a sensible looking display, with minor local inaccuracies.
  3. (slightly less easy) Identify time going backwards as evidence of a dodgy fix and reject.