DataValidator: handle low noise scale

Previously, DataValidator would automatically reject sensor data as
stale if (almost) constant.

But if setting SIH_NOISE_SCALE = 0 for deterministic sim, constant
sensor data are to be expected.

This adds logic to not flag sensor values as stale if noise scale is
very small. If the sensor has *actually* gone stale with very low noise
scale, this means we cannot detect it anymore.
This commit is contained in:
Balduin
2025-11-24 09:08:45 -08:00
committed by Ramon Roche
parent ce98211181
commit 5c08b11442
4 changed files with 46 additions and 6 deletions
+1 -1
View File
@@ -1039,6 +1039,6 @@ void AutopilotTester::check_airspeed_is_invalid()
// If the airspeed was invalidated during the flight, the airspeed is sent in the
// telemetry is NAN and stays so with the default parameter settings.
const Telemetry::FixedwingMetrics &metrics = getTelemetry()->fixedwing_metrics();
std::cout << "Reported airspeed after failure: " << metrics.airspeed_m_s ;
std::cout << "Reported airspeed after failure: " << metrics.airspeed_m_s << "\n";
REQUIRE(!std::isfinite(metrics.airspeed_m_s));
}