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

Change track duration calculation #10

Closed
doc75 opened this issue Jul 25, 2015 · 1 comment
Closed

Change track duration calculation #10

doc75 opened this issue Jul 25, 2015 · 1 comment

Comments

@doc75
Copy link
Contributor

doc75 commented Jul 25, 2015

Hello,

I noticed that when a track contains several segments with a pause between the segment, then the duration is including the pause.
I would like to change that, by removing the pause in the calculation of duration (ultimate goal is to calculate average speed without pause)

I am just having some questions:

  1. Would it be acceptable Pulll Request or you consider pause being part of the track duration ?
  2. If this is acceptable, should we make the calculation only in gpx_file or should we delegate the calculation to segment and track class ?

I am willing to perform this modification. But I also want to prevent proposing a modification that would not be accepted ;-)

Let me know if anything is not clear.

@andrewhao
Copy link
Collaborator

@doc75 - good question. I'm open to both suggestions. As a runner myself, I prefer to not include track segment pauses, although this may matter to others who care about total duration between beginning and end.

What do you need duration for? In what manner are you using the GPXFile?

Could we possibly add an extra attribute on the GPXFile object? A moving duration (as opposed to the absolute duration)?

In terms of implementation, I would prefer each Segment be responsible for calculating its own duration, then have each successive container (Track, GPXFile) calculate its duration by aggregating the durations of their respective Segments.

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

No branches or pull requests

2 participants