## 1 Introduction  
The recent interest in unmanned aerial vehicles (UAVs) necessitates the development of small and lightweight direct georeferencing systems for the guidance, navigation and control (GNC) of UAVs and UAV-based surveying or remote sensing applications. Direct georeferencing comprises the determination of the position (e.g., \(X\), \(Y\), \(Z\)) and the attitude (e.g., \(\alpha\), \(\beta\), \(\gamma\)) of a sensor or the vehicle relative to the Earth, represented in a predefined coordinate frame. The attitude is usually defined as the orientation between the body fixed coordinate frame and the navigation coordinate frame. Although UAVs exist in many different size classes, this paper focuses on micro- and mini-sized UAVs, having a weight limit of 5 kg and a size limit of 1.5 m. Thus, the term UAV in this paper always relates to micro- and mini-sized UAVs. In recent years, direct georeferencing systems have extensively been researched and used, especially in airborne applications [1,2]. However, these systems cannot easily be adopted for small UAVs, which is mainly due to weight and size constraints. Examples of the first approaches to the direct georeferencing of UAVs can be found in [3, 4, 5, 6, 7, 8]. Nevertheless, in [3, 4, 5, 6, 7], direct georeferencing is not performed in hard real-time onboard the UAV. In particular, for the GNC and the realization of automatic operations, the real-time capability is very important. [PERSON] _et al._[8] describe the development of a real-time-capable low-cost system for the position and attitude determination of small UAVs. However, the system accuracies are only \(<\)2 m for the horizontal positions and \(<\)2\({}^{\circ}\) for the yaw angle, which is not sufficient for many applications, e.g., surveying. In this paper, a newly-developed direct georeferencing system is presented, which is intended to provide highly accurate positions and attitudes (\(\sigma_{pos}\ <\) 5 cm, \(\sigma_{att}\ <\ 0.5^{\circ}\)) in real-time onboard a UAV, using lightweight components. Even if the system estimates both positions and attitudes [9], this paper is focused on the attitude determination with the developed system. The algorithms are described in detail, and the accuracy and the performance of the attitude determination are comprehensively evaluated. The challenge in the attitude determination of UAVs comes with the usage of small and lightweight IMUs (inertial measurement unit), such as micro-electro-mechanical system (MEMS) IMUs, since they have a significantly lower quality than the navigation-grade IMUs, which are usually applied in direct georeferencing systems. Without the frequent availability of absolute attitude information, the output of the gyroscopes of MEMS IMUs would be significantly wrong after a few seconds. This applies in particular to the yaw angle. While an IMU itself measures the gravity, which in the long term can be used to bound the roll and the pitch error, the yaw angle error is not bounded, if only IMU readings are available and no assumption about the motion behavior is made. To overcome this problem, there are multiple options, which may serve as a yaw reference for a UAV attitude determination. One option comes with the availability of position information in situations where the UAV's horizontal acceleration is not zero [10, 11, 12]. In this case, the yaw angle is correlated to the position observation. A drawback of this approach is clearly the need for non-zero accelerations. Another option, which is often used in MEMS IMU-based attitude determination, is the integration of a magnetometer [12,13]. However, the main problem when using a magnetometer on a UAV is the distortion of the magnetic field measurements, caused by various time-constant and time-varying effects.