AP_NavEKF: option to align extnav to optflow pos estimate #27487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a cut-down version of PR #26632
This adds a new EK3_SRC_OPTION bit that allows "re-aligning" the External Nav position to the AHRS when optical flow is used (e.g. when External Nav is not used). Previously this re-alignment would only occur when using GPS or Beacons that provide an absolute position.
Re-aligning to the optical flow is useful when the ModalAI VOXL cameras (and perhaps other external nav systems) are paired with an optical flow sensor for backup. It means the pilot should not notice any position jumps when switching between the two sources.
This has been tested on real hardware and below are the before and after screenshots. During this testing the vehicle was first switched to use Optical Flow, the vehicle was then moved and switched to ExtNav. The "Before" image shows the position jump which is cause by optical flow drifting a bit compared to the VOXL camera. In the "After" we see there is no position jump because, while the optical flow was active, the VOXL's position was constantly being shifted to the optical flow based position.