The functions gps.location.lat() and gps.location.lng() return 'double' (a.k.a. 'float'), not 'long'. If you use floats you will only have 6 to 7 significant digits.
If you use gps.location.rawLat() and gps.location.rawLng() you will get values in billionths of a degree (9 digits after the decimal point).
ok that makes sense, but the Serial.print(Xcurrent, 2); outputs binary while Serial.print(Xcurrent, 4); outputs numbers 0-3 so how would I make the monitor printout a number with 4 decimal places?
Nathaniel_:
ok that makes sense, but the Serial.print(Xcurrent, 2); outputs binary while Serial.print(Xcurrent, 4); outputs numbers 0-3 so how would I make the monitor printout a number with 4 decimal places?
Did you try declaring Xcurrent and Ycurrent as floats?
One of the old guys will be able to explain it more technically than I but in your version, the compiler assumes you're working with integers because they are written as whole numbers. So it does integer arithmetic on them (meaning all fractional parts of numbers are discarded). By adding the ".0" at the end, you tell it that you want it to deal with them as floating point numbers.
Basically, the C++ compiler uses the "narrowest" possible datatype going from left-to-right. If everything is int then the arithmetic is performed using int. If the first two arguments are int and a third is long then the arithmetic on the first two arguments is int which is "widened" to long for the final operation with the third argument. The suggestion to add a decimal to the first argument makes all the arithmetic performed using double with implicit conversions added as needed.