fix altitude for telemetry, instead of using zero

This commit is contained in:
JQ 2025-05-18 16:36:45 -07:00
parent a155587b7f
commit d4e6ece75d
7 changed files with 16 additions and 5 deletions

View file

@ -154,7 +154,7 @@ bool T1000SensorManager::begin() {
bool T1000SensorManager::querySensors(uint8_t requester_permissions, CayenneLPP& telemetry) {
if (requester_permissions & TELEM_PERM_LOCATION) { // does requester have permission?
telemetry.addGPS(TELEM_CHANNEL_SELF, node_lat, node_lon, 0.0f);
telemetry.addGPS(TELEM_CHANNEL_SELF, node_lat, node_lon, node_altitude);
}
return true;
}
@ -168,6 +168,7 @@ void T1000SensorManager::loop() {
if (_nmea->isValid()) {
node_lat = ((double)_nmea->getLatitude())/1000000.;
node_lon = ((double)_nmea->getLongitude())/1000000.;
node_altitude = ((double)_nmea->getAltitude()) / 1000.0;
//Serial.printf("lat %f lon %f\r\n", _lat, _lon);
}
next_gps_update = millis() + 1000;