[GRASS5] Need help converting GPS waypoint data

I'm trying to overlay some GPS waypoints onto a city street map. The GPS drive test data has somehow formed a mirror image (flipped in the east-west direction). And it's shifted several miles due east.

All I have are cryptic GPS files like the excerpt you see below, and not much else. Using C++ code, I'm reading in the $G lines, and interpreting the 4th and 5th fields in various ways. I've tried Decimal Degrees, Degrees + Decimal Minutes (with the degrees being the most significant digits), and Degrees, Minutes, and Decimal Seconds. Different Map projections don't help much.

I convert to Decimal Degrees by dividing Minutes by 60 and Seconds by 3600.

I'm obviously landing in the right part of the world, but obviously something is quite wrong. Any idea what could cause the mirror-image flip and eastward shift?

Thanks in advance,
Allan

$H,UNIT ID,none,1.110702tc,2,3.03
$A,042604,162254,1,1,0,3,001,000,006,000,030,00000
$+i,042604,162256
$S,042604,162301,1
$s,042604,162301,1
$G,042604,162316,+3557.478,-08400.106,007.17
$G,042604,162317,+3557.477,-08400.107,009.62
$G,042604,162318,+3557.477,-08400.109,009.96
$G,042604,162319,+3557.476,-08400.111,009.48
$G,042604,162320,+3557.476,-08400.112,008.33
$G,042604,162321,+3557.476,-08400.113,006.29
$G,042604,162322,+3557.476,-08400.114,005.69
$G,042604,162323,+3557.476,-08400.116,008.50

On Wed, 2 Jun 2004 08:58, Allan Metts wrote:

All I have are cryptic GPS files like the excerpt you see below, and not
much else. Using C++ code, I'm reading in the $G lines, and interpreting
the 4th and 5th fields in various ways. I've tried Decimal Degrees,
Degrees + Decimal Minutes (with the degrees being the most significant
digits), and Degrees, Minutes, and Decimal Seconds. Different Map
projections don't help much.

I convert to Decimal Degrees by dividing Minutes by 60 and Seconds by 3600.

I'm obviously landing in the right part of the world, but obviously
something is quite wrong. Any idea what could cause the mirror-image flip
and eastward shift?

$H,UNIT ID,none,1.110702tc,2,3.03
$A,042604,162254,1,1,0,3,001,000,006,000,030,00000
$+i,042604,162256
$S,042604,162301,1
$s,042604,162301,1
$G,042604,162316,+3557.478,-08400.106,007.17
$G,042604,162317,+3557.477,-08400.107,009.62
$G,042604,162318,+3557.477,-08400.109,009.96
$G,042604,162319,+3557.476,-08400.111,009.48
$G,042604,162320,+3557.476,-08400.112,008.33
$G,042604,162321,+3557.476,-08400.113,006.29
$G,042604,162322,+3557.476,-08400.114,005.69
$G,042604,162323,+3557.476,-08400.116,008.50

All the GPS data I have worked with has provided NMEA formatted strings.

The above strings look similar to NMEA, but the $G should be $ followed by 5
character string. The first two characters are the "talker" which should be
GP for GPS the following three should be "sentence" which identify which
sentence format the rest of the line is.

NMEA normally formats positions as 100 x degrees + decimal minutes, followed
by either N or S for latitude and E or W for longitude.

A FAQ covering most NMEA string formats is available at:
http://vancouver-webpages.com/peter/nmeafaq.txt

If the samples you have given above are from your GPS then I suggest you check
the manual for the GPS to see what format it claims the strings are.

My suspicion is that these are not latitude and longitude at all, but some
projected coordinate system.

Hope this helps
Gordon

--

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

The command that Christ has given us is this:
whoever loves God must love his brother also.
  -- 1 John 4:21