PX4-ECL
PX4-ECL copied to clipboard
Reset to optical flow data is using outdated data
If a reset to optical flow velocity is performed for the first time, the velocity will be always reset to zero. Even if we are in air and get reasonable flow data. The issue is that the _flow_compensated_XY_rad which is used inside resetVelocity() will be updated after the call to resetVelocity() inside controlOpticalFlowFusion(). Also if a later reset to the flow sensor happends, the velocity resets to something depending on the last stored value in _flow_compensated_XY_rad, which can be already outdated.