-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
base: master
Are you sure you want to change the base?
AP_NavEKF3: Use the correct extnav variances for posvel fusion #29420
Conversation
#if EK3_FEATURE_EXTERNAL_NAV | ||
} else if (extNavUsedForPos) { | ||
if (extNavUsedForPos) { | ||
R_OBS[3] = sq(constrain_ftype(extNavDataDelayed.posErr, 0.01f, 10.0f)); |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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
There was a problem hiding this 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!
Maybe this PR resolves #24020? |
@priseborough can you have a look? |
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.