alistairmgreen / jsigc

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

Support for the date format of XCTrack #21

Closed w1ndbell closed 2 years ago

w1ndbell commented 2 years ago

XCTrack records the date as "HFDTEDATE:ddmmyy,xx" (xx is digits and can be ignored), and then the parseigc.js throws IGCException: "The file does not contain a date header.". You can download the example of igc file from here. I added an alternative process of date record for XCTrack format. As it is my first pull request ever, there can be some errors. Thank you.

alistairmgreen commented 2 years ago

Hello,

Thanks for bringing this to my attention.

I think that there is a simpler way to fix this without writing a new function for XCTrack dates. Instead we can change the regular expression to work with both formats. Could you please check whether this version works? https://github.com/alistairmgreen/jsigc/pull/22/files

(I haven't deployed the change to GitHub Pages yet.)

w1ndbell commented 2 years ago

Hi,

It seems to work properly! Thank you for your great work!

alistairmgreen commented 2 years ago

@w1ndbell the change to support the XCTrack format is now live.