-
Notifications
You must be signed in to change notification settings - Fork 22
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
polar_training2tcx fixes and improvements #39
base: master
Are you sure you want to change the base?
Changes from 2 commits
2726621
881f3d1
e979012
0037069
d7260b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ def output_tcx(parsed) | |
break | ||
end | ||
|
||
break if i >= samples_count && i >= route_samples_count | ||
break if i >= samples_count && route_i >= route_samples_count | ||
|
||
if !alt_offline || i > alt_offline.stop_index | ||
alt_offline = samples.altitude_offline.find { |off| off.start_index == i } || false | ||
|
@@ -173,14 +173,13 @@ def output_tcx(parsed) | |
} | ||
} | ||
end | ||
first_sample_with_gps = false if first_sample_with_gps | ||
}.xmlns = 'http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2' | ||
} | ||
|
||
i += 1 | ||
elapsed += recording_interval | ||
elapsed_with_pauses += recording_interval | ||
end | ||
}.xmlns = 'http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, Polar Flow does include the namespace for all , except the first one. Not sure why, maybe to please Strava too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it depends on the version and/or the platform of the PolarFlow app. I used their Windows applicaiton to load the trainings, and then downloaded the results via a browser. |
||
} | ||
end | ||
if (avg_speed && avg_speed > 0) || (avg_watts && avg_watts > 0) | ||
xml.Extensions { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like Polar Flow excludes the XML namespace of the first Trackpoint of each Track only. Strange!