These days I’m experimenting with Pixhawk2 + F450 + Here+ V2 RTK GPS. Since my application requires multiple quadcopters, I am using usercode function.
The issue is, sometimes copter suddenly loses its altitude and crashes. I found out that the EKF altitude innovation has diverged and this confirms that the EKF altitude estimation went wrong.
These are two reasons why I think heavy communication leads to the wrong EKF altitude estimation
- Turning off dataflash log improves performance
My application uses GPS1(Ublox M8P), telem1(Xbee, mission planner communication for RTK GPS), telem2(Another Xbee, for customized takeoff, loiter, arming, etc.), and dataflash for the uart. When the take off starts, the dataflash log also starts and this significantly reduces GPS1 communication performance, thus sometimes communication delay of gps data is increased when too much is going on the buffer.
Currently I disabled dataflash log for temporary solution and the lagging significantly reduced. Also, reducing the buffer size from 16 to 4kbyte resulted better performance.
- Downloading dataflash log using MAVlink results wrong estimation
When trying to download the dataflash log by mavlink, the altitude divergence also occurs, thus I think the heavy uart communication significantly degrades the EKF performances.
As far as I know, from the EKF2 code,
in void NavEKF2_core::SelectVelPosFusion(),
readGpsData() has some problems. This does not return valid time_ms when the uart load is heavy.
Since I need dataflash log for the analysis, disabling the function could not be a proper solution. Is there anybody who was able to get stable GPS uart data in heavy communication environment? Or is there an alternative communication solution without burdening the ring buffer? Also my copter does not have vibration problem. Any suggestion is welcome.