View Single Post

  #2 (permalink)  
Old 03-08-2003
sm176811 sm176811 is offline
Junior Member
White Belt
 
Join Date: Mar 2003
Posts: 7
Thats quite easy...!!


You need to read $GPGLL instead of $GPRMC

See the definition below for the Latitude and Logitude encoding in the GPGLL syntax:

$GPGLL
Geographic Position, Latitude / Longitude and time.

eg1. $GPGLL,3751.65,S,14507.36,E*77
eg2. $GPGLL,4916.45,N,12311.12,W,225444,A

4916.46,N Latitude 49 deg. 16.45 min. North
12311.12,W Longitude 123 deg. 11.12 min. West
225444 Fix taken at 22:54:44 UTC
A Data valid

eg3. $GPGLL,5133.81,N,00042.25,W*75
1 2 3 4 5

1 5133.81 Current latitude
2 N North/South
3 00042.25 Current longitude
4 W East/West
5 *75 checksum

$--GLL,lll.ll,a,yyyyy.yy,a,hhmmss.ss,A llll.ll = Latitude of position

a = N or S
yyyyy.yy = Longitude of position
a = E or W
hhmmss.ss = UTC of position
A = status: A = valid data


U use String manipulation to extract the Lat Long. Be careful to use the North/South or East/West to convert the Value to +/- or +/- respectively.

The you need to process the Latitude Longitue values to the Mappoint format.

You can do that by using the mechanism descibed by Vic in http://mp2kmag.com/mappoint/discussi...&highlight=wgs

dRetVal = Int(sNMEA / 100) + (sNMEA - Int(sNMEA / 100) * 100) / 60

Select Case sTmp
Case "N"
'dRetVal = dRetVal
Case "S"
dRetVal = "-" & dRetVal
Case "E"
'dRetVal = dRetVal
Case "W"
dRetVal = "-" & dRetVal
End Select

<Result to be plotted on Mapoint>= dRetVal

Where sNMEA is the Lattitude or Logitude read from the GPS and sTmp is a string value representing N/S or E/W for latitude or Longitude respectively!!

You need to run the above conversion for latitude and longitude and the resultant location should be accurate enough to be plotted in Mappoint.

Interestingly.. I just figured that out this morning at 5 am :)

Let me know if you ned more help... Oh BTW the GPS should be configured to provide information in WGS 84 datum.

Cheers,
John
__________________
Sitting still and wishing makes no person great..
The good lord and sent you fishing but you should dig the bait!!
Reply With Quote