mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 16:51:16 +08:00
EKF2: Spoofing GPS check (#23366)
* estimator gps check fail flag for spoofing * warn whenever spoofing state changes to true, use default hysteresis to completely stop fusion * dont introduce more GPS namings, GNSS instead * flash: exclude mantis for cuav_x7pro
This commit is contained in:
1 parent
62ff39a669
commit
419652b9fe
9 files changed
+53
-13
No files matched your search
@@ -1253,6 +1253,7 @@ void EKF2::PublishGpsStatus(const hrt_abstime ×tamp)
|
||||
estimator_gps_status.check_fail_max_vert_drift = _ekf.gps_check_fail_status_flags().vdrift;
|
||||
estimator_gps_status.check_fail_max_horz_spd_err = _ekf.gps_check_fail_status_flags().hspeed;
|
||||
estimator_gps_status.check_fail_max_vert_spd_err = _ekf.gps_check_fail_status_flags().vspeed;
|
||||
estimator_gps_status.check_fail_spoofed_gps = _ekf.gps_check_fail_status_flags().spoofed;
|
||||
|
||||
estimator_gps_status.timestamp = _replay_mode ? timestamp : hrt_absolute_time();
|
||||
_estimator_gps_status_pub.publish(estimator_gps_status);
|
||||
@@ -2460,6 +2461,7 @@ void EKF2::UpdateGpsSample(ekf2_timestamps_s &ekf2_timestamps)
|
||||
.yaw = vehicle_gps_position.heading, //TODO: move to different message
|
||||
.yaw_acc = vehicle_gps_position.heading_accuracy,
|
||||
.yaw_offset = vehicle_gps_position.heading_offset,
|
||||
.spoofed = vehicle_gps_position.spoofing_state == sensor_gps_s::SPOOFING_STATE_MULTIPLE,
|
||||
};
|
||||
|
||||
_ekf.setGpsData(gnss_sample);
|
||||
|
||||
Reference in new issue
Block a user