Skip to content
Permalink
Browse files

added v0.2 example and XSD files, with test script

  • Loading branch information...
dpeckham committed Jul 21, 2017
1 parent 96797a3 commit cdfebdbe42c025c67da44fade9c46e28bf62d620
Showing with 948 additions and 108 deletions.
  1. +6 −108 README.md
  2. +61 −0 example.gpx
  3. +788 −0 gpx.xsd
  4. +87 −0 openrally.xsd
  5. +1 −0 test.sh
  6. +5 −0 test_wrapper.xsd
114 README.md
@@ -25,119 +25,17 @@ For the latest news and announcements, subscribe to the OpenRally.org new mailin
## OpenRally Enhanced GPX Format v0.2-DRAFT
The new format exports formatted metadata about the route so that other applications can interpret the data directly, without elaborate string parsing. Standard GPX fields are not modified for computer consumption. The format has full support for WPM, WPE, WPS, DZ, FZ, neutralizations, ASS, DSS, Stops, Checkpoints and more.

###What's new in version 0.2-DRAFT:
##What's new in version 0.2-DRAFT:
* units specified in metadata extension (required)
* total distance specified in metadata extension (optional)
* waypoint distance added (optional)
* many additional tags for cross-country and road/stage rallies (thanks Rally Navigator)

```xml
<?xml version='1.0' encoding='UTF-8' standalone='no' ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:openrally="http://www.openrally.org/xmlschemas/GpxExtensions/v0.2-DRAFT" ... >
<metadata>
<extensions>
<openrally:units>metric</openrally:units>
<openrally:distance>33.86</openrally:distance>
</extensions>
</metadata>
##Check out example.gpx and openrally.xsd

<wpt ...>
<extensions>
<openrally:distance>0.35</openrally:distance>
<openrally:wpe/>
<openrally:dss/>
</extensions>
</wpt>
##Testing/validation
We test and validate using test.sh, which is just a wrapper around xmllint.

<wpt ...>
<extensions>
<openrally:dz/>
<openrally:speed>65</openrally:speed>
</extensions>
</wpt>
$ ./test.sh
example.gpx validates

<wpt ...>
<extensions>
<openrally:fz/>
</extensions>
</wpt>

<wpt ...>
<extensions>
<openrally:wpm open='800' clear='20'/>
</extensions>
</wpt>

<wpt ...>
<extensions>
<openrally:wps open='800' clear='20'/>
</extensions>
</wpt>

<wpt ...>
<extensions>
<openrally:stop/>
</extensions>
</wpt>

<wpt ...>
<extensions>
<openrally:checkpoint/>
</extensions>
</wpt>

<wpt ...>
<extensions>
<openrally:neutralization/>
</extensions>
</wpt>

<wpt ...>
<extensions>
<openrally:ass/>
</extensions>
</wpt>

<wpt ...>
<extensions>
<openrally:timecontrol/>
<openrally:startspecialstage/>
<openrally:finishspecialstage/>
<openrally:stopcontrol/>
<openrally:resettozero/>
<openrally:capheading/>
<openrally:gps/>
<openrally:passagecontrol/>
<openrally:fuel/>
<openrally:endfuel/>
<openrally:endofzone/>
<openrally:radio/>
<openrally:medical/>
<openrally:begintireservice/>
<openrally:endtireservice/>
<openrally:helicopter/>
<openrally:police/>
<openrally:fire/>
<openrally:medical/>
<openrally:media/>
<openrally:spectators/>
<openrally:toilets/>
<openrally:giveway/>
<openrally:sensitivezone/></p>
<openrally:onedanger/>
<openrally:twodanger/>
<openrally:threedanger/>
<openrally:startofassistance/>
<openrally:finishofassistance/>
<openrally:startofzone/>
<openrally:endofzone/>
<openrally:checkpoint/>
<openrally:waypointeclipse/>
<openrally:waypointsafety/>
<openrally:waypointmasked/>
<openrally:village/>
</extensions>
</wpt>

</gpx>
```
@@ -0,0 +1,61 @@
<?xml version='1.0' encoding='UTF-8' standalone='no' ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="OpenRally.org" xmlns:openrally="http://www.openrally.org/xmlschemas/GpxExtensions/v0.2-DRAFT">
<metadata>
<extensions>
<openrally:units>metric</openrally:units>
<openrally:distance>33.86</openrally:distance>
</extensions>
</metadata>
<wpt lat="0" lon="0">
<extensions>
<openrally:distance>0.35</openrally:distance>
<openrally:wpe/>
<openrally:dss/>
<openrally:dz/>
<openrally:speed>65</openrally:speed>
<openrally:fz/>
<openrally:wpm open='800' clear='20'/>
<openrally:wps open='800' clear='20'/>
<openrally:stop/>
<openrally:checkpoint/>
<openrally:neutralization/>
<openrally:ass/>
<openrally:timecontrol/>
<openrally:startspecialstage/>
<openrally:finishspecialstage/>
<openrally:stopcontrol/>
<openrally:resettozero/>
<openrally:capheading/>
<openrally:gps/>
<openrally:passagecontrol/>
<openrally:fuel/>
<openrally:endfuel/>
<openrally:endofzone/>
<openrally:radio/>
<openrally:medical/>
<openrally:begintireservice/>
<openrally:endtireservice/>
<openrally:helicopter/>
<openrally:police/>
<openrally:fire/>
<openrally:medical/>
<openrally:media/>
<openrally:spectators/>
<openrally:toilets/>
<openrally:giveway/>
<openrally:sensitivezone/>
<openrally:onedanger/>
<openrally:twodanger/>
<openrally:threedanger/>
<openrally:startofassistance/>
<openrally:finishofassistance/>
<openrally:startofzone/>
<openrally:endofzone/>
<openrally:checkpoint/>
<openrally:waypointeclipse/>
<openrally:waypointsafety/>
<openrally:waypointmasked/>
<openrally:village/>
</extensions>
</wpt>
</gpx>
Oops, something went wrong.

0 comments on commit cdfebdb

Please sign in to comment.
You can’t perform that action at this time.