Skip to content

Commit

Permalink
Pick up fit locations test case (#766)
Browse files Browse the repository at this point in the history
* Add support for Locations.fit files

* patch by tsteven4 to address review comments

* Add a test case for Locations.fit files from Garmin devices

Co-authored-by: Fabrizio Gennari <fabrizio.ge@tiscali.it>
  • Loading branch information
tsteven4 and fabzzap authored Nov 19, 2021
1 parent 368ad39 commit 67ad13d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
Binary file added reference/track/fitlocations-sample.fit
Binary file not shown.
17 changes: 17 additions & 0 deletions reference/track/fitlocations-sample.gpx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - https://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
<time>1970-01-01T00:00:00Z</time>
<bounds minlat="40.321111679" minlon="5.179891856" maxlat="52.178867133" maxlon="9.332499504"/>
<wpt lat="52.178867133" lon="5.179891856">
<name>Posizione 008</name>
<cmt>Posizione 008</cmt>
<desc>Posizione 008</desc>
</wpt>
<wpt lat="40.321111679" lon="9.332499504">
<ele>531.200</ele>
<name>Via Sebastiano </name>
<cmt>Some random position in the centre of a small tow</cmt>
<desc>Some random position in the centre of a small tow</desc>
</wpt>
<trk/>
</gpx>
4 changes: 4 additions & 0 deletions testo.d/garmin_fit.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ compare ${REFERENCE}/track/garmin-oregon-700-output.gpx ${TMPDIR}/fit-sample-gar
gpsbabel -i garmin_fit,recoverymode -f ${REFERENCE}/track/lezyne_super_gps-garmin_fit-sample-bad-endian.fit -o gpx -F ${TMPDIR}/lezyne_super_gps-garmin_fit-sample-bad-endian.gpx 2>/dev/null
compare ${REFERENCE}/track/lezyne_super_gps-garmin_fit-sample-bad-endian.gpx ${TMPDIR}/lezyne_super_gps-garmin_fit-sample-bad-endian.gpx

# fitlocations-sample.fit is from a Garmin Edge Explore, edited to remove sensitive data.
gpsbabel -i garmin_fit -f ${REFERENCE}/track/fitlocations-sample.fit -o gpx -F ${TMPDIR}/fitlocations-sample.gpx
compare ${REFERENCE}/track/fitlocations-sample.gpx ${TMPDIR}/fitlocations-sample.gpx

gpsbabel -i garmin_fit -f ${REFERENCE}/Lctns_Instinct.fit -o unicsv,utc=0 -F ${TMPDIR}/Lctns_Instinct.csv
compare ${REFERENCE}/Lctns_Instinct.csv ${TMPDIR}/Lctns_Instinct.csv

Expand Down

0 comments on commit 67ad13d

Please sign in to comment.