Accuracy of Trajectory Tracking Based on Nonlinear Guidance Logic for Hydrographic Unmanned Surface Vessels

A new trend in recent years for hydrographic measurement in water bodies is the use of unmanned surface vehicles (USVs). In the process of navigation by USVs, it is particularly important to control position precisely on the measuring profile. Precise navigation with respect to the measuring profile avoids registration of redundant data and thus saves time and survey costs. This article addresses the issue of precise navigation of the hydrographic unit on the measuring profile with the use of a nonlinear adaptive autopilot. The results of experiments concerning hydrographic measurements performed in real conditions using an USV are discussed.


Introduction
The importance of hydrographic measurement in recent years has been growing constantly due to the increasing use of water transport, including movements in restricted areas. A particular challenge is shallow-water measurements near land or navigational obstacles where the use of larger hydrographic units is impracticable or not justified economically. An important aspect in this respect is the desire to shift loads from roads and motorways to waterways, which, by definition, are safer and transport is more ecologically friendly and economical.
The process of conducting hydrographic measurements in land-restricted waterways requires precise acquisition of the measurement profile, and a limit to the acquisition of redundant data on the measurement strip tabs in the case of multi-beam echosounder (MBES) measurements and excessive gaps between measurement profiles in the case of single-beam sonar measurements. The International Hydrographic Organization (IHO) does not define the accuracy of maintaining the measuring unit on the profile, but only determines the percentage of searching the bottom of the reservoir and the accuracy of determining the position of the measuring unit. For instance, in the case of the most restrictive special category, 100% coverage and an accuracy of 2 m with respect to determination of position with a 95% confidence level is required [1].
Traditionally, for manned hydrographic units, the helmsman follows the position of the unit on the profile on the monitor screen of the measurement system, adjusting the parameters of the unit's movement to the current weather conditions. Many measurement systems used throughout the world provide the helmsman with an indicator which shows the current distance from the planned measurement profile. Continuous tracking of the position of the measuring unit on the profile requires a high degree of concentration and an appropriate response from the helmsman; this is a tedious and This algorithm requires a frequency of 50 Hz (method name: update), meaning that the update method is used 50 times per second. The method is activated only in automatic mode, meaning that only the automatic modes Auto, Guided, Return to Dock (RTD), and Smart RTD use this method. The automatic modes make use of all navigation sensors, and valid sensors readings are compulsory for automatic mode activation. Any missing sensors' data are unable to activate this function. Moreover, the Auto mode requires a programmed route (route plan), the RTD mode requires a dock (home) position and a saved travelled route to perform smart RTD, and the Guided mode requires a desired point location. All data are provided in the form of geographical waypoints (WPs).
The update method uses, in order, the following methods: • Steering WP-the basic route plan and vehicle destination. The method provides the location that the vehicle should achieve (destination). • NLG controller-the method where the navigation process is implemented. The method, based on destination and vehicle origin, calculates the lateral acceleration.

•
Steering LA-the method, based on the PID (proportional-integral-derivative) controller, calculates the steering output. • Set Steering-the method converts the steering output to the appropriate navigation controller output signal. The output signal (PWM: Pulse-Width Modulation) is the electrical signal interpreted by the electric motor's controller and the rudder's linear actuator controller.
All the methods enumerated above participate in trajectory tracking and have been tuned separately during the platform development and validation process.
Enter automatic mode (Auto, Guide, Return To Dock (RTD), Smart RTD)  This algorithm requires a frequency of 50 Hz (method name: update), meaning that the update method is used 50 times per second. The method is activated only in automatic mode, meaning that only the automatic modes Auto, Guided, Return to Dock (RTD), and Smart RTD use this method. The automatic modes make use of all navigation sensors, and valid sensors readings are compulsory for automatic mode activation. Any missing sensors' data are unable to activate this function. Moreover, the Auto mode requires a programmed route (route plan), the RTD mode requires a dock (home) position and a saved travelled route to perform smart RTD, and the Guided mode requires a desired point location. All data are provided in the form of geographical waypoints (WPs).
The update method uses, in order, the following methods: • Steering WP-the basic route plan and vehicle destination. The method provides the location that the vehicle should achieve (destination). • NLG controller-the method where the navigation process is implemented. The method, based on destination and vehicle origin, calculates the lateral acceleration.

•
Steering LA-the method, based on the PID (proportional-integral-derivative) controller, calculates the steering output. • Set Steering-the method converts the steering output to the appropriate navigation controller output signal. The output signal (PWM: Pulse-Width Modulation) is the electrical signal interpreted by the electric motor's controller and the rudder's linear actuator controller.
All the methods enumerated above participate in trajectory tracking and have been tuned separately during the platform development and validation process.
The guidance logic [24] selects the desired point on the planned trajectory and generates a lateral acceleration (a s ) using this point, in accordance with following formula: where the desired point is on the planned track at distance L 1 from the actual origin of the vehicle ( Figure 2). Knowing that: where the lateral acceleration calculated by Equation (1) equals the centripetal acceleration required to follow instantaneously a circular segment and a s is the property used to track a circle of any radius R. This characteristic predisposes the guidance logic to work faithfully with a curved path. Moreover, as shown elsewhere [24], the method shows better capabilities than the PID controller when used on the UAV in the presence of wind. In this research, the method will be examined on the unmanned surface vessel (USV) using state-of-the-art geodetic grade measurements. The reference position of the USV was measured using independently acquired GPS navigation data (GPS RTK (Real Time Kinematic) geodetic receiver). The guidance logic [24] selects the desired point on the planned trajectory and generates a lateral acceleration ( ) using this point, in accordance with following formula: where the desired point is on the planned track at distance 1 from the actual origin of the vehicle ( Figure 2). Knowing that: where the lateral acceleration calculated by Equation (1) equals the centripetal acceleration required to follow instantaneously a circular segment and is the property used to track a circle of any radius . This characteristic predisposes the guidance logic to work faithfully with a curved path. Moreover, as shown elsewhere [24], the method shows better capabilities than the PID controller when used on the UAV in the presence of wind. In this research, the method will be examined on the unmanned surface vessel (USV) using state-of-the-art geodetic grade measurements. The reference position of the USV was measured using independently acquired GPS navigation data (GPS RTK (Real Time Kinematic) geodetic receiver).
The original Equations (1) and (2) were modified [41] for USV navigation purposes. The implementation required the addition of two parameters ( 1 Damping Factor and 1 Period). Therefore, for the new 1 :  The original Equations (1) and (2) were modified [41] for USV navigation purposes. The implementation required the addition of two parameters (L 1 Damping Factor and L 1 Period). Therefore, for the new L 1 : ζ is the L 1 Damping Factor, T is the L 1 Period (s), and v is the speed of the unit. Finally, substituting Equation (3) into Equation (1) can be written as: where k is the L 1 Control Gain, defined as: The cross-track error (XTE), corresponding to l ⊥ on Figure 3 and defined as a distance between actual USV position perpendicular to the intended (desired) track, can be approximated as a second order differential equation [42]: where the natural frequency ω n (natural frequency (eigenfrequency) is the frequency at which a structure or system have the tendency to oscillate in the absence of any driving or damping forces), is related to T: Sensors 2020, 20, x FOR PEER REVIEW 5 of 16 where the natural frequency (natural frequency (eigenfrequency) is the frequency at which a structure or system have the tendency to oscillate in the absence of any driving or damping forces), is related to : The dynamics of Equation (6) indicate that changing the values of and adjusts the control response of XTE. The and values are specified by the user and, for this research, were adjusted experimentally after long and extensive trials. The parameter tuning requires some user experience regarding the USV's parameters and the response observations during the trials. As a general rule for tuning, the following instructions are given. The 1 period is given in seconds with a range from 1 to 60 (increments of 1) for the 1 tracking loop and is the primary control parameter for aggressive turns in auto mode ( Figure 1). This parameter should be larger for less responsive USV platforms. For smaller and more maneuverable USVs a lesser value can be set. The starting value was adjusted experimentally as 20 s. The 1 control damping ratio with range from 0.6 to 1 (increments of 0.05) should be increased if the USV overshoots the track being followed.
Significant changes made to the original Equation (1) enable the length 1 to be calculated dynamically by the navigation loop depending on the USV ground speed changes and enable the user to specify a constant period for the tracking loop.
The L1 Control Gain was changed from a fixed value of 2 (Equation (1)) to be calculated based on the value set by the user. This enables additional damping to be specified to compensate for delays in the velocity measurement and for the USV frame to respond. Figure 4 presents all possible tracking movements. The current tracking mode depends on the area where the USV is located in relation to the route plan. Figure 4 presents a simple survey plan based on 6 WPs. When the vehicle is located in 1 , the first WP is acknowledged to be tracked and vehicle i proceeds to point A. The point is considered to be reached when the unit is within the parameter. The is the distance in meters from a WP when the algorithm considers the WP has been reached and determines when the unit will proceed to the next WP. After reaching the first WP, the unit starts the L1 tracking mode (positions 2 , 4 ). In the L1 tracking mode a point L is tracked and this point is dynamically located on the line between the last and next WP. The L point is the intersection point between the track line and the circle with the radius equal to the distance 1 defined by the user. When point B is reached the next WP (C) is acknowledged to be tracked (Next WP Tracking Area). The procedure is repeated until the unit reaches the last WP when it stops and waits for the next command, either from the operator or the autonomous system. The dynamics of Equation (6) indicate that changing the values of ζ and ω n adjusts the control response of XTE. The ζ and ω n values are specified by the user and, for this research, were adjusted experimentally after long and extensive trials.
The parameter tuning requires some user experience regarding the USV's parameters and the response observations during the trials. As a general rule for tuning, the following instructions are given. The L 1 period T is given in seconds with a range from 1 to 60 (increments of 1) for the L 1 tracking loop and is the primary control parameter for aggressive turns in auto mode ( Figure 1). This parameter should be larger for less responsive USV platforms. For smaller and more maneuverable USVs a lesser value can be set. The starting value was adjusted experimentally as 20 s. The L 1 control damping ratio ζ with range from 0.6 to 1 (increments of 0.05) should be increased if the USV overshoots the track being followed.
Significant changes made to the original Equation (1) enable the length L 1 to be calculated dynamically by the navigation loop depending on the USV ground speed changes and enable the user to specify a constant period for the tracking loop.
The L1 Control Gain was changed from a fixed value of 2 (Equation (1)) to be calculated based on the ζ value set by the user. This enables additional damping to be specified to compensate for delays in the velocity measurement and for the USV frame to respond. Figure 4 presents all possible tracking movements. The current tracking mode depends on the area where the USV is located in relation to the route plan. Figure 4 presents a simple survey plan based on 6 WPs. When the vehicle is located in USV 1 , the first WP is acknowledged to be tracked and vehicle i proceeds to point A. The point is considered to be reached when the unit is within the WP Radius parameter. The WP Radius is the distance in meters from a WP when the algorithm considers the WP has been reached and determines when the unit will proceed to the next WP. After reaching the first WP, the unit starts the L1 tracking mode (positions USV 2 , USV 4 ). In the L1 tracking mode a point L is tracked and this point is dynamically located on the line between the last and next WP. The L point is the intersection point between the track line and the circle with the radius equal to the distance L 1 defined by the user. When point B is reached the next WP (C) is acknowledged to be tracked (Next WP Tracking Area). The procedure is repeated until the unit reaches the last WP when it stops and waits for the next command, either from the operator or the autonomous system.  The L1 method calculates the lateral acceleration to be executed by the unit. The 1 acceleration is translated to the motors and the steer command using the Steering LA and Motor Control methods ( Figure 1). The Steering LA method is based on a PID controller. The automatic (mission control) algorithms, according to research [25] were demonstrated to control speed and course of the surface vessel. The PID controller continuously attempts to minimize the error ( ) over time by adjustment of a control variable ( ). The error value function ( ) is the difference between a desired set point ( ) and the measured process variable ( ) ( ( ) = ( ) − ( )). Process variable is represented by the value that is being controlled (e.g., actual speed or actual course). The PID controller can be expressed as: where , , and are non-negative and denote the coefficients for the proportional, integral, and derivative terms, respectively. The parameters were set experimentally during test trials. The PID desired and the PID achieved were monitored and displayed and the coefficients can be adjusted to achieve the appropriate object response and parameter (course and speed) stabilization.

System Specification
The steering system specification for the unit (Table 1) is based on a combination of skid steering and a traditional rudder ( Figure 5).  The L1 method calculates the lateral acceleration to be executed by the unit. The L 1 acceleration is translated to the motors and the steer command using the Steering LA and Motor Control methods ( Figure 1). The Steering LA method is based on a PID controller. The automatic (mission control) algorithms, according to research [25] were demonstrated to control speed and course of the surface vessel. The PID controller continuously attempts to minimize the error e(t) over time by adjustment of a control variable u(t). The error value function e(t) is the difference between a desired set point r(t) and the measured process variable y(t) (e(t) = r(t) − y(t)). Process variable is represented by the value that is being controlled (e.g., actual speed or actual course). The PID controller can be expressed as: where K p , K i , and K d are non-negative and denote the coefficients for the proportional, integral, and derivative terms, respectively. The parameters were set experimentally during test trials. The PID desired and the PID achieved were monitored and displayed and the coefficients can be adjusted to achieve the appropriate object response and parameter (course and speed) stabilization.

System Specification
The steering system specification for the unit (Table 1) is based on a combination of skid steering and a traditional rudder ( Figure 5).  Skid-Steering is a type of vehicle steering where rotation (yaw) is obtained by a difference in the speeds of the left and right propellers (wheel) and is typical for vehicles with non-orientable propellers (wheels). Electric motors installed on the platform and situated in the right hull are turned using a linear actuator, therefore, maneuverability is enhanced, and the unit is more responsive to steering, when compared to steering using only pure skid steering. Additionally, this USV uses pivot turns when the angle of turn is greater than a specific angle (can be set in the Pivot Turn Angle parameter). The pivot turn angle was selected as a result of extensive trials and was equal to 45. The USV is equipped with an autopilot and the navigation position is calculated based on the autopilot's internal sensors: three magnetic compasses (nine MEMS magnetometers), an inertial navigation system (INS) based on simple MEMS (microelectromechanical system) sensors consisting of nine gyroscopes and nine accelerometers (compasses and INS embedded in autopilot) and an external GNSS receiver based on an UBlox M8N module. In that configuration, the USV position is calculated using an EKF (extended Kalman filter). The EKF is a 24-state extended Kalman filter and the autopilot's filter estimates the following states: altitude, velocity, position, gyro bias offsets, gyro scale factors, Z accel. bias, Earth's magnetic field, platform body magnetic field, and wind velocity. For calculations in this study, the navigation autopilot used the EKF output position, which means that this was not a pure GPS reading, but filtered and estimated based on other internal sensors. Only one GNSS module based on the UBlox M8N module was used ( Table 2). Skid-Steering is a type of vehicle steering where rotation (yaw) is obtained by a difference in the speeds of the left and right propellers (wheel) and is typical for vehicles with non-orientable propellers (wheels). Electric motors installed on the platform and situated in the right hull are turned using a linear actuator, therefore, maneuverability is enhanced, and the unit is more responsive to steering, when compared to steering using only pure skid steering. Additionally, this USV uses pivot turns when the angle of turn is greater than a specific angle (can be set in the Pivot Turn Angle parameter). The pivot turn angle was selected as a result of extensive trials and was equal to 45 • .
The USV is equipped with an autopilot and the navigation position is calculated based on the autopilot's internal sensors: three magnetic compasses (nine MEMS magnetometers), an inertial navigation system (INS) based on simple MEMS (microelectromechanical system) sensors consisting of nine gyroscopes and nine accelerometers (compasses and INS embedded in autopilot) and an external GNSS receiver based on an UBlox M8N module. In that configuration, the USV position is calculated using an EKF (extended Kalman filter). The EKF is a 24-state extended Kalman filter and the autopilot's filter estimates the following states: altitude, velocity, position, gyro bias offsets, gyro scale factors, Z accel. bias, Earth's magnetic field, platform body magnetic field, and wind velocity. For calculations in this study, the navigation autopilot used the EKF output position, which means that this was not a pure GPS reading, but filtered and estimated based on other internal sensors. Only one GNSS module based on the UBlox M8N module was used ( Table 2). The GPS RTK module readings are not used for navigation; the module is part of the hydrographic equipment and additionally, the acquired RTK readings were used as a reference and as an independent USV position registration. The GPS RTK receiver specifications are given in Table 3. The GPS RTK used for position registration was a state-of-the-art survey grade receiver, embedded in the SPLITBOX-STD-T hydrographic equipment and based on the Trimble GNSS receiver.

Experiments
The experiments were divided into three phases. Phase one was data acquisition. In this phase three different patterns were planned and executed. The patterns were planned to represent typical hydrographic surveys based on the present unit (Pattern 1) ( Figure 6) and the bottom object investigation plan (Patterns 2 and 3) ( Figure 6). All the profiles were numbered in accordance with their execution order. Profiles 1 to 10 belong to pattern no. 1, profiles from 11 to 14 belong to pattern no. 2, and profiles from 15 to 19 belong to pattern no. 3. All data were recorded within their typical hardware configuration, meaning that no additional technical rearrangements of the unit were conducted. The unit in this configuration was prepared to undertake surveys based on best knowledge and practice including use of state-of-the-art hydrographic equipment, therefore, all equipment was calibrated, and all GNSS and INS equipment offsets were measured, and data entered into all hardware units.
Phase two of the experiment concerned logged data filtration and preparation and evaluation of navigation GPS accuracy in the dynamic measurements. To prepare for this evaluation, studies described elsewhere [1] were used.
The approach used the PL-2000 system (ETRS89/Poland CS2000 zone 6) which afforded the replacement of angular coordinates recorded by the GPS and RTK by Cartesian coordinates (in meters). This conversion (from angular GPS coordinates to Cartesian) allowed the calculations to be simplified and the results to be presented in meters. The PL-2000 coordinate system is Cartesian 2D coordinate system with northing (x) and easting (y) axes with orientations fixed to north, east, and units of measurement in meters.

Data Synchronization
Navigation GPS maximal output frequency was declared as 5 Hz, which means that the GPS position ( ) was reported a maximum of five times per second (Figure 7a). To compare both the registered tracks, i.e., RTK and GPS, the data rate for both RTK and GPS should be the same ( Figure  7b). However, the RTK system reported position ( ) with a maximum of 50 points every second and in fact both systems registered tracks at different rates.

Data Synchronization
Navigation GPS maximal output frequency was declared as 5 Hz, which means that the GPS position (p GPS ) was reported a maximum of five times per second (Figure 7a). To compare both the registered tracks, i.e., RTK and GPS, the data rate for both RTK and GPS should be the same (Figure 7b). However, the RTK system reported position (p RTK ) with a maximum of 50 points every second and in fact both systems registered tracks at different rates. To align the track rates a linear interpolation was applied to the lower rate track, i.e., the GPS track. All GPS positions ( ) were interpolated with the maximum number of points equal to that for the RTK ( ). Assuming a data set consisting of independent data values and dependent data values , where = 1, … , , we can find an interpolation function ŷ( ) such that ŷ( ) = for every point in our data set. This means that the interpolation function goes through the given data points. Given a new x * , we can interpolate its function value using ŷ( * ) [43]. In the present study, a linear interpolation was used.
The estimated positions are assumed to lie on the line joining the nearest registered positions of the estimated track with PS registered positions. It is assumed, without loss of generality, that the GPS coordinates transformed to PL-2000 ( and ) are in ascending order, then new interpolated position coordinates ̂G i and ̂G i are calculated according to: To align the track rates a linear interpolation was applied to the lower rate track, i.e., the GPS track. All GPS positions (p GPS ) were interpolated with the maximum number of points equal to that for the RTK (p RTK ).
Assuming a data set consisting of independent data values x i and dependent data values y i , where x = 1, . . . , n, we can find an interpolation functionŷ(x) such thatŷ(x i ) = y i for every point in our data set. This means that the interpolation function goes through the given data points. Given a new x * , we can interpolate its function value usingŷ(x * ) [43]. In the present study, a linear interpolation was used.
The estimated positions are assumed to lie on the line joining the nearest registered positions of the estimated track with n GPS registered positions. It is assumed, without loss of generality, that the GPS coordinates transformed to PL-2000 (X G and Y G ) are in ascending order, then new interpolated position coordinatesX G i andŶ G i are calculated according to: where: n R represents the RTK measurement number, that is, n R = 1, . . . , n RTK , n G represents the GPS measurement number, that is, n G = 1, 1 + r, . . . , n GPS , where r is a RTK to GPS measurement ratio calculated according to the following equation: An example of a result for the GPS position interpolation is presented in Figure 6. In every case the number of GPS measurements was increased and equals the number of RTK measurements.

System Offsets
The position of the unit for navigation purposes is taken from the navigation GPS placed on the top of the mast located in the geometric center of the USV. The GPS antenna location is determined by experience and typical recommendations for unmanned units; that is, the best place for navigations system is the geometric center of the unit and at the highest possible place to diminish interference with board electronics and ensure best satellite visibility. These actions were taken in the present study.
For the hydrographic equipment, this consisted of a multi beam echosounder (MBES), a precise SGB IMU, and an RTK receiver. The best practice for that equipment localization is that the IMU sensors and the MBES antenna should be as close as possible, if not, all offsets should be entered into the system. In that case, the offsets represent coordinates in the local unit coordinate system of all hydrographic equipment including the GPS, the RTK antennas, and the IMU unit, where the IMU sensor is the coordinate system origin with the Y axis parallel to the unit long axis of symmetry ( Figure 8). The hydrographic equipment is calibrated, and offsets are entered into the hydrographic system in accordance with values presented in Table 4. This means that the GPS RTK position was already reported with offsets by the hydrographic system at the origin.
Sensors 2020, 20, x FOR PEER REVIEW 11 of 16 the system. In that case, the offsets represent coordinates in the local unit coordinate system of all hydrographic equipment including the GPS, the RTK antennas, and the IMU unit, where the IMU sensor is the coordinate system origin with the Y axis parallel to the unit long axis of symmetry ( Figure 8). The hydrographic equipment is calibrated, and offsets are entered into the hydrographic system in accordance with values presented in Table 4. This means that the GPS RTK position was already reported with offsets by the hydrographic system at the origin. Given that the system navigation GPS is working out of the hydrographic system and for proper evaluation a vector between the RTK and GPS readings has to be included. The corrected GPS position was calculated from already interpolated GPS positions according to the following formula: where X * , Ŷ * are the antenna coordinates of the GPS receiver in the national plane rectangular coordinate system, x , y are the antenna offset values of the GPS antenna unit on the vehicle  Given that the system navigation GPS is working out of the hydrographic system and for proper evaluation a vector between the RTK and GPS readings has to be included. The corrected GPS position was calculated from already interpolated GPS positions according to the following formula: whereX * G i ,Ŷ * G i are the antenna coordinates of the GPS receiver in the national plane rectangular coordinate system, d xG , d yG are the antenna offset values of the GPS antenna unit on the vehicle coordinate system, defined at the center of IMU(RTK) unit with the y axis being parallel to the unit symmetry axis, and the x axis being perpendicular to the y axis, and HDG is the vessel's actual course reported by the hydrographic system ( Figure 9). already reported with offsets by the hydrographic system at the origin. Given that the system navigation GPS is working out of the hydrographic system and for proper evaluation a vector between the RTK and GPS readings has to be included. The corrected GPS position was calculated from already interpolated GPS positions according to the following formula: where X * , Ŷ * are the antenna coordinates of the GPS receiver in the national plane rectangular coordinate system, x , y are the antenna offset values of the GPS antenna unit on the vehicle coordinate system, defined at the center of IMU(RTK) unit with the y axis being parallel to the unit symmetry axis, and the x axis being perpendicular to the y axis, and HDG is the vessel's actual course reported by the hydrographic system ( Figure 9).

GPS Evaluation
Having obtained all data at an equal rate, with the same coordinate system (PL-2000) and corrected the coordinates using antenna offsets, the navigation GPS accuracy may be calculated. Initially a Euclidean distance between the navigation GPS interpolated position (p GPS ) and the RTK referenced position was calculated, in accordance with following equation: Consequently, the dynamic navigation GPS accuracy was calculated in accordance with formula in [44].

Cross Track Error
The cross track error (XTE) is defined as the distance between the planned sounding profile (planned USV track) and the actual unit position. The sounding profiles are represented by a line connecting two defined WPs. Figure 3 presents the XTE, which equals l ⊥ . Assuming that the sounding profile is defined by two waypoints WP i X W i , Y W i and the next waypoint WP i+1 X W i+1 , Y W i+1 , and the actual unit position is an interpolated GPS position with coordinatesp GPS n R X G i ,Ŷ G i at the measurement number n R , then the actual XTE can be calculated in accordance with the following formula:

Results
The final results represent the calculation process outlined above. Each profile was calculated separately. Table 5 is a graphical example of the results for three representative profiles, np. 2, 6, and 10. The coordinates difference graph represents differences for the X and Y coordinates between the RTK and GPS registered positions along the selected profile. The Euclidean distance represents the results of Equation (14) along selected profiles in meters. The XTE represents the cross track error along selected profiles as a result of applying Equation (15).

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.

Coordinate Differences Euclidean Distance XTE
Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile. Based on the above calculation, the accuracy of dynamic navigation GPS was calculated in accordance with equations described elsewhere [44,45] for each profile separately. Table 6 presents the results of the calculations for each profile. Additionally, in Table 6 the mean XTE was added to evaluate the accuracy of the trajectory tracking for each profile.
The mean values for the research study are presented in Table 7. The mean accuracy for trajectory tracking (mean unit XTE) of the USV is very satisfactory, particularly if we compare it with traditional manual profile tracking or trajectory tracking realized by a typical autopilot used for ship navigation.

Discussion
Nonlinear guidance, originally designed for UAV trajectory tracking, has been adopted and used for USV trajectory tracking. This method allows us to keep a low XTE during all sounding profiles' tracking; more importantly, the USV course changes that keep to the track are very gentle, and do not cause significant disturbances in hydrographic measurements. The trajectory tracking and the USV response for the calculated course inputs depend on the correct PID tuning. As stated above, PID tuning was carried out during extensive field tests. The configuration employed did not show any oscillations, the course changes although robust were gentle, allowing us to keep track within specified limits for the unit to weather conditions and wind direction. The correct PID tuning is very important for course and track keeping. As mentioned elsewhere [28], the USV used in this research showed a regular oscillation for track following, caused by not having ideal PID tuning, and this can significantly affect the unit's endurance and the quality of hydrographic measurement.
The position registered by the navigation GPS is not used directly by the USV for navigation. The pure GPS position readings are filtered using EKF and the final navigation position is calculated using all data available to the autopilot internal sensors. This technique is used widely within the robotics community to estimate a robot's position. Consequently, the position used for navigation, as the results show, has good accuracy. The profile planned by the hydrographers, was followed based on GPS position. If we take into account the antenna position (in the center of the unit) and the offsets between the GPS antenna and the multibeam sonar (main hydrographic sensor) this causes quite significant differences between the real unit track and the sonar antenna track. The displacement differs and depends on the wind speed and direction. Practically, the profile is registered by the RTK system with offsets, therefore, from the hydrographic point of view, all data are registered correctly, however this difference can be diminished.

Conclusions
As the results show, the accuracy of trajectory tracking based on nonlinear guidance logic is suitable for hydrographic USV profile tracking, and the presented unit configuration permits very precise track following with a mean XTE of around 30 cm. This is a very good result, if we compare this performance with a traditional manned hydrographic vessel. In the authors' opinion, trajectory tracking based on nonlinear guidance logic for hydrographic measurements can be implemented on a wide variety of USVs providing correct nonlinear guidance logic and PID parameters.
The difference between the track realized by the unit and the real sonar track can be significant and depends on wind speed and direction. This difference can be diminished using either software offsets or antenna physical displacement. The other approach is to use the RTK signal directly for navigation during the hydrographic survey.