gps formats

1,678 views
Skip to first unread message

dsm

unread,
Jan 27, 2011, 1:52:40 AM1/27/11
to Gpsfly
First of all gpsfly is brilliant! Great idea and well executed. I love
the new analysis features.

I am using gpx and have created my own informal extensions for
recording things like the orientation sensor on an Android device.

so part of my file looks like

<orient x="18.00" y="-26.00" z="19.00"><time>2011-01-26T21:40:56.657Z</
time></orient>
<trkpt lat=" 38.432219514" lon=" -120.212227202"><ele> 61.00</
ele><time>2011-01-26T21:40:58Z</time></trkpt>
<accel x="3.3710361" y="3.8307226"
z="13.5990658"><time>2011-01-26T21:40:56.940Z</time></accel>
<magfield x="-28.80" y="4.00"
z="-54.80"><time>2011-01-26T21:40:56.960Z</time></magfield>

gps fly imports my gps files with these extensions just fine, but of
course ignores my extensions but correctly plots the trkpts. Good
job! thank you!

So this brings up three questions:

1) Is there a way to formally add these extensions to gpx
2) Is there a way to have gpsfly import and analyse the data in these
extensions
3) Can I help in any way to implement these features (I am a very
experienced programmer, but just learning JavaScript and jQuery.)

Thank you

David Maynard

stani

unread,
Jan 27, 2011, 1:29:22 PM1/27/11
to gps...@googlegroups.com
Hi David!

1) I believe the standard way is to add an extension data inside a trackpoint. For example this is a format used by garmin:

      <trkpt lon="-73.50453265942633" lat="40.674306554719806">
        <ele>7.800000190734863</ele>
        <time>2010-09-15T11:18:07.000Z</time>
        <extensions>
          <gpxtpx:TrackPointExtension>
            <gpxtpx:hr>98</gpxtpx:hr>
            <gpxtpx:cad>0</gpxtpx:cad>
          </gpxtpx:TrackPointExtension>
        </extensions>
      </trkpt>

"Extensions" tag is defined by the gpx standard, the garmin extensions are defined by another xml schema, referenced in the xml header like that:

<gpx version="1.1" creator="Garmin Connect"
  xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd"
  xmlns="http://www.topografix.com/GPX/1/1"
  xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
  xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


The important part here is that:

xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"

The definition is found here: http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd

So when our parser sees <gpxtpx:hr>100</gpxtpx:hr> it knows that this is a hearth rate in bpm.
Actually garmin's trackpointextension it's the only extension it recognizes now.

2) As you can see garmin's extension is limited. I don't know if there is a gpx extension that can handle all your data. If we want to handle any data, the best way is probably to define our own extension, then we can add any data to it. We can try to take garmin ext as base, then add more fields to it.

3) We were thinking to make an API, something simple to begin with, like authorization and upload. That can be used by people who make their own apps.

Thanks,
Stanislav

stani

unread,
Jan 31, 2011, 2:35:14 PM1/31/11
to Gpsfly
Hi David,

So we did something simple and now we need an example data to test it.
If you want you can try this:

In the gpx tag add this attribute:

xmlns:gf="http://gpsfly.org/xml/TrackPointExtension/v1"

Then add your data in inside trkpt tags like this (you can add also
other things that gf:accel and gf:orient too, important is to put
"gf:" in front of them)

<trkpt lat=" 37.412266880" lon=" -122.190563652">
<extensions>
<gf:TrackPointExtension>
<gf:orient x="18.00" y="-26.00" z="19.00"></gf:orient>
<gf:accel x="3.3710361" y="3.8307226" z="13.5990658"></gf:accel>
</gf:TrackPointExtension>
</extensions>

Then upload. It will not plot anything, but we can take it and try to
plot your data to see how it works.

Stanislav

On Jan 27, 7:29 pm, stani <stanislav.chach...@gmail.com> wrote:
> Hi David!
>
> 1) I believe the standard way is to add an extension data inside a
> trackpoint. For example this is a format used by garmin:
>
>       <trkpt lon="-73.50453265942633" lat="40.674306554719806">
>         <ele>7.800000190734863</ele>
>         <time>2010-09-15T11:18:07.000Z</time>
>         <extensions>
>           <gpxtpx:TrackPointExtension>
>             <gpxtpx:hr>98</gpxtpx:hr>
>             <gpxtpx:cad>0</gpxtpx:cad>
>           </gpxtpx:TrackPointExtension>
>         </extensions>
>       </trkpt>
>
> "Extensions" tag is defined by the gpx standard, the garmin extensions are
> defined by another xml schema, referenced in the xml header like that:
>
> <gpx version="1.1" creator="Garmin Connect"
>   xsi:schemaLocation="http://www.topografix.com/GPX/1/1http://www.topografix.com/GPX/1/1/gpx.xsdhttp://www.garmin.com/xmlschemas/GpxExtensions/v3http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsdhttp://www.garmin.com/xmlschemas/TrackPointExtension/v1http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd"
Reply all
Reply to author
Forward
0 new messages