GPX Data size efficiency

Former Member
Former Member

I know this subforum isn't meant to talk about any other dev stuff, but there is no dev forum other than this one.

I bought a Foretrex 601 out of curiosity.

It has a fairly limited memory (8mb).

It seems really strange to me to use GPX format that is xml/plain text to store data.

  • Generating routes on basecamp will generate a GPX file with startPoint and endPoint.

    • The .GPX will also include all the “segments” (where you need to turn, for example) between two points
    • The foretrex will NEVER read those points.
    • The data should either be stripped from the GPX or used by the GPS (second choice is probably better)
  • The files where routes/tracks are stored are GPX files (basically XML files)

    • Route line example (len=72 bytes): <gpxx:rpt lat="48.603794574737549" lon="1.569714546203613" />
      • Could be lowered to 16 bytes (2 x double) → 78% size reduction
    • Track line example (len=65 bytes): <trkpt lat="48.587400913238525" lon="1.572611331939697" />
      • Could be lowered to 16 bytes (2 x double) → 70% size reduction

Storing it in a proprietary format (binary one) would allow us to also reduce the time spend on parsing the file.

Is there a place we can download the Foretrex 601 firmware to work on something like that ?

  • Former Member
    Former Member over 5 years ago

    I wrote a POC of the proposed file format https://github.com/ExtReMLapin/bGPX_format

    Storing a 500km track takes around 1.633Mb out of 8 available Mb on the device.

    If storing it in a bGPX format the track takes only 197Kb (832% gain)

    Using double precision mode it takes 393Kb (416% gain)

  • Former Member
    Former Member over 5 years ago in reply to dpawlyk

    Oopsie, I meant the sourcecode.

  • The source code is proprietary. Garmin doesn't release it. It would be dumb of them to release it (or any firmware source).

    Which is the usual case for this kind of stuff. 

    Of course, you want the source. I was just showing the most you are going to get. Note that Garmin doesn't provide old versions of firmware ("perry" is a third party site).

    ======================

    On many units (other than hiking), Garmin uses the FIT format, which is a binary format and already an existing standard. These units convert gpx/tcx files into FIT. Your POC indicates what is already known about FIT files.

    The 601 seems to write FIT files but it's not clear that it can read them.

    =======================

    The Foretrex units seem like odd beasts. There are Garmin watches (more expensive) with more features. Seems like most people buying the Foretrexes like them the way they are.

    =======================

    "It seems really strange to me to use GPX format that is xml/plain text to store data."

    GPX is the most common format for this kind of data. Supporting this format instead of another isn't strange at all.

    Given that the data storage of the Foretrex is so limited, it's very likely that the memory for running the firmware is much more limited. That is, there might not be enough memory to support multiple file formats. If it can only support one format, GPX is going to be the most useful one.

    If the Foretrex can't read FIT files while being able to read them, keep in mind that it's much easier to create code to write data in a particular format than it is to create code that can read any file in the same format.

  • Former Member
    Former Member over 5 years ago in reply to dpawlyk

    Thank you for this detailed answer dpawlyk.

  • Former Member
    Former Member over 5 years ago

    If it can help any future person that had the same question : 

    Intel I found in the firmware : 

    It uses the following fit types : 

    • FIT_TYPE_2
      • Path : Garmin/Settings
      • Type : OutputFromUnit
    • FIT_TYPE_4
      • Path : Garmin/Activities
      • Type : OutputFromUnit
    • FIT_TYPE_8
      • Path : Garmin/Locations
      • Type : OutputFromUnit
    • FIT_TYPE_32
      • Path : GARMIN/MONITOR
      • Type : OutputFromUnit

    Please note the type is NEVER InputToUnit.

    Which means the Foretrex doesn’t read fit files, it only write them.