GPS NMEA serin code, is this a bug?

tater1337

Member
for reading a GPS NMEA codes I stumbled across this in a post

Code:
serin 1,t9600_8,("N"),b0,b1,b2,b3,b4,b5,b6  	'read latitude from gps
now from the NMEA tutorials I am reading, the "N" shows up at the end of the sentence, so wouldnt this return the longitude?
 

BeanieBots

Moderator
With just one line of code in isolation like that, very hard to say.
Bottom line, it will wait for "N" to appear and then put the next 7 bytes of data into b0 to b6 respectively.

My understanding is that "N" (often) comes at the END of the latitude data, so at a guess, the next data set would be longitude, so maybe you're right.
Depends on the GPS/settings and where you are in the current data set.

There are many instances when an "N" might be sent.
http://www.gpsinformation.org/dale/nmea.htm
 
Last edited:

tater1337

Member
With just one line of code in isolation like that, very hard to say.
Bottom line, it will wait for "N" to appear and then put the next 7 bytes of data into b0 to b6 respectively.

My understanding is that "N" (often) comes at the END of the latitude data, so at a guess, the next data set would be longitude, so maybe you're right.
Depends on the GPS/settings and where you are in the current data set.

There are many instances when an "N" might be sent.
http://www.gpsinformation.org/dale/nmea.htm
ok, thought so. I looked at that link you referred to earlier, and thats why i asked.

you are right, I stole the code to implement into a guidance program I am writing, but cant remember which post. now that I have other parts of the code polished up, I wanted to take a good look at it. I don't have a GPS yet to try it on, so I dont know what to expect.

when I do have a GPS, I'll just read the serin and push it back out to the simulator and work it out from there.

thanks for helping me understand.
 

eclectic

Moderator
@tater1337

Firstly, please have another look at post # 6
in
http://www.picaxeforum.co.uk/showthread.php?t=13389

and the last few posts of:

http://www.picaxeforum.co.uk/showthread.php?t=13039&page=14

Getting the GPS info into a Picaxe is no real problem,
but you have lots of other processing requirements.


Secondly, the 14m is an excellent piece of engineering.
But, it's only got a 255 byte memory / 14 variables / M8 maximum speed.

You've got a big, powerful Rocket.
Just my opinion, but, wouldn't you be better off with a
big powerful Picaxe chip,
as has already been suggested?

20X2 / 28X2 ?

For just a couple of £/$ and a couple of grams weight?

e
 

tater1337

Member
@tater1337

Firstly, please have another look at post # 6
in
http://www.picaxeforum.co.uk/showthread.php?t=13389

and the last few posts of:
http://www.picaxeforum.co.uk/showthread.php?t=13039&page=14

Getting the GPS info into a Picaxe is no real problem,
but you have lots of other processing requirements.

Secondly, the 14m is an excellent piece of engineering.
But, it's only got a 255 byte memory / 14 variables / M8 maximum speed.

You've got a big, powerful Rocket.
Just my opinion, but, wouldn't you be better off with a
big powerful Picaxe chip,
as has already been suggested?
well you got really really good points
First, thanks for showing me the NMEA stuff, and yes I did look thru it

I think that was one of the posts I cribbed from. I remember seeing the b0,b0,b0,b0 stuff in your second link.

your second point? the 18x is on the way, the 14m might be regulated to parachute deployment, the 18x might be regulated to another task as well when i believe that I need the bigger chips. but i really want to tighten up my code, and trying to cram it into a 14m might be a way of working on optimizing stuff. looks like it'll fit, even if I have to use if-the-elseif statements for the compass. the code is no longer straightforward but should be very fast, not that it matters, as the servo will be very slow :)

this thread was just meant to ask if what I saw was what i understood in regards to the serin code i cribbed. we are good there :)
 
Top