If GPS/Non-GPS transitions are setup using External Nav (e.g. Visual Odometry) and Optical flow then transitions from optical flow to External Nav may result in a large position jump to the GPS location even though the GPS is not defined in any of the source sets (e.g. the GPS is not defined in any EK3SRCx parameters)
Below is an image from SITL testing where GCS_SEND_TEXT() debug messages were added to NavEKF3_core::ResetPosition() to determine the position source used for the position reset.
If GPS/Non-GPS transitions are setup using External Nav (e.g. Visual Odometry) and Optical flow then transitions from optical flow to External Nav may result in a large position jump to the GPS location even though the GPS is not defined in any of the source sets (e.g. the GPS is not defined in any EK3SRCx parameters)
Below is an image from SITL testing where GCS_SEND_TEXT() debug messages were added to NavEKF3_core::ResetPosition() to determine the position source used for the position reset.
The issue can be reproduced in SITL by doing the following the SITL instructions for Vicon and optical flow. To be more specific follow these instructions:
../Tools/autotest/sim_vehicle.py --map --console -A "--serial5=sim:vicon:"
Fly the vehicle in Guided mode first using External nav
At this last command the vehicle will momentarily appear where the GPS reports the vehicle to be and then move violently back to where it was.