Skip to content

[Backport 1.17] fix(ekf2): allow optical flow to start when range finder is height reference#26962

Open
dakejahl wants to merge 1 commit intorelease/1.17from
backport/1.17/fix-flow-range-height
Open

[Backport 1.17] fix(ekf2): allow optical flow to start when range finder is height reference#26962
dakejahl wants to merge 1 commit intorelease/1.17from
backport/1.17/fix-flow-range-height

Conversation

@dakejahl
Copy link
Copy Markdown
Contributor

@dakejahl dakejahl commented Apr 2, 2026

Backport of #26960 to release/1.17.

…ference

When EKF2_HGT_REF=2 (range sensor) with no GPS, optical flow could
never start. The starting condition required isTerrainEstimateValid()
or isHorizontalAidingActive(), but terrain is never "estimated" when
range is the height reference (ground is the datum, terrain state is
fixed at 0), and there's no horizontal aiding without GPS.

HAGL is directly known from the range measurement in this case, so
optical flow has everything it needs to fuse. Add the range height
reference check to the optical flow starting conditions.

Fixes: #25248
@mrpollo
Copy link
Copy Markdown
Contributor

mrpollo commented Apr 3, 2026

I need to investigate why CI fails in this branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants