RCM3400 interfacing with M12+ Oncore GPS receiver

Status
Not open for further replies.

joneo

New Member
Hi!i donno whether i'm suppose to ask question through here.but i really wish you guys can help me as i'm new to the dynamic C and the Rabbit microprocessor. i have one GPS receiver (M12+ Oncore GPS Receiver) and one RCM3400 dev kit with me. i'm trying to program the RCM3400 to pull the NMEA-0183 data from the GPS receiver. i'm facing a big problem for the interfacing between both this hardware. i've tried the serial port example of the dynamic C but when come to the NMEA-0183 data, as we know it consist of char and integer, so i dono how to save the data as. what i mean is how should i declare it as?as a string?as a character?as a integer?and another problem is where should i save the data to,i mean where should i locate them to?using array?please help.thanks in advance.

below is the program that i write using the Dynamic C. my main purpose is trying to send out the command to the receiver which is in the format of "$PMOTG,GGA,0001*01", then get the NMEA0183 respond from GPS receiver through the serial ports and then process the data.

#class auto
#define CINBUFSIZE 255
#define COUTBUFSIZE 255

#ifndef _232BAUD
#define _232BAUD 4800
#endif
const char nIn2;

main()
{
//auto int nIn2;
//xdata c { "$PMOTG,GGA,0001*01" };

brdInit(); //initialize board for this demo
serCopen(_232BAUD);
serCwrFlush();
serCrdFlush();

while (1)
{
//serCputc (c[0]); //Send lowercase byte
while ((nIn2=serCgetc()) == -1); // Wait for echo
printf ("serial C received %s\n",nIn2);

}
}
 
as we know it consist of char and integer
For those of us who don't have the NMEA-0183 spec. in front of us right now, or are too lazy to search for it, what exactly does the data you're hoping to decode look like? Show me a simple byte-by-byte example.
 
NMEA-0183 have lot of message respond format. for your information to use the M12+ Oncore receiver, i need to send the command "$PMOTG,GGA,0001*01" so that i can always receive the NMEA-0183 message of $GPGGA. and the respond will be in the format of $GPGGA,123519,4807.038,N,01131.324,E,1,08,0.9,545.4,M,46.9,M, , *42. so my problem is what should i declare all the command send out and the responded NMEA data?thanks for your reply
 
It looks like a string to me. I suggest that you store it as a string, then lookup atoi or sscanf in your favourite C book.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…