etoumey / tripy

Python TRIMP calculator and training companion for running.
3 stars 0 forks source link

Handle gpx files with mismatching time and HR data points #10

Closed etoumey closed 5 years ago

etoumey commented 5 years ago

Occasionally HR data drops during a run. This results in lists of different length for time and HR. During parsing, logic needs to be implemented to identify and correct for these drops.

One idea: Parse each <trkpt> section as a whole and identify if a <ns3:hr> tag is missing, interpolate the missing data.

I will need to investigate more to find what's causing this. It appears to have popped up immediately following a stop/start of my watch.

image

etoumey commented 5 years ago

If it is around stop/start, we do not want to interpolate as HR is likely dropping... Maybe the time data just needs to not be save.

This could have ramifications on the TRIMP calculation. Especially if "smart" data-recording is supported.

etoumey commented 5 years ago

Put in a fix in parseFile. It's not really pretty, but it works.