Contact   Imprint   Advertising   Guidelines

I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

A forum dedicated to Hydrofoil riders
User avatar
tkaraszewski
Very Frequent Poster
Posts: 727
Joined: Tue Aug 07, 2018 7:03 pm
Kiting since: 2015
Local Beach: Hood River/Caribbean
Style: Hydrofoil
Gear: Ozone/Levitaz
Brand Affiliation: None
Has thanked: 52 times
Been thanked: 210 times

I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby tkaraszewski » Wed Apr 17, 2019 8:08 pm

This will be of interest primarily to racers and people with an interest in efficiency. I do not race kitefoils, only freeride (so far), but I have been racing sailboats for years, and that's where my interest in these diagrams comes from.

This tool is setup specifically to work with the recording devices that are accessible to kitesurfers, namely GPS-enabled smartwatches. For this reason, the tool requires you to enter the wind direction manually, as there are no readily available wind instruments to record apparent wind angle for kiteboards.

As an example of the output, here's a track recorded on Moses 683 wing and a 9m F-one Bandit in ~18-20 knots of wind:

Image

And here's one from a 10m Slingshot SST and a surfboard in the same conditions:

Image

The numbers are speeds in knots. The red area shows VMG up and downwind. The blue area shows actual board speed for every angle relative to the wind.

These were recorded in a river where the current flows upwind, so the VMG looks better than it would in still water.

The accuracy of the graph depends on the consistency of the wind. The shiftier the wind, the less accurate the graph (it will look as if your tack and gybe angles are narrower than they really are) because the tool has no way of knowing the precise wind direction at any given moment along the track. Still, it's useful for comparing different equipment in similar conditions.

You can use the tool yourself here: http://www.tylerkaraszewski.com/polars.html

You can see the code for the tool here: https://github.com/tylerkaraszewski/gpx_polars/

Let me know if you find this interesting, have questions, or discover any bugs or problems with it!
These users thanked the author tkaraszewski for the post (total 5):
davesails7 (Wed Apr 17, 2019 9:45 pm) • Saxon (Wed Apr 17, 2019 10:01 pm) • BraCuru (Thu Apr 18, 2019 8:08 am) • lederhosen (Thu Apr 18, 2019 9:04 am) • bouclette (Sun Apr 21, 2019 10:28 pm)
Rating: 15.15%

User avatar
davesails7
Very Frequent Poster
Posts: 2220
Joined: Sun Apr 01, 2007 7:36 pm
Kiting since: 2006
Weight: 75 kg
Local Beach: Virginia Beach
Style: Race
Gear: ML B3
R1V2 11. VMG 13, 15, 18
OR Mako 130x35
Brand Affiliation: None
Has thanked: 10 times
Been thanked: 22 times

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby davesails7 » Wed Apr 17, 2019 9:41 pm

That is exactly what I've been looking for! Thanks!!!!

I used to use the GPS Action Replay program, but for some reason I've never been able to get it to work on my new computer.

If you're looking for other things to add, the only other thing GPS Action Replay had was the ability to plot two GPX files on one plot so you can compare different gear. I believe the second GPX just goes on as a dotted line

User avatar
Saxon
Rare Poster
Posts: 6
Joined: Fri Jul 31, 2015 7:20 am
Local Beach: Ocean Beach
Style: Surf
Gear: RPM
Brand Affiliation: None
Has thanked: 1 time
Been thanked: 0

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby Saxon » Wed Apr 17, 2019 10:01 pm

This is awesome!

User avatar
tkaraszewski
Very Frequent Poster
Posts: 727
Joined: Tue Aug 07, 2018 7:03 pm
Kiting since: 2015
Local Beach: Hood River/Caribbean
Style: Hydrofoil
Gear: Ozone/Levitaz
Brand Affiliation: None
Has thanked: 52 times
Been thanked: 210 times

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby tkaraszewski » Wed Apr 17, 2019 11:46 pm

davesails7 wrote:
Wed Apr 17, 2019 9:41 pm
That is exactly what I've been looking for! Thanks!!!!

I used to use the GPS Action Replay program, but for some reason I've never been able to get it to work on my new computer.

If you're looking for other things to add, the only other thing GPS Action Replay had was the ability to plot two GPX files on one plot so you can compare different gear. I believe the second GPX just goes on as a dotted line
Let me know if it works well for you. GPS Action Replay is the only other publicly-available software I know of that does this, and for just this functionality, I found it overly complex and not that great. I wanted something that was simple to use and that I could customize to work exactly as needed. I'm happy to take community feedback for features and settings if enough people are interested in using it.

Do you prefer the dotted line over the the top of the existing plot more than just having two plots side-by-side?

User avatar
davesails7
Very Frequent Poster
Posts: 2220
Joined: Sun Apr 01, 2007 7:36 pm
Kiting since: 2006
Weight: 75 kg
Local Beach: Virginia Beach
Style: Race
Gear: ML B3
R1V2 11. VMG 13, 15, 18
OR Mako 130x35
Brand Affiliation: None
Has thanked: 10 times
Been thanked: 22 times

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby davesails7 » Thu Apr 18, 2019 1:20 am

tkaraszewski wrote:
Wed Apr 17, 2019 11:46 pm
Do you prefer the dotted line over the the top of the existing plot more than just having two plots side-by-side?
Yeah, I like to be able to plot them on top of eachother for a direct comparison.

What speeds show up on the plot? Are these instantaneous or average over a certain amount of time?

Thanks again!

User avatar
tkaraszewski
Very Frequent Poster
Posts: 727
Joined: Tue Aug 07, 2018 7:03 pm
Kiting since: 2015
Local Beach: Hood River/Caribbean
Style: Hydrofoil
Gear: Ozone/Levitaz
Brand Affiliation: None
Has thanked: 52 times
Been thanked: 210 times

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby tkaraszewski » Thu Apr 18, 2019 5:49 am

davesails7 wrote:
Thu Apr 18, 2019 1:20 am
tkaraszewski wrote:
Wed Apr 17, 2019 11:46 pm
Do you prefer the dotted line over the the top of the existing plot more than just having two plots side-by-side?
What speeds show up on the plot? Are these instantaneous or average over a certain amount of time?
Well, I'll explain how it works. I'm open to changing this or making it configurable if it makes more sense.

First, it requires a basic understanding of what data is in a GPX file. The file is basically just a list of points, each with a time. To compute speed, you take the distance between two successive points, and the time between two successive points, and then you've got a speed. You can also compute the angle between two points to get a heading.

The most common time interval to record between points is 1 second, but the GPX file allows for any time interval. Many Garmin devices support "smart recording" that uses longer intervals with fewer points, if it looks like you've been going straight at about the same speed for the whole time (tip - for better accuracy on your Garmin smartwatch, change this to "every second" recording).

So, you end up with a list of segments that have a speed, and a direction. I then group these into "buckets" of three degrees of angle, i.e, every segment between 0 and 3 degrees is counted together. Every segment between 3 and 6 degrees is grouped, etc, through the last group of 357 to 360.

Then, for each degree group, we have some number of segments, all of which are in approximately the same heading (+ or - 1.5 degrees from the middle), and we take the three fastest segments, and average those. This is intended to be a "smoothed" highest speed that you can maintain in the given direction (if there are less than 3 segments for a given angle, only the existing ones are averaged).

Then these highest averages are plotted on the circular plot.

I hope that makes sense. The number "3" in both cases was chosen somewhat arbitrarily, by looking at some example tracks and seeing how many data points you'd get for each direction, and trying to make sure you'd have enough to come up with numbers to average for a best speed.

You could, for instance, use 1-degree buckets, and you'd have more resolution, but you'd see a graph with a more "jagged" outline, as there might not be enough data at any given angle to smooth nicely. This would be an easy setting to add to an "advanced options" panel, probably.

Anyway, that's how it currently works, I'm open to alternative solutions if they seem better, but I think that most other solutions are going to have trade-offs that end up with very similar results.

Momo_13
Rare Poster
Posts: 14
Joined: Thu Oct 17, 2013 11:05 am
Local Beach: Marseille, FR
Favorite Beaches: Marseille, FR
Style: Freeride, race, foil
Gear: Board : Ocean Rodeo Mako 150*35, Spotz 2013 foil , previously Cabrinha Raceboard 2011 183*59
Kite : Flysurfer Sonic1 11, Sonic2 9, Genetrix Hydra 8V5, Cronix 6. Previously Dyno 18 2011, Speed3 12, Speed2 10, Speed4 10, Speed4 8, Hydra 7 V4
Brand Affiliation: None
Has thanked: 1 time
Been thanked: 2 times

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby Momo_13 » Thu Apr 18, 2019 3:25 pm

Hi,
I didn't tried your tool, but I like the website below which doesn't need any registration :

Ex with one random trace :
http://regepe.com/showmap/ed53d44ebaa94

You can setup wind direction manualy in case the calculated one is wrong
Sadely, the VMG is only calculated upwind. But you can shift the wind direction to 180° to have it downwind

zerogee_ca
Very Frequent Poster
Posts: 551
Joined: Sat Mar 13, 2004 6:18 am
Brand Affiliation: None
Location: Winnipeg, Canada
Has thanked: 8 times
Been thanked: 10 times

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby zerogee_ca » Thu Apr 18, 2019 5:47 pm


TomW
Very Frequent Poster
Posts: 3585
Joined: Wed Oct 05, 2005 6:43 pm
Kiting since: 2001
Local Beach: Vejbystrand, Lomma
Gear: TW Surfboards hydrofoil board 110
Gong Veloce M, 100cm carbon mast
Ozone Hyperlink V1 7m
Hyperlink V2 9m, 13m
Concept Air Wave 4,5m
Brand Affiliation: None
Location: Sweden
Has thanked: 53 times
Been thanked: 193 times

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby TomW » Fri Apr 19, 2019 11:49 am

How do extrakt gpx File from Garmin connect?

Oh I see , have to sit down at a computer....

User avatar
tkaraszewski
Very Frequent Poster
Posts: 727
Joined: Tue Aug 07, 2018 7:03 pm
Kiting since: 2015
Local Beach: Hood River/Caribbean
Style: Hydrofoil
Gear: Ozone/Levitaz
Brand Affiliation: None
Has thanked: 52 times
Been thanked: 210 times

Re: I made a tool for turning Garmin/Strava GPX tracks in to polars diagrams

Postby tkaraszewski » Fri Apr 19, 2019 4:29 pm

TomW wrote:
Fri Apr 19, 2019 11:49 am
How do extrakt gpx File from Garmin connect?

Oh I see , have to sit down at a computer....
Yeah, while this page works on mobile, getting GPX files on mobile can be tough (seems easier on android than iOS).


Return to “Hydrofoil”

Who is online

Users browsing this forum: No registered users and 420 guests