Ultimate GPS coding issues

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
murdoxical
 
Posts: 4
Joined: Sat Aug 02, 2014 8:16 pm

Ultimate GPS coding issues

Post by murdoxical »

I just god the Ultimate GPS shield and I'm having a lot of trouble trying to understand how to parse the data.
I understand how to print the raw data from the GPS and how to talk to it and send commands but I can't figure out how to parse it.
I need to get latitude and longitude for my project but when I try to call GPS.read(), or anything, even GPS.begin() I get a compile error say 'GPS' was not declared in this scope. But in the example sketch GPS wasn't declared anywhere but it still works.
How do you correctly parse it to pull the latitude and longitude out?

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

Re: Ultimate GPS coding issues

Post by Franklin97355 »

Have you downloaded and installed the Adafruit_GPS library and tried the parsing sketch? Which Arduino are you using?

User avatar
murdoxical
 
Posts: 4
Joined: Sat Aug 02, 2014 8:16 pm

Re: Ultimate GPS coding issues

Post by murdoxical »

I have but I don't understand the code. My issue's also that when I write, for example GPS.read() I get an error saying GPS was not declared even though I have the library installed at working correctly.
I can talk to the GPS and print the raw nmea strings but I need to get the latitude and longitude out due to the error when compiling.

*edit*
So after working some more on it with the TinyGPS++ library I've ran into a weird issue. I wrote a bit of code to get longitude and latitude and it was working fine until it stopped. Code wise nothings changed but it gives me 0.00 for longitude and latitude. If I comment out the bit for longitude it will give me latitude after a few seconds, and vise versa for longitude.

I know it has a fix as the led tells me so and if I load up the parsing or echo sketch example it works perfectly. What could have changed?

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

Re: Ultimate GPS coding issues

Post by Franklin97355 »

Could you post your code and a description or drawing of your connections between it all?
Please use the code button "</>" when submitting code as shown below.
Code Button.jpg
Code Button.jpg (4.49 KiB) Viewed 262 times

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

Return to “Other Arduino products from Adafruit”