create new tag
view all tags
This is based on the serial.c program that reads the GPS serial port as text and extracts the North and West data. The program serial.c was very ineffective and I rewrote it completely.

The serialGPS object will open the port you give it as argument (and ttyS3 if you leave it empty), flush any existing data, and set up a timer to read the port at 1 second intervals. Each read looks only for the North and West data. If no data is forthcoming, then GPS is considered to have no lock, which can be tested with the isLocked() member function. If isLocked() returns true then the getNorth() and getWest() routines will return the decimal degrees and minutes from the last read of the GPS (1 second at most).

I found that the following mapping brings GPS and odometry into rough aligment:

X value =-36432*304.8*(North-North0)/5

Y value =-22176*304.8*(West-West0)/5

The source code for the serialGPS object is here:

The include file is here:

This is a little test program to show how to call the object

YOU can only have ONE serialGPS object!

-- DamianLyons - 2011-07-11

Topic attachments
I Attachment History Action Size Date Who Comment
C source code filecpp serialGPS.cpp r1 manage 4.1 K 2011-07-11 - 19:16 DamianLyons  
Header fileh serialGPS.h r1 manage 1.2 K 2011-07-11 - 19:16 DamianLyons  
C source code filecpp serialTest.cpp r1 manage 0.3 K 2011-07-11 - 19:16 DamianLyons  
Topic revision: r1 - 2011-07-11 - DamianLyons
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback