Skip to content

Commit 649a28a

Browse files
committed
Pass high precision coordinates to AP config
Fix for #325
1 parent b032180 commit 649a28a

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Firmware/RTK_Surveyor/Form.ino

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)