Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Heart rate in exported FIT files vary from the values shown on Garmin Connect

Rank

Total Posts: 1

Joined 2016-12-28

PM

Hi,

I've exported my daily activity of December 22, 2016 from the Garmin Connect site and trying to extract my heart rate values. I'm calculating the timestamp of the heart rate based on this post https://www.thisisant.com/forum/viewthread/6374/ but the date seems to be off.

Based on the Garmin Connect site, there was only one time where I had a harte rate of 111, which is at 1:40pm (13:40 CET) as seen in attachment hearrate_1340_111.png. The FIT files also provide only one heart rate value with 111, but with a completely different timestamp:
Monitoring:
   
Heart Rate111
   Time Stamp 16
64080
   Calculated Timestamp
Thu Dec 22 22:32:00 CET 2016 


Looking back at the Garmin Connect site again, I had a heart rate of 106 at this timestamp (attachment hearrate_2232_106.png).

My procedure for calculating the timestamp is as follows:
I have a member variable where the timestamp of the monitoring message will be set
monitoringMesgTimeStamp mesg.getTimestamp().getTimestamp(); 


when the message contains a heart rate, the timestamp will be calculated
if( mesg.getHeartRate() != null{
                System
.out.print( "   Heart Rate: " );
                
System.out.printlnmesg.getHeartRate() );
                
System.out.print( "   Time Stamp 16: " );
                
System.out.printlnmesg.getTimestamp16() );

                
Long heartRateTimeStamp monitoringMesgTimeStamp + (( mesg.getTimestamp16() - ( monitoringMesgTimeStamp 0xFFFF ) ) & 0xFFFF);
                
System.out.println"   Calculated Timestamp: " +  new DateTime(heartRateTimeStamp));
            


Is there something wrong with the way I'm calculating the values or does the Garmin Connect exported files are corrupt? Sadly, I could not attach the exported ZIP file to this post, but if required for further support, let me know.

Environment: Windows 10, Java 8 Update 73, IntelliJ 15.04

Thanks,
Patrick

UPDATE 1:
I've extracted the the whole day as csv file and created a diagram. The diagram generated in Excel looks similar to the one shown in Garmin Connect. The Excel version is more detailed as the FIT files provide the hear rate per minute while Garmin Connect shows the heart rate in a two minute interval, but every value seems to be off by 2 - 6 beats, as shown in attachment hearrate_diff.png. This raises the question whether Garmin Connect has problems in displaying the heart rate correctly or is there a problem with the export?      

Image Attachments

hearrate_1340_111.pnghearrate_2232_106.pngheartrate_diff.png

Click thumbnail to see full-size image

RankRankRank

Total Posts: 68

Joined 0

PM

I believe Garmin Connect performs a 2 minute average of heart rate data recorded in Monitoring Files      
Rank

Total Posts: 7

Joined 2017-02-08

PM

There is a "plugins" map with code for a plugin that does what you want?
(At least I hope, it didn't work for me but I'm using C++)