Why?
ASCII
NMEA Format:
$GPGGA,hhMMss.ms,XXXX.XXXX,D,XXXX.XXXX,D,otherdata
The important part here is the XXXX.XXXX,D, which are latitude, longitude, and direction (N/S, E/W). No floating point conversion necessary. Thanks Trimble.
The Trimble GPS unit gives three different output modes, TSIP (binary data), TAIP (ASCII), and NMEA (ASCII). TAIP seems somewhat difficult to configure, but NMEA transmits latitude, longitude, time (in a usable format), and direction right out of the box.
TSIP seemed to be the method of choice because of the output options it allowed (in particular, coordinates in XYZ), but working with floating point data might be a little out of the scope of this project.
NMEA transmits by default at 4800bps, so the SCI baud rate had to be changed from 0x009C to 0x0138. NMEA does not provide XYZ coordinates, so, no easy calculation of meters, but we're confident we can assemble some sort of reasonable approximation from latitude and longitude.
In an hour or so, Zach whipped up a simple prototype that correctly read in latitude and longitude data in packed BCD format, set this data, and provided the direction (North, South, East, West). It worked reasonably within the confines of his room.Maybe someday we'll buy batteries.

No comments:
Post a Comment