Coupled Gps/mems Imu Attitude Determination of Small Uavs with Cots

This paper proposes an attitude determination system for small Unmanned Aerial Vehicles (UAV) with a weight limit of 5 kg and a small footprint of 0.5 m×0.5 m. The system is realized by coupling single-frequency Global Positioning System (GPS) code and carrier-phase measurements with the data acquired from a Micro-Electro-Mechanical System (MEMS) Inertial Measurement Unit (IMU) using consumer-grade Components-Off-The-Shelf (COTS) only. The sensor fusion is accomplished using two Extended Kalman Filters (EKF) that are coupled by exchanging information about the currently estimated baseline. With a baseline of 48 cm, the static heading accuracy of the proposed system is comparable to the one of a commercial single-frequency GPS heading system with an accuracy of approximately 0.25 • /m. Flight testing shows that the proposed system is able to obtain a reliable and stable GPS heading estimation without an aiding magnetometer.


Introduction
Within the Helmholtz Alliance for Robotic Exploration of Extreme Environments (ROBEX), small Unmanned Aerial Vehicles (UAVs) are developed to support an Autonomous Underwater Vehicle (AUV) during explorations below Arctic sea ice.In order to operate the AUV successfully at the marginal ice zone, it is crucial to keep track of the permanently-moving ice edge.By deploying GPS-based tracking devices at the ice edge, the ice drift can be continuously observed before and during AUV operations.In a first attempt, the Alfred Wegener Institute for Polar and Marine Research (AWI) deployed suitable tracking systems manually at the ice edge using zodiacs and a radio-controlled UAV.However, the manual deployment of the tracking systems turned out to be dangerous and time consuming [1].The UAV's limited operation range was identified as a major disadvantage and created the demand for more autonomous UAVs in Arctic environments.
While a variety of consumer-grade and professional solutions for autonomous UAVs exists, the Arctic environment is still a challenge for small autonomous UAVs.One critical aspect is a reliable heading estimation despite the weak horizontal component of the Earth's magnetic field in high latitudes.A reliable approach to determine the vehicle heading in the presence of magnetic disturbances is to estimate the relative position between several Global Navigation Satellite System (GNSS) receivers.Typical GNSS attitude determination systems consist of two or more GNSS receivers that are deployed on a moving platform at a sufficiently large distance from each other.The so-called baselines usually range from 1 m for cars up to 40 m or more for aircraft and ships [2][3][4][5].However, smaller baselines down to 2-3 L1 carrier wavelengths (L1 = 1575.42MHz) are also possible [6].In order to obtain the required measurement accuracy, carrier-phase observations are used.Usually, those observations are strongly influenced by error terms, such as tropospheric and ionospheric delay, receiver clock errors, multi-path errors and receiver noise.However, by calculating Single-Difference (SD) between receivers and Double-Difference (DD) between receivers and satellites, some of the error terms in the carrier-phase observation can be eliminated.
Already in the early 1990s, research on GPS-based attitude determination for aircraft was conducted and successfully tested in flight [7,8].Since then, systems based on high-end dual-frequency (L1 and L2 band) GNSS receivers emerged as the state of the art solution.However, the upcoming of inexpensive MEMS inertial sensors and the growing demand of small UAVs for various tasks encouraged the development of less expensive GNSS attitude determination systems.
Concoli et al. [9] describe the use of multi-GNSS receivers for the attitude determination of a UAV on a conceptional level and simulate the influence of different baseline length.
Falco et al. [10] describe an approach for their 1.5 m×1.5 m footprint UAV based on an array of four single-frequency GPS receivers combined with a consumer-grade MEMS IMU.In their approach, DDs are exploited to calculate the attitude.The heading angle was estimated during a UAV flight test with a mean error below one degree using a short baseline array of 50 cm×50 cm.The navigation system was implemented on the LOGAM platform, a customized board with four GNSS receivers, an IMU, a barometer and a micro-controller.Since no details about the used components are given, a full price for the system cannot be estimated.However, the price for the four utilized Bullet III antennas is about 350$.
Eling et al. [11] combine the measurements of a tactical-grade IMU (ADIS16488) with a dual-frequency (Novatel OEM 615) and a single-frequency (u-Blox Lea6T) GPS receiver.The processing was performed on the National Instruments embedded processing platform sbRIO9606.The dual-frequency receiver is used for the absolute positioning and as one receiver for the moving baseline.The single-frequency receiver is used as the second baseline receiver.With a baseline of 92 cm, a heading accuracy of 0.2 • can be achieved.Two geodetic-grade antennas (3G + C, navXperience) were used.Using tactical-to geodetic-grade only, the total system costs are very high compared to the solution proposed in this article.This article will focus on the GPS/IMU-based attitude determination of a small UAV with a take-off weight of less than 5 kg and a very small footprint of 0.5 m×0.5 m using low-cost, consumer-grade COTS only.The total costs for the proposed navigation system are less than 400$.The system is compared to the commercial Static Heading Determination System from ANavS and tested during flight.

System Architecture
The attitude determination system in this approach is based on two single-frequency GNSS receivers (Neo-M8T; u-Blox, Thalwil, Switzerland) with active low-cost patch antennas, a consumer-grade MEMS IMU (LSM9DS0; STMicroelectronics, Geneva, Switzerland) and an embedded processing platform (UDOO Neo; Seco, Arezzo, Italy).The system combines the carrier-phase of the L1 frequency GPS signal, the GPS pseudo-ranges, as well as the accelerometer, magnetometer and gyroscope measurements of the IMU using Real-Time Kinematics (RTK).Figure 1 shows the UAV concept.
The origin of the UAV fixed body frame is in its center of mass; the origin of the RTK frame is fixed to one of the GPS antennas, as shown in the figure.The GPS antennas are mounted on the UAV booms at a distance of 48 cm, while the IMU is mounted in the UAV's center of mass.The misalignment error due to installation imprecisions between the IMU and GPS antennas is considered to be very small and therefore neglected.The matrix R br to rotate a vector from the body in the RTK frame is given by: The UAV autopilot and its attitude determination system are based on the UDOO Neo.The UDOO Neo incorporates an i.MX6 SoloX, a heterogeneous dual-core processor from NXP.The processor features an ARM Cortex-A9 running at 1 GHz and an ARM Cortex-M4 at 200 MHz in one chip and allows inter-core communication using shared memory.The A9 core is running Linux and the Robot Operating System (ROS) [12].The M4 core is running the Real-time Onboard Dependable Operating System (RODOS) [13].Therefore, the bigger core is used for computationally heavy tasks with soft real-time requirements, like the GPS heading estimation, while the small core handles firm real-time tasks, such as high-frequency attitude determination and attitude control.The computational tasks for the attitude determination of the system are distributed among both processors, as shown in Figure 2. The Cortex-M4 is interfaced with the IMU and runs the quaternion Extended Kalman Filter (EKF) described in Section 2.2.During initialization, accelerometer, gyroscope and magnetometer measurements are combined in order to estimate the unit quaternion q nb that encodes the rotation of a vector from the North-East-Down (NED) navigation frame into to the body fixed frame.The calculated heading is relative to Magnetic North and therefore distorted by the angular offset between the magnetic and geographic North Pole.
The Cortex-A9 is interfaced with the two raw observation data GPS receivers.It calculates the UAV's current position, the magnetic declination, as well as the RTK-based GPS heading.The calculation of the current longitude λ and the latitude ϕ is based on the code-observations from i visible satellites P i r,b of the rover and the base GPS receiver, respectively.The magnetic declination δ can be calculated using the World Magnetic Model (WMM) [14].In order to estimate the current GPS heading, the magnetic declination and the distorted attitude quaternion q nb are used to express the baseline with respect to the NED frame: where R z (δ) describes an elemental rotation of δ around the z-axis, R nb is the rotation matrix that rotates a vector from the navigation frame into the body frame and can be calculated from q nb and ∆x r = [0.48 0 0]T is the baseline expressed in the RTK frame.The baseline ∆x n is then transformed into the Earth-Centered Earth-Fixed (ECEF) frame and combined with the phase-based observations Φ i r,b using the RTK approach described in Section 2.3.If a valid RTK-based baseline estimation is found, we can calculate the GPS heading γ GPS in the NED frame.Since the quaternion EKF should be able to easily integrate heading information obtained from the magnetometer or the GPS measurements, the estimated GPS heading will be referenced towards Magnetic North again: where atan2 returns the four-quadrant inverse tangent of y/x given y and x.Depending on the application and the requirements, either the GPS heading γ GPS , or the magnetometer measurements, or both can be used as input in the attitude determination algorithm.In our application, we want to use the magnetometer as little as possible and, therefore, use it only during the initialization.Nevertheless, a full attitude solution without a magnetic reference at all is possible, as well.In this case, the quaternion EKF is idle until a valid GPS heading is obtained.Although the RTK GPS baseline estimation can be also used to determine the UAV's roll angle, only the accelerometer and gyroscope measurements are used for the UAV's roll and pitch estimation.Calibration techniques, as presented in [15], can be used to compensate accelerometer misalignment errors.

Quaternion Math
This section will briefly review the quaternion math used in the described approach to give a comprehensive view for the reader.A more detailed description is given by Diebel in [16].A quaternion is a hyper complex number of rank four and can be represented in the following way: Another, very commonly-used representation considers the first part to be a scalar, while the rest can be expressed as a vector: The norm of a quaternion is simply defined by: Norm (q) = q = q 0 2 + q 1 2 + q 2 2 + q 3 2 (6) The conjugate of quaternion q can be obtained by negating its vector part and is denoted by q * : Conj (q) = q * = q 0 − q T T ( Unit quaternions can be used to describe rotations in three-dimensional space.For the special case of a unitary quaternion, the inverse of the quaternion equals its conjugate: The product of two quaternions q and p is calculated using the Kronecker product and denoted with ⊗ .Two subsequent rotations q and p can be expressed in a single rotation by multiplying both quaternions.It is important to mention that the quaternion multiplication is not commutative.
The quaternion multiplication can therefore be denoted as: If a measurement of the rotational velocity in the body frame ω b and a quaternion q that describes the rotation of a vector from the fixed navigation frame into the body frame are given, we can easily calculate the quaternion's derivative q with: A vector v given in three-dimensional space can be simply rotated from a fixed frame to a body frame, given that the rotation between the two frames is described by q, with: The same rotation can be obtained by expressing the quaternion q as a rotation matrix from the fixed frame n to the body frame b with: For a more convenient way to interpret quaternions, they can be converted to Euler angles using the following equation:

Quaternion Extended Kalman Filter
The IMU measurements are combined with the GPS heading estimation in an EKF.The implemented filter is based on the approach used by Munguia et al. [17], but is augmented by the RTK GPS heading and designed in such a way that update steps with different sensor rates are possible.

Measurement Models
The IMU consists of a three-axis gyroscope, a three-axis accelerometer and a three-axis magnetometer.The gyroscope measurement vector y g consists of the angular rate in the body frame ω b and additive errors that can be modeled by: where b g is the temperature-dependent gyro bias and υ g is Gaussian white noise with a variance of σ g 2 .The accelerometer measurement vector y a is defined by: where a b is the device acceleration in the body frame, g b is the gravity vector expressed in the body frame, b a is the accelerometer bias and υ a is Gaussian white noise with a variance of σ a 2 .Since the bias in the accelerometer triads can be minimized through proper calibration methods [15], it will be neglected in this filter.
The magnetometer measurement vector y m can be described as: where m b is the surrounding magnetic field, b m is a constant magnetometer bias and υ m is Gaussian white noise with a variance of σ m 2 .The magnetometer bias b m can be compensated for by estimating the so-called hard and soft iron effects using appropriate calibration methods as presented in [18].Ideally, the surrounding magnetic field m b is identical to the Earth's magnetic field.However, metal structures close to the magnetometer, as well as changing currents in the proximity of the magnetometer disturb the Earth's magnetic field.Compensating for those errors is a very challenging task and not always possible.For simplicity, m b is assumed to be identical to the Earth's magnetic field in this filter design.Finally, the RTK GPS heading measurement y GPS is modeled by: where γ GPS describes the north heading referenced to the magnetic pole, in order to allow easier integration of GPS heading and magnetometer measurements, and υ GPS is Gaussian white noise with a variance of σ GPS 2 .

System Propagation
The system state x(k|k) at the time k is given by: where q nb is a unit quaternion representing the orientation of the UAV fixed body frame with respect to the navigation frame and ω b and b g are defined according to Equation (14).
The system state can be predicted at fixed rate ∆t with the following propagation model: where qnb is the quaternion derivative and λ xg is a time correlation factor that models how fast the gyroscope bias b g can vary.
The system state covariance matrix P can be propagated by: where ∇F x is the Jacobian of the system prediction function f and Q is the system noise covariance matrix.The Jacobian of the system prediction function is evaluated for the latest state estimate and given by: The system noise covariance matrix can be expressed as: where σ g 2 is defined according to Equation ( 14) and σ b g 2 is the variance of the gyroscope bias.

System Updates
The filter is designed in such a way that measurement updates can occur independently from each other.While the system state is propagated at fixed intervals of 5 ms, the accelerometer updates occur only if the body is not accelerating.The magnetometer measurements are only used as long as no valid GPS heading is available, and the GPS heading is integrated at 10 Hz as soon as it is computed by the RTK GPS heading estimation.The measurement update for the system state and the system state covariance is given by the following equations: where z i is the current measurement and ẑi is the measurement prediction.W is the Kalman filter gain, and S i is the residual covariance matrix.i describes the sensor used for the particular measurement update and can be summarized as i ∈ {a, γ m , γ GPS }: a represents the accelerometer measurement update, γ m the yaw angle update based on the magnetometer and γ GPS the yaw angle update based on the estimated GPS heading.The residual covariance matrix S i can be calculated by: where ∇H i is the Jacobian of the respective measurement prediction model h i evaluated for the current system state prediction: Finally, the Kalman filter gain is given by:

Roll and Pitch Update
For a non-accelerating body, Earth's gravitational acceleration can be used to estimate the body's roll and pitch angle.If the accelerometer measurements remain within certain boundaries, the UAV is assumed to be non-accelerating.A comprehensive evaluation of different approaches to detect an accelerating body is given by Skog et al. [19].The algorithm utilized in this approach to detect non-accelerated conditions is the stance hypothesis optimal detector.In order to use the gravity vector as an external reference, the Earth's gravitational acceleration measured in the navigation frame needs to be expressed in the body frame using the latest attitude estimation.The measurement prediction is then given by: where R bn is the inverse of R nb and can be used to represent a vector given in the navigation frame with respect to the body frame.R nb can be calculated from q nb using Equation (12).
For the gravitational acceleration, we can assume g = −1, if the raw accelerometer measurements y a are normalized: With accelerometer variance of σ a 2 , the measurement noise covariance matrix is given by: R a = σ a 2 I 3×3 (30)

Yaw Update
In a similar manner, different external heading reference systems can be used to estimate the body's yaw angle.In this approach, the external heading solution is provided from a magnetometer and a GPS-based heading system.The magnetometer is only used for the initial heading determination until a valid GPS solution is found.Once a valid solution is found, only the GPS estimated heading is used in the yaw update step.Using the latest attitude estimation, the current heading angle can be predicted by: Using a magnetometer, the magnetic heading can be obtained by projecting the magnetic field observation into the northeast plane.The projected magnetic field vector m n p can be calculated by rotating the observed magnetic field vector y m into the navigation frame and removing its z component: After the z component of the transferred vector m n is removed, it is transferred back into the system's body frame: Finally, the magnetic heading is given by: Using a GPS heading reference system that provides the Magnetic North heading as output, the GPS yaw measurement is simply obtained by: In both cases, for the GPS and the magnetic reference system, the yaw measurements z γ j are assumed to have Gaussian white noise with a variance of σ γ j 2 where j ∈ {m, GPS}.The according measurement noise covariance matrices are therefore given by: R γ j = σ γ j 2 (36) Similar to the non-accelerating body detection for the roll and pitch update, invalid GPS measurements have to be detected and should not be integrated into the final attitude estimation of the quaternion EKF.Two criteria are applied at every GPS yaw update step in order to validate whether the estimated RTK GPS heading is reliable or not.First, the length of the estimated baseline has to be within an acceptable range if compared to the a priori known value, and second, the GPS heading must be based on an integer fixed solution.
During filter initialization, the sampling variance is additionally compared to the expected variance of the GPS heading in a static scenario.The GPS/IMU sensor fusion will be only started if the observed sampling variance is below a fixed threshold.

Real-Time Kinematics
The GPS heading estimation system is combining code measurements, carrier-phase measurements, the a priori known baseline length and the current baseline orientation in an EKF.The filter approach is based on the open source Real-Time Kinematics Library (RTKLIB) by Takasu [20], but augmented by the baseline orientation measurement and, therefore, the IMU coupling.The EKF tries to estimate the position and velocity of one antenna (rover) relative to the other antenna (base), as well as the carrier-phase ambiguity float solutions.The obtained float solutions are then resolved into fixed integer solutions.Once a valid three-dimensional baseline estimation is calculated, its heading can be easily derived.
Since only L1 carrier-phase signals are considered, the measurement models for the DD carrier phase Φ ij rb and the DD pseudo ranges P ij rb are given by: where ρ ij rb is the geometric range DD, λ 1 is the L1 carrier wavelength and Φ,P are the carrier phase and pseudo range measurement errors, respectively.In order to avoid the hand-over problems when the reference satellite is changing [20], internally Single-Difference ambiguities B i rb,1 are used instead of Double-Difference ambiguities B ij rb,1 .The system state for the EKF is therefore given by: where r r and v r are the rover position and velocity, respectively.The system state and its covariance can be predicted by: x(k + 1|k) = Fx(k|k) (40) The system propagation matrix F and the system noise covariance Q are given by: where ∆t is the sample time of the GPS receiver and with: where R en describes a rotation matrix from the ECEF frame into the local coordinate frame (NED) at the receiver antenna position and σ vn , σ ve and σ vd are the standard deviations of the rover velocity in north, east and down direction, respectively.The measurement vector in RTKLIB consists of the baseline length |∆x e |, the DD carrier-phase measurements Φ ij rb and the DD pseudo-range measurements P ij rb , where the subscript r is the rover, the subscript b is the base, the superscript j is the reference satellite and the superscript i ∈ {1, 2, . . ., m} is the number of valid DD measurements.This measurement vector is extended by ∆x e , the baseline vector in the ECEF frame, and thus reads: The measurement update equations for the system state and the system state covariances are similar to the quaternion EKF approach and can be derived from Equations ( 23)-( 27).
The measurement prediction matrix is given by: where r b is the code-based calculated single position of the base antenna and h Φ rb,1 and h P rb,1 depend on the DD geometric range ρ ij rb,1 and L1 the carrier wavelength λ 1 as follows: . . .
This yields the following measurement Jacobian matrix: where D is the double differencing matrix and E = (e 1 r , e 2 r , ..., e m r ) T describes the line of sight vectors from the rover antenna to the satellite i ∈ {1, 2, . . ., m}.Finally, the measurement noise matrix R is given by: where Σ Φ,P = diag(σ 1 Φ,P 2 , . . ., σ m Φ,P 2 ) describes the variances of the carrier-phase and the pseudo-range measurements, respectively.σ |∆x e | is the accuracy of the a priori known baseline length and Σ ∆x e the accuracy of the estimated baseline orientation using the IMU coupling given by: where σ n 2 , σ e 2 , σ d 2 describe the accuracy of the IMU baseline estimation in the NED frame.
The results of this measurement update are real-valued DD ambiguities.Fixing these real-valued ambiguities to integers improves the quality of the solution significantly.The integer ambiguity resolution is done for each measurement instantaneously using the MLAMBDAmethod [21].At this point, it should be pointed out that the baseline length constraint, as well as the baseline orientation constraint are used iteratively when estimating the float solution.No additional baseline constraints are applied during the integer fixing step, as is the case for the baseline-constraint LAMBDA method proposed by [22].
Once the integer ambiguities are fixed, the RTK-based baseline estimation in the ECEF frame is simply given by: Using our current position estimate, this can be simply transformed into the NED frame.

Evaluation
In order to validate the performance of the proposed approach, various experiments were conducted using a real-world system.All experiments were carried out on the UAV platform shown in Figure 3.The experiments were performed in Würzburg, Germany, on different days.To increase the quality of the GPS raw measurements, ground planes were used to reduce multipath effects as suggested by [23].The GPS raw measurements were obtained at 10 Hz, while the IMU provided data at 200 Hz.The following section will discuss two of the tested scenarios in detail with the focus on the accuracy of the heading determination.Therefore, the system is first compared to other available GPS heading solutions in a static scenario.Subsequently, the system is evaluated during flight, covering the typical dynamic range of the system.

Static Evaluation
In the static scenario, the proposed method is compared to the results of the RTKLIB only and a commercial system, the Static Heading Determination System from ANavS.The results of the ANavS system are considered to be the ground truth.The proposed algorithm is implemented on the UAV itself, and the here presented data are calculated on-board in real time while the results for the two references systems were obtained by post-processing the recorded raw data.The proposed method is compared to the ANavS reference system in Figure 4 for the total experiment duration.After a short initialization time, both systems provide a valid, stable and accurate heading solution.Although the UAV was placed on a field with a sufficient distance to trees and buildings in the attempt to provide a clear view of the sky for both GPS antennas for this experiment, two satellites' locks were temporarily lost during the measurement.The impact of the loss of the two satellite signals can be clearly seen after approximately 251 s.No valid reference heading could be provided during this time.Comparing the system precision, it can be seen that the combined GPS/IMU approach has much lower noise than the reference solution.Table 1 lists the measured standard deviations during this static scenario for the ANavS reference system, the proposed method and its RTK GPS-only solution, as well as the standard RTKLIB solution.The standard deviations are calculated for the time between the first fix of all systems (t = 45 s) until the two satellite locks are lost (t = 245 s).Due to the combination of the high data rate IMU and the RTK GPS heading, the system precision is significantly improved by the quaternion EKF. Figure 5 shows the progress of the yaw estimates for the different systems from a cold start until fixed integer solutions are obtained.All systems obtain a valid solution after less than 45 s.
The reference system from ANavS does not provide any heading information until the carrier-phase integer ambiguities are fixed and a possible solution is found.The time until the first heading estimation is provided takes under open-sky conditions approximately 15 s.During the first 30 s, the orbital data of the GPS satellites are gathered.
The proposed system is initialized based on the observed magnetic heading.In addition to the overall system output, the RTK GPS heading estimates are also shown.Thereby, a comparison between the different systems can be done in a more convenient way.After the orbital data are collected, the integer ambiguities are fixed for every epoch using the baseline length and its currently-estimated orientation.The jump after approximately 21 s indicates the moment when enough orbital data are acquired to estimate the receiver position, and the WMM declination corrections can be applied.In this scenario, the first correct ambiguity fix is obtained after 123 epochs, which equals 12.3 s.Nevertheless, it takes some additional time for the quaternion EKF to adapt the gyroscope biases and adjust its heading estimation. .Time to first fix: the reference system from ANavS, the proposed method and its GPS heading measurements and the GPS heading acquired from the RTKLIB using its standard settings for a moving baseline.
As a second reference, the initialization of RTKLIB's static heading estimation only is also shown in Figure 5.The data are obtained using the RTKLIB default settings for a moving baseline of 48 cm.Using the RTKLIB's fix and hold approach for the integer ambiguities, the first correct heading is estimated 19.8 s after the orbital data are obtained.
Figure 6 shows the impact of the aforementioned loss of satellite lock in more detail.After approximately 251 s, the signal of two satellite locks was lost presumably by accidentally shielding the GPS antennas in a specific direction.Temporary loss of the lock of two satellites: The reference system from ANavS, the proposed method and its GPS heading measurements and the GPS heading acquired from the RTKLIB using its standard settings for a moving baseline.

time [s]
Figure 7 shows the Signal-to-Noise Ratio (SNR) of the tracked satellites during the satellite loss for one of the GPS receivers.In total, eight satellites are tracked.The SNR of Satellites G27 and G32 drops below 28 dB after 251 s and recovers again after approximately 15 s.Additionally, the signal strength of the four other satellites is decreased during this time.Although shielding is a very unlikely scenario for the final application, the reaction of the different systems is quite interesting.While the commercial system re-obtains a valid heading first at t ≈ 265 s, there are strong fluctuations and a temporary error of 20 degrees.In contrast to that, the proposed method takes admittedly longer to re-obtain a correct fix (t ≈ 275 s).However, the maximum error of the proposed method remains under five degrees due to the IMU stabilization.Additionally, no sudden fluctuations can be observed, allowing a more stable flight.In contrast, the RTKLIB solution does not manage to obtain a valid GPS heading again.
During the satellite loss, the measurements of the IMU and the RTK GPS heading are contradicting each other.While the gyroscope measurements correctly indicate no change in orientation, the GPS heading indicates a change.Instead of trusting the GPS heading blindly, the gyroscope biases are adapted according to the time correlation factor λ xg in Equation ( 19), while the IMU estimated baseline orientation constraint allows one to keep the RTK GPS heading stable.

Dynamic Evaluation
In the second scenario, the proposed system is tested during flight.After the initial GPS fix is obtained, the UAV takes off and hovers at a height of 5 m for several seconds.Next, the UAV flies in a clock-wards circle of approximately 11 m in diameter while facing away from the circle center.The circle is completed after 30 s. Subsequently, the UAV moves up and down at roughly the same position without changing its heading.The recorded raw GPS positions of one receiver are shown in Figure 8.The upper plot in Figure 9 shows the estimated heading during the flight.Again, in addition to the overall system output, the GPS heading estimates are shown.Furthermore, the heading calculated by post-processing the recorded data from the IMU and the magnetometer measurements is displayed, as well.Since the ANavS system is designed for static applications and due to the lack of a lightweight reference system that can be mounted on the UAV platform, the magnetic heading during flight is considered as the ground truth.It shall be noted that the magnetic heading is error-prone due to magnetic disturbances by the UAV's motors during flight and therefore can only provide an accuracy of a few degrees.Nevertheless, it can still be used to verify the functionality of the proposed method in flight.The time until all orbit data are gathered takes again roughly 30 s.In contrast to the static evaluation, an integer ambiguity fix could be obtained immediately with the first measurement.Both systems show a smooth circular heading estimation and remain constant once the circular flight is completed.The differences between the magnetic and the GPS-based heading can be caused by the poor calibration of the constant magnetic offsets and the aforementioned additional time-varying magnetic effects, e.g., high electrical currents in the sensor vicinity due to the UAV operation.The lower plot shows whether the update criteria for the yaw update are met or not (see Section 2.2.5) and indicate therefore if the estimated RTK GPS heading is used in the quaternion EKF.

Conclusions
This paper presents a method that allows an autonomous UAV to navigate during flight independently of magnetic field measurements.The proposed method combines single-frequency L1 GPS measurements with the measurements of a consumer-grade MEMS IMU.The sensor fusion is accomplished by using two EKFs that are coupled by exchanging information about the currently-estimated baseline orientation.The first EKF combines the raw GPS code and carrier-phase measurements with a priori baseline information and calculates the RTK GPS heading.The second EKF combines magnetometer, accelerometer and gyroscope measurements with GPS baseline information and computes a full attitude solution for the UAV.The attitude solution is used to predict the baseline for the next update of the GPS EKF.Magnetometer measurements are used during initialization to allow a short time to first fix.During flight, the GPS heading estimates are combined with accelerometer and gyroscope measurements only.However, the proposed approach can be easily adjusted to modify the influence of the magnetometer depending on the application and therefore the UAV's magnetic environment.
The system is implemented on a heterogeneous dual-core.Due to a real-time requirement-dependent task distribution between both cores, no additional or specialized hardware is needed, allowing one to use only low-cost Components-Off-The-Shelf, dropping the total hardware costs of the proposed navigation system to less than 400$.The static evaluation shows that the accuracy of the L1 GPS heading estimates can be compared to the results obtained with a commercially available system.The manufacturer states their accuracy with a 0.25 • /m baseline resulting in an accuracy of approximately 0.5 • for a system with a baseline of 48 cm.This is also in accordance with the findings reported by Eling et al. in [11].The proposed IMU sensor integration improves the standard RTKLIB approach significantly.The combination of IMU and GPS measurements can additionally improve the obtained precision.The precision in static applications is observed to be below 0.05 • .The proposed system was successfully tested during flight.It provides a promising alternative to overcome the heading estimation problem of small UAVs in environments with magnetic disturbances or close to the magnetic poles.

Figure 1 .
Figure 1.Unmanned Aerial Vehicle (UAV) concept with mounted Global Positioning System (GPS) antennas and important coordinate frames.

Figure 4 .
Figure 4. Static evaluation: the ANavS reference heading and the result of the proposed method.

Figure 5
Figure5.Time to first fix: the reference system from ANavS, the proposed method and its GPS heading measurements and the GPS heading acquired from the RTKLIB using its standard settings for a moving baseline.

Figure 6 .
Figure 6.Temporary loss of the lock of two satellites: The reference system from ANavS, the proposed method and its GPS heading measurements and the GPS heading acquired from the RTKLIB using its standard settings for a moving baseline.

Figure 7 .
Figure 7. Tracked satellites of Receiver 2 during the static experiment: eight satellites are tracked; the SNR of Satellites G27 and G32 drops below 28 dB at t ≈ 251 s.

Figure 8 .
Figure 8. Two-dimensional position during the evaluation flight.

Figure 9 .
Figure 9. Heading estimation during flight: magnetic-and GPS-based solution; update criteria.

Table 1 .
Standard deviations during the static scenario.