Reply To: Best setup for UAV-application
Usually, if there is yaw drift on the UM7, it is because there are magnetometer calibration issues that prevent the angle from being measured properly. If there are time-varying magnetics fields (from the permanent magnets in a motor, for example), it can make it very difficult to get a good yaw estimate.
The magnetometer reference vector tells the UM7 what magnetometer measurement to expect when yaw = pitch = roll = 0 degrees. During operation, it takes the measured magnetic field in the sensor body frame and uses the current attitude estimate to rotate it into the inertial frame (see this library article for details about coordinate frames used on the UM7). If the attitude estimate is perfect and there are no magnetic field distortions, the rotated magnetic field measurement should match the reference vector perfectly. Distortions cause the sensor to erroneously measure attitude error.
You are doing all the right things to prevent yaw drift, but it could be that motor magnetics are causing problems. Also, be sure that you are writing everything to FLASH.