$GPRMC and NMEA how to extract from report


Posted on 16th Feb 2014 07:03 pm by admin

Hi There,

Im a little bi lost and not sure where to start with this one, ive got a small gps receiver which im
polling over a serial connection, each time i poll the device i get a load of rubbish back like this...
Did you know?Explore Trending and Topic pages for more stories like this.

Code: $GPRMC,223450.000,A,5310.5785,N,00226.2042,W,0.0,25.8,291109,,,A*49

$GPGGA,223450.000,5310.5785,N,00226.2042,W,1,06,2.1,22.3,M,59.1,M,,0000*7D

$GPVTG,25.8,T,,M,0.0,N,0.0,K,A*32

$PMST200,00,204*1E

$PMST200,00,204*1E

$PMST200,00,204*1E

$PMST200,??,204*1E

$PMST200,??,204*1E

$PMST200,??,204*1E

$PMST200,??,204*1E

$PMST200,??,204*1E

$PMST200,??,204*1E

$GPGLL,5310.5785,N,00226.2042,W,223450.00,A,A*73

$GPGSA,A,3,02,04,05,07,08,10,,,,,,,4.5,2.1,4.0*39

$PMST200,??,204*1E

$PMST200,??,204*1E

$PMST200,??,204*1E

As they are never ever in the same order i cant really use reg_exp to get what i want, basically im
trying to capture the following and then use split to break them down further and insert into a DB

Code: $GPRMC,223450.000,A,5310.5785,N,00226.2042,W,0.0,25.8,291109,,,A*49


how can i just get it to extract that line and nothing else unless i ask it to????

the output from the serial devic come is extract using this

Code: $read = $serial->readPort();

than i just echo read etc etc and get my text which is further up, any ones help
or suggestions would be brill...

thanks
No comments posted yet

Your Answer:

Login to answer
177 Like 46 Dislike
Previous forums Next forums
Other forums

Mail form doesn't send Russian/Cyrillic characters correctly?
When someone enters foreign characters (like Cyrillic text, and Japanese/Chinese probably gives the

AutoChoosing a CSS file based on URL
Hey everyone,

I have a site that has multiple URLs and CSS files.

Based on the URL tha

Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named

How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..<

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

how can i make a .gif images for my site
Dear Friends ,

Pls solve my problem , I am starting making new site but i dont know how can i

Procedural to OOP
ohn Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pri

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

cURL error
So here is my code... I got it off of here... http://www.youtube.com/watch?v=XcgQUsorF_8
Because

foreach help.
Hello all,

First time I'm attempting to use a foreach statement and was just wondering if my

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash