Iāve buckled down to learn about the EKF data and attempted a new analysis. The tutorial for the EKF at http://ardupilot.org/dev/docs/extended-kalman-filter.html#extended-kalman-filter is very helpful.
EKF3 contains all of the āinnovationsā for the model. Innovations are the differences between the model and the subsequent sensor data. My first graph plots the EKF3 values for IVN and IVE (GPS velocity vs. model velocity). This looks almost like a square wave with a 12-15 second period during the āupsetsā in navigation.
The EKF tutorial notes that āThese are an important measure of health for the navigation filter. If you have god quality IMU and GPS data they will be small and around zeroā I read this as saying that only the IMU and GPS data are involved here.
My 2nd graph shows IPN and IPE added (GPS position North and East vs model position):
At the beginning of each 12-15 second period, the positions match. But they drift away for the duration of the 12-15 secondsā¦and then snap back to match. The drift direction matches the direction of the excessive velocity.
Could the compass still be involved. Itās doubtful As shown in the following graph (where I overlay IMX and IMY), there is a gigantic innovation for the magnetic sensors at the beginning of this sequence. But itās so big that the EKF stops using it for navigationā¦therefore it canāt be a cause of the subsequent errors:
The next graph, from NFK4 (EKF4) shows SV and SP. These are estimates of GPS velocity and position errors respectively.
Notice that the velocity error occurs and then the position drifts. I conclude that the position drifts off because the velocity was wrong. In other words, the position error is an effect of the velocity errorā¦not the root cause.
If I look at the GPS.GCrs value (and treat it as the GPS course) for the first 10 seconds of this problem, I see impossible values (shown here in red).
The course changes from due south to almost north (330 degrees) in less than 1/4 second. 4 seconds later, it goes from east to north in 1/4 second. Itās a big plane limited to 45 degree bank angle turns, so moves of that magnitude arenāt possible.
Both the GPS and IMU (as part of the PixHawk) share the characteristic of devices that have worked well w/o these errors over the last year. But I can replace the GPS far more easily and itās less money. So, Iāll try replacing it.
RR