-
Notifications
You must be signed in to change notification settings - Fork 16.8k
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
EKF3: fix EKF reported altitude against public origin #21834
Conversation
555cf42
to
9782a4b
Compare
I guess we can't remove each core's local origin completely? I suspect this isn't possible because the EKF may update the origin in some rarely used code paths.. but I'd be tempted to remove those code paths (assuming they exist) as well. |
no, we can't remove those. The EKF constantly moves the local origin to be the current position while flying so that the locally flat-earth assumption is maintained. The public origin doesn't move. This local origin separation is what allows us to fly long distances (say over 1000km) without large errors due to the curvature of the earth |
9782a4b
to
6e4b299
Compare
an EKF lane change when the two lanes are using different GPS should not cause a height change in GUIDED
always use common origin, and adjust output posD for difference between public and local lane origin heights
6e4b299
to
33d82b2
Compare
this fixes a bug introduced in ArduPilot#21834 this fix in ArduPilot#21834 was correct for getPosD, but should not have been applied to getLLH this caused cruise mode in plane to descend/ascend by the difference between the public and local origins on mode entry fixes ArduPilot#21984
this fixes a bug introduced in ArduPilot#21834 this fix in ArduPilot#21834 was correct for getPosD, but should not have been applied to getLLH this caused cruise mode in plane to descend/ascend by the difference between the public and local origins on mode entry fixes ArduPilot#21984
this fixes a bug introduced in ArduPilot#21834 this fix in ArduPilot#21834 was correct for getPosD, but should not have been applied to getLLH this caused cruise mode in plane to descend/ascend by the difference between the public and local origins on mode entry fixes ArduPilot#21984
this fixes a bug introduced in ArduPilot#21834 this fix in ArduPilot#21834 was correct for getPosD, but should not have been applied to getLLH this caused cruise mode in plane to descend/ascend by the difference between the public and local origins on mode entry fixes ArduPilot#21984
this fixes a bug introduced in ArduPilot#21834 this fix in ArduPilot#21834 was correct for getPosD, but should not have been applied to getLLH this caused cruise mode in plane to descend/ascend by the difference between the public and local origins on mode entry fixes ArduPilot#21984
This fixes an issue that happens with the following scenario:
This PR adds a test that reproduces the issue in SITL and also a fix so that the reported origin uses the public origin and getPosD() in EKF3 adjusts for the difference in origin alt between public origin and the local lane origin