@@ -220,22 +220,17 @@ bool checkConnection(int theSocket, bool connectionIsOpen)
220
220
// See if new PVT data is available
221
221
if (myGNSS.getPVT ()) // getPVT will return true if fresh data is available
222
222
{
223
- long latitude = myGNSS.getLatitude (); // Print the latitude
223
+ double latitude = ( double ) myGNSS.getLatitude (); // Print the latitude
224
224
Serial.print (F (" checkConnection: Lat: " ));
225
- Serial.print (latitude / 10000000L );
226
- Serial.print (F (" ." ));
227
- Serial.print (abs (latitude % 10000000L ));
225
+ Serial.print (latitude / 10000000.0 , 7 );
228
226
229
- long longitude = myGNSS.getLongitude (); // Print the longitude
227
+ double longitude = ( double ) myGNSS.getLongitude (); // Print the longitude
230
228
Serial.print (F (" Long: " ));
231
- Serial.print (longitude / 10000000L );
232
- Serial.print (F (" ." ));
233
- Serial.print (abs (longitude % 10000000L ));
229
+ Serial.print (longitude / 10000000.0 , 7 );
234
230
235
- long altitude = myGNSS.getAltitudeMSL (); // Print the height above mean sea level
231
+ double altitude = ( double ) myGNSS.getAltitudeMSL (); // Print the height above mean sea level
236
232
Serial.print (F (" Height: " ));
237
- Serial.print (altitude);
238
- Serial.print (F (" (mm)" ));
233
+ Serial.print (altitude / 1000.0 , 3 );
239
234
240
235
uint8_t fixType = myGNSS.getFixType (); // Print the fix type
241
236
Serial.print (F (" Fix: " ));
0 commit comments