pierremtb / easy-fit

Parse your .FIT files easily, directly from JS
Other
70 stars 51 forks source link

Add timer time to records #29

Open nholden opened 5 years ago

nholden commented 5 years ago

👋Hi! Thanks so much for this awesome library. It makes working with .FIT files a breeze. ✨

I noticed that records fields have an elapsed_time field that tells us how many seconds have passed since the start of the activity. I think it would be great if records also included a timer_time field that tells us the time on the device when the record happened.

This would be useful because I'll often stop my watch when I stop at a red light, for example, and start it when I begin moving again. Platforms like Garmin Connect and Strava use the time on the device, not the total elapsed time including the time the device was stopped, to calculate splits, and I'd like to do the same.

Happy to take a stab at this one! Just wanted to open an issue in case anyone had already started thinking about this or working on it.

Thanks again! ❤️

jimmykane commented 5 years ago

You can try my fork has many things updated plus the timer time

Screenshot 2019-03-19 at 08 45 14

https://github.com/jimmykane/fit-parser

nholden commented 5 years ago

Thanks, @jimmykane! I'll check it out. 👀

nholden commented 5 years ago

@jimmykane: Thanks again for pointing out your fork! I took a look at it today.

I do see the total_timer_time field for an activity like in your screenshot above. I was hoping to find timer_time fields for individual records, but I'm not seeing those. Here's what a record from your fork looks like:

Screen Shot 2019-03-24 at 10 54 36 AM

Do I need to do something special to get timer_time fields on individual records (and not just the whole activity)?

jimmykane commented 5 years ago

I checked and I cannot see in the fit sdk that there is timer_time for records. Also should that be there. There is already elapsed time.

Timer time should be in the totals message

Screenshot 2019-03-24 at 20 57 18
nholden commented 5 years ago

I checked and I cannot see in the fit sdk that there is timer_time for records. Also should that be there. There is already elapsed time.

That sounds right to me. I didn't see timer_time for records in the FIT SDK.

There also isn't an elapsed_time for records in the FIT SDK. That's something that this library adds. I'd like to do something similar to add timer_time for records. elapsed_time doesn't work for what I'm trying to accomplish because it includes pauses/rests.