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

garmin_fit does not support course_point types well #1182

Open
googol42 opened this issue Sep 17, 2023 · 4 comments
Open

garmin_fit does not support course_point types well #1182

googol42 opened this issue Sep 17, 2023 · 4 comments

Comments

@googol42
Copy link

Hello,

I am using gpsbabel to convert gpx files to fit. After some debugging I have found out that gpsbabel does not take the icon types into account when converting the gpx to fit.

I tried the following combinations in my gpx file:

  • sym tag with numeric type (e.g. <sym>3</sym> for water)
  • sym tag with lower case type (e.g. <sym>water</sym>)
  • sym tag with upper case type (e.g. <sym>WATER</sym>)
  • type tag with numeric type (e.g. <type>3</type>)
  • type tag with lower case type (e.g. <type>water</type>)
  • type tag with upper case type (e.g. <type>WATER</type>)

I then converted those 6 files to fit using gpsbabel -i gpx -f file_x.gpx -o garmin_fit -F file_x.fit

I then converted the fit files to csv using the FitCSVTool from the Fit/Garmin SDK (https://developer.garmin.com/fit/download/):

java -jar Downloads/FitSDKRelease_21.115.00/java/FitCSVTool.jar -b file_x.fit file_x.csv

Then I was sure that it must be an error in gpsbabel. I search your repository and found this line: https://github.com/GPSBabel/gpsbabel/blob/dfc770ac0a68a0827f89ddf8ef09c5766f16a53c/jeeps/gpscom.cc#L1282C5-L1282C34 I am not sure if this code is really used when converting....

I did not find any upstream repository for "jeeps" so I am reporting this here.

I would expect that when I convert a gpx file with a waypoint with <type>WATER</type> (or maybe <type>water</type>) to be converted to a course_point with type = 3

@googol42
Copy link
Author

Also the list of types is not complete (I know it is only a comment):

UC point_type; /* generic = 0,

A full list of types can be found in the mentioned SDK. Open FitSDKRelease_21.115.00/py/garmin_fit_sdk/profile.py and search for 'course_point': which gives you a list of 54 types.

@googol42 googol42 changed the title garmin_fit does not support course_point types garmin_fit does not support course_point types well Sep 17, 2023
@googol42
Copy link
Author

I figured out that the code is not called and found this:

// Try to find a better course point type than "generic", based on the

Unfortunately the intermediate "format" Waypoint does not support something like a type or symbol. The code above attempts (to some extend) to extract the type from the (short)name.

Could that be enhanced? For example: gpx waypoint has the name "water spring" or "WATER spring" the course_point is assigned type 3 and the name "spring". Or do you see any other way to around that limitation?

@tsteven4
Copy link
Collaborator

tsteven4 commented Oct 9, 2023

Unfortunately the intermediate "format" Waypoint does not support something like a type or symbol.

Actually, the gpx reader records the value of the sym element as the field icon_descr in the Waypoint class.

@GPSBabelDeveloper
Copy link
Collaborator

GPSBabelDeveloper commented Oct 10, 2023 via email

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

3 participants