PX4-Autopilot
PX4-Autopilot copied to clipboard
Adds missing reset counter logic to EV height fusion
EV odometry handling in the EKF is not considering the reset_counter field for EV height fusion, only horizontal position, velocity, and yaw.
This PR adds the same reset logic from the other estimates to the EV height fusion controller so that the vertical position and velocity estimates are reset upon change in the EV odom message's reset_counter field.
I'm not entirely sure if resetting vertical velocity to zero is correct in this case - maybe resetting vertical velocity to EV (if it is available in the new message) is the right thing to do, similar to how gnss_height_control handles it:
if (isHeightResetRequired()) {
// All height sources are failing
resetHeightToGps(gps_sample);
resetVerticalVelocityToGps(gps_sample);
I'm not entirely sure if resetting vertical velocity to zero is correct in this case - maybe resetting vertical velocity to EV (if it is available in the new message)
Yes, let's reset to EV velocity if available