Reading gps nmea183 datastream
Archiver
Posts: 46,084
Im starting a project to convert " distance to waypoint"
and "crosstrack error" from the nmea 183 output of a gps, each to an
analog voltage . I would appreciate any suggestions on accomplishing
this with a basic stamp 2, particularly with the code to read NEMA
183.
Frank Jehn
and "crosstrack error" from the nmea 183 output of a gps, each to an
analog voltage . I would appreciate any suggestions on accomplishing
this with a basic stamp 2, particularly with the code to read NEMA
183.
Frank Jehn
Comments
I'd start with the $GPRMB sentence, which contains range to selected
destination waypoint and crosstrack error, both in (ASCII) nautical
miles. Massage these values as needed to form an appropriate value
for the PWM instruction's DUTY argument to achieve 0-5 volts. Or feed
the massaged values to a DAC for some other desired voltage range.
NMEA-0183 is pure ASCII and can be read with a SERIN statement. Your
Stamp program will work better if you use 4800 baud or slower
transmission from your GPS. Familiarize yourself with the WAIT
option of SERIN so you can sync to the beginning of the $GPRMB
sentence.
Steve
On 24 May 00 at 0:58, fjehn@a... wrote:
> Im starting a project to convert " distance to waypoint"
> and "crosstrack error" from the nmea 183 output of a gps, each to
> an analog voltage . I would appreciate any suggestions on
> accomplishing this with a basic stamp 2, particularly with the code
> to read NEMA 183.
>
> Frank Jehn
>
>
>
>
>
where gps currently is) then
use distance formula dist = ((lat1-lat2)^2+(long1-long2)^2)^.5
to get the lat and long then you need to parse the output sentence that
starts with "$GPRMC....."
the fourth element in that output sentence is lat, the 6th element in that
sentence is the long.
At least that is the way it is on the Rockwell Jupiter in 183 mode
there may be a mode that you can set the gps into to output directly the
dist to the waypoint
but I know the above method works because I have done it
I believe that the dist calculated in this manner is metric (km) and might
need to be converted to inches or feet or whatever you want to use
I put my unit in the car and compared to the odometer - right on the button
richard
Original Message
From: <fjehn@a...>
To: <basicstamps@egroups.com>
Sent: Tuesday, May 23, 2000 7:58 PM
Subject: [noparse][[/noparse]basicstamps] READING GPS NMEA183 DATASTREAM
> Im starting a project to convert " distance to waypoint"
> and "crosstrack error" from the nmea 183 output of a gps, each to an
> analog voltage . I would appreciate any suggestions on accomplishing
> this with a basic stamp 2, particularly with the code to read NEMA
> 183.
>
> Frank Jehn
>
>
>
>