|
|
|
@ -1054,8 +1054,9 @@ FixedwingPositionControl::control_position(const math::Vector<2> ¤t_positi
@@ -1054,8 +1054,9 @@ FixedwingPositionControl::control_position(const math::Vector<2> ¤t_positi
|
|
|
|
|
math::Vector<3> accel_body(_sensor_combined.accelerometer_m_s2); |
|
|
|
|
math::Vector<3> accel_earth = _R_nb * accel_body; |
|
|
|
|
|
|
|
|
|
if (!_mTecs.getEnabled() && !_vehicle_status.condition_landed) { |
|
|
|
|
_tecs.update_50hz(_global_pos.alt /* XXX might switch to alt err here */, _airspeed.indicated_airspeed_m_s, _R_nb, accel_body, accel_earth); |
|
|
|
|
/* update TECS filters, but only if in auto mode. */ |
|
|
|
|
if (_control_mode.flag_control_auto_enabled && (_global_pos.timestamp > 0) && !_mTecs.getEnabled() && !_vehicle_status.condition_landed) { |
|
|
|
|
_tecs.update_50hz(_global_pos.alt, _airspeed.indicated_airspeed_m_s, _R_nb, accel_body, accel_earth); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* define altitude error */ |
|
|
|
|