mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
EKF: get status on yaw alignement in flight
1s after the in air mag reset is performed, the final yaw alignment is complete and the yaw estimate can be used for yaw control.
This commit is contained in:
parent
2a5751233a
commit
394fa953b8
@ -215,6 +215,16 @@ public:
|
||||
|
||||
bool isTerrainEstimateValid() const { return _hagl_valid; };
|
||||
|
||||
bool isYawFinalAlignComplete() const
|
||||
{
|
||||
const bool is_using_mag = (_control_status.flags.mag_3D || _control_status.flags.mag_hdg);
|
||||
const bool is_mag_alignment_in_flight_complete = is_using_mag
|
||||
&& _control_status.flags.mag_aligned_in_flight
|
||||
&& ((_imu_sample_delayed.time_us - _flt_mag_align_start_time) > (uint64_t)1e6);
|
||||
return _control_status.flags.yaw_align
|
||||
&& (is_mag_alignment_in_flight_complete || !is_using_mag);
|
||||
}
|
||||
|
||||
uint8_t getTerrainEstimateSensorBitfield() const { return _hagl_sensor_status.value; }
|
||||
|
||||
// get the estimated terrain vertical position relative to the NED origin
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user