>From: <[EMAIL PROTECTED]>
>Subject: GPS & PALM VII
>
>Hi,
>
>I am curently working on serial communication between Palm VII and GPS
using
>CodeWarior. But unfortunately i am not receiving any data on the port.
>when i use the command SerReceiveWait....it did not bring any byte for
me
>just give the error number 773 mean Timeout...
>
>Please help me ...because i am fighting with it from last week
>
Firstly I assume you have used a comms program to confirm that the GPS
is sending the data you expect.
For a NMEA GPS I would recommend using 'ptelenet' from
netpage.em.com.br/mmand/ptlelnet.htm.
Assuming that's OK the following code works for us. We check the serial
port during a nilEvent with this routine:
void CheckSerialData (void) {
unsigned long numBytesAvail, numBytes, i ;
Err err ;
char readBuf [50]; // Temporary for copying the data
from the receive queue to currSentence.
static char currSentence [83]; //Should be able to fit any
sentence in here, needs to persist between calls.
static Byte currSentenceCount = 0 ;
do {
// Find the number of bytes available, ignore any errors by simply
clearing.
while (SerReceiveCheck (gSerialRefNum, &numBytesAvail)) {
SerClearErr (gSerialRefNum);
}
// Read as many bytes as we can in one go
if (numBytesAvail > sizeof (readBuf))
numBytes = sizeof (readBuf);
else
numBytes = numBytesAvail;
numBytes = SerReceive (gSerialRefNum, &readBuf, numBytes, 0, &err);
for (i = 0; i < numBytes; i++) {
if (readBuf [i] == '$')
currSentenceCount = 0 ;
currSentence[currSentenceCount] = readBuf[i] ;
if( readBuf[i] == 0x0a )
ProcessSentence( currSentence ) ; // SHOULD CHECK CHECKSUM
FIRST !
currSentenceCount++ ;
if( currSentenceCount >= sizeof( currSentence ) )
currSentenceCount = 0 ;
}
} while( numBytesAvail > 0 ) ;
}
>From: [EMAIL PROTECTED] (Tom Thomas)
>Subject: Re: GPS / PQA
>
>
>Is the grammer/syntax for these NMEA sentences available only in the
>$125.00 spec described by
>
>http://www.nmea.org/0183.htm
>
>or does anyone know of another source of the information.
I don't have the standard with me but from code on hand here is some
more info, don't sue me if I misquote something ;)
The NMEA standard covers a wide range of devices, only a few of the
messages are related to GPS. A search of the web should find info on
the more common ones. The only ones we normally need are GPRMC, detail
in my last reply, GPGGA, GPGSA and GPGSV. There is support in the
standard custom messages but these vary with supplier. In our case we
can improve the fix time by uploading the time to the GPS at power up.
NMEA sentences start with '$' and end with a '*' followed by an two
character checksum and a LF CR pair. Have a look with a terminal
program. The checksum, from memory, is a sum of the character values
between between the '$' and the '*'.
Some typical data looks like this:
$GPGGA,010531,3645.6274,S,17443.5846,E,1,06,0.93,-1040.4,M,26.5,M,,*71
$GPGSA,A,3,02,07,05,24,04,16,,,,,,,1.86,0.93,1.60*05
$GPGSV,3,1,09,04,69,343,46,07,56,136,40,02,40,050,44,09,34,249,27*7C
$GPGSV,3,2,09,24,28,328,45,16,26,086,49,14,17,125,00,05,13,229,27*7B
$GPGSV,3,3,09,08,10,218,00*42
$GPRMC,010531,A,3645.6274,S,17443.5846,E,0.496,237.3,021099,19.5,E*54
$PRWIZCH,02,7,07,7,05,7,24,7,14,2,09,2,04,7,08,0,00,0,16,7,00,0,00,0*4C
The GPGGA is the satellite active message and gives the location and a
summary of the number satellites used to get the fix. I think is also
indicating the quality of the fix e.g.
$GPGGA,010531,3645.6274,S,17443.5846,E,1,06,0.93,-1040.4,M,26.5,M,,*71
Time Lat Lon Q Sat pre Height Sep
The GPGSV tells you what satellites are where in the sky and how strong
their signals are. The first number, 3, is the total count of
sentences. The second, 1 to 3, is the message number. The next is the
total number of satellites reported. Next follows four numbers for each
satellite being satellite ID number, the elevation, the azimuth and
finally the signal level.
>From memory GPGSA is a list of satellite ID numbers.
That's a quick summary, for more detail talk with the people made your
GPS.
Cheers
David Annett
Development Engineer
Talon Technology
---
You are currently subscribed to palm-dev-forum as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]