We have a mission involving a particular payload we run regularly, and we have done so perhaps hundreds of times. Today, on the fourth flight of the day, the compass malfunctioned, initialized with a bogus value, and starting the mission in Auto mode resulted in severe toilet bowling, a flip upon landing, and (minor) damage to the vehicle. After repairs, four further flights were completed without any incident.
We would appreciate any insight into why the compass malfunctioned and if there’s any thing we need to keep watch for in the future. We recognize the pilot should have been alarmed by the initial yaw being grossly incorrect (approx. 100 degrees off, the vehicle should have been placed ~90 degrees each time) and that the flip likely could have been avoided had we switched to and landed in AltHold mode.
But the incorrect yaw was the only symptom of any impending problem and we want to be sure there’s not any hardware or software glitch that needs correcting or addressing.
Provide your hardware installation diagram. Your aircraft must at least use a bracket to install the GPS to a high point, otherwise there will be serious magnetic field interference. For your aircraft, using the GPS for yaw module instead of compass is a good solution to the problem.
The GPS/compass module is mounted on a bracket and is the highest point on the vehicle.
Can you help me understand why there was serious magnetic field interference for only one out of eight flights? Each flight started from the same place (within a few feet), had the same payload, was pointing the same direction, and ran the same mission.
It appears the compass somehow initialized with a bogus rotation value. The used compass should be MAG[0] and MAG[1], one of the unused compasses is MAG[2].
Pre-crash, offsets applied to MAG[2] so they line up with the others.
During crash, offsets applied to MAG[0] and MAG[1] so that they line up with the MAG[2] from before (i.e. with the same offsets). Note that axis X and Y have swapped, and axis Z is inverted!