Flight testing using 2 GPS - possible bug/HW issue

I have tested the two GPS feature with pretty bad results.
Pixhawk 2.1 (not first batch, bought about a month ago) with arducopter 3.5
2 here GPSs
1 external compass in use.

First flight all went well, results looked good (Log attached)
After the first successful flight I landed changed the battery and tried it again. After a short time a bad deviation accrued, the quad just headed off in one direction until I felt it was unsafe.
Tried it again with same bad results.

Looking at the log it looks like some kind of EKF glitch to my untrained eye but I will let the experts have a look. Its clear that both GPS1 and GPS 2 are showing close position and POS is way way off.
A few errors appeared - EKF-PRIMERRY 1 and 0, EKF-CHECK 1 and 0.

All 3 flights in the attached file.
Pixhawk 2.1 two GPS flight testing-20170729T183811Z-001.zip (479.6 KB)

The zip file:
Good flight - 2017-07-27 12-14-20
Rest are bad flights.

Could be a setup problem/bad HW I dont know…

Thanks for all the help!!

Are you sure your compass orientation is set correctly? I’m not very qualified to look at these information in a log, but it looks like your internal compasses (which you have disabled to be used) don’t agree with your external one.

The magnetometer innovations for the IMU1 and IMU2 EKF’s are very large and in agreement with each other.

It appears from the plotting the field strength that MAG1 and 3 are the external units and MAG2 is the internal. There is no consistency between the three mags. You need to perform a compass calibration and verify the orientation of the magnetometers.

Thanks for looking in to it!

I am only using 1 externally mounted compass so why should the EKF trigger?

I have re-calibrated my compass, made sure only the external one is being used.
Tried flying again with 2 GPSs connected. (Only the UART was connected not the I2C)
During the first flight I Got compass variance and the quad started a toilet bowl effect.
After landing I disconnected the second GPS and changed the parameters accordingly.
Second flight was flawless. NO errors NO compass variance.

Again the only difference between the two flights was the disconnecting of the second GPS.

I think there is a problem with the EKF in 3.5 when using 2 GPSs
@rmackay9 I think its worth looking in to.
Folder with 2 flight logs

I think there is a real bug here.
@priseborough it maybe EKF related.