AP_Airspeed: use pythagorous3()
This commit is contained in:
parent
a7f213a5c5
commit
b8e4e35a0d
@ -54,7 +54,7 @@ float Airspeed_Calibration::update(float airspeed, const Vector3f &vg)
|
||||
// No state prediction required because states are assumed to be time
|
||||
// invariant plus process noise
|
||||
// Ignore vertical wind component
|
||||
float TAS_pred = state.z * sqrtf(sq(vg.x - state.x) + sq(vg.y - state.y) + sq(vg.z));
|
||||
float TAS_pred = state.z * pythagorous3(vg.x - state.x, vg.y - state.y, vg.z);
|
||||
float TAS_mea = airspeed;
|
||||
|
||||
// Calculate the observation Jacobian H_TAS
|
||||
|
Loading…
Reference in New Issue
Block a user