A method and system for testing straight-line driving deviation of an unmanned vehicle

CN122900864APending Publication Date: 2026-10-13DONGFENG AUTOMOBILE COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611029647.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]本申请实施例提供一种无人车直线行驶偏离测试方法及系统,以解决相关技术中因起步抖动及信号噪声导致测试基准不稳定、抗干扰能力弱,进而造成测试结果精度低与复现性差的问题

Benefits of technology

[0016]本申请提供的技术方案带来的有益效果包括:本申请实施例提供了一种无人车直线行驶偏离测试方法及系统,通过分析车辆起步阶段的波动情况,自适应确定目标基准区间,并结合异常值剔除处理获取纯净航向样本以计算高可信度基准航向角,进而对全程瞬时航向进行修正,并在多里程点计算横向偏离量。有效规避了起步抖动及信号噪声对基准确立的干扰,消除了初始姿态偏差,显著提升了直线行驶偏离量测试的基准稳定性、抗干扰能力及结果复现性,为无人车性能评估与参数优化提供了精准可靠的数据支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122900864A_ABST
    Figure CN122900864A_ABST
Patent Text Reader

Abstract

The application relates to a method and system for testing straight-line driving deviation of an unmanned vehicle, and belongs to the technical field of vehicle performance testing. The method comprises the following steps: acquiring driving data of the unmanned vehicle during driving, wherein the driving data at least comprises an instantaneous heading angle and a cumulative driving distance; acquiring fluctuation conditions of a starting stage in the driving data; determining a target reference interval of the driving of the unmanned vehicle from a plurality of candidate intervals based on the fluctuation conditions; performing outlier rejection processing on the instantaneous heading angle data in the target reference interval to obtain a pure heading sample; calculating a reference heading angle based on the pure heading sample, and correcting the instantaneous heading angle during the driving by using the reference heading angle to obtain a corrected heading angle; and calculating a lateral deviation amount of the unmanned vehicle relative to a reference straight line at at least one preset mileage detection point based on the corrected heading angle and the cumulative driving distance. The application effectively avoids the interference of starting jitter and signal noise on the establishment of the reference, and eliminates the initial attitude deviation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive performance testing technology, and in particular to a method and system for testing deviation from straight-line driving of an unmanned vehicle. Background Technology

[0002] Straight-line driving performance is a key indicator for measuring the chassis control accuracy, navigation and positioning stability, and actuator reliability of unmanned vehicles. During vehicle development, calibration, and acceptance, it is necessary to accurately quantify and evaluate the lateral deviation of the vehicle during straight-line driving to ensure that the vehicle can drive safely and accurately along the predetermined trajectory.

[0003] Testing for vehicle straight-line deviation mainly relies on manual measurement or conventional positioning methods. In some high-precision testing scenarios, on-board high-precision testing equipment is typically used for data acquisition. The conventional process involves using the vehicle's heading angle and travel distance recorded by the equipment, selecting a fixed mileage interval after start-up to calculate the average heading as a benchmark, and combining this with preset detection point locations to calculate the lateral deviation through geometric relationships. This is then used as the basis for evaluating the vehicle's straight-line performance.

[0004] However, the vehicle start-up phase is often accompanied by mechanical vibration or sensor transient errors. The existing fixed interval selection method cannot avoid vibration data, resulting in a systematic deviation in the reference heading angle. On the other hand, there is a lack of an effective mechanism to eliminate abnormal data caused by signal packet loss or sudden interference, and the evaluation point is too singular to distinguish between starting attitude error and mid-course control drift. Summary of the Invention

[0005] This application provides a method and system for testing deviations in straight-line driving of unmanned vehicles, in order to solve the problems in related technologies where unstable test benchmarks and weak anti-interference capabilities are caused by start-up jitter and signal noise, resulting in low accuracy and poor reproducibility of test results.

[0006] Firstly, a method for testing deviation of an unmanned vehicle while driving straight is provided, comprising: acquiring driving data of the unmanned vehicle during its driving process, the driving data including at least instantaneous heading angle and cumulative driving distance; acquiring fluctuations in the driving data during the initial stage; determining a target reference interval for the unmanned vehicle's driving from a plurality of preset candidate intervals based on the fluctuations; performing outlier removal processing on the instantaneous heading angle data within the target reference interval to obtain a clean heading sample; calculating a reference heading angle based on the clean heading sample, and using the reference heading angle to correct the instantaneous heading angle during the driving process to obtain a corrected heading angle; and calculating the lateral deviation of the unmanned vehicle relative to a reference straight line at at least one preset mileage detection point based on the corrected heading angle and cumulative driving distance.

[0007] In some embodiments, obtaining the fluctuations in the starting phase of the driving data includes: calculating the acceleration fluctuation amplitude or acceleration change rate in the starting phase of the driving data as the fluctuation situation.

[0008] In some embodiments, determining the target reference interval for autonomous vehicle driving from a preset plurality of candidate intervals based on the fluctuation situation includes: if the fluctuation situation is less than a preset stability threshold, then selecting a candidate interval of a first mileage segment as the target reference interval; if the fluctuation situation is greater than or equal to the preset stability threshold, then selecting a candidate interval of a second mileage segment as the target reference interval; wherein the mileage length of the second mileage segment is greater than the mileage length of the first mileage segment.

[0009] In some embodiments, the outlier removal process for the instantaneous heading angle data within the target reference interval to obtain a clean heading sample includes: calculating the average value and standard deviation of the instantaneous heading angle data within the target reference interval; determining an effective threshold interval based on the average value and standard deviation; identifying and removing instantaneous heading angle data exceeding the effective threshold interval as outliers; and using the remaining data as the clean heading sample.

[0010] In some embodiments, before calculating the reference heading angle based on the clean heading sample, the method further includes: calculating the variance of the clean heading sample; if the variance exceeds a preset fluctuation threshold, determining that the current target reference interval is invalid, and switching to another candidate interval to re-execute the outlier removal process; if the variance does not exceed the preset fluctuation threshold, calculating the reference heading angle based on the clean heading sample.

[0011] In some embodiments, calculating the reference heading angle based on the clean heading sample includes: calculating the arithmetic mean of all instantaneous heading angle data in the clean heading sample, and using the arithmetic mean as the reference heading angle.

[0012] In some embodiments, the step of using the reference heading angle to correct the instantaneous heading angle during the driving process to obtain the corrected heading angle includes: calculating the difference between the instantaneous heading angle during the driving process and the reference heading angle, and using the difference as the corrected heading angle at that moment.

[0013] In some embodiments, the preset at least one mileage detection point includes at least three detection points.

[0014] In some embodiments, after calculating the lateral deviation of the unmanned vehicle relative to the reference straight line, the method further includes: visualizing the lateral deviation and the heading angle change curve, generating a test report, and storing the driving data, the reference heading angle, and the corrected heading angle in a local database.

[0015] Secondly, an unmanned vehicle straight-line driving deviation testing system is provided, comprising: a data acquisition module for acquiring driving data of the unmanned vehicle during driving, the driving data including at least instantaneous heading angle and cumulative driving distance; a fluctuation determination module for acquiring fluctuations in the driving data during the initial stage; an interval determination module for determining a target reference interval for the unmanned vehicle's driving from a plurality of preset candidate intervals based on the fluctuations; a data cleaning module for performing outlier removal processing on the instantaneous heading angle data within the target reference interval to obtain a clean heading sample; a reference correction module for calculating a reference heading angle based on the clean heading sample and using the reference heading angle to correct the instantaneous heading angle during driving to obtain a corrected heading angle; and a deviation calculation module for calculating the lateral deviation of the unmanned vehicle relative to a reference straight line at at least one preset mileage detection point, based on the corrected heading angle and the cumulative driving distance.

[0016] The beneficial effects of the technical solution provided in this application include: This application provides a method and system for testing straight-line deviation of unmanned vehicles. By analyzing the fluctuations during the vehicle's start-up phase, it adaptively determines the target reference interval and, combined with outlier removal processing, obtains clean heading samples to calculate a high-confidence reference heading angle. This corrects the instantaneous heading throughout the entire journey and calculates the lateral deviation at multiple mileage points. This effectively avoids interference from start-up jitter and signal noise on reference establishment, eliminates initial attitude deviations, and significantly improves the reference stability, anti-interference capability, and result reproducibility of straight-line deviation testing, providing accurate and reliable data support for unmanned vehicle performance evaluation and parameter optimization. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic diagram of the overall process steps provided for embodiments of this application; Figure 2 This is a flowchart illustrating step 4, provided as an embodiment of the present application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] This application provides a method and system for testing straight-line driving deviation of unmanned vehicles, which can solve the problems in related technologies where the test benchmark is unstable and the anti-interference ability is weak due to start-up jitter and signal noise, resulting in low accuracy and poor reproducibility of test results.

[0021] Reference Figure 1-2 A method for testing deviation from straight-line driving of an unmanned vehicle, comprising: S1: Acquire driving data of the autonomous vehicle during its operation. The driving data should include at least the instantaneous heading angle and the cumulative driving distance.

[0022] In this embodiment, a high-precision positioning and speed measurement unit, such as a VBOX testing instrument, installed on the unmanned vehicle body, utilizes its integrated satellite receiving module and inertial measurement module to collect the vehicle's motion state information in real time at a preset sampling frequency. This data, including the instantaneous heading angle and cumulative distance traveled relative to the starting point at each sampling moment, is transmitted to the VBOX testing instrument's built-in data processing unit via an onboard communication bus, such as a CAN bus or Ethernet. This step provides high-frequency, continuous, and high-precision raw data support for subsequent benchmark establishment and deviation calculation, unaffected by lane lines and lighting conditions. It ensures the accuracy and completeness of data acquisition under all operating conditions, thus laying a solid data foundation for eliminating initial attitude errors and achieving accurate evaluation of multiple feature points.

[0023] S2: Obtain the fluctuations during the initial stage of the driving data. Specifically, calculate the acceleration fluctuation amplitude or acceleration change rate during the initial stage of the driving data as the fluctuation situation. Specific methods include, but are not limited to, extracting the instantaneous acceleration sequence within a preset time window or distance window from the driving data using a data processing unit, calculating the difference between the maximum and minimum acceleration values ​​in this sequence as the acceleration fluctuation amplitude, and performing differential processing on the acceleration sequence to obtain the acceleration change rate.

[0024] S3: Based on fluctuation conditions, determine the target reference interval for the autonomous vehicle's driving from a set of preset candidate intervals. In this embodiment, the system presets multiple sets of candidate intervals with different mileage lengths. Based on fluctuation conditions, the system determines the target reference interval for the autonomous vehicle's driving from these preset candidate intervals, including: If the fluctuation is less than the preset stability threshold, then the candidate interval of the first mileage segment is selected as the target benchmark interval.

[0025] If the fluctuation is greater than or equal to the preset stability threshold, then the candidate interval of the second mileage segment is selected as the target benchmark interval.

[0026] In this process, the length of the second mileage segment is greater than that of the first mileage segment. If the fluctuation is less than the stability threshold, it indicates that the vehicle's starting posture is stable. In this case, the candidate interval of the first mileage segment with a shorter mileage is selected as the target reference interval to optimize computing resources. If the fluctuation is greater than or equal to the stability threshold, it indicates that there is significant shaking or acceleration change during vehicle start-up. In this case, the candidate interval of the second mileage segment with a longer mileage is automatically switched to the target reference interval. By expanding the sampling range, the averaging effect is used to offset the instantaneous noise and posture disturbance at the moment of start-up.

[0027] In this embodiment, the preferred first mileage segment candidate interval is 0-10 meters, and the preferred second mileage segment candidate interval is 0-20 meters. The interval length can be dynamically adjusted according to the vehicle's starting characteristics. By adaptively switching between long and short intervals, the immediacy of data processing is ensured when starting smoothly, while effectively filtering out instantaneous noise contamination of the reference heading angle by expanding the sampling range when starting with severe vibrations. This significantly improves the adaptability and robustness of the reference data to the starting performance of different vehicle models and complex road conditions, ensuring the accuracy of the subsequent deviation calculation source.

[0028] S4: Perform outlier removal on the instantaneous heading angle data within the target reference interval to obtain clean heading samples. This includes the following steps: S40: Calculate the mean and standard deviation of instantaneous heading angle data within the target reference interval. The mean is represented by μ and the standard deviation is represented by σ.

[0029] S41: Determine the effective threshold interval based on the mean and standard deviation. The effective threshold interval includes, but is not limited to, [μ-3σ, μ+3σ].

[0030] S42: Identify and remove instantaneous heading angle data that exceeds the effective threshold range as outliers, including abnormal data such as severe shaking during start-up, emergency braking, and brief loss of VBOX signal.

[0031] S43: Use the remaining data as a clean heading sample. The clean heading sample is used for subsequent baseline calculations.

[0032] By performing micro-cleaning on the benchmark data, a dynamic effective threshold range is constructed by calculating the arithmetic mean μ and standard deviation σ of the instantaneous heading angle samples within the target benchmark interval. Gross errors exceeding the threshold range caused by severe start-up jitter, emergency braking, or signal loss are identified as outliers and removed, retaining only clean heading samples that conform to the distribution pattern. This principle, by combining micro-level noise filtering with macro-level interval adaptation in the preceding steps, effectively prevents the influence of individual outlier data on the average benchmark heading angle, ensuring that the benchmark data used for subsequent full-range correction calculations has high confidence and authenticity, thereby guaranteeing the accuracy of the straight-line deviation assessment results.

[0033] S5: Calculate the reference heading angle based on the clean heading sample, and use the reference heading angle to correct the instantaneous heading angle during the driving process to obtain the corrected heading angle. In this embodiment of the application, calculating the reference heading angle based on the clean heading sample includes: calculating the arithmetic mean of all instantaneous heading angle data in the clean heading sample, and using the arithmetic mean as the reference heading angle.

[0034] In addition, the instantaneous heading angle during the driving process is corrected using the reference heading angle to obtain the corrected heading angle, which includes: calculating the difference between the instantaneous heading angle and the reference heading angle during the driving process, and using the difference as the corrected heading angle at that moment.

[0035] First, the arithmetic mean of the clean heading samples after step S4 is calculated to determine a high-confidence reference heading angle. The mean-averaging property is then used to further smooth residual random noise. Subsequently, the difference between the instantaneous heading angles collected throughout the process and this reference heading angle is calculated to obtain the corrected heading angle. This step follows the results of the previous data cleaning and effectively eliminates fixed error sources such as the initial parking posture of the vehicle and sensor installation deviations through difference correction. It transforms the absolute heading into a relative heading that only reflects changes in the driving trajectory, providing a unified and zero-bias stable angle reference for subsequent accurate calculation of lateral deviation based on geometric relationships. This ensures that the deviation calculation only focuses on dynamic deviation during the driving process rather than initial state errors, significantly improving the accuracy and comparability of the test results.

[0036] In this embodiment of the application, before calculating the reference heading angle based on the clean heading sample, the method further includes: calculating the variance of the clean heading sample; if the variance exceeds a preset fluctuation threshold, the current target reference interval is determined to be invalid, and the process is switched to another candidate interval to re-execute the outlier removal process, the other candidate interval may be a backup stable interval; if the variance does not exceed the preset fluctuation threshold, the reference heading angle is calculated based on the clean heading sample.

[0037] Before calculating the reference heading angle, the variance of the clean heading sample is statistically analyzed to assess the data dispersion. If the variance exceeds the preset fluctuation threshold, the current interval is determined to be invalid and automatically switched to another candidate interval to re-perform cleaning and verification. If the variance is qualified, the arithmetic mean of the sample is calculated as the reference heading angle. Then, the reference angle is used to perform difference correction on the instantaneous heading angle throughout the entire journey to obtain the corrected heading angle.

[0038] Step three, based on the indirect kinematic index of acceleration fluctuation amplitude, performs preliminary orientation selection within preset short-mileage and long-mileage candidate intervals. The logical assumption is that stable acceleration indicates usable heading data. This step further delves into the data ontology level, calculating the variance of the clean heading samples within the selected interval in Step three. If the variance exceeds a threshold, it indicates that although the acceleration may be stable, the heading data itself has discrete noise or signal drift. At this point, the current interval is deemed invalid, triggering a retry mechanism to switch to another candidate interval, thus forming a secondary verification and correction of the initial selection results in Step three. This correlation upgrades the scheme from a single indirect index judgment to direct data consistency verification. The technical effect is to compensate for the potential risk of missed judgments in Step three, prevent benchmark distortion caused by abnormal sensor signals, and form a progressive reliability assurance system, significantly improving the confidence of the benchmark heading angle and the accuracy of test results under complex operating conditions.

[0039] S6: At at least one preset mileage detection point, calculate the lateral deviation of the unmanned vehicle relative to the baseline straight line based on the corrected heading angle and cumulative travel distance. The preset mileage detection point includes at least three detection points. For example, the system defaults to three test points: 20 meters, 35 meters, and 50 meters. The selection of these points is based on the lateral control characteristics of the unmanned vehicle: 20 meters corresponds to a short-distance stable condition after start-up, 35 meters corresponds to a medium-distance constant-speed steady-state condition, and 50 meters corresponds to a long-distance cumulative amplification of deviation. These three data segments can completely distinguish the differences in deviation over short, medium, and long distances. Dynamic parameter configuration is also supported, allowing for customized modification of the mileage points for different vehicle types, such as long-wheelbase freight unmanned vehicles and small park AGVs.

[0040] Specifically, the system monitors the cumulative driving distance in real time during vehicle operation. When the distance reaches at least three preset feature mileage detection points, the corrected heading angle output in step S5 is called. The lateral deviation of the vehicle relative to the reference straight line at that moment is calculated through triangular geometric projection relationships. The point selection is based on the lateral control characteristics of the autonomous vehicle and is physically mapped. This achieves segmented quantitative diagnosis of straight-line driving performance. By comparing the deviation trends at different mileage points, it can effectively distinguish whether the deviation is caused by the chassis mechanical installation at the start or by the drift of the control algorithm, which causes the deviation to increase over time. This overcomes the deficiency of single endpoint evaluation in being unable to locate the error source. At the same time, the configurable point feature improves the versatility and adaptability of the solution to autonomous vehicles of different sizes, forming a comprehensive and diagnosable straight-line driving performance evaluation system.

[0041] In this application, after calculating the lateral deviation of the unmanned vehicle relative to the reference straight line, the method further includes: visualizing the lateral deviation and the heading angle change curve, generating a test report, and storing the driving data, the reference heading angle, and the corrected heading angle in a local database.

[0042] The lateral deviation calculated in step S6 and the corrected heading angle data output in step S5 are mapped to the human-machine interface for visualization rendering. Deviation curves and heading fluctuation curves that change with mileage are plotted, and a comprehensive test report including the maximum deviation value, pass / fail judgment, and trend analysis is automatically generated. Simultaneously, the original driving data, baseline heading angle, corrected heading angle, and intermediate calculation results are structured and stored in a local database, linked with timestamps and vehicle IDs. An intuitive presentation of test results and a full-link data traceability mechanism are constructed. By transforming abstract numerical values ​​into visual graphs, the threshold for data interpretation is lowered. The technical effect is to assist technicians in quickly locating specific mileage segments where deviation occurs and corresponding heading abrupt changes. It supports long-term archiving and playback analysis of test data to verify the algorithm iteration effect, realizing a complete closed loop from data acquisition and processing to result output and storage, significantly improving the automation level of the testing process, problem diagnosis efficiency, and data management standardization.

[0043] Reference Figure 1-2An unmanned vehicle straight-line driving deviation testing system includes: a data acquisition module, a fluctuation determination module, an interval determination module, a data cleaning module, a baseline correction module, and a deviation calculation module. The data acquisition module acquires driving data of the unmanned vehicle during its operation, including at least instantaneous heading angle and cumulative driving distance. The fluctuation determination module acquires the fluctuations during the initial stage of the driving data. The interval determination module determines the target baseline interval for the unmanned vehicle from multiple preset candidate intervals based on the fluctuations. The data cleaning module removes outliers from the instantaneous heading angle data within the target baseline interval to obtain clean heading samples. The baseline correction module calculates the baseline heading angle based on the clean heading samples and uses the baseline heading angle to correct the instantaneous heading angle during driving, obtaining a corrected heading angle. The deviation calculation module calculates the lateral deviation of the unmanned vehicle relative to a baseline straight line at at least one preset mileage detection point, based on the corrected heading angle and cumulative driving distance.

[0044] The testing system and testing method address the same technical problems, employ the same technical solutions, and achieve the same technical effects, so they will not be elaborated further here.

[0045] In the description of this application, it should be noted that the terms "upper," "lower," etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two elements. For those skilled in the art, the specific meaning of the above terms in this application can be understood according to the specific circumstances.

[0046] It should be noted that in this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0047] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for testing deviation from straight-line driving of an unmanned vehicle, characterized in that, It includes: Acquire driving data of the unmanned vehicle during its operation, including at least the instantaneous heading angle and cumulative driving distance; Obtain the fluctuations during the initial stage of the driving data; Based on the fluctuation situation, the target reference interval for the autonomous vehicle to drive is determined from a set of multiple candidate intervals. Outlier removal is performed on the instantaneous heading angle data within the target reference interval to obtain clean heading samples; The reference heading angle is calculated based on the pure heading sample, and the instantaneous heading angle during the driving process is corrected using the reference heading angle to obtain the corrected heading angle; At at least one preset mileage detection point, the lateral deviation of the unmanned vehicle relative to the reference straight line is calculated based on the corrected heading angle and the cumulative driving distance.

2. The method for testing deviation of an unmanned vehicle in straight-line driving as described in claim 1, characterized in that: The step of obtaining the fluctuations in the starting phase of the driving data includes: calculating the acceleration fluctuation amplitude or acceleration change rate in the starting phase of the driving data as the fluctuation situation.

3. The method for testing deviation of an unmanned vehicle in straight-line driving as described in claim 1, characterized in that: The step of determining the target reference interval for autonomous vehicle driving from a preset number of candidate intervals based on the fluctuation situation includes: If the fluctuation is less than the preset stability threshold, then the candidate interval of the first mileage segment is selected as the target reference interval. If the fluctuation is greater than or equal to the preset stability threshold, then the candidate interval of the second mileage segment is selected as the target reference interval. The second mileage segment has a longer mileage than the first mileage segment.

4. The method for testing deviation of an unmanned vehicle in straight-line driving as described in claim 1, characterized in that: The step of removing outliers from the instantaneous heading angle data within the target reference interval to obtain clean heading samples includes: Calculate the mean and standard deviation of the instantaneous heading angle data within the target reference interval; Based on the mean and standard deviation, determine the effective threshold range; Instantaneous heading angle data that exceeds the effective threshold range are identified as outliers and removed. The remaining data will be used as the clean heading sample.

5. The method for testing deviation in straight-line driving of an unmanned vehicle as described in claim 4, characterized in that: Before calculating the reference heading angle based on the clean heading sample, the method further includes: Calculate the variance of the clean heading sample; If the variance exceeds the preset fluctuation threshold, the current target baseline interval is determined to be invalid, and the process is switched to another candidate interval to re-execute the outlier removal process. If the variance does not exceed the preset fluctuation threshold, the reference heading angle is calculated based on the clean heading sample.

6. The method for testing deviation in straight-line driving of an unmanned vehicle as described in claim 5, characterized in that: The step of calculating the reference heading angle based on the clean heading sample includes: calculating the arithmetic mean of all instantaneous heading angle data in the clean heading sample, and using the arithmetic mean as the reference heading angle.

7. The method for testing deviation of an unmanned vehicle in straight-line driving as described in claim 1, characterized in that: The step of correcting the instantaneous heading angle during the driving process using the reference heading angle to obtain the corrected heading angle includes: calculating the difference between the instantaneous heading angle during the driving process and the reference heading angle, and using the difference as the corrected heading angle at that moment.

8. The method for testing deviation of an unmanned vehicle in straight-line driving as described in claim 1, characterized in that: The preset at least one mileage detection point includes at least three detection points.

9. The method for testing deviation of an unmanned vehicle in straight-line driving as described in claim 1, characterized in that: After calculating the lateral deviation of the unmanned vehicle relative to the reference straight line, the method further includes: visualizing the lateral deviation and the heading angle change curve, generating a test report, and storing the driving data, the reference heading angle, and the corrected heading angle in a local database.

10. A system for testing deviations in straight-line driving of an unmanned vehicle, characterized in that, include: The data acquisition module is used to acquire driving data of the unmanned vehicle during its operation. The driving data includes at least the instantaneous heading angle and the cumulative driving distance. The fluctuation determination module is used to obtain the fluctuation situation in the starting phase of the driving data; The interval determination module is used to determine the target reference interval for the autonomous vehicle to drive from a set of multiple candidate intervals based on the fluctuation situation. The data cleaning module is used to remove outliers from the instantaneous heading angle data within the target reference interval to obtain clean heading samples. The reference correction module is used to calculate the reference heading angle based on the pure heading sample, and to use the reference heading angle to correct the instantaneous heading angle during the driving process to obtain the corrected heading angle. The deviation calculation module is used to calculate the lateral deviation of the unmanned vehicle relative to a reference straight line at at least one preset mileage detection point, based on the corrected heading angle and the cumulative driving distance.