GPS
adn
Posts: 17
Is there a way to save the NMEA data from the GPS and then just read specific values with the BS2 without using the wait or the timeout formatter of the SERIN command or using the serial buffer ic from Protean Logic Inc? Please help
Comments
Where do you want to save the NMEA data?
If its in the Stamp, you don't have much storage available.
Each NMEA 'sentence' can be many characters in length.
If you want to save a bunch of data, just plug into the serial port on the laptop and use
Hyperterminal and the 'save to file' option. You'll save everything that the GPS puts out.
Getting the Stamp to read specific values will still require some work with the SERIN formatters
in order to get the right numbers out of the file.
Can you give us some more details on what you're trying to do?
Cheers,
Tom Sisk
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I am using the bs2 to read 10 different sensors with relatively simple code and send the results to the serial port using the debug command. One of the sensors is the GPS and I am using the following to get the data from the GPS:
SERIN 8, 16884,150,NODATA,[noparse][[/noparse]WAIT("$GPRMC"), SKIP 1, DEC2 hr, DEC2 mn, DEC2 sc,SKIP 2, DEC2 latD, DEC2 latM, DEC2 latF, SKIP 1,lonHemi,SKIP 1, DEC3 lonD, DEC2 lonM, DEC2 lonF, SKIP 1,latHemi,SKIP 1, DEC3 nsVel,Dot, DEC1 ewVel]
DEBUG "TIME ",DEC2 hr,":",DEC2 mn,":",DEC2 sc,CR
DEBUG "Latitude ",DEC2 latD,":",DEC2 latM,":",DEC2 latF,lonHemi,CR
DEBUG "Longitude ",DEC3 lonD,":",DEC2 lonM,":",DEC2 lonF,latHemi,CR
DEBUG "Speed ",DEC3 nsVel,Dot, DEC1 ewVel,CR
which works fine... but the problem is that the bs2 even with the 150 timeout formatter slows down a lot and is not very good for real time monitoring. My thinking is that since you have serial data from the GPS if there is a way to get the data from the GPS with some other serial device (memory) and then use the serin command with the bs2 without using the WAIT formatter to get the data from the memory so that the bs2 will continue to the next command as fast as posible. Maybe all this is wrong since I am just an amateur with all these but please help.
Also please let me know if the sx microcontroller can perform multitasking, receive serial data while continuing to execute other commands and send serial data out. Is it advisable to imigrate the project to the sx family.
Thank you for your help.
Yes, you can create a serial buffer using the SX -- see the Projects section of a MIDI receiver I created that is able to receive data while doing other things.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
$GPRMC,211437,A,3441.65,N,03302.89,E,000.0,,160805,003.3,E*52
$GPRMB,A,0.74,L,+054,KKKK,3418.45,N,03304.55,E,023.2,176.6,,V*0F
$GPR00,+054,KKKK,,,,,,,,,,,,*5F
$GPGLL,3441.65,N,03302.89,E*69
$PGRMA,44,f,3*30
$GPXTE,A,A,0.74,L,N*6D
$GPBWC,211437,3418.45,N,03304.55,E,176.6,T,173.3,M,023.2,N,KKKK*09
From all this I need to get the speed and maybe the position.
The gps cannot send text only nmea183, 182 and 180 sentences (this is 183)
What I would like to do (if possible) is to have some other device (maybe memory module) receive and save the data as is and then retrieve the data from the memory with the basic stamp. Is this possible? This way the basic stamp program will execute at normal speed (fast) and every time it will come to the serin command it will find the data saved so it will not wait for the gps to send the GPRMC...... The data from the gps will not be updated on every cycle of the program but its ok, at least the rest of the data will be.
Thank you for your help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
The $GPGLL has basic position data & time/date; $GPRMC has position, time/date, speed over land, and some other stuff.
I have it dumping to an LCD, right now, but I need to run it into a Stamp to re-configure·it for the LCD/HD44780's mapping (line 1, line 3, line 2, line 4 -- why did they have to do that?) and proper presentation.