forked from Archive/PX4-Autopilot
ekf2: yaw estimator add yaw_composite_valid boolean
This commit is contained in:
parent
a218f4bfaf
commit
3889b79342
|
@ -3,6 +3,7 @@ uint64 timestamp_sample # the timestamp of the raw data (microseconds)
|
|||
|
||||
float32 yaw_composite # composite yaw from GSF (rad)
|
||||
float32 yaw_variance # composite yaw variance from GSF (rad^2)
|
||||
bool yaw_composite_valid
|
||||
|
||||
float32[5] yaw # yaw estimate for each model in the filter bank (rad)
|
||||
float32[5] innov_vn # North velocity innovation for each model in the filter bank (m/s)
|
||||
|
|
|
@ -338,6 +338,9 @@ public:
|
|||
bool getDataEKFGSF(float *yaw_composite, float *yaw_variance, float yaw[N_MODELS_EKFGSF],
|
||||
float innov_VN[N_MODELS_EKFGSF], float innov_VE[N_MODELS_EKFGSF], float weight[N_MODELS_EKFGSF]);
|
||||
|
||||
// Returns true if the output of the yaw emergency estimator can be used for a reset
|
||||
bool isYawEmergencyEstimateAvailable() const;
|
||||
|
||||
const BaroBiasEstimator::status &getBaroBiasEstimatorStatus() const { return _baro_b_est.getStatus(); }
|
||||
|
||||
const auto &aid_src_baro_hgt() const { return _aid_src_baro_hgt; }
|
||||
|
@ -1062,9 +1065,6 @@ private:
|
|||
// Returns true if the reset was successful
|
||||
bool resetYawToEKFGSF();
|
||||
|
||||
// Returns true if the output of the yaw emergency estimator can be used for a reset
|
||||
bool isYawEmergencyEstimateAvailable() const;
|
||||
|
||||
void resetGpsDriftCheckFilters();
|
||||
|
||||
bool resetEstimatorAidStatusFlags(estimator_aid_source_1d_s &status) const
|
||||
|
|
|
@ -1384,6 +1384,7 @@ void EKF2::PublishYawEstimatorStatus(const hrt_abstime ×tamp)
|
|||
yaw_est_test_data.innov_vn, yaw_est_test_data.innov_ve,
|
||||
yaw_est_test_data.weight)) {
|
||||
|
||||
yaw_est_test_data.yaw_composite_valid = _ekf.isYawEmergencyEstimateAvailable();
|
||||
yaw_est_test_data.timestamp_sample = _ekf.get_imu_sample_delayed().time_us;
|
||||
yaw_est_test_data.timestamp = _replay_mode ? timestamp : hrt_absolute_time();
|
||||
|
||||
|
|
Loading…
Reference in New Issue