-
Notifications
You must be signed in to change notification settings - Fork 19.9k
AP_NavEKF3: Check if rangefinder is in range (if in use by EK3_SRCx_POSZ) #29537
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
base: master
Are you sure you want to change the base?
AP_NavEKF3: Check if rangefinder is in range (if in use by EK3_SRCx_POSZ) #29537
Conversation
44412df to
3757144
Compare
| dal.snprintf(failure_msg, failure_msg_len, "Rangefinder not enabled"); | ||
| return false; | ||
| } | ||
| bool rangefinder_healthy = false; |
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.
can't we just check rngValidMeaTime_ms ?
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.
should be in the new pre_arm check in the backends, so we check all lanes, check it is fusing
|
I'm pretty sure that I have a bug from a user here in Japan that shows this same issue. The user was on Copter-4.5.7 so it's an existing issue. |
|
@rishabsingh3003 do you have time to test the change I suggested? |
|
@tridge I did get to try your suggestions, however it did not work as expected. This is the relevant line I am talking about: |
|
Hi @rmackay9, I’m a bit confused about the issue. |
|
Hi @rishabsingh3003, I spent some time looking into this today and I may have a fix for the underlying issue #30490. I wonder though, have you ever been able to re-create the issue in SITL? |
It is currently possible to takeoff in Alt-Hold, have EK3_SRCx_POSZ set to "RANGEFINDER", and have the rangefinder out of range (can be verified in SITL).
This can cause the EK3 height estimates to grow unconstrained till the rangefinder is back in range.
I recently saw a log where this caused the copter to almost crash.
This PR adds a pre-arm check for this issue.