-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
iNav V5 - Barometer sanity check missing? #8224
Comments
Hi @robustini, the Pull Request opened by Konstantin solves your problem. The resolution of this problem is already in Branch Master, you might want to do some flying and see if the problem really disappeared. And the idea of adding a function to check if baro is sending acceptable readings that are meant to be used in autopilot modes is really good, I can try to develop this in the future... Thanks for your contributions, and again, I'm really a fan of your work at ArduPilot, I've learned a lot from your videos. |
Thanks @JulioCesarMatias! |
@JulioCesarMatias in all honesty I don't understand how the baro_median_filter, which I had definitely ON, could have cut out the reading in MSP of the barometer only, leaving the data at 0. |
This log shows a flight of my tailsitter with Ardupilot. |
Baro sanity check is only done by looking if it is present on the I2C or UART (MSP). If it is detected, and it is returning bad data, Alt-hold and Pos-Hold modes may still be active, leading to crashes. Between the I2C or MSP there must be a function to check the health of the Baro, if the data is good, ok, use Baro... The iNav has the verification of the estimate of Position Z, the maximum error value accepted is configurable through of the |
This ArduPilot graphic is very beautiful! Maybe one day we won't have him on iNav... |
Do you think we should have a parameter to compensate for the elevation of the field, and apply it to the baro calculation? |
I looked at the inav_max_eph_epv parameter, i.e. estimated position error thresholds but I don't understand if it is intended in XY or even in Z. |
Obviously, a copter that performs an RTH only with the gps data will never be accurate in altitude, but at least it will bring the drone to the home and not in orbit like a rocket, a bit like Betaflight does if you only use the gps, without mag and barometer. |
I've always thought it makes sense to have some sort of basic sanity check for Baro based altitude position estimations using GPS altitude. GPS altitude may not be so accurate but with a decent lock it's usually within 10 - 20m which is fine for sanity checking to prevent moon shots on multirotors. Fixed wing does have input from the GPS in this regard, inav_use_gps_no_baro. |
Current Behavior
Recently a fix was made for the Matek GNSS M8Q-CAN gps, the barometer was not detected.
Unfortunately this fix did not solve a problem: sometimes the barometer does not give any data in MSP, while the gps and mag data are there.
In fact in the first log it works perfectly, in the second it remains at 0.
Just then I had a digital video block, I activated the RTH which should have stopped at 30 meters high, just look at the log to understand what happened.
It was a miracle to get the racer back intact.
Steps to Reproduce
It is not easily reproducible but it is undeniable from the log that happened here.
Expected behavior
Here I involve the main developer @DzikuVx and the friend @JulioCesarMatias by asking him why there is no baro sanity check.
It would be enough to compare its data with the height detected by the gps, which will still be inaccurate but could allow the racer not to be sent into orbit during RTH if the baro fail.
I don't know if @matek has checked this issue, but it seems to me that he pointed out a possible similar problem.
I do not exclude that it may also be a gps firmware problem, if iNav has armed it means that the baro identified it.
Suggested solution(s)
Add a sanity check of the barometer in case of RTH or other automatisms that involve its use, and if it does not work, use the gps height.
Additional context
logs.zip
INAV/ZEEZF7 5.0.0 Jul 4 2022 / 08:25:36 (e3b3e2b9)
GCC-10.2.1 20201103 (release)
The text was updated successfully, but these errors were encountered: