# Full Real-Time Positioning and Attitude System Based on GNSS-RTK Technology
## 1 Introduction
IMUs are also used to compute the position of the target where they are installed, given an initial position, by merging the measurements of accelerometers and gyroscopes. The measurement errors due to noise, misalignment, calibrations, etc. cause the position estimate to degrade as time passes. The positioning errors may be corrected or compensated by fusing the IMU measurements with the GPS measurements and using a KF. There exist different technologies for the construction of accelerometers, gyroscopes, and magnetometers. A short revision of these different technologies is given next:  
* Electromechanical gyroscopes and accelerometers: This technology has fallen into disuse and can only be found in old systems. Its accuracy may be very high, but due to the large number of high-precision mechanical elements, its cost and maintenance is also very high. There are many different types, but all rely on the same principle: rotation masses that create torques due to accelerations and rotations, and devices that measure these torques and relate them with angular velocities and accelerations. * Microelectromechanical systems (MEMSs): This is the most commonly used technology for computing the attitude due to its low cost, low energy consumption, and good performance. The main working principles of this technology are introduced in a very brief way. The main principle for accelerometers relies on a suspended mass with a spring that will be displaced in the direction of the spring due to an acceleration, creating or changing an electrical capacitance. The gyroscopes work in a similar way, with a mass placed over a piezoelectric actuator, which creates a Coriolis force when an angular velocity actuates over the device [9]. Finally, microelectromechanical (MEM) magnetometers use an inductance with a current, and if there exists a magnetic field in the perpendicular direction of the inductance, a Lorentz force is generated [10]. * Optical gyroscopes: These systems are based on the Sagnac effect [11], and are classified into ring gyroscopes (RLGs), which use mirrors for the light circuit, and fiber optic gyroscopes (FOGs), where the light travels through a fiber optic circuit. Their main advantage is the absence of mobile parts, with a lower maintenance. RLGs have more resolution than FOGs and can detect smaller velocities. In general, IMUs are not enough to correctly compute the attitude of a solid; it is necessary to fuse the information of the sensors (accelerometers, gyroscopes, and magnetometers) and define a dynamical model of the solid, since different systems will behave in a different way, such as a plane or a car. Any of the aforementioned sensors has the same problem, together with the high cost and limited access of high-precision devices for the general public. In this work, we study the use of the GNSS-RTK technology to construct a high-precision positioning and attitude system, with low cost compared with high-precision sensors and systems than can be found commercially. Moreover, it is independent of the platform in which is installed, since it does not need the mathematical model of the platform dynamics. The only limitation of this device is that for very high dynamics (more than 4G), its performance may degrade due to possible deformation of some of the components, whose features may change. In addition, this device can only work at full performance on open air; for other scenarios, we must consider alternative technologies, as mentioned before. Therefore, the main objective of the present work is the construction and validation of an AHRS and positioning system based on the GNSS-RTK technology. The position computation using GNSS-RTK technology is straightforward, so this work is focused on the AHRS.