mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 15:03:34 +08:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user