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

AP_GPS: Remove external event from Septentrio driver #11025

Merged
merged 2 commits into from
Apr 14, 2019

Conversation

WickedShell
Copy link
Contributor

@WickedShell WickedShell commented Apr 6, 2019

The Septentrio driver was logging camera feedback that the GPS witnessed. This was useful from a minimum hardware perspective, but it does pose a safety risk to flight. If to many events are triggered (due to noise on the input pin, or a truly fast camera) you can create congestion on the serial port to the GPS and the position data gets delayed. We detect this in the health bits, but the lag the data experiences becomes significant enough that the EKF will start rejecting the GPS data. This leads to oscillations in the sky, and all kinds of horrifying stuff happening. To correct for this I've removed the feedback into ArduPilot. I'm happy to restore it in the future if there is a patch on the GPS firmware that would prevent this from blocking the flight critical positioning data. As a note the GPS did detect the buffer overflow/port congestion, and we did detect it on the ArduPilot side. This does not have any impact on the PPK workflow, all events are still logged to the GPS SD card the same as they were before.

Example of external event induced lag (this line of timestamps should be perfectly flat, instead of bending in the middle):
Figure_1

This also makes a change to ensure that we log receiver status to the GPS SD card. This is useful for problem analysis, when the statustext message from the autopilot gets lost, or the user has misplaced the log files.

This was test flown on a AsteRx-M2

@amilcarlucas this patch may be of interest to you.

@amilcarlucas
Copy link
Contributor

Testred it today, worked fine.

If the event pin floats, this can lead to UART congestion, causing the
EKF to reject the GPS data, and the vehicle will drift around the sky in
a most disturbing manner
This improves log analysis of bad GPS health messages when you have a
report of bad GPS health but lost the MAVLink message, or didn't have
access to the autopilot log with the information for some reason.
@WickedShell WickedShell merged commit cc679db into ArduPilot:master Apr 14, 2019
@WickedShell
Copy link
Contributor Author

@rmackay9 @tridge I've tagged this on the backports list, as this fixes external noise on a pin causing a loss of GPS lock. It's rare enough though, that I don't think it merits a point release by itself though.

@rmackay9
Copy link
Contributor

This was on the list to backport to Rover-3.5 but I hit significant merge conflicts so I'll leave it to Rover-3.6 unless there are objections

@WickedShell
Copy link
Contributor Author

@rmackay9 I'd object given that if this happens the EKF will be rejecting all GPS data until the situation recovers, which could be a undefined time period.

@rmackay9
Copy link
Contributor

@WickedShell, any chance that you could create a PR or just merge it to the Rover-3.5 branch? Sorry to put extra load on your but I just don't trust myself to get it right..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Copter 3.6 Backports
  
3.6.9-rc1/rc2
Development

Successfully merging this pull request may close these issues.

None yet

4 participants