-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong timestamp for HR based on event_timestamps (HRM Swim .fit files) #122
Comments
Hello. Is there anyone to confirm the issue or not? |
Hi @Kypaz I am looking at analysing "appended" hr data in fit files, did you ever get any futher with this? In my fitfile there are a few times where the "normal" hr data was received (because the heartrate strap and watch were out of the water for a short while). Looking at fitparse the appended hr records look like this:
So the pattern to me seems to be I get one "hr" record with a timestamp, then a whole bunch of "hr" records with filtered_bpm set and an increasing event_timestamp. Then the pattern repeats with a fresh record with timestamp, and the following "hr" records with filtered_bpm restart the event_timestamp at zero again. Comparing this to the output of the fit2csv tool from the fitsdk, I see the first few lines to look like this:
Note that I do not see multiple "event_timestamp" in records within one "filtered_bpm" through fitparse, unlike you seem to have? In the fit2csv tool I do see that "event_timestamp" is indeed multiple values. Some observations:
|
After some looking into this, these are my observations so far:
The corresponding fit2csv tool output for this record is
Note that fitparse starts the event_timestamps at zero after each resync, while fit2csv continues with absolute event_timestamp values. This is not a problem by itself, but fitparse also uses the wrong zero value for the event_timestamp, making it impossible to use the event_timestamps of the tupled filtered_bpm values: My questions currently are:
@polyvertex any thoughts? |
After some more analysis, I realized that the
As you can see only the Possibly this bug can be closed, saying that the If possible it would be nice if fitparse could properly decode+accumulate these values anyhow (even if they are not previously defined), as the fit2csv utility does, or otherwise discard them if they cannot be properly decoded due to a lack of definition. |
Hi,
I have tried recently to integrate HR data from 'hr' fields at the end of the .fit file, because that's what HRM Swim sensor do.
No problem about that, and I've come across #69, but I believe we retrieve directly a timestamp and no need to do specific treatment.
So basically inside 'hr' field, we have 8 'event_timestamp' with associated timestamp, and at the end an array of 8 bpm values, so it's quite easy to match.
Here's the problem : the timestamps seems "OK" but they do not quite match with the duration of the session.
I've attached a .fit file below, the maximum timestamp retrieved is 1567.8544921875 seconds = 26.11 minutes, but the overall duration of the session is 1h10
I believe all the bpm data are here, it's just that the timestamp associated are wrong
I think this issue was first adressed in #26 but close due to no example
hrmswim.fit.zip
@pR0Ps
Please ask if you need more information on my end
Thanks for the help !
Alexandre
[Edit : You can just import the .fit file into Garmin Connect or GoldenCheetah if you want to see the "real data", and the Heart Stream]
[Edit 2 : For reference, Golden Cheetah seems to do it here at 'decodeHr' method]
[Edit 3 : For reference as well, see 'Plugin Example (HR)' here
The text was updated successfully, but these errors were encountered: