Garmin FIT file parsing issue

260 views
Skip to first unread message

Gareth Coco

unread,
Jun 2, 2010, 12:25:41 PM6/2/10
to golden-che...@googlegroups.com
Hi,

Is anyone else having a problem that when GC with mapping parses the
FIT file that there are one or two Long/Lat points that are incorrect?
In my case I have several files that when GC parses them there is a
point that the Long/Lat is two thirds or half the value of the
previous point. A GC export shows the following from two files:

File 1: GC export
<sample cad="79" watts="276" secs="1697" km="13.3504"
alt="308.4" lon="-73.307293939" lat="42.362043766" hr="152"
kph="27.3024" len="1"/>
<sample cad="79" watts="257.333" secs="1698" km="13.3572"
alt="308.4" lon="-48.871529293" lat="28.24136251" hr="152"
kph="27.4164" len="1"/>
<sample cad="79" watts="238.667" secs="1699" km="13.3641"
alt="308.4" lon="-24.435764646" lat="14.120681255" hr="152"
kph="27.5304" len="1"/>
<sample cad="79" watts="220" secs="1700" km="13.371"
alt="308.4" lon="0" lat="0" hr="152" kph="27.6444" len="1"/>
<sample cad="78" watts="250" secs="1701" km="13.3813"
alt="308.6" lon="-73.307495859" lat="42.361808569" hr="152"
kph="28.044" len="1"/>

File 2 - GC export
<sample cad="81" watts="85" secs="2315" km="19.0672" alt="457"
lon="-73.36402442" lat="42.432240696" hr="156" kph="35.604" len="1"/>
<sample cad="81.5" watts="83" secs="2316" km="19.0758"
alt="457" lon="-36.68201221" lat="21.216120348" hr="155" kph="35.8542"
len="1"/>
<sample cad="82" watts="81" secs="2317" km="19.0844" alt="457"
lon="0" lat="0" hr="154" kph="36.1044" len="1"/>
<sample cad="83" watts="93" secs="2318" km="19.0965"
alt="456.8" lon="-73.363762653" lat="42.432053863" hr="154"
kph="36.36" len="1"/>

The map view for the first file and the actual FIT file are attached.

Anyone else? Thoughts on why the parser is doing this? Garmin Connect
does not show the problem.

2010-05-23-13-26-03.fit
FIT-parse-error-map.jpg

Jamie Kimberley

unread,
Jun 2, 2010, 12:48:44 PM6/2/10
to Gareth Coco, golden-che...@googlegroups.com
Garreth,

I've seen issues similar to this. I'm not sure if it is the parser,
or if there is a problem with the data itself. Garmin's interpreter
might be using some logic to fix up the data. can you find the same
samples in a tcx file exported? You might see that the data is bad
and has been replaced with the same GPS coordinates of the
preceding "good" coordinates.

This may be one step in finding out the issue.

Jamie

> --
> _______________________________________________
> Golden-Cheetah-Users mailing list
> golden-che...@googlegroups.com
> http://groups.google.com/group/golden-cheetah-users?hl=en

"You don't use science to show that you're right, you use science to
become right."--xkcd
__________________
Jamie Kimberley
Postdoctoral Fellow
Department of Mechanical Engineering
The Johns Hopkins University
Office: 410.516.5162
Mobile: 217.621.8272
Fax: 410.516.4316
E-Mail:jamie.k...@jhu.edu

Gareth Coco

unread,
Jun 2, 2010, 1:01:59 PM6/2/10
to Jamie Kimberley, golden-che...@googlegroups.com
Okay. From the TCX file for the same FIT file:

<Trackpoint>
<Time>2010-05-25T22:00:07.000Z</Time>
<Position>
<LatitudeDegrees>42.432240676134825</LatitudeDegrees>
<LongitudeDegrees>-73.3640243858099</LongitudeDegrees>
</Position>
<AltitudeMeters>453.79998779296875</AltitudeMeters>
<DistanceMeters>19067.16015625</DistanceMeters>
<HeartRateBpm>
<Value>156</Value>
</HeartRateBpm>
<Cadence>81</Cadence>
<Extensions>
<ns3:TPX>
<ns3:Speed>9.890000343322754</ns3:Speed>
<ns3:Watts>85</ns3:Watts>
</ns3:TPX>
</Extensions>
</Trackpoint>
<Trackpoint>
<Time>2010-05-25T22:00:09.000Z</Time>
<AltitudeMeters>457.0</AltitudeMeters>
<DistanceMeters>19086.33984375</DistanceMeters>
<HeartRateBpm>
<Value>154</Value>
</HeartRateBpm>
<Cadence>82</Cadence>
<Extensions>
<ns3:TPX>
<ns3:Speed>10.029000282287598</ns3:Speed>
<ns3:Watts>81</ns3:Watts>
</ns3:TPX>
</Extensions>
</Trackpoint>

So two things are happening.
1. There looks like a missed record (no
Time>2010-05-25T22:00:08.000Z</Time> record.
2. The Time>2010-05-25T22:00:09.000Z</Time> has no Long/Lat data. The
next record does.

Guessing that this is the problem. No to look a the parser code and see why.

Gareth Coco

unread,
Jun 2, 2010, 1:10:29 PM6/2/10
to Jamie Kimberley, golden-che...@googlegroups.com
Okay. Looking at the FIT file parser the missed record is treated like
smart recording and an average of the last data records is performed.
Some logic change maybe required to fix this in the long term. I guess
at the moment I can just export to GC and correct the data.

Jamie Kimberley

unread,
Jun 2, 2010, 2:04:09 PM6/2/10
to Gareth Coco, golden-che...@googlegroups.com
Gareth. Good catch. Please file a bug report on the the tracker
detailing what you've found. Isuppose thAt we could not imterpolate
gps data for smart recorded files. That is create points with speed,
time etc but with no gps data.

Reply all
Reply to author
Forward
0 new messages