GPX file error?

You want to get involved in the Opencaching Network?
Antworten
RVRoadTrip

This is beyond me but perhaps one of you can understand this.  A user submitted the following info about an error regarding "Founds". Can someone advise me as to what needs to be corrected and where?  Thank you.

RVRoadTrip
OCUS Admin


--------------------------
The GPX file being generated (not the GPX GC version) is using the wrong information for a found log.

This is xsd file for the file.
http://geocaching.com.au/geocache/1/geocache.xsd

Note the enumerated values for the log type.

 

Code: Alles auswählen

 <xsd:enumeration value="Found"/>
    <xsd:enumeration value="Didn't find it"/>
    <xsd:enumeration value="Not Attempted"/>
    <xsd:enumeration value="Note"/>
    <xsd:enumeration value="Other"/>
    <xsd:enumeration value="Will Attend"/>
    <xsd:enumeration value="Attended"/>
    <xsd:enumeration value="Publish Listing"/>
    <xsd:enumeration value="Retract Listing"/>
    <xsd:enumeration value="Needs Archived"/>
    <xsd:enumeration value="Temporarily Disable"/>
    <xsd:enumeration value="Enable Listing"/>
    <xsd:enumeration value="Needs Maintenance"/>
    <xsd:enumeration value="Owner Maintenance"/>
    <xsd:enumeration value="Webcam Photo Taken"/>
    <xsd:enumeration value="Archive"/>
    <xsd:enumeration value="Unarchive"/>


The enumeration for a found log is Found.
The GPX file being generated has Found it

Code: Alles auswählen

    <log id="206">
       <time>2010-10-04T12:30:00Z</time>
       <geocacher>NativTxn</geocacher>
       <type>Found it</type>
       <text>Loved it!&nbsp; I'm going to have to take my son by here</text>
    </log>


GSAK uses the enumeration of the field to match the log type, so Found it is NOT matched, so they get converted to notes.

If you can correct the GPX generator to generate the values according to the enumeration of the xsd, then GSAK will happily import the file with Found logs and you get the smiley face.
OlofL

Strange that I havn't got this error myself. Anyway to fix, open file:
lib/search.gpxgc.inc.php
around line 244 (in my version):
$gpxLogType[1] = 'Found it'; //OC: Found
Change this line to:
$gpxLogType[1] = 'Found'; //OC: Found

But I would test this on both older GSAK, the version this user is using and handheld devices before going live.
OlofL

Sorry, didn't notice this part:
The GPX file being generated (not the GPX GC version) i
The GPX without GC is disabled in our version, it wasn't usable in GSAK and in the GPS so we found no use for it. But it might be the same fix in your version, the one we have has already Found on this line (around line 174):
$gpxLogType[1] = 'Found';
RVRoadTrip

Thanks, hopefully that will solve the issue.

When editing that file I noticed a section that showed the various cache types. We have added several new cache types but I was not aware that the cache types were mentioned in these files. Will the new cache types not show up in the GPX files?
Schrottie

The current version of opencaching.de GPX will work with all known GPS and just as with any software. While the attributes are also availableat GC, they have the matching ID, all other have a fake ID to prevent confusions. Geokrety are also in the GPX file (trackable section). Exotic types of cache are declared as 'unknown' to prevent errors in GPS devices or software.
RVRoadTrip

How difficult would it be to add our additional cache types to the GPX files so they don't simply display as "unknown"? And explain it like I was a noob, because I am. :)
OlofL

It is easy to add them, but of little value since neither GSAK nor any GPS knows of our specific cache types. That is why they are listed as unknown or virtuals in the GPX, to make them usable.
RVRoadTrip

Fair enough, thanks!
faina09

Nice! now works fine with GSAK!!
But I have noticed that some caches (i.e. OC80FA, OC80FB and probably others) generate a GPX file with NO INFO (The file is closed immediatly after </keywords> with a </gpx>)
Schrottie

[quote="faina09"]
But I have noticed that some caches (i.e. OC80FA, OC80FB and probably others) generate a GPX file with NO INFO (The file is closed immediatly after </keywords> with a </gpx>)
[/quote]
Hmm. All caches listed in slovenia with a description marked as "german" are affected. Is the description language setted to english, the gpx file is correct. So I must consider if there is a correlation between language and description cache location.
oliver

The reason was that the caches had no vaild country assigned.
Antworten