TinyGPS and Adafruit Ultimate GPS: can't get speed

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ted0h
 
Posts: 6
Joined: Sun Apr 21, 2013 1:35 pm

TinyGPS and Adafruit Ultimate GPS: can't get speed

Post by ted0h »

I'm trying to use TinyGPS to get the speed and course information out of the $GPRMC sentence. While TinyGPS will successfully parse this sentence (from another GPS):

$GPRMC,201557.648,A,3802.7398,N,12207.5863,W,034.0,328.5,040913,,,A*74

It cannot get the speed information out of this one, from the Adafruit Ultimate GPS:

$GPRMC,202448.000,A,3809.3721,N,12205.2551,W,35.53,22.44,040913,,,A*79

Has anyone run into this before? Any fixes?

Thanks.

Ted

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: TinyGPS and Adafruit Ultimate GPS: can't get speed

Post by Franklin97355 »

Ted, what are the digits just to the right of the 'W'? That should be the speed (in Knots)

User avatar
ted0h
 
Posts: 6
Joined: Sun Apr 21, 2013 1:35 pm

Re: TinyGPS and Adafruit Ultimate GPS: can't get speed

Post by ted0h »

Yes, I agree, that's the speed in knots. The data is flowing from the GPS, but the TinyGPS library is not able to read parts of the data stream for some reason. The TinyGPS library only uses the GPGGA and the GPRMC sentences. I did some additional poking around, and the TinyGPS library is not seeing the GPRMC sentences coming from the Adafruit GPS, only the GPGGA sentences. With the other GPS chip (Sparkfun Venus), it sees both sentences. This explains why the Arduino can't get the speed info, it's only getting the sentence with the position info. But I can't figure out why the Tiny GPS library isn't seeing the GPRMC sentences from the Adafruit chip. Baud rate on both devices is the same, 9600.

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: TinyGPS and Adafruit Ultimate GPS: can't get speed

Post by Franklin97355 »

Are you using the library supplied by Adafruit? If so then could we see your code?

User avatar
ted0h
 
Posts: 6
Joined: Sun Apr 21, 2013 1:35 pm

Re: TinyGPS and Adafruit Ultimate GPS: can't get speed

Post by ted0h »

No, I'm using the TinyGPS library. However, I think I figured out what was going on. I was checking for new GPS sentences in a loop, but also processing them in the same loop. I rewrote the code to get the sentences, then process them once they were received, avoiding possible conflicts. This seems to have fixed the problem. So, in short, the board and the library were working fine, my code was the culprit. Thanks for your help.

Ted

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”