## 2 Autonomous Driving Control Algorithm
### Path-Tracking Control Algorithm  
The path-tracking algorithm computes the control parameters including the left and right track velocities for autonomous driving along the desired vehicle course based on waypoints and the vehicle's current navigational information. Figure 3 shows the process of the proposed path-tracking control algorithm. The path-tracking control algorithm consists of four parts: checking the quality of navigational data, switching the waypoint, searching the target point, and computing the control parameter. The first step, which checks the quality of navigational data, determines whether to move or to stop an autonomous driving vehicle, as the GNSS-RTK/motion sensor integrated positioning algorithm may provide navigational data of a low quality. In this study, the navigational data are regarded as good quality when the age of the _GNSS_ measurement update with the resolved ambiguity does not exceed 2 s and the precision of position is lower than 0.5 m. If the quality of the navigational data is bad, the left and right track speeds are set to zero and transmitted to the motor drives. The step of switching the waypoint is to determine whether to switch the next waypoint or not. The route of the vehicle for autonomous driving is represented by waypoints that are a set of points for  
Figure 3: Process of the path-tracking control algorithm. absolute locations defined by the vehicle's latitude and longitude coordinates. Since the autonomous driving vehicle navigates between consecutive waypoints, it is important to switch between the various waypoints to follow a specified path. In addition, since the crawler-type vehicle can rotate in-situ, it is necessary to consider whether to rotate in situ or not at the current waypoint. To determine whether the current waypoint is the point of rotation in situ or not, it is necessary to check the angle between the two straight lines created by two adjacent waypoints relative to the current waypoint by the following equation:  
\[\left|\text{atan2}\left(\frac{WP_{n_{East}}-WP_{n-1_{East}}}{WP_{n_{North}}-WP_{ n-1_{North}}}\right)-\text{atan2}\left(\frac{WP_{n+1_{East}}-WP_{n_{East}}}{WP_{n+1_{ North}}-WP_{n_{North}}}\right)\right|\ \leq\ \gamma, \tag{7}\]  
where \(n\) is the current waypoint index, \(WP_{n_{North}}\) and \(WP_{n_{North}}\) are the north and the east coordinates of the current waypoint, which are defined by the north, east, down (NED) relative coordinate system with the origin at the current vehicle's location, and \(\gamma\) is the reference angle to determine whether to rotate in-situ. If the current waypoint is the point of rotation, the waypoint is switched when the difference between the current vehicle's yaw and the azimuth of the straight line generated between the current waypoint and the next waypoint is within the reference angle. If the current waypoint is not the point of rotation in-situ, to switch the next waypoint, it is checked whether the vehicle is within the acceptance radius at the current waypoints, as expressed in the following Equation [22]:  
\[WP_{n_{North}}^{2}+WP_{n_{East}}^{2}\ \leq\ R_{WP}^{2}, \tag{8}\]  
where \(WP_{n_{North}}\) and \(WP_{n_{North}}\) are the north and the east coordinates of the current waypoint, which are defined by the NED relative coordinate system with the origin at the current vehicle's location, and \(R_{WP}\) is the acceptance circle radius for switching the waypoint. The step of searching the target point is to set a point, which is a location to be moved at the next epoch based on the current vehicle location and the selected waypoint. To set a target point, the enclosed-based line-of-sight (LOS) guidance algorithm [22] is applied in this study. This method is to calculate the coordinates of a target point based on the slope of the straight line between the current waypoint and the previous waypoint and a circle with radius R enclosing the current vehicle's location (Figure 4).