mrkeuz / ttgpslogger

Automatically exported from code.google.com/p/ttgpslogger
0 stars 0 forks source link

GPX fields are written in wrong order. #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

GPX files are currently written with the <time> field before the <ele> 
field 

For example:

          <trkpt lon="-3.816735" lat="54.328072">
            <time>2010-03-01T20:56:44Z</time> 
            <ele>101.5</ele> 
            <fix>3d</fix> 
            <sat>7</sat> 
            <hdop>1.35</hdop> 
            <vdop>0.94</vdop> 
            <pdop>1.64</pdop> 
            </trkpt>

but the schema says: 

<!--  elements must appear in this order 
  --> 
- <!--  Position info 
  --> 
  <xsd:element name="ele" type="xsd:decimal" minOccurs="0" /> 
  <xsd:element name="time" type="xsd:dateTime" minOccurs="0" /> 

etc etc

What is the expected output? What do you see instead?

<ele> then <time>

What version of the product are you using? On what operating system?

TTGPSLogger V0.4 beta (For Symbian S60 3rd FP2)

Please provide any additional information below.

Any program (for example Garmin's Mapsource) that validates the file 
against its schema will fail to load it.

(The 'official' test for a valid GPX file, is that it should validate 
against the schema: See http://www.topografix.com/gpx_validation.asp)

Original issue reported on code.google.com by horn...@gmail.com on 2 Mar 2010 at 12:14

GoogleCodeExporter commented 9 years ago
Should be easy to fix, they have only reorder this in 
"TTGPSLoggerRecorderFormatGPX.cpp".

OLD:
if 
(iEngine->Settings()->GPXTags(CTTGPSLoggerSettingsData::ETTGPSLoggerSettingsGPXT
agsIndexTime))
                {
            aBody.Append(_L8("        <time>"));
            TTGPSLoggerCommon::AppendFormatGPXTimeStampL(aBody, aPositionData->SatelliteTime());
            aBody.Append(_L8("</time>\n"));
                }
        if (iEngine->Settings()->GPXTags(CTTGPSLoggerSettingsData::ETTGPSLoggerSettingsGPXTagsIndexEle) && !Math::IsNaN(aPositionData->Position().Altitude()))
            {
            aBody.AppendFormat(_L8("        <ele>%.1f</ele>\n"), aPositionData->Position().Altitude());
            }

NEW:
if 
(iEngine->Settings()->GPXTags(CTTGPSLoggerSettingsData::ETTGPSLoggerSettingsGPXT
agsIndexEle) && !Math::IsNaN(aPositionData->Position().Altitude()))
            {
            aBody.AppendFormat(_L8("        <ele>%.1f</ele>\n"), aPositionData->Position().Altitude());
            }
if 
(iEngine->Settings()->GPXTags(CTTGPSLoggerSettingsData::ETTGPSLoggerSettingsGPXT
agsIndexTime))
                {
            aBody.Append(_L8("        <time>"));
            TTGPSLoggerCommon::AppendFormatGPXTimeStampL(aBody, aPositionData->SatelliteTime());
            aBody.Append(_L8("</time>\n"));
                }

Original comment by andre.tippel@googlemail.com on 4 Aug 2010 at 5:39

GoogleCodeExporter commented 9 years ago
Yes, this bug should be fixed.
The <time> field should be after the <ele> field. With the current order the 
GPX file is registered like "not supported" format by the most mapping and POI 
managing programs, like Garmin MapSource. 

Original comment by tro...@gmail.com on 12 Oct 2010 at 2:27

GoogleCodeExporter commented 9 years ago
I fixed this issue and issue 2. Look at my posts at issue 2 there i describe 
how i fixed them.

I provide a fixed binary version at http://www.datenmuehle.kilu.de/TTGPSLogger

Original comment by andre.tippel@googlemail.com on 14 Oct 2010 at 8:43

GoogleCodeExporter commented 9 years ago
andre, could you please provide a fixed binary for S60v32 as well?

Original comment by petsk...@gmail.com on 23 Jan 2011 at 7:23

GoogleCodeExporter commented 9 years ago
Give me some time to download and setup the v3 FP2 sdk and i will try to build 
a fixed version.

Original comment by andre.tippel@googlemail.com on 23 Jan 2011 at 9:07

GoogleCodeExporter commented 9 years ago
It's done, I test it in the emulator and it seems it works. You find it here 
--> http://www.datenmuehle.kilu.de/TTGPSLogger

Original comment by andre.tippel@googlemail.com on 23 Jan 2011 at 6:40

GoogleCodeExporter commented 9 years ago
It's working well. Thank you for the quick work.

Original comment by petsk...@gmail.com on 23 Jan 2011 at 8:28