GPS NMEA string parser
Archiver
Posts: 46,084
I have not done anything in BASIC for quite some time
Does anyone know of or have a parsing routine for GPS NMEA strings?
This is for a Multi-vehicle tracking application using Freewave radio
modems for communication.
I want to use a basic stamp to parse and reformat the NMEA messages
before being transmitted
Thanks
Does anyone know of or have a parsing routine for GPS NMEA strings?
This is for a Multi-vehicle tracking application using Freewave radio
modems for communication.
I want to use a basic stamp to parse and reformat the NMEA messages
before being transmitted
Thanks
Comments
This is how i read NMEA data from a GPS module:
GPSQuality var byte ' GPS quality indicator
TimeData var byte(4) ' UTC time data
LatitudeData var byte(4) ' latitude data
LongitudeData var byte(4) ' longitude data
AltitudeData var word ' altitude data
' GPSReadData - Reads NMEA data from the GPS module
'
GPSReadData: ' Set the default GPS data quality
GPSQuality = 0
' Get NMEA data from the GPS module...
SERIN 0,16572,2000,GPSReadDataFailed,[noparse][[/noparse]WAIT("$GPGGA"), SKIP 1, DEC2
TimeData(0), DEC2 TimeData(1), DEC2 TimeData(2), SKIP 1, DEC2 TimeData(3),
SKIP 2, DEC2 LatitudeData(0), DEC2 LatitudeData(1), SKIP 1, DEC2
LatitudeData(2), SKIP 3, LatitudeData(3), SKIP 1, DEC3 LongitudeData(0),
DEC2 LongitudeData(1), SKIP 1, DEC2 LongitudeData(2), SKIP 3,
LongitudeData(3), SKIP 1, DEC1 GPSQuality, SKIP 8, DEC AltitudeData]
GPSReadDataFailed: RETURN
If valid GPS data is received then the value of the GPSQuality variable will
be non-zero.
I hope this helps. Feel free to email me at russell@w... if you
have any more questions. I look forward to hearing from you.
Best regards,
Russell Warburton
email: russell@w...
website: http://www.warburtech.com
telephone: +44 (0)7814 044 754
Original Message
From: "dbugger2003" <flint@d...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, November 12, 2003 8:02 PM
Subject: [noparse][[/noparse]basicstamps] GPS NMEA string parser
> I have not done anything in BASIC for quite some time
>
> Does anyone know of or have a parsing routine for GPS NMEA strings?
>
> This is for a Multi-vehicle tracking application using Freewave radio
> modems for communication.
>
> I want to use a basic stamp to parse and reformat the NMEA messages
> before being transmitted
>
> Thanks
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
http://www.parallax.com/dl/docs/cols/nv/vol3/col/83.pdf
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: dbugger2003 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=_My3odZcGVb7V7EESyRgbHlhrs7zXAHvB937iX-D_WE7Unnp4ckoHQipTWjHOhv4NX6vPazeLxAtAddu]flint@d...[/url
Sent: Wednesday, November 12, 2003 2:02 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] GPS NMEA string parser
I have not done anything in BASIC for quite some time
Does anyone know of or have a parsing routine for GPS NMEA strings?
This is for a Multi-vehicle tracking application using Freewave radio
modems for communication.
I want to use a basic stamp to parse and reformat the NMEA messages
before being transmitted
Thanks
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
//Andy
Original Message
From: "Jon Williams" <jwilliams@p...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, November 12, 2003 11:20 PM
Subject: RE: [noparse][[/noparse]basicstamps] GPS NMEA string parser
> This article covers receiving and parsing a NMEA string using the BS2p:
>
> http://www.parallax.com/dl/docs/cols/nv/vol3/col/83.pdf
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: dbugger2003 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=7jSxw2lECE--ZUxZjhvN337zZv2aUVI3IudXlotU_1-bNjPmXYiAlGBbokx5oWeeBlRwc2MPGnk]flint@d...[/url
> Sent: Wednesday, November 12, 2003 2:02 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] GPS NMEA string parser
>
>
> I have not done anything in BASIC for quite some time
>
> Does anyone know of or have a parsing routine for GPS NMEA strings?
>
> This is for a Multi-vehicle tracking application using Freewave radio
> modems for communication.
>
> I want to use a basic stamp to parse and reformat the NMEA messages
> before being transmitted
>
> Thanks
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject
> and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p....
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>I can't get the link to work. Is it me or the link. Anyone else got sucess ?
>//Andy
Andy -
If you can't get to it from Jon's link, try this which is the selection page:
http://www.parallax.com/html_pages/downloads/nvcolumns/Nuts_Volts_Downloads_V3.a\
sp
Then choose "Where in the World is my BASIC Stamp?" or Column 83.
Bruce Bates
>
Original Message
>From: "Jon Williams" <jwilliams@p...>
>To: <basicstamps@yahoogroups.com>
>Sent: Wednesday, November 12, 2003 11:20 PM
>Subject: RE: [noparse][[/noparse]basicstamps] GPS NMEA string parser
>
>
> > This article covers receiving and parsing a NMEA string using the BS2p:
> >
> > http://www.parallax.com/dl/docs/cols/nv/vol3/col/83.pdf
> >
> > -- Jon Williams
> > -- Applications Engineer, Parallax
> > -- Dallas Office
> >
> >
> >
Original Message
> > From: dbugger2003 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ihafUkH3QTjfLB64aA3xtIh_C9n1mlG7j4kZFIH2OE9t382gq5byexaoUIpiWj1og8VQ5n3bDFN8]flint@d...[/url
> > Sent: Wednesday, November 12, 2003 2:02 PM
> > To: basicstamps@yahoogroups.com
> > Subject: [noparse][[/noparse]basicstamps] GPS NMEA string parser
> >
> >
> > I have not done anything in BASIC for quite some time
> >
> > Does anyone know of or have a parsing routine for GPS NMEA strings?
> >
> > This is for a Multi-vehicle tracking application using Freewave radio
> > modems for communication.
> >
> > I want to use a basic stamp to parse and reformat the NMEA messages
> > before being transmitted
> >
> > Thanks
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject
> > and Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
> > This message has been scanned by WebShield. Please report SPAM to
> > abuse@p....
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
It's a Adobe PDF format file though.
Have you installed the Adobe PDF reader?
Original Message
From: Anders Lundin [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Uj0wfaYOmIrXabHV6kmxmAj5ZsP_0GB0qip5qYIMgLdQdQX5j76wJ8GLh0fdqz2Wwzr4A4U-IkoyyLHCy0YOJUEzOhRcyp-LygI]newsgroups1@s...[/url
Sent: Wednesday, November 12, 2003 10:58 PM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] GPS NMEA string parser
I can't get the link to work. Is it me or the link. Anyone else got
sucess ?
//Andy
Original Message
From: "Jon Williams" <jwilliams@p...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, November 12, 2003 11:20 PM
Subject: RE: [noparse][[/noparse]basicstamps] GPS NMEA string parser
> This article covers receiving and parsing a NMEA string using the
BS2p:
>
> http://www.parallax.com/dl/docs/cols/nv/vol3/col/83.pdf
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: dbugger2003 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=OTWUIJIsMvh0PSoAD6jP4KYbYr3Yg8U4KTmjxI6OctezcTOzGfC7hDXbOud6NtOT34lV2rd1N0lOfww]flint@d...[/url
> Sent: Wednesday, November 12, 2003 2:02 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] GPS NMEA string parser
>
>
> I have not done anything in BASIC for quite some time
>
> Does anyone know of or have a parsing routine for GPS NMEA strings?
>
> This is for a Multi-vehicle tracking application using Freewave radio
> modems for communication.
>
> I want to use a basic stamp to parse and reformat the NMEA messages
> before being transmitted
>
> Thanks
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject
> and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p....
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject
and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
opening it.
//Andy
Original Message
From: "Earl Bollinger" <earlwbollinger@c...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, November 13, 2003 12:58 PM
Subject: RE: [noparse][[/noparse]basicstamps] GPS NMEA string parser
> It works for me OK.
> It's a Adobe PDF format file though.
> Have you installed the Adobe PDF reader?
>
>
Original Message
> From: Anders Lundin [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=DzGqFG9jOsCsM2maFuppdMLdM4PEf6fYI3pCGVznpC4Hq5mRR9GuXeDjIDoD6_IhRVMVFRiU5x_GhCv5B9dEwYx9iEvhc_aHTpAOxA]newsgroups1@s...[/url
> Sent: Wednesday, November 12, 2003 10:58 PM
> To: basicstamps@yahoogroups.com
> Subject: Re: [noparse][[/noparse]basicstamps] GPS NMEA string parser
>
> I can't get the link to work. Is it me or the link. Anyone else got
> sucess ?
> //Andy
>
>
Original Message
> From: "Jon Williams" <jwilliams@p...>
> To: <basicstamps@yahoogroups.com>
> Sent: Wednesday, November 12, 2003 11:20 PM
> Subject: RE: [noparse][[/noparse]basicstamps] GPS NMEA string parser
>
>
> > This article covers receiving and parsing a NMEA string using the
> BS2p:
> >
> > http://www.parallax.com/dl/docs/cols/nv/vol3/col/83.pdf
> >
> > -- Jon Williams
> > -- Applications Engineer, Parallax
> > -- Dallas Office
i guess there is some thing wrong there sense i got it up yesterday.
//Andy
Original Message
From: "Bruce Bates" <bvbates@u...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, November 13, 2003 12:29 PM
Subject: Re: [noparse][[/noparse]basicstamps] GPS NMEA string parser
> At 05:57 AM 11/13/03 +0100, Anders Lundin wrote:
> >I can't get the link to work. Is it me or the link. Anyone else got
sucess ?
> >//Andy
> Andy -
>
> If you can't get to it from Jon's link, try this which is the selection
page:
>
http://www.parallax.com/html_pages/downloads/nvcolumns/Nuts_Volts_Downloads_V3.a\
sp
>
> Then choose "Where in the World is my BASIC Stamp?" or Column 83.
>
> Bruce Bates
>
>
> >
Original Message
> >From: "Jon Williams" <jwilliams@p...>
> >To: <basicstamps@yahoogroups.com>
> >Sent: Wednesday, November 12, 2003 11:20 PM
> >Subject: RE: [noparse][[/noparse]basicstamps] GPS NMEA string parser
> >
> >
> > > This article covers receiving and parsing a NMEA string using the
BS2p:
> > >
> > > http://www.parallax.com/dl/docs/cols/nv/vol3/col/83.pdf
> > >
> > > -- Jon Williams
> > > -- Applications Engineer, Parallax
> > > -- Dallas Office
should not count on data being fixed in length in you parser. While the
order may be always the same, the standard does not guarentee that the data
fields be of any specific length. I.E. Some of the newer GPSRs sent lat/long
to more decimal places than the older units. To be sure, parse on the comma
delimiters and the * before the checksum. Every data field (except the last
one) is delimited by a comma as a matter of standard.
HTH
Vic
________________________________________________________
Victor Fraenckel - The Windman
vfraenc1 ATSIGN nycap DOT rr DOTcom
KC2GUI
Home of the WindReader Electronic Theodolite
Read the WIND
"Victory at all costs, victory in spite of all terror, victory however long
and hard the road may be; for without victory there is no survival."
- Winston [noparse][[/noparse]Leonard Spencer] Churchill (1874 - 1965)
Dost thou not know, my son, with how little wisdom the world is governed?
-Count Oxenstierna (ca 1620) to the young King Gustavus Adolphus
fields. I can do this because I capture *most* of the $GPMRC string
into the BS2p Scratchpad RAM and parse from there.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Vic Fraenckel [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=f2ipxileFKyqJc-2b0bMB1sH-SIRhG2N8etpVhQjnxKOvZM8UV-569pJVMaoLye2kKcE4K_Da2gQCCw]vfraenc1@n...[/url
Sent: Thursday, November 13, 2003 1:02 PM
To: BasicStamps
Subject: [noparse][[/noparse]basicstamps] Re: GPS NMEA string parser
I just want to caution those who are trying to parse NMEA strings that
you should not count on data being fixed in length in you parser. While
the order may be always the same, the standard does not guarentee that
the data fields be of any specific length. I.E. Some of the newer GPSRs
sent lat/long to more decimal places than the older units. To be sure,
parse on the comma delimiters and the * before the checksum. Every data
field (except the last
one) is delimited by a comma as a matter of standard.
HTH
Vic
________________________________________________________
Victor Fraenckel - The Windman
vfraenc1 ATSIGN nycap DOT rr DOTcom
KC2GUI
Home of the WindReader Electronic Theodolite
Read the WIND
"Victory at all costs, victory in spite of all terror, victory however
long and hard the road may be; for without victory there is no
survival."
- Winston [noparse][[/noparse]Leonard Spencer] Churchill (1874 - 1965)
Dost thou not know, my son, with how little wisdom the world is
governed? -Count Oxenstierna (ca 1620) to the young King Gustavus
Adolphus
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
and or article?
Thanks
JF
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=GJjabof5Alny9ylrJco2zOytqsgXpKWCoys7nYrvFagqwLbqbUTGiZ7wpvNyAGw_VuEvW67Db64Rty-blaQ8vik]jwilliams@p...[/url
Sent: Thursday, November 13, 2003 4:27 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Re: GPS NMEA string parser
The GPS parsing code from my article handles fixed- and variable-width
fields. I can do this because I capture *most* of the $GPMRC string
into the BS2p Scratchpad RAM and parse from there.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Vic Fraenckel [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=UlnNGItMW2XL6Be5hISZi57UKIzPKkrW5cMmMpS0VTawEm5r6KJT_H58ppB2dXz82MPZiaME9bWGCbY]vfraenc1@n...[/url
Sent: Thursday, November 13, 2003 1:02 PM
To: BasicStamps
Subject: [noparse][[/noparse]basicstamps] Re: GPS NMEA string parser
I just want to caution those who are trying to parse NMEA strings that
you should not count on data being fixed in length in you parser. While
the order may be always the same, the standard does not guarentee that
the data fields be of any specific length. I.E. Some of the newer GPSRs
sent lat/long to more decimal places than the older units. To be sure,
parse on the comma delimiters and the * before the checksum. Every data
field (except the last
one) is delimited by a comma as a matter of standard.
HTH
Vic
________________________________________________________
Victor Fraenckel - The Windman
vfraenc1 ATSIGN nycap DOT rr DOTcom
KC2GUI
Home of the WindReader Electronic Theodolite
Read the WIND
"Victory at all costs, victory in spite of all terror, victory however
long and hard the road may be; for without victory there is no
survival."
- Winston [noparse][[/noparse]Leonard Spencer] Churchill (1874 - 1965)
Dost thou not know, my son, with how little wisdom the world is
governed? -Count Oxenstierna (ca 1620) to the young King Gustavus
Adolphus
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/