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
TinyGPS and Adafruit Ultimate GPS: can't get speed
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ted0h
- Posts: 6
- Joined: Sun Apr 21, 2013 1:35 pm
- Franklin97355
- Posts: 23910
- Joined: Mon Apr 21, 2008 2:33 pm
Re: TinyGPS and Adafruit Ultimate GPS: can't get speed
Ted, what are the digits just to the right of the 'W'? That should be the speed (in Knots)
- ted0h
- Posts: 6
- Joined: Sun Apr 21, 2013 1:35 pm
Re: TinyGPS and Adafruit Ultimate GPS: can't get speed
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.
- Franklin97355
- Posts: 23910
- Joined: Mon Apr 21, 2008 2:33 pm
Re: TinyGPS and Adafruit Ultimate GPS: can't get speed
Are you using the library supplied by Adafruit? If so then could we see your code?
- ted0h
- Posts: 6
- Joined: Sun Apr 21, 2013 1:35 pm
Re: TinyGPS and Adafruit Ultimate GPS: can't get speed
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
Ted
Please be positive and constructive with your questions and comments.