Good morning everyone,
We gave it a try yesterday to a primary lane of EKF with VIO as yaw source and GPS for position. We noticed that the alignment for the yaw of the VIO to be referenced with North direction as zero is done with respect to the yaw is currently in use. Before taking off, this would be, and correct me if I am wrong, the yaw estimation in the first lane (EKF3 core with index 0) since the AP_NavEKF3::updateFilter method forces it to be the primary if the vehicle has not been armed. Therefore, when we define the EK3_SRC1_YAW=6 (Extnav yaw) and RC9_OPTION=80 (VisoAlign) and flip the channel 9 before flying, the alignment does not happen. In fact, it makes sense since the method AP_VisualOdom_IntelT265::align_sensor_to_vehicle check first if the source of yaw is external navigation and does not perform the alignment if this is true.
The alignment works perfectly before taking off if the primary lane has another yaw source such compass as shown below:
And I dare say that we were able to have a very good flight with the yaw of the VIO as source without the alignment making sure that the vehicle was pointing north before taking off. However, I wonder if there is a work-around to this situation that does not imply us to point to north before taking off. The yaw of the camera is quite good in certain environments where the compass is not an option. I am going to try today a Lua script that will change the primary core before taking off, so the alignment can happen having in a secondary lane the compass and making it the primary just before taking off. Not sure if it is going to work since the AP_NavEKF3::updateFilter does not allow lane switching before arming.