I am currently parsing pool swim activity FIT files through the official Javascript SDK (https://github.com/garmin/fit-javascript-sdk). I have been unable to find any way of extracting the fine-grained heart rate data that I can see on Garmin Connect. I can see are Time In Zone and Lap message entries with summarized HR data, but nothing that gives me the fine grained data points I see in the graph below (the graph below is what I see for the same FIT file I'm processing that I downloaded from my personal Garmin Connect account):
I don't have this issue w/ open water swims as those consist of Record messages that contain the heart rate (however, pool swims lack those message types).
Here is how I am initializing the decoder:
let decoder = new Decoder(file_stream); const { messages, errors } = decoder.read({ mesgListener: fit_message_stream_listener.get_stream_listener(), applyScaleAndOffset: true, expandSubFields: true, expandComponents: true, convertTypesToStrings: true, convertDateTimesToDates: true, includeUnknownData: true, mergeHeartRates: true });
Any suggestions on how I can get this data? Is this a current limitation of the JavaScript SDK? Any other recommended ways of extracting this data?
PS. I am using this logic in a Garmin sync endpoint for our product. I would ideally like to keep the solution within the JavaScript domain, but open to other options. Thank you!