mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-29 20:18:31 -04:00
AP_TECS: update for AHRS API change
This commit is contained in:
parent
25ef0d5a7b
commit
9b8311580b
@ -151,9 +151,10 @@ void AP_TECS::update_50hz(float hgt_afe)
|
|||||||
_update_50hz_last_usec = now;
|
_update_50hz_last_usec = now;
|
||||||
|
|
||||||
// USe inertial nav verical velocity and height if available
|
// USe inertial nav verical velocity and height if available
|
||||||
if (_ahrs.have_inertial_nav()) {
|
Vector3f posned, velned;
|
||||||
_integ2_state = -_ahrs.get_velocity_NED().z;
|
if (_ahrs.get_velocity_NED(velned) && _ahrs.get_relative_position_NED(posned)) {
|
||||||
_integ3_state = -_ahrs.get_relative_position_NED().z;
|
_integ2_state = - velned.z;
|
||||||
|
_integ3_state = - posned.z;
|
||||||
} else {
|
} else {
|
||||||
// Get height acceleration
|
// Get height acceleration
|
||||||
float hgt_ddot_mea = -(_ahrs.get_accel_ef().z + GRAVITY_MSS);
|
float hgt_ddot_mea = -(_ahrs.get_accel_ef().z + GRAVITY_MSS);
|
||||||
|
Loading…
Reference in New Issue
Block a user