**2. Materials and methods**

The proposed step-by-step procedures of how to correct the collected GPS sensor's latitude and longitude coordinates used to find the position of the towed array vehicle in an underground imaging system are presented in **Figure 2**. This provides a *Adaptive Neuro-Fuzzy Inference System-Based GPS-IMU Data Correction for Capacitive… DOI: http://dx.doi.org/10.5772/intechopen.112921*

#### **Figure 2.**

*Step-by-step process of GPS sensor's latitude and longitude coordinates correction used for the capacitive resistivity underground imaging system.*

functional view of how the whole research system works. The process starts with the hardware circuit development of an RTK-GPS sensor with an integrated IMU sensor, followed by the incorporation of a developed Arduino-based GPS/IMU integrated navigation algorithm to complete the device needed for GPS and IMU data collection, which is conducted through actual field testing. After collecting the data, three prediction models were developed: ANFIS, LSTM, and ELM, while the collected data were trained using these three models to predict the corrected GPS latitude and longitude. The prediction model with the highest accuracy was selected while LSTM and ELM prediction models were also used to validate the performance of ANFIS and, thus, utilized for final model testing of collected data.

#### **2.1 Arduino-based RTK-GPS with integrated IMU**

An Arduino-based RTK-GPS with an integrated IMU is a device that combines a real-time kinematic (RTK) global positioning system (GPS) with an inertial measurement unit (IMU) using an Arduino microcontroller. The overall block diagram of how the RTK-GPS is combined with the IMU sensor is presented (**Figure 3**) to comprehend the overall system architecture and information flow between various functional parts. The RTK-GPS utilized is a Sparkfun SMA-ZED-F9P model, which is the highest-quality module for high-accuracy GNSS and GPS navigation solutions, including RTK, with 10 mm three-dimensional accuracy, while the utilized IMU sensor is GY-85 9DOF Sensor that has nine axes which are triaxial gyroscope, triaxial accelerometer, and triaxial magnetic field. The RTK-GPS sensor can calculate the satellite position and velocity and provides a GPS raw pseudo-range that is the pseudo-distance between the satellite and GPS receiver, and the pseudo-rate specifies the velocity. Through this, the RTK-GPS sensor strengthens GPS signals for exact locations and velocities. On the other hand, the IMU sensor performs the coordination rotation, which is the process of aligning the axes of the IMU sensor with the axes of the vehicle where it is mounted. It also performs altitude determination. These two are significant aspects of sensor fusion in localization and vehicle tracking. Then, by

#### **Figure 3.**

*Block diagram of the development of Arduino-based GPS-RTK with integrated IMU for sensor fusion.*

utilizing mechanization equations, the accelerometer, gyroscope, and magnetometer in the IMU sensor module offer information on linear acceleration, angular velocity, and magnetic field strength along three axes, also considering the estimation errors present in the computation process. If IMU errors are not dealt with or assessed correctly as part of a combined GPS-IMU system, these can cause major inaccuracies in location, velocity, and attitude calculation. To build the system, the RTK-GPS sensor, IMU sensor, Secure Digital (SD) card module, and LCD monitor are connected to the Arduino mega board using various interfaces such as serial peripheral interface (SPI), inter-integrated circuit (I2C), and universal asynchronous receiver/transmitter (UART). Once the components are connected, necessary libraries [30] are installed, and the algorithm for sensor fusion is written to read data from the RTK-GPS and IMU, store the data on the Secure Digital (SD) card, and display the data on the LCD monitor in real-time. Thus, providing an output of the GPS-IMU dataset.

To show the actual electrical connections between the components in the circuit, the electronic circuit diagram is presented (**Figure 4**) to create a powerful system that can provide high-precision positioning data and information about the device's orientation and movement.

Overall, the RTK-GPS component provides high-precision positioning data [31, 32], while the IMU [32–34] component provides information about the device's orientation and movement. Combining these two components can produce more accurate and reliable data than either component alone. By combining the functionalities of the RTK-GPS and IMU, the device provides more accurate and reliable data than either component alone [34]. As a result, it is a vital tool for a broad spectrum of applications requiring precise location and movement data. The setup function initializes the modules, sets the output rate of the RTK-GPS module to 20 Hz, creates a log file on the SD card, and initializes the 20 × 4 LCD. The loop function reads data from the RTK-GPS module, converts it into a more readable format, and writes it to the log file and LCD display. The data logged includes the latitude, longitude, mean sea level and accuracy. In addition, the code was designed to read data from the IMU sensor module, which contains an accelerometer, a magnetometer, and a gyroscope. The data includes acceleration, magnetic field strength, and angular velocity in three axes, as well as gyroscope temperature.

*Adaptive Neuro-Fuzzy Inference System-Based GPS-IMU Data Correction for Capacitive… DOI: http://dx.doi.org/10.5772/intechopen.112921*

**Figure 4.** *Circuit diagram of Arduino-based GPS-RTK with integrated inertial measurement unit.*
