[nSLUG] GPS Turn by Turn (Voice) and XML

David Potter dlpotter at eastlink.ca
Mon Jan 25 09:53:47 AST 2010


My Garmin Nuvi GPS turn by turn  (voice) directions were often (but not
always) using  "H W Y 111" instead of "Highway 111".

The gps has file in the following format...

 
<?xml version="1.0" encoding="UTF-8" ?>
<gtt xmlns="http://www.garmin.com/xmlschemas/GarminTextTranslation/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.garmin.com/xmlschemas/GarminTextTranslation/v1
http://www.garmin.com/xmlschemas/GarminTextTranslationv1.xsd" >
<hdr>
    <lang>British_English</lang>
    <desc>British English</desc>
    <type>Primary</type>
    <sort>0</sort>
    <cpage>65001</cpage>
    <pnum>006-D0897-01</pnum>
    <ver>2.60</ver>
    <upperkbrd>ABCDEFGHIJKLMNOPQRSTUVWXYZ</upperkbrd>
    <lowerkbrd>abcdefghijklmnopqrstuvwxyz</lowerkbrd>
</hdr>

<str>
    <tag>TXT_TRF_EVENT_0001_Q0_STR</tag>
    <txt>traffic problem</txt>
</str>
 
<str>
    <tag>TXT_TRF_EVENT_0024_Q0_STR</tag>
    <txt>bridge closed</txt>
</str>
 
<str>
    <tag>TXT_Hwy__STR</tag>
    <txt>Highway</tx>
</str>

<snip>

---------------

"Hwy" in the last item appears to provide string substitution, and also
seems to be case sensitive. A couple of weeks ago I edited the file to
add some additional variations and was mostly successful in having the
voice use "Highway" rather the "H W Y". The other day I happened to look
at the screen in the middle of another outburst of "H W Y" and noticed
the device was showing "HwY 111".....

Can anyone help me figure out some way to use regular expressions (?) in
the <tag> </tag> elements to sanitize case abnormalities and standardize
the result across different map data...?

David

-- 




More information about the nSLUG mailing list