## 3 Results  
### Methodology for Automatic Course Correction  
A moving vehicle, thanks to distance measurements using laser rangefinders, is able to determine its current position in relation to the adopted reference surface. The simplest solution used for this purpose is to measure the distance from a given surface with two laser rangefinders. After appropriate calculations, the angle between the vehicle axis and the given surface can be determined. Knowing the angle and distance of the vehicle from the reference surface and characteristic markers, the actual trajectory of the selected point of the vehicle can be determined.  
By comparing the real trajectory with the calculated trajectory for the selected point on the route, one can correct the coordinates and generate a fragment of the trajectory bringing the vehicle to the set path. From a theoretical point of view, this solution is very simple. From a practical point of view, it is not applicable, as a result of the various errors that occur. In real conditions, when the vehicle is in motion, it is not possible to precisely determine the angle of the vehicle axis in relation to the base surface on a short section of the route (s = 0.5-1.5 m). This is the first fundamental error in such a course of proceedings. The second error results from the fact that the vehicle is moving along a curvilinear trajectory while bringing the vehicle to the correct route. In the proposed rate correction algorithm, the most rational solution seems to be dividing the correction process into two stages. In the first stage, the bearing from the laser rangefinder on the selected side of the vehicle is used to determine the shift of the real trajectory from the set one. The value of this offset is taken into account in the odometry algorithm. During the assumed \(i\) calculation steps necessary for the vehicle to cover the distance s = 1 m in each iteration, a constant value equal to \(1/i\) of the determined shift is added to or subtracted from the stored trajectory. After this sequence of the \(i\) iteration is completed, the virtual trajectory tracking point approaches the given route. Then, it covers a distance of 0.5 m, guided by the odometry method. In the second stage, the control system uses measurements from a laser rangefinder to guide the AGV vehicle at a designated distance from the reference surface.  
In this stage, an additional correction of the position takes place at the beginning, and only then is the vehicle aligned parallel to the given surface. There is a need to apply additional position correction results from the incorrect determination of the distance between the vehicle and the given surface. In the first stage of the correction process, the laser rangefinder installed in the vehicle measures the distance perpendicular to the longitudinal axis of the vehicle. If the vehicle is not parallel to the base surface, the distance measured by the laser is not the actual distance of the vehicle from the set surface. In order to determine the actual distance of the vehicle from the reference surface, the measurement should be perpendicular to the given surface.  
The algorithm of the developed methodology is presented in Figure 4.  
In the experimental studies aimed at verifying the developed methodology, several dozen tests were carried out with an AGV vehicle along a specific route. All tests confirmed the correctness of the adopted methodology, and the analytical section presents examples of routes on which the developed methodology was verified.