# Full Real-Time Positioning and Attitude System Based on GNSS-RTK Technology
## 1 Introduction  
The accurate positioning and attitude computation of vehicles, robots, or even persons is of the utmost importance and critical for the success of multiple operations and missions in many commercial and research areas. The attitude and positioning info can be used to follow the state of progress of a particular mission or to relay it as a navigation aid to the navigation systems [1; 2; 3]. Global Positioning Systems (GPSs) are commonly used for localization in a wide number of application scenarios. The advantages of GPSs are their wide area coverage, the capability of providing navigation data seamlessly to multiple vehicles, relatively low power requirements, the miniaturization of receivers, and being environmentally friendly in the sense that their signals do not interfere significantly with the ecosystem. However, it is important to notice that there are scenarios in which GPSs are ineffective or even useless, for example, indoors, in caves, in urban scenarios with many surrounding buildings, in space, or underwater, and alternative positioning systems must be employed (see [4; 5] and references therein). Most of the attitude systems rely on inertial measurement units (IMUs) that must be periodically recalibrated and that imply a high cost to obtain an accurate position and attitude computation. This makes them unaffordable for many projects and developments; thus, there is a need for alternative systems. Following this trend, in this work, we present an alternative positioning and attitude system to be used in open-air scenarios, where GPSs may be used at full performance and coverage. This alternative attitude system developed here is based on the GNSS-RTK technology, which has a relatively low cost. The use of attitude systems goes back to 1930 [6], where it was used to help plane pilots navigate in low-visibility situations (instrumental flight). Historically, these systems have been widely used in the aeronautic, military, and space industries for assistance or guidance of planes, missiles, rockets, satellites, etc. However, in the last years, due to the advances in electronics and cost reduction, these systems have become very popular in other areas: mobile phones, electrical vehicles, drones, robotics, etc. It is important to note the differences between inertial measurement units (IMUs) and attitude and heading reference systems (AHRSs). IMUs are composed of several sensors measuring physical magnitudes in different directions. The usual sensors are magnetometers, accelerometers, and gyroscopes, which can be used individually or by combining their measurements. In the industrial field, the term degree of freedom (DOF) distinguishes the number of sensors that measure physical magnitudes in each of the axes of the solid in which they are installed. Usually, IMUs are 3 DOF, 6 DOF, and 9 DOF, and the latter is the one that is the most complete, as it includes an accelerometer, a gyroscope, and a magnetometer in each of the axes. The IMUs may provide these sensor measurements as raw data or in physical units. However, most of the IMUs need to be periodically recalibrated to guarantee the accuracy and reliability of the measurements. Moreover, in the case of IMUs that include magnetometers, the recalibration must always be done if the IMU installation is changed, regardless of the time elapsed since the last calibration. The standalone IMU sensor measurements may be useful for some applications aimed at detecting specific events, such as a hit measured by the accelerometers, but for many other applications, these standalone measurements are not useful, such as for the rotation of a mobile phone screen depending on its orientation. The attitude computation systems fuse the information obtained from all sensors of an IMU, usually by Kalman filters (KFs), to provide a single solution given by the Euler angles [7] or by quaternions [8].