-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
GPS & baro fusion problem #14141
Comments
Good question. Let me ping @bresch and @CarlOlsson hoping that they have answers. |
Unfortunately I don't have experience with GPS as primary height source. @matejbone Just curious, why don't you want to use baro as primary height source? |
I tried to use GPS, because after a long flight 2+ hours I had in mind that barometric pressure would change and that would affect the approaching height. How do I adjust weight between both? Is there a parameter? |
No the EKF only uses one of them at the time. Here is some super old issue regarding baro offset estimation PX4/PX4-ECL#44 |
FYI @RomanBapst @jkflying |
Use baro as primary height source. The offset will be re-estimated using GPS if available, so you shouldn't have drift. There were some ideas from @kamilritz about doing multiple height source fusion (vision, lidar, baro & GPS all together) but this would require a big rework of the EKF. |
OK thanks for the help to all! I will try to use baro and see what happens if GPS is jammed. |
@jkflying Can you remind me where we are doing this? I was under the impression that we don't compensate for baro drift. |
Hmm, it seems we only do that if we don't use baro as primary. https://github.com/PX4/ecl/blob/81c6d6655f6e409cac549ed8537b22996b413028/EKF/control.cpp#L1083-L1092 |
Hi!
I have a question regarding EKF2 fusion.
PX4 is set up to use GPS as a primary source for EKF2_HGT_MODE.
Reported altitude is OK until the GPS receiver is jammed. In that case, fusion creates a problem, because it merges invalid position from GPS and baro and from that point on fused altitude is incorrect. Px4 thinks it's flying way higher than it actually is.
Is there a way in the parameters to set up in case of invalid GPS to use baro as a primary source. Could I set PX4 to turn off fusion when GPS signal is invalid? I think that is feeding info in the Kalman filter even when it's invalid and from that point on fused altitude does not return to GPS reported one.
Flight1
Flight2
I tried using EKF2_GPS_V_GATE and EKF2_GPS_P_GATE more restrictively but without any luck.
Thanks!
The text was updated successfully, but these errors were encountered: