From 48b18753345092bc306640283908686861f6064d Mon Sep 17 00:00:00 2001 From: jnomikos Date: Fri, 12 Sep 2025 13:59:13 -0500 Subject: [PATCH 1/2] Remote ID: Negative GCS GPS altitude can be valid. NaN GCS GPS altitude is invalid --- src/Vehicle/RemoteIDManager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Vehicle/RemoteIDManager.cc b/src/Vehicle/RemoteIDManager.cc index c16538585c7a..4da9418a03c7 100644 --- a/src/Vehicle/RemoteIDManager.cc +++ b/src/Vehicle/RemoteIDManager.cc @@ -298,7 +298,7 @@ void RemoteIDManager::_sendSystem() // GPS position needs to be valid before checking other stuff if (geoPositionInfo.isValid()) { // If we dont have altitude for FAA then the GPS data is no good - if ((_settings->region()->rawValue().toInt() == Region::FAA) && !(gcsPosition.altitude() >= 0) && _gcsGPSGood) { + if ((_settings->region()->rawValue().toInt() == Region::FAA) && !qIsNaN(gcsPosition.altitude()) && _gcsGPSGood) { _gcsGPSGood = false; emit gcsGPSGoodChanged(); qCDebug(RemoteIDManagerLog) << "GCS GPS data error (no altitude): Altitude data is mandatory for GCS GPS data in FAA regions."; From eb257ab9047dee013d634b8a4f73fb78da48a4cb Mon Sep 17 00:00:00 2001 From: John Nomikos <84941452+jnomikos@users.noreply.github.com> Date: Tue, 16 Sep 2025 10:59:21 -0500 Subject: [PATCH 2/2] qIsNaN, fix reversed logic Was invalidating if altitude WASN'T NaN. Should be other way around --- src/Vehicle/RemoteIDManager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Vehicle/RemoteIDManager.cc b/src/Vehicle/RemoteIDManager.cc index 4da9418a03c7..c7356f11a0c3 100644 --- a/src/Vehicle/RemoteIDManager.cc +++ b/src/Vehicle/RemoteIDManager.cc @@ -298,7 +298,7 @@ void RemoteIDManager::_sendSystem() // GPS position needs to be valid before checking other stuff if (geoPositionInfo.isValid()) { // If we dont have altitude for FAA then the GPS data is no good - if ((_settings->region()->rawValue().toInt() == Region::FAA) && !qIsNaN(gcsPosition.altitude()) && _gcsGPSGood) { + if ((_settings->region()->rawValue().toInt() == Region::FAA) && qIsNaN(gcsPosition.altitude()) && _gcsGPSGood) { _gcsGPSGood = false; emit gcsGPSGoodChanged(); qCDebug(RemoteIDManagerLog) << "GCS GPS data error (no altitude): Altitude data is mandatory for GCS GPS data in FAA regions.";