mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 07:51:36 +08:00
Use isAllFinite() in all places that check finiteness on entire vectors or matrices
This commit is contained in:
@@ -194,7 +194,7 @@ void MagBiasEstimator::Run()
|
||||
const Vector3f &bias = _bias_estimator[mag_index].getBias();
|
||||
const Vector3f bias_rate = (bias - bias_prev) / dt;
|
||||
|
||||
if (!PX4_ISFINITE(bias(0)) || !PX4_ISFINITE(bias(1)) || !PX4_ISFINITE(bias(2)) || bias.longerThan(5.f)) {
|
||||
if (!bias.isAllFinite() || bias.longerThan(5.f)) {
|
||||
_reset_field_estimator[mag_index] = true;
|
||||
_valid[mag_index] = false;
|
||||
_time_valid[mag_index] = 0;
|
||||
|
||||
Reference in New Issue
Block a user