-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixed Wing: Extremely erratic altitude reporting with GPS #629
Comments
There is a bug in GPS/BARO combined handling of altitude, #543 is a work in progress to improve things. Basically current code is unable to handle altitude correctly if BARO and GPS are misaligned and they likely are. As a workaround one can zero out EDIT: #543 is not ready to be used for AH/PH/RTH yet, but you can try using it to collect some data for analysis. |
Or as the wiki suggest ;) Disable barometer (set baro_hardware = 1) on Naze32 targets due to critical bug that can make airplane dive to ground. |
@oleost I prefer to use baro over GPS altitude. Somehow I do not trust GPS altitude too much |
Sure it's better with baro, please report back if zeroing w_z_gps_p and w_z_gps_v does the trick. Then I can update the wiki to reflect that instead. |
I have to say I am flying several planes without baro (CC3D and nazes) with great success. Better to get the baro code working, but not needed. |
Hope to test over the weekend |
This should be fixed by #543 |
Still unable to test. If somebody can flight-test this (GPS + BARO enabled) and provide a log it would be awesome. |
I was supposed to test it the day I was out, but forgot to enable barometer :/ Will test as soon as weather permits. |
@oleost no worries! Also no need to engage any navigation modes, just recording a simple log will do just fine. |
@oleost any chance you would be able to test this in the nearest future? |
I hope so. Just waiting for weather. My wing and battery is charged and ready |
@digitalentity Looking at the weather forecast I either get a chance tomorrow if not there will be heavy wind for one week. |
@digitalentity https://drive.google.com/open?id=0B-yHzNtOXxbEa181WGstVTRhTGs Log, CLI dump and video. I think I noticed some strange altitude loss while circle above home with RTH and first try. Have not have timed to look at the log myself yet. ( And skip to 8:30 for møre acrobatic flight with rolls and loops ) |
There if deffinitly something wierd here. First time doing RTH on this wing. Please have a look. It also climbs during the seconds Im in GPS hold. Unsure if I had pitch applied on TX to increase altitude but I dont think so. Keep in mind that my baro is not shieldet in any way as I was not planning to use it. Except that its below one the flightcontroller. (To synchronize video you can watch when I flip switch its armed and blackbox record is starting.) |
Ok, looks like it's not a BARO issue, but a GPS issue. During that weird altituce change GPS altitude drops from 40m to -22m (negative altitude): Baro on the contrary indicate correct behavior (rise in altitude) when airplane climbs in attempt to compensate. Ok, the initial issue is indeed solved - BARO/GPS are synchronised, GPS is preferred, however the altitude estimation itself may be wrong. I wonder if we should favor barometer instead of GPS? |
Hmm. How is it on multirotors? (But I would assume that if you have BARO enabled it should be correct and be the preffered way of measuring height, on both multirotors and fixedwing) But it is wierd, granted I dont have flown this fly very much, but I have done POS/ALT hold without any issues previously. In gps only mode. Wonder why this happend now or if its only concidence.. (Or if I took off with low satelite count and I got addiotonal satelites while that drop is happening) |
From what I've read GPS altitude is less reliable than baro altitude, so favouring barometer makes sense. |
I'm for favoring baro over GPS altitude |
See #842 |
Since my airplane is operational, let's do some FW testing :)
Symptoms: with GPS fix, altitude reported over MSP to OSD (not sure about internal data since not using PosHold/AltHold on FW yet) was extremely erratic: from -50m to 100m in few seconds.
I suspect it's a result of extremely poor fix and the fact that FW uses GPS for altitude and vertical velocity. Probably this is fine with good GPS module and fix.
@digitalentity I suspect setting
w_z_gps_p
andw_z_gps_v
to0
would force INAV to use BARO for altitude, but this is hard to do without extremely good knowledge of software. Maybe some kind of a CLI swith to simplify the thing?The text was updated successfully, but these errors were encountered: