Neoraptor reminded me that he and I had worked quite a bit on the script offline and went through a number of revisions that I never shared. Here's the latest v1.6. I hopefully captured the major changes in the changelog (shown in the comments at the beginning of the script) but I think I left some stuff out as I was getting ready for a race and got a bit tired of working on the script so I'll have to peruse our emails between each other to make sure. Regardless here are the logged changes since 1.2:
## Changes: 1.6 - Added time interpolation. Found that Dlog99 was dropping data
## when data points had the same time values, which they would
## as this script was setting empty time values to the last known
## good time value. To prevent the dropping I added a function
## that interpolates time for data points between logged time
## and sets the interpolated time values in the output.
## 1.5 - Removed second tag_junk_lines function call from main as it
## was redundant. Added options for new parameters mingps and
## disable-gps-cleanup. "--mingps=X" sets the minimum
## number of gps satellites required for gps data to be valid,
## defaults to 4. "--disable-gps-cleanup" will disable cleaning up
## by the data (defaults to false) and switch pre-cleanup to setting
## all gps values prior to the first good set to the same as the
## first good set. Added lots of output to the
## various data processing functions to indicate their status.
## Enabled the gps lat/long conversion from degrees to radians
## to make AEM/GEMS DA setup more seamless since they expect
## radians by default.
## 1.4 - Fixed an issue with how we fill in the blanks. We were filling
## in the blanks with last known good values, including "good"
## values from lines tagged for removal. Changed to ignore those
## lines so values from them don't corrupt the rest of the data.
## 1.3 - Added comments. Changed junk character handling from setting
## values to prior "good" values to instead just delete the
## offending lines. Also changed ctrl M stripping to be all
## elements as random ^M were screwing up other text matches.
## Moved the ^M stripping to earlier in the pipeline too.
Hmm re-reading my changelog notes makes me cringe
I am not a developer...