A failsafe should be triggered if the new pose estimation varies too much from the previous estimation (i.e. not within reasonable dynamics of the system). This failsafe would 'capture' wrong estimation (e.g. if the VIO fails or has a sudden gap) and prevent a consequent crash.
Implement the logic to compute the difference between the new and the previous estimation
Find a way to trigger a failsafe mode
Find reasonable parameters as threshold for when to trigger the failsafe
A failsafe should be triggered if the new pose estimation varies too much from the previous estimation (i.e. not within reasonable dynamics of the system). This failsafe would 'capture' wrong estimation (e.g. if the VIO fails or has a sudden gap) and prevent a consequent crash.