A method and apparatus for determining heading information

CN121498667BActive Publication Date: 2026-08-07CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING CHANGAN AUTOMOBILE CO LTD
Filing Date
2025-11-06
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

然而,车载环境充满挑战:车身本身的铁磁材料(硬铁干扰)和车内电器设备工作时的电磁场(软铁干扰)会严重扭曲地球磁场,导致指南针指向不准

Benefits of technology

[0007] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions, which, when executed by a processor, implements the method for determining heading information provided in this application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121498667B_ABST
    Figure CN121498667B_ABST
Patent Text Reader

Abstract

The application provides a method and device for determining heading information, the method comprising: obtaining geomagnetic data at a current time from a geomagnetic sensor, and obtaining vertical gyroscope data at the current time from an inertial measurement unit; in a case where positioning data collected from a global positioning system is not obtained, or the positioning data is obtained and is less than or equal to a first threshold value, determining a change in a heading angle at the current time relative to a target time based on the vertical gyroscope data at the current time and a time difference between the current time and the target time; the target time refers to a time at which the positioning data last exceeds the first threshold value before the current time; obtaining a geomagnetic heading angle at the current time based on the geomagnetic data at the current time; and obtaining a final heading angle at the current time based on a final heading angle at the target time, the change in the heading angle, and the geomagnetic heading angle at the current time in a preset storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of navigation technology, and in particular to a method and apparatus for determining heading information. Background Technology

[0002] Currently, many vehicles are equipped with geomagnetic compasses to provide drivers with directional guidance. However, the in-vehicle environment presents numerous challenges: the ferromagnetic materials of the vehicle itself (hard iron interference) and the electromagnetic fields generated by the vehicle's electrical equipment (soft iron interference) can severely distort the Earth's magnetic field, causing inaccurate compass readings. Existing solutions require users to drive the vehicle in a figure-eight pattern or in circles to complete the calibration, a cumbersome process with a poor user experience, and many users are unaware of the need for or how to perform this operation. Therefore, there is an urgent need for a solution that can automatically and in real-time calibrate and maintain high reliability of vehicle heading information under various complex environments. Summary of the Invention

[0003] This application provides a method and apparatus for determining heading information, which can achieve automatic, real-time, and highly reliable output of heading information for vehicles such as automobiles without human intervention.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a method for determining heading information, characterized in that the method includes: Acquire geomagnetic data for the current moment from the geomagnetic sensor, and acquire vertical gyroscope data for the current moment from the inertial measurement unit; If no positioning data is obtained from the Global Positioning System, or if the positioning data is obtained but is less than or equal to a first threshold, the change in heading angle of the current time relative to the target time is determined based on the gyroscope data in the vertical direction at the current time and the time difference between the current time and the target time; wherein, the target time refers to the time before the current time when the positioning data was last greater than the first threshold. Based on the geomagnetic data at the current moment, the geomagnetic heading angle at the current moment is obtained; Based on the final heading angle at the target time, the change in heading angle, and the geomagnetic heading angle at the current time in the preset storage space, the final heading angle at the current time is obtained.

[0005] This application provides a device for determining heading information, characterized in that the device includes: The acquisition unit is used to acquire geomagnetic data at the current moment from the geomagnetic sensor and gyroscope data in the vertical direction at the current moment from the inertial measurement unit. The processing unit is configured to, when no positioning data is acquired from the Global Positioning System, or when the acquired positioning data is less than or equal to a first threshold, determine the change in heading angle of the current time relative to the target time based on the vertical gyroscope data of the current time and the time difference between the current time and the target time; wherein, the target time refers to the time before the current time when the positioning data was last greater than the first threshold. The processing unit is further configured to obtain the geomagnetic heading angle at the current moment based on the geomagnetic data at the current moment; The processing unit is further configured to obtain the final heading angle at the current time based on the final heading angle at the target time, the change in heading angle, and the geomagnetic heading angle at the current time stored in a preset storage space.

[0006] This application provides a means of transportation, the means of transportation including: Memory is used to store executable instructions or computer programs. A domain controller is used to implement the heading information determination method provided in the embodiments of this application when executing computer-executable instructions or computer programs stored in the memory.

[0007] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions, which, when executed by a processor, implements the method for determining heading information provided in this application.

[0008] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the method for determining heading information provided in this application.

[0009] The embodiments of this application have the following beneficial effects: When the current GPS signal is lost or the GPS system positioning accuracy is low, it is necessary to determine the final heading angle at the current moment based on the final heading angle of the last time the positioning data before the current moment was greater than a first threshold (i.e., the target time), the change in heading angle between the target time and the current time, and the geomagnetic heading angle at the current moment. In this way, it is possible to achieve automatic, real-time, and highly reliable output of vehicle heading information without human intervention. Attached Figure Description

[0010] Figure 1 This is a first flowchart illustrating the method for determining heading information provided in an embodiment of this application; Figure 2 This is a second flowchart illustrating the method for determining heading information provided in the embodiments of this application; Figure 3 This is a schematic diagram of the first component structure of the heading information determination device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the third process of the method for determining heading information provided in the embodiments of this application; Figure 5 This is a schematic diagram of the second component structure of the heading information determination device provided in the embodiments of this application; Figure 6 This is a schematic diagram of the composition and structure of the vehicle provided in the embodiments of this application.

[0011] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] This application provides a method for determining heading information. Figure 1 This is a first flowchart illustrating the method for determining heading information provided in this application embodiment, applicable to vehicles such as cars, ships, and airplanes. Figure 1 As shown, the method for determining this heading information includes the following steps: S101: Acquire geomagnetic data at the current moment from the geomagnetic sensor, and acquire gyroscope data in the vertical direction at the current moment from the inertial measurement unit.

[0014] Geomagnetic data refers to the magnetic field intensity components measured along the X, Y, and Z axes in the coordinate system of a geomagnetic sensor. Geomagnetic data is used to reflect the local magnetic field environment of a vehicle at its current geographical location.

[0015] Vertical gyroscope data refers to the angular velocity of the inertial measurement unit (IMU) rotating about its vertical axis. Gyroscope data is used to reflect the instantaneous rotational rate of the IMU about its vertical axis.

[0016] S102: If no positioning data is obtained from the Global Positioning System, or if positioning data is obtained but the positioning data is less than or equal to the first threshold, determine the change in heading angle of the current time relative to the target time based on the gyroscope data in the vertical direction at the current time and the time difference between the current time and the target time; wherein, the target time refers to the time before the current time when the positioning data was last greater than the first threshold.

[0017] The first threshold refers to the lower limit of GPS positioning accuracy. If the positioning data is less than or equal to the first threshold, the GPS positioning accuracy is considered low. If the positioning data is greater than the first threshold, the GPS positioning accuracy is considered high. The positioning data includes at least the number of valid positioning satellites and the GPS horizontal accuracy factor. Different first thresholds are set for different positioning data.

[0018] For example, if the number of effective positioning satellites is less than or equal to 6 (i.e., the first threshold) and the GPS horizontal accuracy factor is less than or equal to 2.0 (i.e., the first threshold), the GPS system is considered to have low positioning accuracy.

[0019] If no positioning data is obtained from the GPS system, or if the obtained positioning data is less than or equal to the first threshold, it indicates that the current GPS signal is lost or the GPS system positioning accuracy is low. Therefore, it is necessary to combine the final heading angle of the last time the positioning data was greater than the first threshold before the current time (i.e., the target time), the change in heading angle between the target time and the current time, and the geomagnetic heading angle of the current time to determine the final heading angle of the current time.

[0020] S103: Based on the geomagnetic data at the current moment, obtain the geomagnetic heading angle at the current moment.

[0021] In some embodiments, when the vehicle is not tilted, the two magnetic field intensities in the horizontal direction included in the geomagnetic data at the current moment are substituted into the formula for calculating the geomagnetic heading angle to obtain the geomagnetic heading angle at the current moment.

[0022] In other embodiments, obtaining the geomagnetic heading angle based on the geomagnetic data at the current moment includes: determining the target pitch angle of the vehicle at the current moment based on the triaxial acceleration data collected from the inertial measurement unit at the current moment, the gyroscope data along the left side of the vehicle at the previous moment, and the target pitch angle at the previous moment, while the vehicle is tilted; determining the target roll angle of the vehicle at the current moment based on the acceleration data along the left side of the vehicle at the current moment and the acceleration data along the vertical direction of the vehicle collected from the inertial measurement unit, and the target roll angle at the previous moment, along the forward direction of the vehicle at the previous moment; transforming the geomagnetic data of the geomagnetic sensor in the body coordinate system at the current moment into the local horizontal coordinate system based on the target pitch angle and the target roll angle, to obtain two magnetic field strengths in the local horizontal direction; and obtaining the geomagnetic heading angle at the current moment based on the two magnetic field strengths in the local horizontal direction.

[0023] In this embodiment, when the vehicle is tilted, the acceleration data along the vehicle's forward direction (X-axis), the acceleration data along the vehicle's left side (Y-axis), and the acceleration data along the vehicle's vertical direction (Z-axis) collected by the IMU at the current moment are substituted into the pitch angle calculation formula to calculate the vehicle's initial pitch angle at the current moment. Then, based on the product of the gyroscope data along the vehicle's left side (Y-axis) at the previous moment and the time difference, the angle change is obtained. Based on the sum of the angle change and the pitch angle at the previous moment, the estimated pitch angle at the current moment is obtained. Finally, the initial pitch angle and the estimated pitch angle at the current moment are weighted and fused to obtain the target pitch angle at the current moment.

[0024] The initial roll angle of the vehicle at the current moment is calculated by substituting the acceleration data along the left side of the vehicle (Y-axis) and the acceleration data along the perpendicular direction of the vehicle (Z-axis) collected by the IMU into the roll angle calculation formula. Then, the angle change is obtained by multiplying the gyroscope data along the vehicle's forward direction (X-axis) at the previous moment with the time difference. The estimated roll angle at the current moment is obtained by summing the angle change with the roll angle at the previous moment. Finally, the target roll angle at the current moment is obtained by weighted fusion of the initial roll angle and the estimated roll angle.

[0025] Furthermore, based on the target pitch angle and target roll angle at the current moment, the geomagnetic intensity of the geomagnetic sensor at the current moment along the direction of the vehicle's movement and along the left side of the vehicle in the body coordinate system are transformed into the local horizontal coordinate system to obtain two magnetic field intensities in the local horizontal direction; finally, the two magnetic field intensities in the local horizontal direction are substituted into the formula for calculating the heading angle to obtain the geomagnetic heading angle at the current moment.

[0026] It should be noted that zero-bias compensation can be performed on the gyroscope data first, and the accelerometer data can be filtered before calculating the roll and pitch angles. This can reduce the noise caused by vehicle vibration.

[0027] In this embodiment, when the vehicle is tilted, the magnetic field vector measured by the geomagnetic sensor is rotated from the sensor coordinate system that is tilted with the vehicle to the horizontal vehicle coordinate system to obtain the pure horizontal magnetic field component. This can eliminate the magnetic field component affected by the vehicle's tilt, thereby ensuring the accuracy of the calculated geomagnetic heading angle.

[0028] S104: Based on the final heading angle, the change in heading angle, and the geomagnetic heading angle at the current time in the preset storage space, the final heading angle at the current time is obtained.

[0029] In this embodiment, the heading angle at the current moment is estimated based on the final heading angle and the change in heading angle at the target time. This estimate is then combined with the geomagnetic heading angle at the current moment through weighted fusion processing to obtain the final heading angle at the current moment. The final heading angle at the current moment is stored in a preset storage space for easy retrieval during subsequent calculations. The preset storage space stores the final heading angle of the vehicle at each moment.

[0030] In this embodiment, when the GPS signal is lost or the GPS system positioning accuracy is low, it is necessary to determine the final heading angle at the current moment based on the final heading angle of the last time the positioning data before the current moment exceeded a first threshold (i.e., the target time), the change in heading angle between the target time and the current time, and the geomagnetic heading angle at the current moment. This enables the automatic, real-time, and highly reliable output of vehicle heading information, such as that of a car, without human intervention.

[0031] In some embodiments of this application, obtaining the final heading angle at the current time based on the final heading angle at the target time, the change in heading angle, and the geomagnetic heading angle at the current time in a preset storage space includes the following steps: S201: Based on the final heading angle and the change in heading angle at the target time, obtain the estimated heading angle at the current time.

[0032] The estimated heading angle for the current moment is obtained by adding the final heading angle of the last time the positioning data before the current moment was greater than the first threshold (i.e., the target time) to the heading angle change between the target time and the current moment.

[0033] S202: Based on the estimated heading angle and the first weight value at the current moment, as well as the geomagnetic heading angle and the second weight value at the current moment, the final heading angle at the current moment is obtained; wherein, the sum of the first weight value and the second weight value is 1.

[0034] Multiply the estimated heading angle at the current moment by the first weight value to obtain the first result. Multiply the geomagnetic heading angle at the current moment by the second weight value to obtain the second result. Finally, add the first result and the second result to obtain the final heading angle at the current moment.

[0035] It should be noted that the first and second weight values ​​can be preset values ​​or adaptively set according to the fluctuations of geomagnetic data at adjacent times. The sum of the first and second weight values ​​is always 1.

[0036] In some embodiments of this application, the method further includes: If no positioning data is obtained from the Global Positioning System, or if the positioning data is obtained but the positioning data is less than or equal to the first threshold, and the geomagnetic data at the current moment fluctuates normally relative to the geomagnetic data at the previous moment, the first weight value is determined based on the time difference between the current moment and the target moment. The second weight value is determined based on 1 and the first weight value.

[0037] The difference between the current geomagnetic data and the previous geomagnetic data can be compared with a corresponding threshold. If the difference is less than or equal to the threshold, it indicates that the geomagnetic data fluctuations between adjacent times are normal. Conversely, if the difference is greater than the threshold, it indicates that the geomagnetic data fluctuations between adjacent times are abnormal.

[0038] It should be noted that when the GPS signal is lost or the GPS system's positioning accuracy is low, and the geomagnetic data fluctuations between adjacent moments are normal (indicating a stable geomagnetic environment without significant interference), the accuracy of the estimated heading angle decreases as the time difference between the current moment and the target moment widens. Consequently, the first weight value set for the time difference will decrease. Since the sum of the first and second weight values ​​is 1, as the first weight value decreases, the second weight value corresponding to the geomagnetic heading angle at the current moment will increase.

[0039] Here, the first weight value is dynamically adjusted based on the time difference between the current time and the target time. Then, the second weight value corresponding to the geomagnetic heading angle at the current time is obtained by subtracting the first weight value from 1. This eliminates the need for manual intervention or hard switching, avoiding abrupt changes and making the heading output more continuous and stable.

[0040] In some embodiments of this application, determining the first weight value based on the time difference between the current time and the target time includes: Based on different third weight values ​​corresponding to different time difference ranges, the third weight value of the time difference range to which the time difference belongs is determined; the third weight value of the time difference range to which the time difference belongs is used as the first weight value.

[0041] Here, different time difference ranges are preset, and different third weight values ​​are set for different time difference ranges. Further, the time difference range to which the current time and the target time belong is determined, and the third weight value corresponding to this time difference range is the first weight value.

[0042] For example, if the time difference is preset to be less than T1 (e.g., 30 seconds), the first weight value is 0.7; if the time difference is preset to be greater than or equal to T1 and less than T2 (e.g., 2 minutes), the first weight value is 0.3; if the time difference is preset to be greater than or equal to T2, the first weight value is 0.1. Based on this, if the time difference between the current time and the target time is greater than or equal to T1 and less than T2, the first weight value is 0.3, and the corresponding second weight value is 0.7.

[0043] In some embodiments of this application, the method further includes: In the event that no positioning data is obtained from the Global Positioning System, or the positioning data is obtained but the positioning data is less than or equal to a first threshold, and the geomagnetic data at the current moment fluctuates abnormally relative to the geomagnetic data at the previous moment, a geomagnetic confidence score is determined based on the geomagnetic data at the current moment, and at least one of the current geographical location and the geomagnetic data at the previous moment. The second weight value is determined based on the geomagnetic reliability score; The first weight value is determined based on 1 and the second weight value.

[0044] The difference between the current geomagnetic data and the previous geomagnetic data can be compared with a corresponding threshold. If the difference is less than or equal to the threshold, it indicates that the geomagnetic data fluctuations between adjacent times are normal. Conversely, if the difference is greater than the threshold, it indicates that the geomagnetic data fluctuations between adjacent times are abnormal.

[0045] It should be noted that when the GPS signal is lost or the GPS system's positioning accuracy is low, and abnormal fluctuations in geomagnetic data at adjacent times indicate an unstable geomagnetic environment or significant interference, a second weight value needs to be determined based on the reliability score of the current geomagnetic data. As the reliability score of the current geomagnetic data decreases, the second weight value decreases. Since the sum of the first and second weight values ​​is 1, as the second weight value decreases, the first weight value corresponding to the time difference increases.

[0046] Here, the second weight value is dynamically adjusted based on the reliability score of the geomagnetic data from the previous moment. Then, the first weight value corresponding to the time difference is obtained by subtracting the second weight value from 1. This eliminates the need for manual intervention or hard switching, avoiding abrupt changes and making the heading output more continuous and stable.

[0047] In some embodiments of this application, determining the geomagnetic confidence score based on at least one of the current geomagnetic data and the current geographical location and the geomagnetic data from the previous time includes: The current geographical location is used as input to a pre-established geomagnetic interference level model to obtain the corresponding geomagnetic interference level. Based on the degree of geomagnetic interference, a geomagnetic reliability score for the geomagnetic data at the current moment is determined; Alternatively, the overall magnetic field strength at the current moment can be determined based on the three-axis magnetic field strength included in the geomagnetic data at the current moment. Based on the geomagnetic data at the target time, including the three-axis magnetic field strength, the overall magnetic field strength at the target time is determined; Determine the ratio of the overall magnetic field strength at the current moment to the overall magnetic field strength at the target moment; use the ratio as the geomagnetic confidence score; Alternatively, the geomagnetic reliability score can be obtained based on the degree of geomagnetic interference and the ratio.

[0048] In the first feasible implementation, a geomagnetic interference level model is used to process the current geographical location to obtain the corresponding geomagnetic interference level. As the geomagnetic interference level increases, the geomagnetic reliability score of the geomagnetic data at the current moment decreases; conversely, as the geomagnetic interference level decreases, the geomagnetic reliability score of the geomagnetic data at the current moment increases. Based on this principle, a correspondence between the geomagnetic interference level and the geomagnetic reliability score is established. According to this correspondence and the geomagnetic interference level corresponding to the current geographical location, the geomagnetic reliability score of the geomagnetic data at the current moment can be determined.

[0049] Regarding the establishment of the geomagnetic interference level model, an initial geomagnetic interference level model can be trained based on multiple collected geographical locations and their corresponding geomagnetic interference levels to obtain a trained geomagnetic interference level model. The geomagnetic interference level corresponding to each geographical location can be quantified based on the collected geomagnetic data.

[0050] In the second feasible implementation, the sum of the squares of the magnetic field strength along each axis at the current moment is calculated, and then the square root is taken to obtain the overall magnetic field strength at the current moment. The sum of the squares of the magnetic field strength along each axis at the target moment is then calculated, and the square root is taken to obtain the overall magnetic field strength at the target moment. Finally, the ratio of the overall magnetic field strength at the current moment to the overall magnetic field strength at the target moment is calculated to obtain the geomagnetic reliability score of the geomagnetic data at the current moment.

[0051] In the third feasible implementation, a weighted fusion process is performed based on the degree of geomagnetic interference and the ratio calculated above to obtain the corresponding geomagnetic confidence score. The weight values ​​corresponding to the degree of geomagnetic interference and the ratio can be pre-set.

[0052] In some embodiments of this application, determining the second weight value based on the geomagnetic confidence score includes: Based on different fourth weight values ​​corresponding to different geomagnetic confidence score ranges, the fourth weight value of the geomagnetic confidence score range to which the geomagnetic confidence score belongs is determined; the fourth weight value of the geomagnetic confidence score range to which the geomagnetic confidence score belongs is used as the second weight value.

[0053] Here, different geomagnetic confidence score ranges are pre-set, and different fourth weight values ​​are set for different geomagnetic confidence score ranges. Further, the geomagnetic confidence score range to which the current geomagnetic confidence score belongs is determined, and the fourth weight value corresponding to this geomagnetic confidence score range is the second weight value.

[0054] For example, the second weight is pre-set to be 0 when the current geomagnetic confidence score is less than C1 (e.g., 0.3); 0.2 when the current geomagnetic confidence score is greater than or equal to C1 and less than C2 (e.g., 0.6); and 0.5 when the current geomagnetic confidence score is greater than or equal to C2. Based on this, if the current geomagnetic confidence score is greater than or equal to C1 and less than C2, the second weight is 0.2, and the corresponding first weight is 0.8.

[0055] In some embodiments of this application, the method further includes: If the positioning data collected from the Global Positioning System is greater than the first threshold, and the vehicle is traveling in a straight line with a speed greater than or equal to the second threshold, the final heading angle at the current moment is obtained based on the heading angle in the positioning data from the Global Positioning System.

[0056] One way to determine if a vehicle is traveling in a straight line is to make the steering wheel angle approximately zero or the gyroscope angular velocity extremely small.

[0057] In this embodiment of the application, when the GPS system has high positioning accuracy, the vehicle is traveling in a straight line, and the vehicle speed is greater than or equal to the second threshold, it indicates that the heading information provided by the GPS system is a highly reliable true value. Therefore, the heading angle collected by the GPS system at the current moment is taken as the final heading angle at the current moment.

[0058] In some embodiments of this application, the method further includes: The heading angle difference is obtained based on the difference between the heading angle at the current time and the geomagnetic heading angle at the current time in the positioning data; Based on the heading angle difference, the internal compensation parameters of the geomagnetic sensor are adjusted; wherein, the internal compensation parameters are used to counteract interference from the rigid and soft iron of the vehicle body.

[0059] In this embodiment of the application, when the heading information provided by the GPS system is a highly reliable true value, the internal compensation parameters of the geomagnetic sensor can be dynamically adjusted based on the difference between the heading angle at the current moment and the geomagnetic heading angle at the current moment in the positioning data collected by the GPS system, i.e., the heading angle difference. This makes the geomagnetic heading angle of the adjusted geomagnetic sensor more accurate in the next moment.

[0060] Based on the above embodiments, this application provides a schematic diagram of the structure of a heading information determination device. Figure 3 This is a schematic diagram of the first component structure of the heading information determination device provided in the embodiments of this application, applied to an automobile, such as... Figure 3 As shown, the car includes sensor 30, domain controller 31 and vehicle infotainment system 32, wherein sensor 30 includes geomagnetic sensor 33, IMU sensor 34 and GPS module 35; Among them, the geomagnetic sensor 33 is used to collect the magnetic field strength of the XYZ three axes; the X-axis refers to the direction along the car's forward movement, the Y-axis refers to the direction along the left side of the car, and the Z-axis refers to the direction perpendicular to the car. IMU sensor 34 is used to collect XYZ triaxial acceleration and XYZ triaxial angular velocity, i.e., gyroscope data; GPS module 35 is used to collect positioning information, including heading angle; Domain controller 31 is used to process the data from each sensor using an integrated intelligent real-time calibration algorithm package to obtain the final heading angle at the current moment, and then send it to the display screen of vehicle infotainment system 32 for display.

[0061] Furthermore, this application provides a third flowchart illustrating a method for determining vehicle heading information, as shown below. Figure 4 As shown, the execution entity of this method for determining vehicle heading information is a domain controller, which may include the following steps: S401: Acquire geomagnetic data at the current moment from the geomagnetic sensor, and acquire three-axis gyroscope data and three-axis acceleration data at the current moment from the IMU sensor.

[0062] S402: If GPS module positioning data is not obtained, or if the obtained positioning data is less than or equal to the first threshold, determine that the GPS signal is poor.

[0063] Next, execute S403 to S404.

[0064] S403: Based on the gyroscope data in the vertical direction at the current moment and the time difference between the current moment and the target moment, determine the change in heading angle at the current moment relative to the target moment; where the target moment refers to the moment before the current moment when the positioning data was last greater than the first threshold.

[0065] S404: Based on the current three-axis gyroscope data and three-axis acceleration data collected by the IMU sensor, as well as the current geomagnetic data, the current geomagnetic heading angle is obtained.

[0066] Specifically, when the car is tilted, the acceleration data collected by the IMU along the car's forward direction (X-axis), along the car's left side (Y-axis), and along the car's vertical direction (Z-axis) at the current moment are substituted into the pitch angle calculation formula to calculate the car's initial pitch angle at the current moment. Next, the angle change is obtained by multiplying the gyroscope data along the car's left side (Y-axis) from the previous moment by the time difference. The estimated pitch angle at the current moment is obtained by summing the angle change with the pitch angle from the previous moment. Finally, the initial pitch angle and the estimated pitch angle are weighted and fused to obtain the target pitch angle at the current moment. The time difference refers to the time difference between the current moment and the previous moment.

[0067] The initial roll angle of the car at the current moment is calculated by substituting the acceleration data along the left side of the car (Y-axis) and the acceleration data along the vertical direction of the car (Z-axis) collected by the IMU into the roll angle calculation formula. Then, the angle change is obtained by multiplying the gyroscope data along the car's forward direction (X-axis) at the previous moment with the time difference. The estimated roll angle at the current moment is obtained by summing the angle change with the roll angle at the previous moment. Finally, the target roll angle at the current moment is obtained by weighted fusion processing based on the initial roll angle and the estimated roll angle.

[0068] Furthermore, based on the target pitch angle and target roll angle at the current moment, the geomagnetic intensity of the geomagnetic sensor at the current moment along the direction of the vehicle's movement and along the left side of the vehicle in the body coordinate system are transformed into the local horizontal coordinate system to obtain two magnetic field intensities in the local horizontal direction; finally, the two magnetic field intensities in the local horizontal direction are substituted into the formula for calculating the heading angle to obtain the geomagnetic heading angle at the current moment.

[0069] It should be noted that you can first perform zero-bias compensation on the gyroscope data, filter the accelerometer data, and then calculate the roll and pitch angles. This can reduce the noise caused by car vibration.

[0070] S405: Based on the geomagnetic data at the current moment and the geomagnetic data at the previous moment, determine whether the magnetic interference is strong.

[0071] The difference between the current geomagnetic data and the previous geomagnetic data is compared with a corresponding threshold. If the difference is less than or equal to the threshold, it indicates that the geomagnetic data fluctuations between adjacent moments are normal, meaning the magnetic interference is not strong. Conversely, if the difference is greater than the threshold, it indicates that the geomagnetic data fluctuations between adjacent moments are abnormal, meaning the magnetic interference is strong.

[0072] If the magnetic interference is not strong, execute S406; if the magnetic interference is strong, execute S407.

[0073] S406: Determine the first weight value based on the time difference between the current time and the target time; determine the second weight value based on 1 and the first weight value.

[0074] For example, if the time difference is preset to be less than T1 (e.g., 30 seconds), the first weight value is 0.7; if the time difference is preset to be greater than or equal to T1 and less than T2 (e.g., 2 minutes), the first weight value is 0.3; if the time difference is preset to be greater than or equal to T2, the first weight value is 0.1. Based on this, if the time difference between the current time and the target time is greater than or equal to T1 and less than T2, the first weight value is 0.3, and the corresponding second weight value is 0.7.

[0075] Next, execute S408 and S409.

[0076] S407: Determine a geomagnetic confidence score based on the geomagnetic data at the current time, and at least one of the geomagnetic data at the current geographical location and the geomagnetic data at the previous time; determine a second weight value based on the geomagnetic confidence score; determine a first weight value based on 1 and the second weight value.

[0077] For example, the second weight is pre-set to be 0 when the current geomagnetic confidence score is less than C1 (e.g., 0.3); 0.2 when the current geomagnetic confidence score is greater than or equal to C1 and less than C2 (e.g., 0.6); and 0.5 when the current geomagnetic confidence score is greater than or equal to C2. Based on this, if the current geomagnetic confidence score is greater than or equal to C1 and less than C2, the second weight is 0.2, and the corresponding first weight is 0.8.

[0078] Next, execute S408 and S409.

[0079] The specific calculation process for the geomagnetic confidence score has been explained in detail in the previous embodiments and will not be repeated here.

[0080] S408: Based on the final heading angle and the change in heading angle at the target time in the preset storage space, obtain the estimated heading angle at the current time.

[0081] S409: Based on the estimated heading angle and the first weight value at the current moment, as well as the geomagnetic heading angle and the second weight value at the current moment, the final heading angle at the current moment is obtained; wherein, the sum of the first weight value and the second weight value is 1.

[0082] S410: If the acquired positioning data is greater than the first threshold, determine that the GPS signal is good.

[0083] S411: When the car is traveling in a straight line and its speed is greater than or equal to the second threshold, the final heading angle at the current moment is obtained based on the heading angle in the positioning data.

[0084] It should be noted that the acquisition of geomagnetic data can be achieved by first maintaining a window containing the most recent N geomagnetic readings (e.g., data from the last 2 seconds), and then calculating the average and standard deviation of the magnetic field strength within that window in real time. When new data arrives, if its value deviates from the average by more than three times the standard deviation, it is identified as an interference pulse and discarded to prevent bad data from affecting subsequent calculations.

[0085] Based on the above embodiments, this invention also provides a device for determining heading information. Figure 5This is a schematic diagram of the second component structure of the heading information determination device provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the device for determining the heading information includes: The acquisition unit 501 is used to acquire geomagnetic data at the current moment from the geomagnetic sensor and gyroscope data in the vertical direction at the current moment from the inertial measurement unit. Processing unit 502 is configured to, when no positioning data is acquired from the Global Positioning System, or when the positioning data is acquired and the positioning data is less than or equal to a first threshold, determine the change in heading angle of the current time relative to the target time based on the gyroscope data in the vertical direction at the current time and the time difference between the current time and the target time; wherein, the target time refers to the time before the current time when the positioning data was last greater than the first threshold. The processing unit 502 is further configured to obtain the geomagnetic heading angle at the current moment based on the geomagnetic data at the current moment; The processing unit 502 is further configured to obtain the final heading angle at the current time based on the final heading angle at the target time, the change in heading angle, and the geomagnetic heading angle at the current time stored in a preset storage space.

[0086] In this embodiment, when the GPS signal is lost or the GPS system positioning accuracy is low, it is necessary to determine the final heading angle at the current moment based on the final heading angle of the last time the positioning data before the current moment exceeded a first threshold (i.e., the target time), the change in heading angle between the target time and the current time, and the geomagnetic heading angle at the current moment. This enables the automatic, real-time, and highly reliable output of vehicle heading information, such as that of a car, without human intervention.

[0087] In some embodiments of this application, the processing unit 502 is further configured to obtain the estimated heading angle at the current time based on the final heading angle at the target time and the amount of change in heading angle; and to obtain the final heading angle at the current time based on the estimated heading angle at the current time, a first weight value, and the geomagnetic heading angle and a second weight value at the current time; wherein the sum of the first weight value and the second weight value is 1.

[0088] In some embodiments of this application, the processing unit 502 is further configured to, when no positioning data is acquired from the global positioning system, or when the positioning data is acquired and the positioning data is less than or equal to a first threshold, and the geomagnetic data at the current moment fluctuates normally relative to the geomagnetic data at the previous moment, determine the first weight value based on the time difference between the current moment and the target moment; and determine the second weight value based on 1 and the first weight value.

[0089] In some embodiments of this application, the processing unit 502 is further configured to determine the third weight value of the time difference range to which the time difference belongs based on different third weight values ​​corresponding to different time difference ranges; and use the third weight value of the time difference range to which the time difference belongs as the first weight value.

[0090] In some embodiments of this application, the processing unit 502 is further configured to, when no positioning data is acquired from the global positioning system, or when the positioning data is acquired and the positioning data is less than or equal to a first threshold, and the geomagnetic data at the current moment fluctuates abnormally relative to the geomagnetic data at the previous moment, determine a geomagnetic reliability score based on the geomagnetic data at the current moment, the current geographical location, and the geomagnetic data at the previous moment; determine a second weight value based on the geomagnetic reliability score; and determine a first weight value based on 1 and the second weight value.

[0091] In some embodiments of this application, the processing unit 502 is further configured to determine the fourth weight value of the geomagnetic confidence score range to which the geomagnetic confidence score belongs based on different fourth weight values ​​corresponding to different geomagnetic confidence score ranges; and use the fourth weight value of the geomagnetic confidence score range to which the geomagnetic confidence score belongs as the second weight value.

[0092] In some embodiments of this application, the processing unit 502 is further configured to: use the current geographical location as input to a pre-established geomagnetic interference level model to obtain the corresponding geomagnetic interference level; determine the geomagnetic reliability score of the geomagnetic data at the current time based on the geomagnetic interference level; or, determine the overall magnetic field strength at the current time based on the three-axis magnetic field strength included in the geomagnetic data at the current time; determine the overall magnetic field strength at the target time based on the three-axis magnetic field strength included in the geomagnetic data at the target time; determine the ratio of the overall magnetic field strength at the current time to the overall magnetic field strength at the target time; use the ratio as the geomagnetic reliability score; or, obtain the geomagnetic reliability score based on the geomagnetic interference level and the ratio.

[0093] In some embodiments of this application, the processing unit 502 is further configured to obtain the final heading angle at the current moment based on the heading angle at the current moment in the positioning data collected from the global positioning system when the positioning data collected from the global positioning system is greater than the first threshold, the vehicle is in a straight-line driving state, and the driving speed is greater than or equal to the second threshold.

[0094] In some embodiments of this application, the processing unit 502 is further configured to obtain a heading angle difference based on the difference between the heading angle at the current time and the geomagnetic heading angle at the current time in the positioning data; and to adjust the internal compensation parameters of the geomagnetic sensor based on the heading angle difference; wherein the internal compensation parameters are used to counteract the interference of hard iron and soft iron of the vehicle.

[0095] This invention also provides another means of transportation. Figure 6 This is a schematic diagram of the composition structure of a transportation vehicle provided in an embodiment of the present invention, such as... Figure 6 As shown, the vehicle 60 includes: a domain controller 601 and a memory 602 configured to store computer programs capable of running on a processor; The domain controller 601 is configured to execute the method steps in the foregoing embodiments when running a computer program.

[0096] Of course, in practical applications, such as Figure 6 As shown, the various components in the vehicle 60 are coupled together via a bus system 603. It is understood that the bus system 603 is used to enable communication between these components. In addition to a data bus, the bus system 603 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 6 The general designated all buses as Bus System 603.

[0097] In practical applications, the aforementioned processor can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), controller, microcontroller, and microprocessor. It is understood that, for different devices, the electronic devices used to implement the functions of the aforementioned processor can also be other types, and this embodiment of the invention does not impose specific limitations.

[0098] The aforementioned memory can be volatile memory, such as random access memory (RAM). Access memory); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and providing instructions and data to the processor.

[0099] In an exemplary embodiment, the present invention also provides a computer-readable storage medium for storing a computer program.

[0100] Optionally, the computer-readable storage medium can be applied to any of the methods in the embodiments of the present invention, and the computer program causes the computer to execute the corresponding processes implemented by the processor in the various methods of the embodiments of the present invention. For the sake of brevity, these will not be described in detail here.

[0101] In the several embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0102] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0103] Furthermore, in the various embodiments of the present invention, all functional units can be integrated into one processing module, or each unit can be a separate unit, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0104] The methods disclosed in the several method embodiments provided by this invention can be arbitrarily combined without conflict to obtain new method embodiments.

[0105] The features disclosed in the several product embodiments provided by this invention can be arbitrarily combined without conflict to obtain new product embodiments.

[0106] The features disclosed in the several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0107] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A method for determining heading information, characterized in that, The method includes: Acquire geomagnetic data for the current moment from the geomagnetic sensor, and acquire vertical gyroscope data for the current moment from the inertial measurement unit; If no positioning data is obtained from the Global Positioning System, or if the positioning data is obtained but is less than or equal to a first threshold, the change in heading angle of the current time relative to the target time is determined based on the gyroscope data in the vertical direction at the current time and the time difference between the current time and the target time; wherein, the target time refers to the time before the current time when the positioning data was last greater than the first threshold. Based on the geomagnetic data at the current moment, the geomagnetic heading angle at the current moment is obtained; Based on the final heading angle at the target time, the change in heading angle, and the geomagnetic heading angle at the current time in the preset storage space, the final heading angle at the current time is obtained.

2. The method according to claim 1, characterized in that, The process of obtaining the final heading angle at the current moment based on the final heading angle at the target time, the change in heading angle, and the geomagnetic heading angle at the current moment in the preset storage space includes: Based on the final heading angle at the target time and the change in heading angle, the estimated heading angle at the current time is obtained; Based on the estimated heading angle and the first weight value at the current moment, as well as the geomagnetic heading angle and the second weight value at the current moment, the final heading angle at the current moment is obtained; wherein the sum of the first weight value and the second weight value is 1.

3. The method according to claim 2, characterized in that, The method further includes: If no positioning data is obtained from the Global Positioning System, or if the positioning data is obtained but the positioning data is less than or equal to the first threshold, and the geomagnetic data at the current moment fluctuates normally relative to the geomagnetic data at the previous moment, the first weight value is determined based on the time difference between the current moment and the target moment. The second weight value is determined based on 1 and the first weight value.

4. The method according to claim 3, characterized in that, Determining the first weight value based on the time difference between the current time and the target time includes: Based on different third weight values ​​corresponding to different time difference ranges, the third weight value of the time difference range to which the time difference belongs is determined; the third weight value of the time difference range to which the time difference belongs is used as the first weight value.

5. The method according to claim 2, characterized in that, The method further includes: In the event that no positioning data is obtained from the Global Positioning System, or the positioning data is obtained but the positioning data is less than or equal to a first threshold, and the geomagnetic data at the current moment fluctuates abnormally relative to the geomagnetic data at the previous moment, a geomagnetic confidence score is determined based on the geomagnetic data at the current moment, and at least one of the current geographical location and the geomagnetic data at the previous moment. The second weight value is determined based on the geomagnetic reliability score; The first weight value is determined based on 1 and the second weight value.

6. The method according to claim 5, characterized in that, The determination of the second weight value based on the geomagnetic confidence score includes: Based on different fourth weight values ​​corresponding to different geomagnetic confidence score ranges, the fourth weight value of the geomagnetic confidence score range to which the geomagnetic confidence score belongs is determined; the fourth weight value of the geomagnetic confidence score range to which the geomagnetic confidence score belongs is used as the second weight value.

7. The method according to claim 5, characterized in that, The determination of the geomagnetic reliability score based on at least one of the current geomagnetic data and the current geographical location and the geomagnetic data from the previous moment includes: The current geographical location is used as input to a pre-established geomagnetic interference level model to obtain the corresponding geomagnetic interference level. Based on the degree of geomagnetic interference, a geomagnetic reliability score for the geomagnetic data at the current moment is determined; Alternatively, the overall magnetic field strength at the current moment can be determined based on the three-axis magnetic field strength included in the geomagnetic data at the current moment. Based on the three-axis magnetic field strength included in the geomagnetic data at the target time, the overall magnetic field strength at the target time is determined; Determine the ratio of the overall magnetic field strength at the current moment to the overall magnetic field strength at the target moment; use the ratio as the geomagnetic confidence score; Alternatively, the geomagnetic reliability score can be obtained based on the degree of geomagnetic interference and the ratio.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: If the positioning data collected from the Global Positioning System is greater than the first threshold, and the vehicle is traveling in a straight line with a speed greater than or equal to the second threshold, the final heading angle at the current moment is obtained based on the heading angle in the positioning data from the Global Positioning System.

9. The method according to claim 8, characterized in that, The method further includes: The heading angle difference is obtained based on the difference between the heading angle at the current time and the geomagnetic heading angle at the current time in the positioning data; Based on the heading angle difference, the internal compensation parameters of the geomagnetic sensor are adjusted; wherein, the internal compensation parameters are used to counteract the interference of hard and soft iron from the vehicle.

10. A device for determining heading information, characterized in that, The device includes: The acquisition unit is used to acquire geomagnetic data at the current moment from the geomagnetic sensor and gyroscope data in the vertical direction at the current moment from the inertial measurement unit. The processing unit is configured to, when no positioning data is acquired from the Global Positioning System, or when the acquired positioning data is less than or equal to a first threshold, determine the change in heading angle of the current time relative to the target time based on the vertical gyroscope data of the current time and the time difference between the current time and the target time; wherein, the target time refers to the time before the current time when the positioning data was last greater than the first threshold. The processing unit is further configured to obtain the geomagnetic heading angle at the current moment based on the geomagnetic data at the current moment; The processing unit is further configured to obtain the final heading angle at the current time based on the final heading angle at the target time, the change in heading angle, and the geomagnetic heading angle at the current time stored in a preset storage space.

Citation Information

Patent Citations

  • Course angle correction method and device

    CN106443745A

  • Fusion course angle estimation method and system based on machine learning classification

    CN114323008A