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

Fix polar_training2gpx having empty "samples" #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

embar-
Copy link
Contributor

@embar- embar- commented Aug 22, 2024

One more fix for #47 :
polar_training2gpx:33:in output_gpx': undefined method recording_interval' for nil:NilClass (NoMethodError)
This could happen if SAMPLES file not exist or has no data.

embar- added 3 commits August 21, 2024 18:49
Hope this will fix cmaion#47 :
polar_training2gpx:33:in `output_gpx': undefined method `recording_interval' for nil:NilClass (NoMethodError)
If one kind (e.g. cadence) of data is missing, all values are zeros for it, thus no need to to check for single values for export. If sometimes zero value is real data (e.g. temperature in winter) - it will not be skipped because we know that same array has also non-zero data.
@cmaion
Copy link
Owner

cmaion commented Aug 23, 2024

Hi,

Not sure you need any of this, now that you parse SAMPLES.BPB when SAMPLES.GZB is not present?

@embar-
Copy link
Contributor Author

embar- commented Aug 23, 2024

Initially this pull request #49 seemed as direct solution for #47 but now seems just polishing.
Although samples variable should be present (since you merged #48), but this #49 will be

  • prevention if for any reason SAMPLES would be missing,
  • also more precise GPS time-stamp (using route_samples.duration [if present] instead of samples.recording_interval,
  • better deal regarding export or not zero values).

Thus I still would like to see it merge though purpose is no longer #47 itself.

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.

2 participants