PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

[Bug] GPS failure, notify user

Open dakejahl opened this issue 10 months ago • 8 comments

Describe the bug

We had a customer experience some momentary GPS interference which kicked the vehicle out of position mode and into altitude mode. They reported the issue to us because it was not clear from the log what caused the failure. The log file contains some cryptic warnings.

Image

After analyzing the log it appears that the speed accuracy exceeded the max threshold. Although I tried to reproduce this in sim and was unable to cause the failure by simply increasing the speed accuracy. It's hard to tell where exactly in ekf code the failure occurs without some kind of indicator.

To Reproduce

Experience GPS interference. Maybe a long term goal would be to add a failure injection test mode into sim for simulating GPS interference.

Expected behavior

There should be an event notification that informs the user at GCS that the vehicle has lost position hold (xy_valid goes false). Ideally it would be even more specific and indicate the exact reason for failure (eg speed accuracy exceeds max threshold). The log file should also contain this notification and we should suppress the other side effect warnings.

Screenshot / Media

Image

Flight Log

https://logs.px4.io/plot_app?log=c25d5ee4-1531-4dc3-9906-637c52488da4

Software Version

v1.15.0

Flight controller

ARKV6X

Vehicle type

Multicopter

How are the different components wired up (including port information)

No response

Additional context

No response

dakejahl avatar Feb 18 '25 03:02 dakejahl

The concern and tradeoff is detecting any potential GPS spoofing, but at first glance I don't think we should have invalidated the velocity estimate in the first place.

dagar avatar Feb 18 '25 15:02 dagar

Here are another 2 logs with the same issue https://logs.px4.io/plot_app?log=f69359b9-e132-47f7-99cf-a5803bcf525a https://logs.px4.io/plot_app?log=6127c186-c2c1-46ff-b59a-c1b92f0423a0

dakejahl avatar Feb 18 '25 18:02 dakejahl

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-feb-26-2025/43951/4

DronecodeBot avatar Feb 26 '25 05:02 DronecodeBot

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-feb-26-2025/43951/1

DronecodeBot avatar Feb 26 '25 14:02 DronecodeBot

to add it this, Freefly Systems is also having this problem in a few different forms

This log does the same thing when RTK stream on the ground station is stopped. https://logs.px4.io/plot_app?log=9c2fc42d-171b-40fe-ab77-32ac7895d92d

We have had similar problems where small spikes above PDOP threshold also cause this.

jeremyzff avatar Mar 20 '25 22:03 jeremyzff

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-mar-26-2025/44527/1

DronecodeBot avatar Mar 26 '25 16:03 DronecodeBot

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/frequent-local-position-loss-despite-good-gps/45362/4

DronecodeBot avatar May 01 '25 18:05 DronecodeBot

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/wiki-errors-for-ek2-gps-check/45940/2

DronecodeBot avatar Jun 10 '25 02:06 DronecodeBot