- I am getting Latitude: 39,957431 and
Longitude: -860180660.01
If you print the latitude with this:
Serial.print( fix.latitude(), 6 );
... it will print the latitude as floating-point degrees. Positive values are north of the equator, and negative values are south of the equator.
The float type can only retain ~7 significant digits, so seeing "39.957431" on the Serial Monitor window is a little misleading. The last digit, a '1', is not useful, because it is an 8th digit.
Because of this limitation, NeoGPS stores lat/lon values as a scaled 32-bit integer, degrees * 10000000. For example, it stores 39.957431 as 399574310, internally. When you call the latitude() function, NeoGPS takes the integer, converts it to a float (dropping 2 significant digits), and divides by 10000000.0.
The code you posted will not print "-860180660.01". It might print "-86.018066".
If your code were this:
Serial.print( (float) fix.latitudeL() );
... it would print "-860180660.01". Don't do that.
If you want the full 10 significant digits that NeoGPS can provide, you must print the scaled 32-bit integer as if it were a float. Basically, you need to print a '.' character at the right place. See NMEAloc.ino for a utility routine to do just that: printL. There are other methods for printing lat/lon as degrees/minutes/seconds (DMS), or degrees/minutes/fractional minutes.
Cheers,
/dev
P.S. Be sure to use code tags around any code in your posts. Put a [code] tag before the code, and put a [/code] tag after the code,
so it looks
like this.