Developing an Algorithm to Improve Positioning Accuracy of Low-Cost Global Navigation Satellite System Modules

Global Navigation Satellite System (GNSS) technology is the most widely used technique for obtaining positioning and navigation information for various applications. However, GNSS is not an error free technology. Differential GNSS techniques are used to mitigate these errors and different commercial brands of GNSS receivers have been developed to avoid some errors where quality and performance depends heavily on the price tag of such advance GNSS receivers due to the fact that technological capabilities adopted and embedded in each single GNSS receiver. There are user cases where the few or more those capabilities has to keep leave behind thereby compromise the cost to benefit ratio. As an alternative to above problem, some low-cost GNSS modules are now available in the market which has quite low position accuracy but can be developed to address unique requirements of some user cases. In practical situations, Real-Time-Kinematic (RTK) positioning systems cannot be used everywhere due to its technical limitations and GNSS receivers use different levels of techniques such as moving baseline system or Satellite Based Augmentation System (SBAS). Further, heading information is also a very important parameter in marine industry for obtaining the vessel’s orientation. This research attempts to assess the capability of u-blox NEO M8N GNSS module for hydrographic surveys by developing a moving baseline GNSS configuration and simple Kalman filter based algorithm. The developed prototype was tested in both static and kinematic observations. The prototype achieved 0.5-2.5 meters of position accuracy at the 95% confidence level in static observations, while it archived around 3 meters of positioning accuracy in kinematic observations. This is a sufficient accuracy for Order 1a, Order 1b and Order 2 standards of hydrographic surveys according to the IHO S-44 guidelines.


Introduction
Global Navigation Satellite Systems (GNSS) have revolutionized positioning and navigation technologies by providing accurate and reliable positioning information worldwide.GNSS refers to a global network of satellites that transmit signals containing precise timing and positioning information.These signals are received by GNSS receivers, which process the information to determine accurate positions, velocities, and timings.Notable GNSS systems include GPS (Global Positioning System) GLONASS, Galileo, and BeiDou.
In single observation GNSS has relatively low position accuracy.Differential GNSS (DGNSS) methods aim to enhance the positioning accuracy of GNSS receivers by mitigating errors caused by atmospheric disturbances, satellite clock inaccuracies, and other environmental influences.DGNSS techniques involve the comparison of signals from a reference receiver, typically located at a known position, with those received by a user receiver.By analyzing the differences between these signals, errors can be estimated and corrected, improving the overall positioning accuracy (Zabalegui et al., 2020).Satellite Based Augmentation System (SBAS) is a common method, such as WAAS, EGNOS and MSAS provide service to designated geographical regions of the globe, where one prominent SBAS is the GPS Aided Geo Augmented Navigation (GAGAN) system.
GAGAN is an Indian SBAS designed to provide improved GNSS positioning in the Indian region also covering Sri Lanka (Dammalage & De Silva, 2018).It utilizes additional satellites and ground-based infrastructure to transmit correction messages to GNSS receivers, aiding in mitigating errors and enhancing the accuracy of positioning information GNSS system has three main segments as Ground controlling segment, Satellite segment and user segment.In user segment vast verities of GNSS receivers are available in the market today.GNSS receivers are devices that receive satellite signals, process them, and determine the receiver's position and other related information such as time and velocity.These receivers typically consist of an antenna to capture the signals, a radio frequency (RF) front end to amplify and filter the received signals, a baseband processor to demodulate and decode the signals, and a positioning engine to calculate the receiver's position.When considering about the cost point of view, from low cost to expensive GNSS receivers are developed.
Low-cost GNSS receivers provide a cost-effective solution for applications requiring less accurate positioning information.However, they often suffer from limitations in signal processing capabilities, signal sensitivity, and positioning accuracy compared to high-end receivers.Because of these limitations, it can degrade their performance specially in challenging environments.
The u-blox NEO-M8N GNSS module is a popular low-cost GNSS receiver module that incorporates advanced positioning technology.It supports multiple GNSS constellations and provides high sensitivity reception, making it suitable for numerous applications.The NEO-M8N module offers a range of features including support for DGNSS which makes it a better candidate for improving the performance of low-cost GNSS receivers.
According to the International Hydrographic Organization (IHO) S-44, the standards are divided into five criteria for hydrographic surveys, each with specific requirements and data accuracy standards.These criteria define the horizontal positioning accuracy using the term "Total Horizontal Uncertainty" (THU).Those values can tabulate as follows (Table 1); Every hydrographic survey should be categorized according to above criteria and the choice of survey instrumentation changed according to survey requirements.
According to above Table 1, it's not required to have high precision position for most of the hydrographic survey criteria (M.E. Elsobeiey, 2020).Specially for Order 2, Order 1b and Order 1a surveys can be done under stand-alone GNSS+SBAS configuration (M.Elsobeiey, 2013).
Price of the professional GNSS receiver is one of main drawback in this field specially survey grade GNSS receiver are much expansive.Because of that GNSS users are trying to use low cost GNSS receivers for their applications.But low cost GNSS modules has very low accuracy and reliability.If it possible to increase positional accuracy of low cost GNSS modules, it will be a better option for above problems in successfully catering the requirements.
This paper discussed on such experiment conducted to improve the position accuracy of low cost GNSS modules for hydrographic surveys by developing hardware prototype and software algorithm.

Hardware Prototype Development
It is possible to obtain current position information, satellite information, solution type information, time, speed and many more using low-cost GNSS modules (Fernandez et al., 2019).These modules provide low accuracy so that cannot be used in most of the land surveying application (M.Elsobeiey, 2013).By using a microcontroller board, it can be programmed as a basic GNSS prototype using an National Marine Electronics Association (NMEA) parser algorithm, which can derive location information and other satellite parameters from NMEA sentences in a userreadable format.
The developed prototype used two u-blox NEO M8N GNSS modules (Figure 1), an ESP32 development board, a 0.96-inch OLED display and four push buttons.The ESP32 was chosen over standard Arduino development boards because it has a larger coding space, a dual-core processor with a clock speed of up to 240 MHz, supports two universal asynchronous receiver / transmitters (UARTs) and one I2C interface, and provides additional generalpurpose input/output (GPIO) pins.Further, it is also commonly available in the local market at an affordable price, making it a good option for industriallevel Arduino development boards.The prototype was assembled on a simple project board.Jumper wires were used to connect electronic items together.The prototype is working on a 5-volt supply and requires around 200 mA of current at peak stage.Generally, it's easy to power on through mini-USB in ESP32 board.After several tests, the final hardware prototype layout and prototype was as follows (Figure 2 & 3);

Algorithm Development
The algorithm was developed using the Arduino environment, which is based on the C++ programming language.Several Arduino-supporting libraries were used to derive position information from the UBX protocol, develop display functions, and use EEPROM and Bluetooth interface developments.
The main algorithm is a combination of simple Kalman filters, the haversine formula, the Vincenty formula and NMEA sentence development functions.Those formula-based functions were used to derive heading information and a smooth final position estimation.Heading is the angle between true north and the vector calculated from the primary to secondary antenna.Kalman filters are mathematical techniques that use a number of observations to predict the state of a system.They were initially developed by Rudolf Kalman in the 1960s and are now widely used in a variety of application.
The fundamental operation of the filter designed in two stages.The first stage is known as the prediction stage because it uses a system development prediction model to estimate the system state a priori from the previous state.The second stage, known as the update stage, corrects the initial a priori estimate using observations from the system to provide an a posteriori state estimate.Starting with an initial estimated state, this two-stage procedure is repeated in a loop until process is complete (Gomez-Gil et al., 2013).
Estimated position information is giving with the output of NMEA sentences.NMEA is a standard protocol used to transmit data between marine electronic devices such as GNSS receivers, sonar, and autopilots.The NMEA protocol defines a set of sentences that are used to transmit data such as position, speed, and heading (NMEA Revealed, 2023).NMEA sentences are text strings that are sent in American Standard Code for Information Interchange (ASCII) format at a specified baud rate.In this stage, GNRMC, GPZDA, GNGGA, GNVTG, and GPHDT sentences were developed for sending position information and heading information.Further, it was designed in such a way to change antenna separation length according to the user requirements.
The light-emitting diode (LED) outputs, simple menu functions including push button inputs, and a Bluetooth interface were added to the main algorithm.The purpose of adding an LED output is to show whether the current GNSS status is allowable or not by just turning on or off the LED.It's very important to show the solution status of the satellite count, position dilution of precision (PDOP) level and accuracy estimations during the surveying.Those factors are important factors of the final position's accuracy.To solve that problem, additional LEDs were added as GNSS status indicators.There are eight LEDs: SATS OK, SATS OUT, PDOP OK, PDOP OUT, HACC OK, HACC OUT, and DGNSS OK, DGSS OUT.If it exceeds threshold values, it turns on all OUT LEDs, and if values are at an allowable level, then OK LEDs are turned on.With this, the use can get an idea of current status by looking at the LED rather than reading numerical values during the data collection.
Additionally, the developed menu page helped to change the parameters, and the Bluetooth settings which is very useful interface to transmit output NMEA sentences wirelessly.

Working Process of main algorithm
The algorithm takes the GNSS information from both primary and secondary GNSS modules and calculates the distance and heading between two GNSS readings.Then it calculates how much deviation is there from the actual antenna separation, which is a given known to the system.A simple Kalman filter-based algorithm was used to estimate the most suitable position by using actual antenna separation, computed distance between the two GNSS readings, and heading.Estimated latitude and longitude are used in the NMEA protocol design.Finally, the developed NMEA sentences are sending through USB and Bluetooth interfaces as position output.A graphical user interface (GUI) system is working in parallel with the NMEA protocol design.It's display shows the current GNSS status, and the LEDs are working according to user adjustments.User adjustment can be done by using push buttons, and final values are stored in electrically erasable programmable read-only memory (EEPROM).
Layout of developed algorithm working process as follows (Figure 4);

GUI Layout and GUI working Process
In order to account for the changes of the adjustable parameters such as antenna separation, threshold values, Bluetooth settings and to display hardware information, a simple menu functions with GUIs were developed.Four push buttons ware added as SELECT, UP, DOWN and BACK.The layout of developed GUI menu pages as follows (Figure 5); While receiving GNSS data through the UBX protocol algorithm, it is checked to see if the data has a GNSS fixed solution or not.The main algorithm will not execute until both modules give a GNSS-fixed solution.The display shows which module provides a fixed GNSS solution.Generally, this situation can occur while the GNSS antenna is disconnected.If both modules are able to track more than five satellites.
Module is able to generate a fixed GNSS solution.This ensures the maximum accuracy.
When everything is ok, the algorithm runs normally.The Display shows the current latitude and longitude values in decimal degrees, altitude above sea level in meters, PDOP, satellite count, Bluetooth ON or OFF, local time, speed in knots, horizontal accuracy estimate, and vertical accuracy estimate information (Figure 6).Algorithm-generated NMEA sentences were sent through USB and Bluetooth interfaces while Bluetooth was enabled.Status indicating LEDs are turning on or off according to user adjustments.All settings can be saved in the ESP32 EEPROM.The user can access menu pages by pressing the SELECT button during the normal running stage.After pressing the SELECT button, it goes to the "Base Line" page, which is related to actual GNSS antenna separation.The user can move between "Base Line", "Limits", "Hardware Info," and "Bluetooth" pages by using the UP and DOWN buttons (Figure 7).By pressing the SELECT button, the user can access adjustments on the required pages, and by pressing the BACK button, the user can move to the previous page.By selecting the "Base Line" page, the user can access the "Edit Base Line" page.After selecting it, the display shows the current antenna separation length, which was saved in EEPROM, and the user can increase or decrease it by pressing the UP or DOWN buttons, and the display shows adjustments.By changing the button state in a small-time interval (small pressing), its increase or decrease values are displayed on one decimal page, and by long pressing, their increase or decrease is continually displayed until button release (Figure 8).Finally, the user can push the select button again to save the value into the EEPROM and display it automatically on the back page.Then the algorithm adjusts its parameters according to the new antenna separation value.On the "Limits" page, users can adjust threshold values for satellite counts, PDOP level, and horizontal accuracy estimation values.On the "Limits" page, there are three sub-menus: "Edit Satellite Limit", "Edit PDOP Limit" and "Edit HAE Limit".By selecting those pages, the user can adjust threshold values the same as for antenna separation adjustment.Finally, users can save the final value in EEAPROM.Then LEDs work according to those threshold values.For example, if the current PDOP value is 2.5 and the threshold value is 2.0, then the red PDOP OUT LED is turned on until PDOP is less than 2.0.When PDOP is less than 2.0, the PDOP OK LED is turned on and the PDOP OUT LED is turned off.Similarly, working the other six LEDs to show results It's easier to identify by seeing LEDs than by reading values.
Selecting the "View HW Info" page shows the current hardware status of both modules (Figure 9).On the Bluetooth page, users can turn on or off the Bluetooth interface of the prototype.

Observation Results and Discussion
There are several standalone and kinematic observations were taken by using developed prototype.For collecting stand-alone observations existing ground control point (NSG1) at the Sabaragamuwa University of Sri Lanka was used.Collected observations can be separate as follows;

Stand Alone Observation Using Single U-blox NEO M8N GNSS Module on Ground Control Point without Algorithm
The NEO M8N GNSS module was fixed on the NSG 1 control point and got data from stand-alone observation.About 15 minutes (1050 epochs) of observation were made with the GAGAN corrections.In statistical analysis, the average position shift was 0.993 meters from the known point and those measurements had 2.906 meters of standard deviation.This study doesn't concern with vertical measurements (altitude) because they can deviate more from the actual reading because it's impossible to get accurate altitude measurements by using these types of low-cost single-frequency GNSS modules and general purpose GNSS antennas.

Stand Alone Observation of Final Prototype with Different Antenna Separations
It was tested for 5, 3 and 1 m antenna separations and the results are given in the Figures 11 to 16   2.When analyzing heading values, it has a higher deviation in small antenna separations (1m), and it looks more stable with higher antenna separations (5m).Similarly, it gives 1.71 meters of position error for 5 meters of antenna separation and 0.822 meters of position error for 3 meters of antenna separation.In this study 1.602 meters of position errors taken for 1 meter antenna separation.
Generally, the developed algorithm is able to give a more accurate horizontal position in the minimum antenna separations, because input positions are very closer to each other than larger antenna separation values.But in the small antenna separation, heading values are not accurate because headings are calculated using observed latitudes and longitudes.When the antennas are closer to each other, the coordinates can be closer or even overlap due to the larger GNSS errors then the measured heading will not accurate.

Accuracy Comparison of Final Prototype with HEMISPHERE VS330
Hemisphere VS330 GNSS compass system can provide accurate position and heading information based on commercially developed moving base concept.This system was used to do the accuracy comparison with the developed system.Here, both Hemisphere VS330 and developed prototype used with 1m antenna separation (1m moving base).VS330 having dual frequency facility tracking L1 and L2 frequencies.GNSS antennas of the prototype also fixed on the same place and recorded NMEA raw data for post processing.3.According to statistical analysis of the results, a better average position was obtained by prototype than by VS330 because those prototype results are closer to the actual position than the VS330 result.But the VS330 has much less noise than the prototype.Its position standard deviation is around a few centimeters in all the observation sets.The standard deviation of the readings taken from the prototype was always around 0.5 meters.As a summary, the Hemisphere VS330 observation was taken with higher precision than prototype results.This could be possible because the Hemisphere VS330 is a high-grade GNSS receiver and has more advanced hardware and algorithms.The prototype used just simple GNSS antennas, which are commonly used in GNSS units.First, the prototype was taken along an irregular path and it has given around 2-3 meters of shifting with ground known points on Google map.The distance between the NSG1 control point and the moved path was 3.3 meters (Figure 21).

Kinematic Observation Using Developed Prototype
Secondly, this unit was setup in a hydrographic survey boat along with the SxBlue II GNSS receiver to test the actual performance during the bathymetric survey.SxBlue II is a commercial-grade singlefrequency (L1) GNSS receiver with GAGAN capacity.The observation results were plotted in Google Earth Pro (Figure 24).Here, the red path is the prototype observation and the blue path is the SxBlue II observation path.The data was collected at a nearshore area in Norachcholei, Sri Lanka.According to the plotted map (Figure 22), the shift of the paths was 2-3 meters between SxBlue II and developed prototype.In these experiments, it is difficult to come to a direct conclusion on the accuracy of the developed prototype as all the tested other GNSS units were also having their own errors.It was used Google Earth Pro to plot all kinematic observations.Google map also having errors because it was developed by using satellite images.
Finally, the results of both observations which were taken from the prototype was having a bias around 2-5 meters according to Google Earth.

Conclusion
Without the developed algorithm, NEO M8N GNSS module is able to provide position accuracy around 6 meters in 95% confidence level.With the developed algorithm, the prototype has given less than 1.5m of positioning accuracy with 66% confidence level in stand-alone observation.
By the result of observation which were taken by changing antenna separations, prototype was able to archive highest accuracy in 3 meters of antenna separation.According to those results it can recommend to 3 meters of antenna separation to get better results in both position and headings than other antenna separations.
According to accuracy comparison observation data, developed prototype was able to archive position accuracy between 0.55m -2.566m in 95% confidence level in 1m of antenna separation.In the kinematic observation data prototype position accuracy was less than 5 meters.
Heading information has large variations because its directly measured by using input latitudes and longitudes.To get accurate heading information this algorithm cannot be used according to above observation results.Algorithm is able to giving more accurate heading information in larger antenna separations but in practically it can be difficult.
According to observation results developed prototype is cannot used to higher order hydrographic surveys because they are required less than 2m of position accuracy.According to IHO S44 6 th edition, it can use to Order 1a, Order 1b and Order 2 surveys which are not required high accurate positioning.For getting it should be improving algorithm by using GNSS IMU fusion techniques.

Algorithm development
The developed system is working based on GNSS information only and it does not include any auxiliary sensers like inertial measurement unit (IMU).However, it can be further developed by adding supporting sensors with extended Kalman filters and could be able to giving better results in both stand alone and dynamic modes.

Mobile Application Development
The commercial grade GNSS receivers are controlling through mobile applications.It's possible to develop mobile application to configure the developed prototype by connecting via Bluetooth interface.Then, this system will be much more user-friendly.

Figure 5 .
Figure 5. Layout of GUI Pages Meroon paths are representing UP/ DOWN button press and black paths are representing SELECT / BACK button press.After giving 5 volts of power to the main board, it turns on the setup algorithm.Display shows Welcome Animation and searching UBX communication from UART1 and UART2 interfaces.By default, the prototype searched UBX data by using different baud rates, such as 19200 and 38400.In organic light-emitting diode (OLED) displays, it searches for GNSS modules at different baud rates.If the ESP32 can receive UBX data from both GNSS modules, the algorithm runs in the initial stage.This also helps to initialize the Kalman filter algorithm.It takes some time around 5 seconds for better position estimation with the Kalman filter during the initialization.While receiving GNSS data through the UBX protocol algorithm, it is checked to see if the data has a GNSS fixed solution or not.The main algorithm will not execute until both modules give a GNSS-fixed solution.The display shows which module provides a fixed GNSS solution.Generally, this situation can occur while the GNSS antenna is disconnected.If both modules are able to track more than five satellites.

Figure 7 .
Figure 7. GUI Pages Related to Edit Base Line, Edit Thresholds, View Hardware Information and Bluetooth

Figure 8 .
Figure 8. GUIs During Adjustment of Antenna Separation

Figure 9 .
Figure 9. Hardware Information Display

Figure 10 .
Figure 10.Scatter Plot Diagram Stand Alone Observation of u-blox NEO M8N GNSS Module . The positional accuracy is shown in the scatter plots and heading accuracy is given in the line plot.

Figure 11 .Figure 12 .Figure 14 .Figure 15 .Figure 16 .
Figure 11.Scatter Plot Result of GNSS Observation in 5mAntenna Separation Four different observations taken by changing heading angle to represent the 4 quadrants.Figures 17-20 are showing the results.

Figure 21 .
Figure 21.Kinematic Observations on the go

Figure 20 .
Figure 20.Heading Changes Diagram of Developed Prototype in 1 st Observation set

Figure 22 .
Figure 22.Line Comparison with SxBlue II GNSS Receiver

Table 1 .
IHO S44 Standards and Their THU Values