@@ -431,20 +431,16 @@ void createSettingsString(char* settingsCSV)
431431 // Bluetooth radio type
432432 stringRecord (settingsCSV, " bluetoothRadioType" , settings.bluetoothRadioType );
433433
434- // Current coordinates
435- double geodeticLat = i2cGNSS.getLatitude () / 10000000.0 ;
436- double geodeticLon = i2cGNSS.getLongitude () / 10000000.0 ;
437- double geodeticAlt = i2cGNSS.getAltitude () / 1000.0 ;
438-
439- stringRecord (settingsCSV, " geodeticLat" , geodeticLat, 8 );
440- stringRecord (settingsCSV, " geodeticLon" , geodeticLon, 8 );
441- stringRecord (settingsCSV, " geodeticAlt" , geodeticAlt, 3 );
434+ // Current coordinates come from HPPOSLLH call back
435+ stringRecord (settingsCSV, " geodeticLat" , latitude, 8 );
436+ stringRecord (settingsCSV, " geodeticLon" , longitude, 8 );
437+ stringRecord (settingsCSV, " geodeticAlt" , altitude, 3 );
442438
443439 double ecefX = 0 ;
444440 double ecefY = 0 ;
445441 double ecefZ = 0 ;
446442
447- geodeticToEcef (geodeticLat, geodeticLon, geodeticAlt , &ecefX, &ecefY, &ecefZ);
443+ geodeticToEcef (latitude, longitude, altitude , &ecefX, &ecefY, &ecefZ);
448444
449445 stringRecord (settingsCSV, " ecefX" , ecefX, 3 );
450446 stringRecord (settingsCSV, " ecefY" , ecefY, 3 );
0 commit comments