mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-04 07:30:57 +08:00
ekf2: remove warning events logging
- some of these warning flags aren't even being used, and most of the rest we can figure out from other sources
This commit is contained in:
1 parent
c29b4ff87e
commit
75bb339d94
9 files changed
+2
-84
No files matched your search
@@ -1107,16 +1107,7 @@ void EKF2::PublishEventFlags(const hrt_abstime ×tamp)
|
||||
_filter_information_event_changes++;
|
||||
}
|
||||
|
||||
// warning events
|
||||
uint32_t warning_events = _ekf.warning_event_status().value;
|
||||
bool warning_event_updated = false;
|
||||
|
||||
if (warning_events != 0) {
|
||||
warning_event_updated = true;
|
||||
_filter_warning_event_changes++;
|
||||
}
|
||||
|
||||
if (information_event_updated || warning_event_updated) {
|
||||
if (information_event_updated) {
|
||||
estimator_event_flags_s event_flags{};
|
||||
event_flags.timestamp_sample = _ekf.time_delayed_us();
|
||||
|
||||
@@ -1139,27 +1130,12 @@ void EKF2::PublishEventFlags(const hrt_abstime ×tamp)
|
||||
event_flags.reset_hgt_to_rng = _ekf.information_event_flags().reset_hgt_to_rng;
|
||||
event_flags.reset_hgt_to_ev = _ekf.information_event_flags().reset_hgt_to_ev;
|
||||
|
||||
event_flags.warning_event_changes = _filter_warning_event_changes;
|
||||
event_flags.gps_quality_poor = _ekf.warning_event_flags().gps_quality_poor;
|
||||
event_flags.gps_fusion_timout = _ekf.warning_event_flags().gps_fusion_timout;
|
||||
event_flags.gps_data_stopped = _ekf.warning_event_flags().gps_data_stopped;
|
||||
event_flags.gps_data_stopped_using_alternate = _ekf.warning_event_flags().gps_data_stopped_using_alternate;
|
||||
event_flags.height_sensor_timeout = _ekf.warning_event_flags().height_sensor_timeout;
|
||||
event_flags.stopping_navigation = _ekf.warning_event_flags().stopping_mag_use;
|
||||
event_flags.invalid_accel_bias_cov_reset = _ekf.warning_event_flags().invalid_accel_bias_cov_reset;
|
||||
event_flags.bad_yaw_using_gps_course = _ekf.warning_event_flags().bad_yaw_using_gps_course;
|
||||
event_flags.stopping_mag_use = _ekf.warning_event_flags().stopping_mag_use;
|
||||
event_flags.vision_data_stopped = _ekf.warning_event_flags().vision_data_stopped;
|
||||
event_flags.emergency_yaw_reset_mag_stopped = _ekf.warning_event_flags().emergency_yaw_reset_mag_stopped;
|
||||
event_flags.emergency_yaw_reset_gps_yaw_stopped = _ekf.warning_event_flags().emergency_yaw_reset_gps_yaw_stopped;
|
||||
|
||||
event_flags.timestamp = _replay_mode ? timestamp : hrt_absolute_time();
|
||||
_estimator_event_flags_pub.update(event_flags);
|
||||
|
||||
_last_event_flags_publish = event_flags.timestamp;
|
||||
|
||||
_ekf.clear_information_events();
|
||||
_ekf.clear_warning_events();
|
||||
|
||||
} else if ((_last_event_flags_publish != 0) && (timestamp >= _last_event_flags_publish + 1_s)) {
|
||||
// continue publishing periodically
|
||||
@@ -2676,8 +2652,7 @@ void EKF2::UpdateAccelCalibration(const hrt_abstime ×tamp)
|
||||
&& (_ekf.fault_status().value == 0)
|
||||
&& !_ekf.fault_status_flags().bad_acc_bias
|
||||
&& !_ekf.fault_status_flags().bad_acc_clipping
|
||||
&& !_ekf.fault_status_flags().bad_acc_vertical
|
||||
&& !_ekf.warning_event_flags().invalid_accel_bias_cov_reset;
|
||||
&& !_ekf.fault_status_flags().bad_acc_vertical;
|
||||
|
||||
const bool learning_valid = bias_valid && !_ekf.accel_bias_inhibited();
|
||||
|
||||
|
||||
Reference in new issue
Block a user