Skip to content
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

Add timer_time field to record #32

Closed
wants to merge 1 commit into from
Closed

Add timer_time field to record #32

wants to merge 1 commit into from

Conversation

nholden
Copy link

@nholden nholden commented Mar 24, 2019

Currently, records fields have an elapsed_time field that tells us how many seconds have passed since the start of the activity.

This change adds a timer_time field to records. It's different from elapsed_time because elapsed_time tells us the total time that has passed since the activity started, including pauses/rests. timer_time that tells us the time shown on the device when the record happened.

Example record payloads

Before this change

{
  "timestamp": "2019-03-09T18:36:11.000Z",
  "elapsed_time": 4569,
  "position_lat": 32.75025587528944,
  "position_long": -117.13018745183945,
  "distance": 14.16679,
  "altitude": 0.11679999999999996,
  "speed": 8.686285714285715,
  "heart_rate": 150,
  "cadence": 81,
  "temperature": 15,
  "fractional_cadence": 0
}

After this change

{
  "timestamp": "2019-03-09T18:36:11.000Z",
  "elapsed_time": 4569,
  "timer_time": 4480,
  "position_lat": 32.75025587528944,
  "position_long": -117.13018745183945,
  "distance": 14.16679,
  "altitude": 0.11679999999999996,
  "speed": 8.686285714285715,
  "heart_rate": 150,
  "cadence": 81,
  "temperature": 15,
  "fractional_cadence": 0
}

closes #29

Currently, `records` fields have an `elapsed_time` field that tells us 
how many seconds have passed since the start of the activity.

This change adds a `timer_time` field to `records`. It's different from 
`elapsed_time` because `elapsed_time` tells us the total time that has 
passed since the activity started, including pauses/rests. `timer_time` 
that tells us the time shown on the device when the record happened.

closes #29
- `true`: Includes a `elapsed_time` field inside each `record` field, containing the elapsed time in seconds since the first record (**default**)
- `false`
- `true`: Includes `elapsed_time`, containing the elapsed time in seconds since the first record, and `timer_time`, containing the time shown on the device, inside each `record` field
- `false` (**default**)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like false is the default.

@jimmykane
Copy link

@nholden I have "merged" this to the repo https://github.com/jimmykane/fit-parser
It's different npm package to since I cannot update this lib.
That package is a fork of this one, no modification except updates on FIT SDK and the contributions.

@nholden nholden closed this May 13, 2020
@nholden nholden deleted the timer-time branch May 13, 2020 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add timer time to records
2 participants