Adafruit gps wrong location

hello everyone!

i am working on an arduino mega board, with 'Adafruit Ultimate GPS Breakout'.
I need the gps to reconstruct the route I take, so I need the latitude and longitude.
Running some example sketches in the 'Adafruit_GPS' library I noticed that the latitude and longitude values are wrong (apart from the fact that they are dms format)... I tried running my own sketch with the TinyGPS.h library and the coordinates are right...
to make you understand:
with TinyGPS.h (and the sketch I made) I get '44.96093' as latitude, with Adafruit_GPS (with examples from the library) I get '44.57665' (same for longitude)....

can anyone explain to me how this happens?

thank you very much,
alberto.

For informed help, please read and follow the instructions in the "How to get the best out of this forum" guide, linked at the head of every forum category.

what did I do wrong?

You forgot to follow the instructions in the posted guide.

1 Like

if I have posted the question wrongly, the moderators will intervene...
I ask the question again: do you know why, when running sketches from its library, GPS returns wrong coordinates?

Yes.

Check out the libraries to see how the positie is handled.

One is shown as degrees, and decimal degrees.
The second is degrees and minutes (but using a decimal point as the separator).

Converting the decimal part of the first one to minutes by multiplying by 60 gives:
0.96093 * 60 = 57.6558

so: 44.96093° = 44° 57.6558' (close to 44° 57.665')

2 Likes

ok thank you very much!

sorry, i thought this was the solution but it's not..
I realised that even if I convert the coordinates, the position I get is not correct!
let me explain: when I get the value '44.96093' (with the TinyGPS.h library) this value is in decimal degrees and when I plot the position on the map I get the correct result;
when I obtain the value '44.57665' (with the Adafruit_GPS.h library) I already have 44° 57' which are correct while the seconds are completely wrong, consequently my position is wrong

That is: with the Adafruit_GPS.h library I have as output a result in dms but with the seconds part completely wrong

Look up NMEA sentence coding to learn how to interpret decimal degrees versus NMEA format DDDMM.MMM

You have misinterpreted the latter.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.