Offboard mode with local position that doesn't update

Hi,

I’ve tried running iris with optical flow on SITL and test different scenarios using offboard commands.

I ran into some issue where flying over a plain surfaces (with no texture), the optical flow obviously reported quality=0, but the drone kept running in offboard mode as if it had a valid local position (and what actually happened is that the drone was moving without updating its local position).

Sending a setpoint_position command while in this state caused the drone to fly accelerate endlessly (as the local position isn’t updating, so the drone never reaches it setpoint).

I was able to reproduce the same issue when running in offboard with GPS only, and flying before the GPS has a lock.

Two questions in this manner:

  1. Why isn’t offboard mode aborted in this situation (when local position can’t update)? Flying autonomously without a proper local position is very dangerous.
  2. How come the IMU doesn’t update the local position and make this a little bit less harmful?

Thanks!
Koby