Data processing method and device, electronic equipment and chip
By combining sensor data, quasi-static magnetic field detection algorithm and gyroscope constraint algorithm, the problem of insufficient accuracy of the initial heading angle in pedestrian heading estimation is solved, and more accurate pedestrian heading estimation and position trajectory tracking are achieved.
Patent Information
- Application Number
- CN202310843213.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-01-10
AI Technical Summary
The lack of effective ways to accurately determine the initial heading angle in the prior art affects the accuracy of pedestrian heading calculation.
By acquiring the sensor data of the terminal device, performing fusion attitude calculation, combining quasi-static magnetic field detection algorithm and gyroscope constraint algorithm, we determine the initial heading angle that meets both the quasi-static magnetic field conditions and gyroscope constraint conditions, and improve the accuracy of the initial heading angle. .
When disturbed by magnetic fields, the initial heading angle can be accurately calculated, which improves the accuracy of pedestrian heading calculations, and makes the derived position trajectory closer to the reality.
Smart Images

Figure CN119289978A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and chip. Background Art
[0002] Pedestrian Dead-Reckoning (PDR) uses heading estimation and step length estimation based on parameters such as height and cadence, combined with a dead-reckoning algorithm to calculate the location information of pedestrians.
[0003] In pedestrian heading dead reckoning, an initial heading estimation is required to obtain an initial heading angle. However, there is currently a lack of effective methods to accurately determine the initial heading angle, which in turn affects the accuracy of pedestrian heading dead reckoning. Summary of the invention
[0004] In view of this, the present application provides a data processing method, device, electronic device and chip, the main purpose of which is to improve the current technical problem of lack of an effective way to accurately determine the initial heading angle in pedestrian heading calculation, which in turn affects the accuracy of pedestrian heading calculation.
[0005] In a first aspect, the present application provides a data processing method, comprising:
[0006] Obtain sensor data from terminal devices;
[0007] Perform fusion posture calculation based on sensor data to obtain posture calculation data of the carrier of the terminal device;
[0008] Based on the attitude solution data and sensor data, the initial heading angle that satisfies both the quasi-stationary magnetic field conditions and the gyroscope constraints is determined.
[0009] In a second aspect, the present application provides a data processing device, including:
[0010] An acquisition module, configured to acquire sensor data of a terminal device;
[0011] A solution module is configured to perform fusion posture solution according to the sensor data to obtain posture solution data of the carrier of the terminal device;
[0012] The determination module is configured to determine an initial heading angle that satisfies both a quasi-stationary magnetic field condition and a gyroscope constraint condition based on attitude solution data and sensor data.
[0013] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data processing method described in the first aspect.
[0014] In a fourth aspect, the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the data processing method described in the first aspect when executing the computer program.
[0015] In a fifth aspect, the present application provides a chip comprising one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the data processing method described in the first aspect.
[0016] By means of the above technical scheme, the present application provides a data processing method, device, electronic device and chip, which specifically first obtains the sensor data of the terminal device; performs fusion posture solution according to the sensor data to obtain the posture solution data of the carrier of the terminal device; and then determines the initial heading angle that satisfies both the quasi-stationary magnetic field conditions and the gyroscope constraint conditions based on the posture solution data and the sensor data. Compared with the current prior art, the present application can add a stationary quasi-magnetic field detection algorithm and a gyroscope constraint algorithm to the part of calculating the initial heading angle, and can prompt the user that the magnetic field interference is large at the location where the user is located when the user is disturbed by the magnetic field, and actively select the correct magnetometer data for calculation to obtain an accurate initial heading angle, thereby improving the accuracy of the pedestrian heading calculation, so that the position trajectory derived by the pedestrian heading estimation algorithm can be closer to reality.
[0017] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 A schematic diagram of a data processing method provided in an embodiment of the present application is shown;
[0021] Figure 2A flow chart showing a data processing method provided by an embodiment of the present application is shown;
[0022] Figure 3 A flowchart of an example provided by an embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram showing an example provided by an embodiment of the present application;
[0024] Figure 5 An effect diagram of an example provided by an embodiment of the present application is shown;
[0025] Figure 6 An effect diagram of an example provided by an embodiment of the present application is shown;
[0026] Figure 7 An effect diagram of an example provided by an embodiment of the present application is shown;
[0027] Figure 8 An effect diagram of an example provided by an embodiment of the present application is shown;
[0028] Fig. 9 A structural schematic diagram of a data processing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0030] In order to improve the technical problem that there is a lack of effective methods for accurately determining the initial heading angle in the current prior art, which in turn affects the accuracy of pedestrian heading estimation. This embodiment provides a data processing method, such as Figure 1 As shown, the method includes:
[0031] Step 101: Acquire sensor data of a terminal device.
[0032] In some examples, the method shown in this embodiment can be executed by a terminal device, which can be called a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal device can also be a car with communication functions, a smart car, a mobile phone, a wearable device, a tablet computer (Pad), etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
[0033] In the embodiment of the present application, the sensor data may include: magnetometer data, gyroscope data, accelerometer data, etc. For example, the posture data of the terminal device carrier may be determined by the collected magnetometer data, gyroscope data, and accelerometer data.
[0034] An accelerometer (or acceleration sensor) is a sensor that can measure acceleration. It is usually composed of a mass block, a damper, an elastic element, a sensitive element, and an adaptive circuit. During the acceleration process, the sensor measures the inertial force on the mass block and uses Newton's second law to obtain the acceleration value. The accelerometer can measure low-speed static acceleration.
[0035] A magnetometer (or magnetometer sensor) is an instrument used to measure magnetic fields. A gyroscope is used to measure angular velocity and has high dynamic characteristics. It is a device that indirectly measures angles. It measures the derivative of the angle, that is, the angular velocity. The angle can only be obtained by integrating the angular velocity over time.
[0036] Step 102: Perform fusion posture calculation based on the sensor data to obtain posture calculation data of the carrier of the terminal device.
[0037] In an embodiment of the present application, attitude solution can be to solve the attitude of the carrier based on gyroscope data, accelerometer data, magnetometer data, etc. For example, the gyroscope and accelerometer directly output angular velocity and acceleration data, which need to be integrated accordingly to obtain the angle and velocity, and then the quaternion is solved through complementary filtering of the Attitude and Heading Reference System (AHRS), and then converted into Euler angles, namely pitch angle, roll angle and heading angle, etc., as the attitude solution data of the carrier.
[0038] Among them, the basic idea of AHRS is that when the carrier does not have translational motion, the pitch and roll of the carrier can be calculated by sensing the gravity component through acceleration; the magnetometer can sense the magnetic north direction, so the magnetic north heading of the carrier can be calculated; and the gyroscope measures and outputs the rotational angular velocity of the carrier, and the roll, pitch, and heading increments can be calculated by integration, but because the gyro output value contains errors, the error will accumulate over time when the integral calculation is used. The gyroscope has good dynamic response characteristics, but cumulative errors will occur when calculating the attitude. The magnetometer and accelerometer have no cumulative errors when measuring the attitude, but the dynamic response is poor. Then, using the instant output values of the accelerometer and magnetometer to correct the gyroscope can achieve the effect of complementary advantages and improve the measurement accuracy and dynamic performance of the system.
[0039] The specific operation process of AHRS may include: Calculate the attitude and initialize the quaternion: Since the attitude angle and the quaternion can be calculated mutually, the quaternion can be initialized first according to the known attitude or the attitude calculated by the accelerometer and the magnetometer. Then, the accelerometer correction and the magnetometer correction are calculated as a basis, and finally the gyroscope output value is corrected according to these corrections.
[0040] Step 103: Determine an initial heading angle that satisfies both the quasi-stationary magnetic field condition and the gyroscope constraint condition based on the attitude solution data and the sensor data.
[0041] Pedestrian heading dead reckoning uses heading estimation and step length estimation based on parameters such as height and cadence, combined with a dead reckoning algorithm to calculate the location information of the pedestrian. Pedestrian heading dead reckoning requires an initial heading estimation to obtain an initial heading angle. In the initial heading estimation part, the initial heading angle calculated by magnetism can be used. However, in actual situations, due to the influence of magnetic field interference at the location and errors in the magnetometer device, an offset will occur, resulting in a discrepancy with the actual heading.
[0042] Therefore, in the embodiment of the present application, a quasi-stationary magnetic field detection algorithm can be used to determine the initial heading angle that meets the quasi-stationary magnetic field conditions. Specifically, the quasi-stationary magnetic field detection algorithm calculates the standard value of each moment by taking the magnetometer to determine whether the standard value at the stationary moment is less than the threshold value of the quasi-stationary magnetic field change. If it is less than the threshold value of the quasi-stationary magnetic field change, the magnetic field interference at that location is small, and the angle output by the magnetometer is more consistent with the actual situation. Otherwise, it is determined that the magnetic field interference at that location is large, and the angle output by the magnetometer is greatly different from the actual situation.
[0043] Due to the presence of steel structures or ferromagnetic objects inside buildings, the magnetic field interference generated is often stable, that is, when the horizontal and vertical axes of the earth are subject to a steadily changing magnetic field strength, the estimated direction of the pedestrian will point in the wrong direction. If the foot is at zero speed in this area at this time, although the quasi-stationary magnetic field condition is met, the calculated geomagnetic heading angle is wrong, so a gyroscope constraint detection algorithm should be added to constrain it, and the gyroscope constraint detection algorithm is used to determine the initial heading angle that meets the gyroscope constraint condition.
[0044] Compared with the current existing technology, this embodiment can add a static quasi-magnetic field detection algorithm and a gyroscope constraint algorithm to the part of calculating the initial heading. When the user is disturbed by the magnetic field, the user can be prompted that the magnetic field interference is large at the location where the user is located, and the correct magnetometer data can be actively selected for calculation to obtain an initial heading angle that satisfies both the quasi-static magnetic field conditions and the gyroscope constraint conditions. This can improve the accuracy of the initial heading angle calculation, and further improve the accuracy of the pedestrian heading calculation, so that the position trajectory derived by the pedestrian heading estimation algorithm can be closer to the truth.
[0045] In order to further illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following Figure 2 The specific method shown, wherein the method includes:
[0046] Step 201: Acquire sensor data of a terminal device.
[0047] Sensor data may include: magnetometer data, gyroscope data, and accelerometer data.
[0048] Exemplarily, taking the terminal device as a smart phone and the carrier of the terminal device as a pedestrian, the sensor data of the mobile phone is obtained, including magnetometer data, gyroscope data and accelerometer data. Specifically, the pedestrian's current minimum static acceleration can be obtained.
[0049] Step 202: Perform fusion posture calculation based on the sensor data to obtain posture calculation data of the carrier of the terminal device.
[0050] In actual scenarios, the sensor data may contain some noise data, so for the subsequent calculation to be accurate, optionally, before step 202, it also includes: filtering the noise data of the sensor data; accordingly, step 202 may specifically include: analyzing the sensor data after the noise filtering to obtain the posture data. For example, through the initial calibration filtering algorithm of the magnetometer, some high-frequency noise is removed to make the magnetometer data smoother.
[0051] In the embodiment of the present application, the accelerometer and gyroscope are collected in real time after the pedestrian heading calculation is run, and the attitude information of the carrier can be output in real time. Pedestrian heading calculation can detect the stationary state of the carrier, take the magnetometer data from the stationary state to the start of movement, and calculate the initial heading angle. For example, there are accelerometers, gyroscopes and magnetometer sensors on smart watches. When the sports mode is turned on and the pedestrian heading calculation is turned on, the pedestrian heading calculation will detect the stationary state of the carrier, take the magnetometer data when the stationary conditions are met, calculate the initial heading angle, and combine the data of the gyroscope and accelerometer to perform real-time calculation to obtain the attitude information of the carrier.
[0052] Based on the AHRS complementary filtering algorithm, optionally, step 202 may specifically include: first, based on the gyroscope data, obtaining the rotational angular velocity of the carrier; then, according to the rotational angular velocity, obtaining the second heading angle of the carrier by integral calculation; then, according to the magnetometer data and the accelerometer data, determining the correction value of the second heading angle; using the correction value to correct the second heading angle, obtaining the third heading angle of the carrier. In addition, accurate heading angle information corresponding to the integral of the gyroscope can be obtained, which is convenient for subsequent calculation of the gyroscope constraint algorithm.
[0053] Step 203: Determine a first heading angle that satisfies a quasi-stationary magnetic field condition based on the magnetometer data.
[0054] Optionally, step 203 may specifically include: determining whether a standard value calculated by the magnetometer at the stationary moment is less than a first preset threshold value of the quasi-stationary magnetic field change; if the standard value is less than the first preset threshold value of the quasi-stationary magnetic field change, determining the heading angle corresponding to the standard value as the first heading angle that meets the quasi-stationary magnetic field condition.
[0055] In an embodiment of the present application, the magnetometer will collect corresponding standard values at different times, and determine the corresponding heading angles according to each standard value. If the standard value corresponding to the magnetometer at the stationary moment is less than the magnetic field change threshold, it can be determined that the heading angle corresponding to the standard value meets the quasi-stationary magnetic field condition, that is, the first heading angle that meets the quasi-stationary magnetic field condition.
[0056] Optionally, the quasi-stationary magnetic field detection condition may be as shown in the following formula 1:
[0057] R t < M0 (Formula 1)
[0058] In formula 1, R t is the standard value at each moment calculated by the magnetometer, and M0 is the threshold value of the quasi-stationary magnetic field change.
[0059] Exemplarily, based on step 202, the standard value of the mobile phone magnetometer data at each moment is obtained and compared with the magnetic field change threshold in the quasi-stationary magnetic field detection algorithm. For example, the value of the mobile phone magnetometer data at the first moment is 2, and the magnetic field change threshold in the quasi-stationary magnetic field detection algorithm is 3. Then, the value of the mobile phone magnetometer data at the first moment is less than the magnetic field change threshold in the quasi-stationary magnetic field detection algorithm. It can be judged that the value of the mobile phone magnetometer data at the first moment is less affected by the magnetic field interference and meets the quasi-stationary magnetic field condition.
[0060] If the value of the mobile phone magnetometer data at the first moment is 5, the value of the mobile phone magnetometer data at the first moment is greater than the magnetic field change threshold 3 in the quasi-stationary magnetic field detection algorithm, and the value of the mobile phone magnetometer data at the first moment is greatly disturbed by the magnetic field and does not meet the quasi-stationary magnetic field condition.
[0061] Step 204: determine whether the first heading angle satisfies the gyroscope constraint condition based on the attitude solution data.
[0062] Based on the optional method in step 202, step 204 may specifically include: determining whether the absolute value of the difference between the third heading angle and the first heading angle is less than or equal to a second preset threshold; if the absolute value of the difference is less than or equal to the second preset threshold, determining that the first heading angle satisfies the gyroscope constraint condition.
[0063] Optionally, the gyroscope constraint condition may be specifically shown in the following formula 2:
[0064] Δψ= |ψ2-ψ1|≤ξ (Formula 2)
[0065] In Formula 2, ψ1 is the first heading angle, that is, the heading angle calculated by the magnetometer, ψ2 is the third heading angle, that is, the calibrated heading angle detected by the gyroscope; Δψ is the absolute value of the difference between the third heading angle and the first heading angle, and ξ is the threshold of the gyroscope constraint condition, that is, the above-mentioned second threshold.
[0066] Optionally, step 204 specifically further includes: determining an initial heading angle based on attitude solution data and noise-filtered sensor data.
[0067] In an embodiment of the present application, the third heading angle is the heading angle after correction of the second heading angle obtained by gyroscope integration; the first heading angle is the heading angle calculated by the magnetometer; and the second preset threshold is the preset threshold of the gyroscope constraint condition.
[0068] Exemplarily, based on step 203, the corrected heading angle obtained by solving the posture of the mobile phone is obtained, the heading angle obtained by integrating and correcting the gyroscope is subtracted from the heading angle calculated by the magnetometer and the absolute value is taken, and the obtained data is compared with the heading angle threshold of the preset gyroscope constraint condition. If the difference is less than or equal to the preset threshold, the heading angle calculated by the magnetometer meets the constraint condition.
[0069] For example, if the heading angle calculated by the mobile phone magnetometer is 3, the heading angle integrated and corrected by the gyroscope is 2, and the preset threshold of the gyroscope constraint condition is 2, then the absolute value of the difference between the heading angle obtained by gyroscope integration and correction and the heading angle calculated by the magnetometer can be obtained to be 1. It can be judged that the absolute value of the difference is less than the preset threshold of the gyroscope constraint condition, and it can be judged that the heading angle calculated by the magnetometer meets the constraint condition.
[0070] If the heading angle calculated by the mobile phone magnetometer is 5, then the absolute value of the difference between the heading angle obtained by integrating and correcting the gyroscope and the heading angle calculated by the magnetometer is 3. The absolute value of the difference is greater than the preset threshold of the gyroscope constraint condition, and it can be determined that the heading angle calculated by the magnetometer does not meet the constraint condition.
[0071] Step 205: If the first heading angle satisfies the gyroscope constraint condition, determine the first heading angle as the initial heading angle of the carrier.
[0072] Optionally, after step 205, it also includes: calculating the movement trajectory of the carrier based on the initial heading angle and attitude solution data, and correcting the calculated movement trajectory using the GNSS data and Kalman filter of the terminal device to obtain the movement trajectory information of the carrier.
[0073] Optionally, acceleration, angular velocity and magnetometer data as well as Global Navigation Satellite System (GNSS) data are used when executing the PDR algorithm. The GNSS data can mainly be terminal positioning data for the mobile phone (watch).
[0074] In the embodiment of the present application, the Kalman filter is essentially a recursive algorithm implemented by a digital computer, and each recursive cycle includes two processes: time update and measurement update of the estimated quantity. The time update is determined by the measurement update result of the previous step and the prior information when designing the Kalman filter, and the measurement update is determined based on the time update according to the measurement value obtained in real time. Therefore, the measurement can be regarded as the input of the Kalman filter, and the estimated value can be regarded as the output. In the PDR algorithm, the pure PDR algorithm will cause the inertial components to offset due to the long derivation time, resulting in a deviation between the trajectory and the actual trajectory. After adding the Kalman filter, the pure PDR data is used as the estimated value and the GNSS data is used as the measurement. The Kalman filter recursive algorithm is performed to correct the pure PDR trajectory so that the trajectory is consistent with the actual trajectory.
[0075] Exemplarily, based on step 204, a heading angle satisfying the gyroscope constraint condition is obtained as the initial heading angle of the pedestrian, and the estimated pedestrian trajectory is corrected according to the mobile phone positioning data and Kalman filtering to obtain the pedestrian's moving trajectory.
[0076] Compared with the current existing technology, this embodiment can add a static quasi-magnetic field detection algorithm, a gyroscope constraint algorithm and a magnetometer initial calibration filtering algorithm to the part of calculating the initial heading. When the user is disturbed by the magnetic field, the user can be prompted that the magnetic field interference is large at the user's location, and the correct magnetometer data can be actively selected for calculation; and Kalman filtering and calibration detection algorithms are added in the process of calculating the initial heading angle to make the calculated heading angle more consistent with the actual one, thereby making the position trajectory derived by the pedestrian heading estimation algorithm closer to the actual one.
[0077] In order to illustrate the specific implementation process of this embodiment, the following specific application examples are given: Figure 3 As shown, but not limited to:
[0078] For example, assuming that the terminal device is a watch of pedestrian A, and the carrier of the terminal device is pedestrian A, the movement trajectory of pedestrian A wearing the watch while exercising is taken as an example.
[0079] First, the magnetometer data, gyroscope data and accelerometer data of pedestrian A's watch are obtained. The gyroscope data can be used to obtain the rotation angular velocity of pedestrian A, and then the heading angle of pedestrian A can be obtained by integral calculation. However, since the gyroscope data will be affected by the geomagnetic field, the heading angle of pedestrian A needs to be corrected according to the magnetometer data and accelerometer data to obtain the corrected heading angle.
[0080] Then, the heading angle of pedestrian A can be obtained through the magnetometer data. By performing quasi-stationary magnetic field detection on the heading angle obtained by the magnetometer, the heading angle of pedestrian A that meets the quasi-stationary magnetic field conditions can be obtained. Then, the heading angle of pedestrian A that meets the quasi-stationary magnetic field conditions is subjected to gyroscope constraint detection. The heading angle of pedestrian A that meets the gyroscope constraint detection is the initial heading angle of pedestrian A. The watch obtains GNSS data and performs Kalman filtering to determine the movement trajectory of pedestrian A.
[0081] When the watch does not support inertial navigation and there is no GNSS and no position information output, the motion trajectory will be discontinuous. Figure 4 shown.
[0082] When calculating the motion trajectory of pedestrian A, the PDR trajectory generated by the initial heading angle calculation is not added. It can be seen that the inaccurate initial heading will cause an angle deviation between the trajectory derived by the PDR and the actual trajectory, such as Figure 5 As shown in the figure, the relatively dense trajectory is the actual movement trajectory of the pedestrian, and the relatively sparse trajectory is the inferred pedestrian trajectory. The heading angle calculated by magnetism in the initial heading estimation part will be offset due to the magnetic field interference at the location and the error of the magnetometer device, resulting in inconsistency with the actual heading.
[0083] If in Figure 5 On the basis of , adding GNSS data to perform Kalman filter algorithm correction, the deduced trajectory also has a large deviation, such as Figure 6 As shown, the relatively dense trajectories are the actual movement trajectories of pedestrians, and the relatively sparse trajectories are the inferred trajectories of pedestrians.
[0084] If in Figure 5 After adding the initial heading angle calculation correction on the basis of , it can be found that the actual initial heading is consistent with the initial heading calculated by this technical solution, and the PDR-derived trajectory is consistent with the actual trajectory, such as Figure 7 As shown, the relatively dense trajectories are the actual movement trajectories of pedestrians, and the relatively sparse trajectories are the inferred trajectories of pedestrians.
[0085] If in Figure 7 On the basis of , GNSS data is added to perform Kalman filter algorithm correction, and the derived trajectory is smoother and consistent with the real trajectory, such as Figure 8As shown, the relatively dense trajectories are the actual movement trajectories of pedestrians, and the relatively sparse trajectories are the inferred trajectories of pedestrians.
[0086] Compared with the current existing technology, this embodiment can add a static quasi-magnetic field detection algorithm, a gyroscope constraint algorithm and a magnetometer initial calibration filtering algorithm to the part of calculating the initial heading. When the user is disturbed by the magnetic field, the user can be prompted that the magnetic field interference is large at the user's location, and the correct magnetometer data can be actively selected for calculation; and Kalman filtering and calibration detection algorithms are added in the process of calculating the initial heading angle to make the calculated heading angle more consistent with the actual one, thereby making the position trajectory derived by the pedestrian heading estimation algorithm closer to the actual one.
[0087] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in this embodiment provides a data processing device, such as Fig. 9 As shown, the device includes: an acquisition module 31, a solution module 32, and a determination module 33.
[0088] An acquisition module 31 is configured to acquire sensor data of a terminal device;
[0089] A solution module 32 is configured to perform fusion posture solution according to the sensor data to obtain posture solution data of the carrier of the terminal device;
[0090] The determination module 33 is configured to determine an initial heading angle that satisfies both a quasi-stationary magnetic field condition and a gyroscope constraint condition according to the attitude solution data and the sensor data.
[0091] In some examples of this embodiment, the sensor data includes: magnetometer data, gyroscope data and accelerometer data; accordingly, the determination module 33 is specifically configured to determine a first heading angle that satisfies a quasi-stationary magnetic field condition based on the magnetometer data; based on the attitude solution data, determine whether the first heading angle satisfies a gyroscope constraint condition; if the first heading angle satisfies the gyroscope constraint condition, determine that the first heading angle is the initial heading angle of the carrier.
[0092] In some examples of this embodiment, the determination module 33 is specifically configured to determine whether the standard value calculated by the magnetometer at the stationary moment is less than the first preset threshold value of the quasi-stationary magnetic field change; if the standard value is less than the first preset threshold value of the quasi-stationary magnetic field change, the heading angle corresponding to the standard value is determined as the first heading angle that meets the quasi-stationary magnetic field condition.
[0093] In some examples of this embodiment, the solution module 32 is specifically configured to obtain the rotation angular velocity of the carrier based on the gyroscope data; obtain the second heading angle of the carrier by integral calculation according to the rotation angular velocity; determine the correction value of the second heading angle according to the magnetometer data and the accelerometer data; and correct the second heading angle using the correction value to obtain the third heading angle of the carrier.
[0094] In some examples of this embodiment, the determination module 33 is specifically configured to determine whether the absolute value of the difference between the third heading angle and the first heading angle is less than or equal to a second preset threshold; if the absolute value of the difference is less than or equal to the second preset threshold, it is determined that the first heading angle satisfies the gyroscope constraint condition.
[0095] In some examples of this embodiment, the solving module 32 is further configured to perform noise data filtering on the sensor data.
[0096] In some examples of this embodiment, the solving module 32 is further configured to analyze the sensor data after noise filtering to obtain the posture data.
[0097] In some examples of this embodiment, the determination module 33 is further configured to determine the initial heading angle based on the attitude solution data and the noise-filtered sensor data. In some examples of this embodiment, the determination module 33 is further configured to perform a movement trajectory calculation of the carrier based on the initial heading angle and the attitude solution data, and use the GNSS data of the terminal device and the Kalman filter to correct the calculated movement trajectory to obtain the movement trajectory information of the carrier.
[0098] It should be noted that for other corresponding descriptions of the functional units involved in the data processing device provided in this embodiment, reference can be made to Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0099] Based on the above Figure 1 and Figure 2 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The method shown.
[0100] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0101] Based on the above Figure 1 and Figure 2 The method shown, and Fig. 9 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, such as a smart phone, a tablet computer, a drone, a smart robot and other smart terminals, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The method shown.
[0102] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0103] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0104] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0105] Based on the above Figure 1 and Figure 2 The method shown, and Fig. 9 The virtual device embodiment shown in the embodiment further provides a chip, including one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal including a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the above-mentioned Figure 1 and Figure 2 The method shown.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the solution of this embodiment, compared with the current prior art, this embodiment can add a static quasi-magnetic field detection algorithm, a gyroscope constraint algorithm, and a magnetometer initial calibration filter algorithm to the part of calculating the initial heading, and can prompt the user that the magnetic field interference is large when the user is disturbed by the magnetic field, and actively select the correct magnetometer data for calculation; and add Kalman filtering and calibration detection algorithms in the process of calculating the initial heading angle to make the calculated heading angle more consistent with the actual one, thereby making the position trajectory derived by the pedestrian heading estimation algorithm closer to reality.
[0107] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0108] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.
Claims
1. A data processing method, characterized in that: include: Obtain sensor data from terminal devices; Performing fusion posture calculation based on the sensor data to obtain posture calculation data of the carrier of the terminal device; An initial heading angle satisfying both a quasi-stationary magnetic field condition and a gyroscope constraint condition is determined according to the attitude solution data and the sensor data.
2. The method according to claim 1, characterized in that The sensor data includes: magnetometer data, gyroscope data and accelerometer data; The step of determining an initial heading angle that satisfies both a quasi-stationary magnetic field condition and a gyroscope constraint condition based on the attitude solution data and the sensor data comprises: Determining a first heading angle satisfying a quasi-stationary magnetic field condition based on the magnetometer data; Determining whether the first heading angle satisfies a gyroscope constraint condition according to the attitude solution data; If the first heading angle satisfies the gyroscope constraint condition, the first heading angle is determined as the initial heading angle of the carrier.
3. The method according to claim 2, characterized in that The determining, based on the magnetometer data, a first heading angle satisfying a quasi-stationary magnetic field condition comprises: Determine whether the standard value calculated by the magnetometer at the stationary moment is less than a first preset threshold value of the quasi-stationary magnetic field change; If the standard value is less than a first preset threshold value of the quasi-stationary magnetic field change, the heading angle corresponding to the standard value is determined as a first heading angle that satisfies the quasi-stationary magnetic field condition.
4. The method according to claim 2, characterized in that: The step of performing fusion posture calculation according to the sensor data to obtain posture calculation data of the carrier of the terminal device includes: Based on the gyroscope data, obtaining the rotational angular velocity of the carrier; Obtaining a second heading angle of the carrier by integrating and calculating according to the rotation angular velocity; Determining a correction value of the second heading angle according to the magnetometer data and the accelerometer data; The second heading angle is corrected using the correction value to obtain a third heading angle of the carrier.
5. The method according to claim 4, characterized in that The determining, based on the attitude solution data, whether the first heading angle satisfies a gyroscope constraint condition comprises: Determining whether an absolute value of a difference between the third heading angle and the first heading angle is less than or equal to a second preset threshold; If the absolute value of the difference is less than or equal to a second preset threshold, it is determined that the first heading angle satisfies the gyroscope constraint condition.
6. The method according to claim 1, characterized in that Before analyzing the sensor data to obtain the posture data of the carrier of the terminal device, the method further includes: Performing noise data filtering on the sensor data; The step of analyzing the sensor data to obtain the posture data of the carrier of the terminal device includes: Analyze the sensor data after noise filtering to obtain the posture data; The step of determining an initial heading angle that satisfies both a quasi-stationary magnetic field condition and a gyroscope constraint condition based on the attitude solution data and the sensor data comprises: The initial heading angle is determined based on the attitude solution data and the noise-filtered sensor data.
7. The method according to any one of claims 1 to 6, characterized in that After determining the initial heading angle that satisfies both the quasi-stationary magnetic field condition and the gyroscope constraint condition based on the attitude solution data and the sensor data, the method further includes: The movement trajectory of the carrier is estimated based on the initial heading angle and the attitude solution data, and the estimated movement trajectory is corrected using the global navigation satellite system GNSS data and Kalman filter of the terminal device to obtain the movement trajectory information of the carrier.
8. A data processing device, characterized in that: include: An acquisition module, configured to acquire sensor data of a terminal device; A solution module is configured to perform fusion posture solution according to the sensor data to obtain posture solution data of the carrier of the terminal device; The determination module is configured to determine an initial heading angle that satisfies both a quasi-stationary magnetic field condition and a gyroscope constraint condition according to the attitude solution data and the sensor data.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
11. A chip, characterized in that: The invention comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 7.