Hi All,
Log: 00000077.BIN
I am trying to understand why the altitude (in altitude hold) was so erratic in the flight log attached. In this log there are multiple flights, the last one results in the aircraft hitting the ground.
Context: The area we were flying in was a downtown street with tall buildings (film shoot): Google Maps
This is a tough area that has lots of magnetic interference and lots of multipathing affecting GPS accuracy which can be seen in the log. I was flying in Alt Hold.
—I believe I experienced two related but separate issues here:
a) Poor altitude performance: The baro readings seem reasonable and don’t appear to be causing the issue here. Although EK2_ALT_SROUCE=0 (baro), I believe the altitude controller was still being affected by EK2_GPS_TYPE=0 (GPS 3D Vel and 2D Pos). The theory here is that the 3D velocity from the GPS was affecting the EKF altitude. Can anyone confirm this? When I look a the log I can’t see any direct correlation between GPS.VZ / GPS.Alt and CUN.Alt / CUN.DAlt though.
b) What caused the crash: At 34min 18s “Vibration Compensation” was activated. My belief is this is a unintended activation based on the GPS.VZ (Vertical velocity) dramatically jumping up and down caused NFK4.SV to go above 1 (for more than 1 sec) activating the Vibration Failsafe. If I would have set EK2_GPS_TYPE=1, 2 or 3 would this still have been triggered?
----What should I have done differently to make the aircraft fly better?
c) Should EK2_GPS_TYPE have been set to 1 (GPS 2D vel and 2D pos)? I am assuming the erratic GPS readings would still affect the attitude performance in Alt Hold (but by how much)? Or should I have set this to 3 (no GPS). I would assume 3 (no GPS) would prevent loiter from being used (which is not desirable, see last paragraph)
d) Should I have changed AHRS_GPS_USE=0? Does this parameter even do anything anymore if EKF is being used? It says 0 disables GPS in non-auto modes, but I am guessing EKF would still use GPS if available which would cause issues?
e) Should EK2_MAG_CAL have been set to 2 (only use heading fusion). Could using 3-axis fusion affect the drones attitude with erratic magnetic interference?
—The goal:
What I would have liked in this situation would be to fly in Alt Hold without any influence from the GPS on altitude and attitude (acknowledging that there would be some attitude drift) BUT still have the ability to change into loiter (using the GPS) when I came to a stop at the end of the run to hold a stationary position. I understand loiter would be erratic if I tried to fly down the street, but when the drone was relatively stationary (like at the very end of the log) the GPS data seemed to be good enough to hold a stationary position (taking caution).
Ardupilot 4.0.3
1600mm Octocopter (25kg)