Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EKF2: Spoofing GPS check #23366

Merged
merged 5 commits into from
Jul 9, 2024
Merged

Conversation

haumarco
Copy link
Contributor

@haumarco haumarco commented Jul 5, 2024

Solved Problem

Currently the spoofing state, which gets set by the GPS driver, does not have any effect on the estimator.

Solution

One can now add the spoofing state to the EKF2_GPS_CHECK. For it to fail, the spoofing flag has to be consistently true over a second and vice-versa for it to pass again.
There is now also a event which gets sent once when the first spoofed message arrives. This will notify the user, independent of the settings chosen in EKF2_GPS_CHECK.

@haumarco haumarco requested review from dagar and sfuhrer July 5, 2024 14:18
@haumarco haumarco added the EKF2 label Jul 5, 2024
@dagar dagar requested a review from AlexKlimaj July 5, 2024 16:31
@AlexKlimaj
Copy link
Member

Here is a log with an example with false positive spoofing. We probably want spoofing state to be >=2 for a period of time before failing the check.

https://review.px4.io/plot_app?log=8e03bae1-1551-4c93-bf6b-19c22e3c78a1

image
image

@haumarco
Copy link
Contributor Author

haumarco commented Jul 9, 2024

I now changed it to:
We report every time the fusion is interrupted because of spoofing: i.e.: every time the gps_check_flags.spoofing_detected goes from false to true.
The disabling of the fusion (the one above is just skipping) is now based on the existing hysteresis.

Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would really want to completely switch from GPS to GNSS at some point...

@haumarco haumarco force-pushed the pr-ekf2_disable_gps_fusion_w_spoofing branch from 7ae41a4 to 30211ab Compare July 9, 2024 08:57
bresch
bresch previously approved these changes Jul 9, 2024
@haumarco haumarco merged commit 419652b into main Jul 9, 2024
91 of 94 checks passed
@haumarco haumarco deleted the pr-ekf2_disable_gps_fusion_w_spoofing branch July 9, 2024 14:31
@AMoldskred
Copy link

@haumarco @bresch Looks like the CI for synching the px4_msgs repo failed on the deploy here. They are now out of synch, causing issues if you use the px4_ros2_interface_lib. Would you mind rerunning the action synching the msgs?

vertiq-jordan pushed a commit to iq-motion-control/PX4-Autopilot that referenced this pull request Aug 21, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants