PMB 648 parsing
bnrg
Posts: 14
HI,
I am using the PMB 648 GPS module and am having a little trouble parsing using the GGA format. All seems to be working except the distance above sea level-I keep getting only a few meters msl which cannot be right as I am at 5000 feet. Here is my parsed string, can you please take a look and comment?
SERIN 0, n4800, [WAIT("GGA,"), DEC2 utchh, DEC2 utcmm, DEC2 utcss, SKIP 1, DEC3 utcdss, DEC2 latdeg, DEC2 latmin, SKIP 1, DEC4 latmind, latdir,
DEC3 londeg, DEC2 lonmin, SKIP 1, DEC4 lonmind, londir, DEC2 PFI, DEC2 satnmbr, DEC2 hdop, DEC4 msl]
I am sure it is something simple, but ...
When parsing this out, I counted the digits from the Polstar NMEA example. Is this correct? It would seem much simpler if there was a way for pbasic to recognize the comma's in the text string to separate out the data.
Thanks,
Bob
I am using the PMB 648 GPS module and am having a little trouble parsing using the GGA format. All seems to be working except the distance above sea level-I keep getting only a few meters msl which cannot be right as I am at 5000 feet. Here is my parsed string, can you please take a look and comment?
SERIN 0, n4800, [WAIT("GGA,"), DEC2 utchh, DEC2 utcmm, DEC2 utcss, SKIP 1, DEC3 utcdss, DEC2 latdeg, DEC2 latmin, SKIP 1, DEC4 latmind, latdir,
DEC3 londeg, DEC2 lonmin, SKIP 1, DEC4 lonmind, londir, DEC2 PFI, DEC2 satnmbr, DEC2 hdop, DEC4 msl]
I am sure it is something simple, but ...
When parsing this out, I counted the digits from the Polstar NMEA example. Is this correct? It would seem much simpler if there was a way for pbasic to recognize the comma's in the text string to separate out the data.
Thanks,
Bob
Comments
http://www.bae.ksu.edu/precisionag/Papers/Easy%20GPS%20Readings%20for%20the%20Basic%20Stamp%20Chip%20version%202.doc
Basically he uses DEC instead of DEC2.
One problem that I foresee is that some GPS receivers, if there is no lock, will not output a number between the commas. I don't see that addressed in the code above, but I'm not familiar enough with PBASIC to suggest an alternative.