Skip to content
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

AP_NavEKF3: Use the correct extnav variances for posvel fusion #29420

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rishabsingh3003
Copy link
Contributor

Currently, the variance for ext nav is never used if a healthy GPS is connected and even if not set as a EK3_SRC_ source.

#if EK3_FEATURE_EXTERNAL_NAV
} else if (extNavUsedForPos) {
if (extNavUsedForPos) {
R_OBS[3] = sq(constrain_ftype(extNavDataDelayed.posErr, 0.01f, 10.0f));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's existing code but we could make the upper constraint consistent between GPS and ExtNav (e.g. 100). This is scope creep though so no need to change for this PR unless you want to

@@ -720,27 +720,29 @@ void NavEKF3_core::FuseVelPosNED()
R_OBS[4] = R_OBS[0];
for (uint8_t i=0; i<=2; i++) R_OBS_DATA_CHECKS[i] = R_OBS[i];
} else {
#if EK3_FEATURE_EXTERNAL_NAV
if (extNavVelToFuse && frontend->sources.useVelXYSource(AP_NavEKF_Source::SourceXY::EXTNAV)) {
R_OBS[2] = R_OBS[0] = sq(constrain_ftype(extNavVelDelayed.err, 0.05f, 5.0f));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, we could make the upper constraint consistent by making it 50 instead of 5

Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for fixing this long standing issue!

@rmackay9
Copy link
Contributor

rmackay9 commented Mar 4, 2025

Maybe this PR resolves #24020?

@tridge
Copy link
Contributor

tridge commented Mar 4, 2025

@priseborough can you have a look?

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.

4 participants