Determination method for installation angle of mobile device, apparatus, device, and storage medium

By constructing a loss function and utilizing data from a three-axis accelerometer, gyroscope, and GNSS chip, the process of calculating the installation angle was optimized, solving the problem of insufficient positioning accuracy caused by the non-fixed installation angle of mobile devices in vehicle scenarios, and improving the accuracy of the installation angle and positioning accuracy.

WO2026001581A1PCT designated stage Publication Date: 2026-01-02BEIJING AUTONAVI YUNMAP TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/098785
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-26
Filing Date
2025-06-03
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

In vehicle-mounted scenarios, the mounting angle of mobile devices is not fixed, resulting in insufficient positioning accuracy. Existing technologies struggle to accurately determine the mounting angle of the phone relative to the vehicle.

Method used

By constructing a loss function and utilizing data from a triaxial accelerometer, gyroscope, and GNSS chip, the loss value of the loss function is optimized to determine the installation angle of the mobile device. The consistency of the installation angle is verified by combining the difference between inertial navigation acceleration and GNSS acceleration, ensuring the accuracy of the installation angle.

Benefits of technology

It improves the positioning accuracy of mobile devices in vehicle scenarios, avoids reverse installation angle errors, and simplifies the process of calculating the installation angle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025098785_02012026_PF_FP_ABST
    Figure CN2025098785_02012026_PF_FP_ABST
Patent Text Reader

Abstract

A determination method for the installation angle of a mobile device, an apparatus, a device, and a storage medium. The method comprises: using, as given quantities of a loss function, a component of acceleration data in the horizontal direction outputted by a triaxial accelerometer, angular velocity in the vertical direction determined on the basis of angular velocity data outputted by a gyroscope, and velocity in the heading direction of a vehicle determined on the basis of velocity data outputted by a GNSS chip, and using an installation angle as a variable of the loss function (S11); by taking the minimization of a loss value calculated by the loss function as an objective, determining candidate installation angles (S12); on the basis of the velocity data outputted by the GNSS chip, determining GNSS acceleration in the heading direction of the vehicle (S13); on the basis of the candidate installation angles and a component of detection data of the accelerometer in the horizontal direction, determining inertial navigation acceleration corresponding to the candidate installation angles in the heading direction of the vehicle (S14); and on the basis of the difference between the inertial navigation acceleration corresponding to the candidate installation angles in the heading direction of the vehicle and the GNSS acceleration, determining an installation angle from among the candidate installation angles (S15). In the method, an installation angle can be accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and equipment for determining installation angle of mobile device and storage medium

[0001] The present disclosure claims priority to the Chinese patent application No. 202410840620.X, filed on June 26, 2024, and entitled "Method, device and equipment for determining installation angle of mobile device and storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present disclosure relates to the positioning technical field, and in particular to a method, device and equipment for determining installation angle of mobile device and storage medium. BACKGROUND

[0003] At present, when users travel by driving vehicles, they are used to placing mobile devices such as mobile phones in vehicles, and using services (such as location-based services) provided by application software installed in mobile phones. This scenario can be commonly referred to as a vehicle-mounted scenario.

[0004] In the vehicle-mounted scenario, taking a mobile device as a mobile phone as an example, due to the influence of factors such as the size of the mobile phone, the internal structure of the vehicle and the habits of the user, the position and manner in which the user places the mobile phone in the vehicle are not fixed, which will result in that the posture of the mobile phone relative to the vehicle is also not fixed. In order to obtain a more accurate positioning position of the mobile phone, so as to ensure the quality of the location-based services (such as navigation services) provided to the user, the prior art usually adopts a multi-sensor fusion positioning technology to determine the positioning position of the mobile phone, wherein the input data of the fusion positioning includes not only data provided by a global navigation satellite system (GNSS), but also data measured by an inertial navigation sensor (abbreviated as an inertial navigation sensor) carried on the mobile phone. In order to ensure that the data measured by the inertial navigation sensor can be accurately calculated and the positioning accuracy of the fusion positioning is ensured, it is necessary to obtain the installation angle of the mobile phone relative to the vehicle and ensure that the installation angle is accurate.

[0005] Therefore, how to obtain an accurate installation angle of a mobile device relative to a vehicle in a vehicle-mounted scenario is a problem to be solved by those skilled in the art. SUMMARY

[0006] In order to solve the above technical problems existing in the prior art, the present disclosure provides a method, device and equipment for determining installation angle of mobile device and storage medium, which improves the accuracy of the obtained installation angle and further improves the positioning accuracy.

[0007] In a first aspect, the disclosure provides a method for determining the installation angle of a mobile device, the mobile device being placed on a vehicle, the mobile device being equipped with a three-axis accelerometer, a gyroscope and a GNSS chip. The three-axis accelerometer and the gyroscope can be independently arranged or integrated together, for example, in an inertial measurement unit (IMU). The method comprises: taking the component of the acceleration data output by the three-axis accelerometer in the horizontal direction, the vertical angular velocity determined according to the angular velocity data output by the gyroscope, and the speed of the vehicle forward direction determined based on the speed data output by the GNSS chip as known quantities of a loss function, taking the installation angle of the mobile device with the vehicle as a variable of the loss function, and determining a candidate installation angle by minimizing the loss value calculated by the loss function; determining the GNSS acceleration in the vehicle forward direction based on the speed data output by the GNSS chip; determining the inertial navigation acceleration corresponding to the vehicle forward direction according to the candidate installation angle and the component of the acceleration data output by the three-axis accelerometer in the horizontal direction; and determining the installation angle from the candidate installation angle based on the difference between the inertial navigation acceleration corresponding to the vehicle forward direction and the GNSS acceleration. The time of the acceleration data output by the accelerometer, the time of determining the vertical angular velocity according to the angular velocity data output by the gyroscope, the time of determining the speed of the vehicle forward direction based on the speed data output by the GNSS chip, and the calculation time of the GNSS acceleration are within the same time window.

[0008] The technical solution provided by the disclosure determines the candidate installation angle of the mobile device by constructing a loss function, wherein the variable of the loss function is the installation angle of the mobile device with the vehicle, and the loss value calculated by the loss function can represent the size of the lateral acceleration of the vehicle. The goal is to minimize the loss value calculated by the loss function. When the loss value is minimized, the lateral acceleration of the vehicle is close to zero, and the candidate installation angle obtained at this time includes the forward installation angle and the reverse installation angle. The forward installation angle is the installation angle that the solution of the disclosure hopes to obtain, and the reverse installation angle is the installation angle opposite to the forward installation angle. Because the inertial navigation acceleration corresponding to the vehicle forward direction determined according to the forward installation angle and the component of the detection data of the accelerometer in the horizontal direction has high consistency with the GNSS acceleration in the vehicle forward direction determined according to the speed data output by the GNSS chip, the consistency between the inertial navigation acceleration determined according to the forward installation angle and the GNSS acceleration is high, that is, the difference between the two is small. The consistency between the inertial navigation acceleration corresponding to the vehicle forward direction determined according to the reverse installation angle and the component of the acceleration data output by the accelerometer in the horizontal direction and the GNSS acceleration is poor, that is, the difference between the two is large. Therefore, the correct installation angle can be determined from the candidate installation angle by verifying the acceleration consistency in the solution of the disclosure, avoiding the problem of reverse installation angle, and helping to improve the fusion positioning accuracy.

[0009] Further, the technical solution provided by the present disclosure converts solving the installation angle into optimizing the loss value of the loss function, and simplifies the difficulty of solving the installation angle.

[0010] In a second aspect, the present disclosure further provides a device for determining the installation angle of a mobile device, which comprises a first determining unit, a second determining unit, a third determining unit and an installation angle determining unit. The first determining unit is configured to take the component of the acceleration data output by the three-axis accelerometer in the horizontal direction, the angular velocity in the vertical direction determined according to the angular velocity data output by the gyroscope, and the speed of the vehicle in the forward direction determined based on the speed data output by the GNSS chip as the known quantities of the loss function, take the installation angle of the mobile device and the vehicle as the variable of the loss function, and determine the candidate installation angle by taking the loss value calculated by minimizing the loss function as the target. The second determining unit is configured to determine the GNSS acceleration in the forward direction of the vehicle based on the speed data output by the GNSS chip. The third determining unit is configured to determine the inertial navigation acceleration corresponding to each candidate installation angle in the forward direction of the vehicle according to each candidate installation angle and the component of the acceleration data output by the three-axis accelerometer in the horizontal direction. The installation angle determining unit is configured to determine the installation angle from each candidate installation angle based on the difference between the inertial navigation acceleration corresponding to each candidate installation angle in the forward direction of the vehicle and the GNSS acceleration. The time of the acceleration data output by the three-axis accelerometer, the time of determining the angular velocity in the vertical direction according to the angular velocity data output by the gyroscope, the time of determining the speed of the vehicle in the forward direction based on the speed data output by the GNSS chip, and the calculation time of the GNSS acceleration are within the same time window.

[0011] In a third aspect, the present disclosure further provides a mobile device. The mobile device comprises a three-axis accelerometer, a gyroscope, a GNSS chip, a processor and a memory. The memory is configured to store a program. The three-axis accelerometer is configured to detect and output acceleration data. The gyroscope is configured to detect and output angular velocity data. The GNSS chip is configured to detect and output satellite positioning related data. When the position of the mobile device needs to be determined, the program is executed by the processor to perform the method for determining the installation angle of the mobile device provided in the first aspect. The mobile device can be a mobile phone, a tablet computer or other portable device capable of installing application software.

[0012] In a fourth aspect, the present disclosure further provides a storage medium having a computer program stored thereon. The computer program is executed to implement the method for determining the installation angle of the mobile device provided in the first aspect.

[0013] In a fifth aspect, the present disclosure further provides a computer program product comprising a computer program. The computer program is executed by a processor to implement the method for determining the installation angle of the mobile device provided in the first aspect. Attached Figure Description

[0014] Figure 1 is a schematic diagram of the mobile phone body coordinate system and heading angle;

[0015] Figure 2 is a schematic diagram of the vehicle-mounted scenario provided in this disclosure;

[0016] Figure 3 is a perspective view of the vehicle provided in this disclosure from a top-down perspective;

[0017] Figure 4 is a schematic diagram of the software and hardware structure of the mobile device provided in this disclosure;

[0018] Figure 5 is a flowchart of a method for determining the installation angle of a mobile device according to an embodiment of this disclosure;

[0019] Figure 6 is a flowchart of a method for determining the installation angle of a mobile device according to another embodiment of this disclosure;

[0020] Figure 7 is a schematic diagram of a device for determining the installation angle of a mobile device according to an embodiment of the present disclosure;

[0021] Figure 8 is a schematic diagram of a device for determining the installation angle of a mobile device according to another embodiment of this disclosure;

[0022] Figure 9 is a schematic diagram of a mobile device provided in an embodiment of this disclosure. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present disclosure, the following uses a mobile phone as an example to illustrate the application scenarios of the present disclosure.

[0024] See Figure 1, which is a schematic diagram of the mobile phone's coordinate system and heading angle. The orientation in Figure 1 is for illustrative purposes only and does not constitute a limitation on the application scenarios of this disclosure.

[0025] The coordinate axes of the mobile phone's body coordinate system include the origin, and the mutually orthogonal X-axis, Y-axis, and Z-axis. The origin is located at the center of mass of the phone, the positive direction of the Y-axis is from the center of mass to the top of the phone, the positive direction of the X-axis is from the center of mass to the side of the phone (such as the right side), and the positive direction of the Z-axis is perpendicular to the plane of the phone.

[0026] Let the gravity axis of the geodetic coordinate system be G, the westward axis be W, and the northward axis be N.

[0027] The phone's yaw angle is used to indicate the phone's heading, and is the angle between the phone and the GN plane after the phone rotates around the Z-axis.

[0028] The phone's pitch angle is the angle between the phone and the WN plane after the phone rotates around the X-axis.

[0029] The roll angle of the mobile phone is the angle between the Y axis and the WN plane.

[0030] Referring to FIG. 2, which is a schematic diagram of a vehicle scene provided by the present disclosure, it can be understood that the user uses any scenario that needs to provide services based on the location of the mobile phone 10 in the car (including but not limited to navigation services), including but not limited to, the user uses an application that provides weather information in the car or uses an application that provides life services in the car, etc. As shown in FIG. 2, the mobile phone 10 is fixed near the center console in the car, and a certain application provides services for the user based on the location of the mobile phone 10.

[0031] At this time, the inertial measurement unit (IMU), global satellite navigation system (GNSS), etc. can be used to obtain the positioning information of the mobile phone, that is, the location information of the mobile phone, through Kalman filter algorithm fusion positioning.

[0032] The IMU is a sensor mainly used to detect and measure acceleration and rotational motion, which can obtain the three-axis angular rate and acceleration of an object.

[0033] The GNSS can include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Beidou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), Satellite Based Augmentation Systems (SBAS), etc., and the present disclosure does not make specific limitations.

[0034] Referring to FIG. 3, a perspective view of a top view of a vehicle is provided. A mobile phone installation angle θ refers to an angle between a mobile phone yaw angle and a vehicle forward direction. As shown in FIG. 3, Y_IMU and X_IMU refer to Y and X axes of a mobile phone body coordinate system, and Y_car and X_car refer to coordinate axes of a coordinate system established by a vehicle, a positive direction of X_car is a vehicle forward direction, Y_car is perpendicular to X_car, and the mobile phone installation angle θ is an angle between X_IMU and X_car. In a vehicle-mounted scenario, in order to obtain a more accurate positioning position of the mobile phone, a multi-sensor fusion positioning technology is usually used. Input data of the fusion positioning includes GNSS satellite positioning data and data measured by an inertial navigation sensor (hereinafter referred to as an inertial navigation sensor) carried on the mobile phone. In order to ensure that the data measured by the inertial navigation sensor can be accurately calculated and the positioning accuracy of the fusion positioning is ensured, the installation angle of the mobile phone relative to the vehicle needs to be obtained and the accuracy of the installation angle needs to be ensured.

[0035] In order to obtain an accurate installation angle, an embodiment of the present disclosure provides a mobile device installation angle determination method, device, equipment and storage medium.

[0036] In order to enable personnel in the technical field to more clearly understand the present disclosure, the technical solutions of the present disclosure will be described below in conjunction with the accompanying drawings in the embodiments of the present disclosure.

[0037] The words "first", "second", and the like used in the present disclosure are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0038] The embodiments of the present disclosure are described by taking the clockwise direction of the installation angle as an example, where the angle value range of the installation angle is [0, 360°]. It can be understood that the angle value range of the installation angle can also be [-180°, +180°], and the negative angle represents the counterclockwise direction of the installation angle.

[0039] Referring to FIG. 4, a schematic diagram of a software structure and a hardware structure of a mobile device provided by the present disclosure is shown. The present disclosure needs acceleration data output by an accelerometer, angular velocity data output by a gyroscope, and speed data output by a GNSS chip, so the mobile device can be equipped with an IMU sensor and a GNSS chip in one case. The IMU sensor can be a combined unit including a three-axis accelerometer and a three-axis gyroscope, and the accelerometer and the gyroscope of the IMU sensor are used to measure acceleration and angular velocity, and estimate position and attitude. The mobile device can also include a GNSS antenna for receiving GNSS signals, so that the GNSS service of the mobile device can obtain GNSS data, which can include position data, speed data, and time data, etc. The data output by the IMU sensor and the GNSS chip are all real-time obtainable data.

[0040] In another case, the mobile device can not be equipped with an IMU sensor, but can be equipped with a dedicated three-axis accelerometer and a gyroscope. When the mobile device is working, the three-axis accelerometer mounted thereon outputs acceleration data, and the gyroscope outputs angular velocity data. The mobile device obtains GNSS data through the GNSS chip. The data output by the three-axis accelerometer, the gyroscope, and the GNSS chip are all real-time obtainable data.

[0041] When the application software installed on the mobile device (such as application software with navigation function) provides location-based service to the user, the application can obtain the detection data of the IMU sensor and the GNSS data, and provide the installation angle detection algorithm to determine the installation angle of the mobile device relative to the vehicle. The installation angle detected by the installation angle detection algorithm can be provided to the positioning algorithm to determine the position of the mobile device; if the service provided by the application software to the user based on the location is navigation service, the navigation algorithm can provide navigation service based on the position determined by the positioning algorithm.

[0042] Referring to FIG. 5, a flowchart of a method for determining the installation angle of a mobile device provided by an embodiment of the present disclosure is shown, which includes the following steps:

[0043] S11: taking the component of the acceleration data output by the three-axis accelerometer in the horizontal direction, the angular velocity in the vertical direction determined according to the angular velocity data output by the gyroscope, and the speed of the vehicle forward direction determined based on the speed data output by the GNSS chip as known quantities of a loss function, and taking the installation angle as a variable of the loss function.

[0044] The three-axis accelerometer (or accelerometer) or gyroscope in the following description of the embodiments of the present disclosure can be a three-axis accelerometer and a gyroscope in an IMU sensor, or a three-axis accelerometer and a gyroscope independently arranged, and neither affects the implementation of the embodiments. In addition, the horizontal direction in step S11 refers to the direction perpendicular to the direction of gravity. The vertical direction of the angular velocity is equivalent to the direction of the angular velocity, and the specific direction can be determined by the right-hand screw rule. The direction of the angular velocity is the direction of the thumb, and when rotating counterclockwise, the direction of the angular velocity is vertically upward, and when rotating clockwise, the direction of the angular velocity is vertically downward.

[0045] The scheme of the present disclosure converts the solving of the installation angle into an optimization problem of the loss value of the loss function. When constructing the loss function, the known quantities of the loss function are the components of the acceleration data output by the three-axis accelerometer in the horizontal direction, the angular velocity in the vertical direction determined according to the angular velocity data output by the gyroscope, and the speed of the vehicle forward direction determined based on the speed data output by the GNSS chip.

[0046] Because the target of the solving is the installation angle, the variable of the loss function is the installation angle between the mobile device and the vehicle. The function value of the loss function, that is, the loss value of the loss function, can represent the size of the lateral acceleration of the vehicle. In one possible implementation, the function value of the loss function is an even power of the lateral acceleration, for example, the square of the lateral acceleration, so that the loss function has a minimum value.

[0047] S12: Determine the candidate installation angle by minimizing the loss value calculated by the loss function.

[0048] In the scheme of the embodiments of the present disclosure, the optimization target of the loss function is to minimize the loss value of the loss function, and the target is to minimize the loss value calculated by the loss function, that is, to minimize the lateral acceleration of the target vehicle. Because the loss value of the loss function can represent the size of the lateral acceleration of the vehicle, when the loss value of the loss function is a minimum value, it represents that the lateral acceleration of the vehicle is small, and the angle value corresponding to the minimum value is the candidate installation angle.

[0049] Taking the function value of the loss function as an even power of the lateral acceleration as an example, in this implementation, the loss function generally has two local minimum loss values, and the two local minimum loss values correspond to different candidate installation angles, that is, the candidate installation angles determined by minimizing the loss value calculated by the loss function are two, and the two candidate installation angles include a positive installation angle and a reverse installation angle opposite to the positive installation angle by 180 degrees. The present disclosure needs to select the positive installation angle from the two angles.

[0050] S13: Determine the GNSS acceleration of the vehicle forward direction based on the speed data output by the GNSS chip.

[0051] In a possible implementation, when the GNSS acceleration in the vehicle forward direction is acquired, the GNSS acceleration in the vehicle forward direction can be determined based on the speed data output by the GNSS chip. For example, the ratio between the difference between two adjacent speed data and the time difference corresponding to the two adjacent speed data is determined as the GNSS acceleration in the vehicle forward direction. It can be understood that other ways of calculating the acceleration in the vehicle forward direction can also produce the effect of the present disclosure, and are equivalent to the step S13 of the present disclosure.

[0052] S14: determining, according to the alternative installation angle and the component of the acceleration data output by the three-axis accelerometer in the horizontal direction, the inertial navigation acceleration corresponding to the alternative installation angle in the vehicle forward direction.

[0053] S15: determining, based on the difference between the inertial navigation acceleration corresponding to the alternative installation angle in the vehicle forward direction and the GNSS acceleration, the installation angle from the alternative installation angles.

[0054] Because the GNSS acceleration should have a high consistency with the inertial navigation acceleration determined according to the correct installation angle, and there is a large difference between the GNSS acceleration and the inertial navigation acceleration determined by using the reverse installation angle, in order to select the correct installation angle, the present disclosure determines the inertial navigation acceleration of the vehicle in the forward direction by the three-axis accelerometer, and determines the GNSS acceleration of the vehicle in the forward direction by the speed data output by the GNSS chip, and then calculates the difference between the two accelerations to determine the consistency of the two accelerations, and then determines the correct installation angle from the alternative installation angles.

[0055] As mentioned above, the alternative installation angles usually have two, and for each alternative installation angle, the corresponding inertial navigation acceleration needs to be determined respectively. The two alternative installation angles are referred to as the first alternative installation angle and the second alternative installation angle.

[0056] Hereinafter, the inertial navigation acceleration determined according to the first alternative installation angle is taken as the first inertial navigation acceleration, and the inertial navigation acceleration determined according to the second alternative installation angle is taken as the second inertial navigation acceleration, and the technical solution provided by the embodiment of the present disclosure is introduced.

[0057] The difference between the first inertial navigation acceleration and the GNSS acceleration is determined as the first deviation, and the difference between the second inertial navigation acceleration and the GNSS acceleration is determined as the second deviation. By comparing the absolute values of the first deviation and the second deviation, the positive installation angle and the reverse installation angle are distinguished.

[0058] Specifically, when the absolute value of the first deviation is greater than the absolute value of the second deviation, the second alternative installation angle is determined as the correct installation angle, that is, the positive installation angle, and the first alternative installation angle is the reverse installation angle. When the absolute value of the first deviation is less than the absolute value of the second deviation, the first alternative installation angle is determined as the correct installation angle, that is, the positive installation angle, and the second alternative installation angle is the reverse installation angle.

[0059] The order of the above steps in the embodiments of the present disclosure is only for the convenience of description, and does not constitute a limitation on the technical solutions of the present disclosure. In actual application, the order of the above steps can be adjusted, for example, the order of S13 and S14 is exchanged.

[0060] It should be noted that in the scheme provided by the present disclosure, the time of the acceleration data output by the three-axis accelerometer, the time of determining the angular velocity of the vertical direction according to the angular velocity data output by the gyroscope, the time of determining the speed of the vehicle forward direction based on the speed data output by the GNSS chip, and the calculation time of the GNSS acceleration are preferably within the same time window to ensure the timeliness of various sensor data and improve the accuracy of the determined installation angle. The length of the time window is not specifically limited by the present disclosure and can be set to any time length such as 2 seconds, 3 seconds, etc.

[0061] In summary, the technical scheme provided by the embodiments of the present disclosure converts the problem of solving the installation angle into the problem of optimizing the loss value of the loss function, simplifying the difficulty of solving the installation angle. And by verifying the acceleration consistency, the correct installation angle is determined from the alternative installation angle, avoiding the problem of reverse installation angle, ensuring the accuracy of the obtained installation angle, and helping to improve the accuracy of the fusion positioning.

[0062] The following will be described in conjunction with a specific implementation manner.

[0063] Referring to FIG. 6, a flowchart of a method for determining the installation angle of a mobile device provided by another embodiment of the present disclosure is shown. This embodiment takes the scenario that the IMU and GNSS chip are mounted in the mobile device, and the user uses an application program with navigation function as an example to introduce the method provided by the embodiments of the present disclosure in detail. The mobile device can be a mobile phone, a tablet computer or other electronic device. The application program with navigation function can be a map navigation type application program, or a life service type application program, etc. The method shown in FIG. 6 includes the following steps:

[0064] S21: The user fixes the mobile device on the vehicle and enables the application program with navigation function to navigate.

[0065] In a possible implementation, when the mobile device starts an application, IMU detection data and GNSS data need to be buffered for a period of time, and the method provided in the present disclosure is executed until the amount of buffered data is sufficient for installation angle detection. The present disclosure does not specifically limit the length of time for buffering IMU detection data and GNSS data. The purpose of buffering data for a period of time is to obtain multiple sets of IMU detection data and GNSS data for installation angle detection and mutual verification, thereby improving the accuracy of the determined installation angle.

[0066] The IMU detection data includes accelerometer detection data and gyroscope detection data. The accelerometer detection data is acceleration data output by the accelerometer, and the gyroscope detection data is angular velocity data output by the gyroscope.

[0067] S22: determining a gravity direction according to the average value of the accelerometer detection data.

[0068] If the vehicle has not started to travel, that is, in a stationary state, the detection result of the accelerometer at this time directly represents the gravity. Therefore, the average value of the accelerometer detection data in the buffered IMU detection data in the time window is taken as the gravity direction [gx, gy, gz]. Taking the average value can reduce the error of the determined gravity direction.

[0069] S23: determining the component of the acceleration data in the horizontal direction and the angular velocity in the vertical direction according to the gravity direction.

[0070] As described above, the horizontal direction of the present disclosure is perpendicular to the gravity direction.

[0071] The accelerometer detection data can be represented as a vector represents the detection value of the accelerometer detection data in the X-axis direction, represents the detection value of the accelerometer detection data in the Y-axis direction, represents the detection value of the accelerometer detection data in the Z-axis direction.

[0072] The gyroscope detection data can be represented as a vector represents the detection value of the gyroscope detection data in the X-axis direction, represents the detection value of the gyroscope detection data in the Y-axis direction, represents the detection value of the gyroscope detection data in the Z-axis direction.

[0073] Based on the gravity direction [gx, gy, gz], the current pitch and roll of the mobile device are determined, and the specific formula is as follows: roll = arctan2(gy, gz) (1)

[0074] Assume the mobile device's current heading angle is the initial angle, i.e., yaw = 0.

[0075] The rotation matrix rot, determined by equations (1) and (2) above and yaw = 0, is as follows:

[0076] The rotation matrix `rot`, when multiplied by a vector, changes the direction of the vector but not its magnitude, while preserving its chirality. Preserving chirality means that after multiplying a vector, the coordinate system of the result remains unchanged compared to the coordinate system of the vector; it only rotates the vector. Therefore, when the rotation matrix `rot` is left-multiplied by accelerometer data, the horizontal component of the determined acceleration data maintains a right-handed coordinate system; similarly, when the rotation matrix `rot` is left-multiplied by gyroscope data, the horizontal component of the determined gyroscope data also maintains a right-handed coordinate system.

[0077] After multiplying the accelerometer data by rot, the horizontal component of the acceleration data is determined. This component is represented as the first component, as shown in the following formula:

[0078] After multiplying the gyroscope's detection data by rot, the vertical component of the gyroscope's detection data is determined. This component is the vertical angular velocity, and it is represented as the second component, as shown in the following formula:

[0079] S24: Determine the relationship between the vehicle's lateral acceleration and the installation angle based on the horizontal component of the acceleration data output by the accelerometer and the vertical angular velocity.

[0080] Referring to Figure 3, the X_car direction is the forward direction of the vehicle, and the Y_car direction is the lateral direction of the vehicle.

[0081] lateral acceleration of the vehicle (acc) i It can be expressed as follows:

[0082] In the above formula (6), a ix and a iy The component of the acceleration data measured by the IMU that is converted to the horizontal plane can be determined by equation (4), which is the projection value on the horizontal plane.

[0083] Even when the IMU has zero input, the gyroscope and accelerometer will still produce a very small output; this output value is the zero bias. The zero bias is affected by factors such as the IMU's power-on state, temperature, and internal structure, making it generally difficult to obtain an accurate zero bias at the current moment.

[0084] is the component of the accelerometer bias on the X axis, is the component of the accelerometer bias on the Y axis.

[0085] ω iz is the angular velocity in the vertical direction, which can be determined by equation (5). The angular velocity in the vertical direction represents the clockwise or counterclockwise rotation around the vertical direction.

[0086] is the gyroscope bias in the vertical direction. υ is the speed of the vehicle in the forward direction.

[0087] For the convenience of calculation and description, the following definitions of substitution are made.

[0088] Definition: x = sin θ; y = cos θ; a i = a ix ; b i = -a iy ; c i = 1; d i = υ; e i = υω iz .

[0089] Then the above equation (6) can be converted into the following equation (7): acc i = a i x + b i y + c i z + d i ω + e i (7)

[0090] S25: Determine the loss function according to the relationship between the lateral acceleration of the vehicle and the installation angle.

[0091] In the embodiments of the present disclosure, the loss value of the loss function f can be used to represent the size of the lateral acceleration of the vehicle. Because the variable of the loss function f is the installation angle of the mobile device and the vehicle, the loss function f can represent the relationship between the lateral acceleration of the vehicle and the installation angle. After changing the installation angle θ, the function value of the loss function changes, and the installation angle is the independent variable, and the loss value of the loss function f is the dependent variable.

[0092] The optimization goal of the loss function f is to minimize the loss value, that is, to minimize the lateral acceleration of the vehicle. When the loss value of the loss function f is a minimum value, the lateral acceleration of the vehicle represented approaches zero, and the corresponding installation angle variable takes a value including the sought installation angle.

[0093] ​The relationship between the lateral acceleration of the vehicle and the installation angle has been determined in the above formula (7), and the loss function f determined according to the relationship between the lateral acceleration of the vehicle and the installation angle in the embodiment of the present disclosure satisfies the following formula: f =∑acc i 2 =∑(a i x+b i y+c i z+d i ω+e i ) 2 (8)

[0094] The purpose of the summation in formula (8) is to accumulate multiple sets of calculation values within the same time window, so as to avoid the selection error of the installation angle caused by the large accidental error when only a single set of data is used. The purpose of squaring the lateral acceleration in formula (8) is to make the function value of the loss function f greater than or equal to zero, so as to facilitate the solution of the corresponding angle value when the loss function value is the smallest. After squaring the lateral acceleration, the minimum value of the loss function is zero. It can be understood that the loss function f can also be determined as other even powers of the lateral acceleration, such as the fourth power, etc.

[0095] S26: Determine the installation angles corresponding to the two local minimum values of the loss function as the first and second candidate installation angles.

[0096] When the function value of the loss function takes the minimum value, the following formula (9) needs to be satisfied:

[0097] Expanding formula (9) can obtain:

[0098] After eliminating formula (10), the following formula can be obtained:

[0099] A 00 in formula (11) is∑a i 2 , A 10 is∑b i a i ,..., A 34 is∑d i e i .

[0100] Therefore, z and ω can be represented by x and y, as follows:

[0101] The formula (12) is brought into the loss function f of the formula (8), the elimination for z and ω is realized by representing z and ω with x and y, the variable related to the accelerometer zero offset and the gyroscope zero offset in the loss function is removed by elimination, the number of variables is reduced, at this time the loss function f is only related to the installation angle θ, and solving the minimum value of the loss function can determine the θ. The determination process of the θ is specifically explained below.

[0102] The minimum value of the loss function corresponds to the candidate installation angle, including a first candidate installation angle and a second candidate installation angle.

[0103] In a possible implementation, the solving is performed by an enumeration method, more than two installation angle values are determined from a preset angle value range of the installation angle, each installation angle value is sequentially substituted into the loss function to obtain a function value, and then installation angle values corresponding to two local minimum function values in the obtained multiple function values are determined as the first candidate installation angle and the second candidate installation angle.

[0104] The disclosure embodiments do not specifically limit the angle value range of the preset installation angle, and in a possible implementation, the angle value range can be [0°, 360°]. The disclosure embodiments do not specifically limit the number of installation angle values, and it can be understood that when the angle value range is determined, the more the number of installation angle values, the higher the accuracy of the determined first candidate installation angle and the second candidate installation angle.

[0105] In a possible implementation, when the enumeration is performed, the angle value can be selected according to a preset step length and then substituted into the loss function f. The preset step length is not specifically limited in the disclosure embodiments. If the preset step length is set too small, for example, 0.01°, the calculation number can be increased, and the installation angle θ can be solved slowly. If the preset step length is set too large, for example, 2°, although the calculation speed is improved, the installation angle θ solved can have a large error. In actual application, the preset step length can be determined in combination with the calculation capability of the mobile device.

[0106] For example, the preset step length is set to 1°, 1°, 2°, 3°,..., 359°, and 360° are sequentially substituted into the loss function to obtain 360 function values, and two local minimum function values are determined from the 360 function values. Therefore, there are two angle values corresponding to the two local minimum function values, one of which is the installation angle, and the other is the reverse installation angle which is 180° different from the installation angle.

[0107] In another possible implementation, in addition to the enumeration method, the gradient descent method can also be used to converge the loss value to two minimum values by setting multiple initial angle values. The number of initial values is greater than or equal to 2, and the number of initial values is not specifically limited in the disclosure embodiments. The initial angle value is a pre-set angle value.

[0108] For example, in the case of one initial angle value, in the use of gradient descent method, the direction opposite to the corresponding gradient (or approximate gradient) of the loss function f at the initial angle value is determined, and the next angle value is selected in the direction according to the preset step size for iterative search until a local minimum function value of the loss function f is determined.

[0109] For example, the current alternative installation angle θ is 6°, the initial value a1 is 10°, the preset step size is 1°, and the corresponding angle value in the direction of the gradient of the loss function f at 10° is gradually increased. The next angle value selected in the direction opposite to the gradient according to the preset step size is 9°, and the next angle value selected for iteration again is 8°, until the function value converges when the iteration is to 6°, and it is determined that the alternative installation angle is 6°.

[0110] The preset step size is not specifically limited in the embodiments of the present disclosure, and the preset step size can affect the convergence speed of the gradient descent method and the accuracy of the calculation result. If the preset step size is set to be small, the accuracy of the determined alternative installation angle can be improved, but the number of iterations is increased and the calculation amount is increased. If the preset step size is set to be large, the alternative installation angle can be determined faster, but the error of the determined alternative installation angle is increased. In a possible implementation manner, the preset step size is a fixed step size, which can be set to 1° or 0.5°, etc.

[0111] In another possible implementation manner, the preset step size is a step size that meets a preset change rule, for example, the preset step size can be gradually reduced as the number of iterations increases, so that the determined installation angle θ is more accurate. Specifically, when the number of iterations of the gradient descent method is in a first number interval, the preset step size is a first angle, and when the number of iterations of the gradient descent method is in a second number interval, the preset step size is a second angle. The first number interval is smaller than the second number interval, and the first angle is greater than the second angle.

[0112] The following is an example. For example, when the number of iterations is in the first number interval [0, 10], the preset step size is 1°; when the number of iterations is in the second number interval (10, ∞], the preset step size is 0.5°, and at this time, the solution result of the installation angle θ can be more accurate, for example, when the installation angle is 6.4°, after more than 10 iterations, the installation angle θ solved by the present implementation manner is 6.5°, which is closer to the true installation angle.

[0113] The initial angle value preset by the embodiment of the present disclosure is not specifically limited. The range of the installation angle can be evenly divided into two or more angle value ranges. In actual application, considering the convenience of observing the screen of the mobile device, the installation angle of the mobile device is mostly in the first angle value range and the second angle value range among the two or more angle value ranges, that is, the probability of the installation angle of the mobile device being in the first angle value range and the second angle value range is greater than that in other angle value ranges. The number of the angle value ranges is not specifically limited by the embodiment of the present disclosure.

[0114] For example, when the value range of the installation angle is [0, 360°], the value range is evenly divided into six angle value ranges, the first angle value range can be [0, 60°], and the second angle value range can be [300°, 360°]. For another example, when the value range of the installation angle is [-180°, +180°], the value range is evenly divided into six angle value ranges, the first angle value range can be [0, 60°], and the second angle value range can be [-60°, 0°).

[0115] Therefore, in order to improve the convergence speed of the gradient descent method, at least one initial angle value in the plurality of initial angle values is located in the first angle value range, and at least one initial angle value is located in the second angle value range.

[0116] The first angle range and the second angle range are only illustrative, and the ranges of the two angle ranges can be appropriately adjusted. The related parameters of the preset step length and the initial value can be stored in the program package of the application program.

[0117] S27: verifying the acceleration consistency of the two alternative installation angles to determine the correct installation angle.

[0118] After any one of the implementation manners in S26 is adopted, it can be determined that the loss function f has two local values, and the two local minimum values correspond to one alternative installation angle respectively. Therefore, the first alternative installation angle and the second alternative installation angle are determined.

[0119] The two alternative installation angles include one correct installation angle, which can also be referred to as a forward installation angle. The other one is a reverse installation angle which is 180 degrees opposite to the forward installation angle. Therefore, the two angles need to be distinguished to select the correct installation angle.

[0120] The following is described taking the case that the vehicle drives forward as an example. The principle when the vehicle drives backward is similar, which is not described herein again.

[0121] In order to select the correct installation angle, the scheme of the embodiment of the disclosure combines the consistency of the vehicle forward inertial navigation acceleration and the GNSS acceleration as the judgment basis. The inertial navigation acceleration is the acceleration determined by the inertial navigation system. The inertial navigation system of the mobile device includes an IMU. The horizontal projection component of the IMU is the acceleration in the forward direction of the vehicle The formula can be expressed as:

[0122] In formula (13), the is the accelerometer zero offset. Since the accelerometer zero offset is usually small, the difference in consistency caused by the accelerometer zero offset can be ignored compared with the difference in consistency caused by the difference between the reverse installation angle and the correct installation angle. Therefore, when verifying the acceleration consistency, the accelerometer zero offset can be ignored, and formula (13) is converted to the following formula:

[0123] The acceleration in the forward direction of the vehicle determined according to the GNSS data The formula can be expressed as:

[0124] In formula (15), Δt is the time interval of the velocity data of two adjacent GNSS outputs. When the vehicle-mounted device runs the navigation application program, the navigation application program can obtain the detection data of the GNSS. i and υ i+1 are two adjacent velocity data output by the GNSS chip.

[0125] The above two angles determined are respectively brought into formula (14) to obtain two results. The two results are compared with the calculation result of formula (15) respectively, and the angle corresponding to the result closest to the result is determined as the installation angle.

[0126] Specifically, the deviation function Cost of and can be constructed. Cost is used to measure the consistency of and , that is, to measure the closeness of and . Cost can be determined by the following formula:

[0127] The purpose of the summation in formula (16) is to accumulate multiple groups of calculation values in the first time period, so as to avoid the selection error of the installation angle caused by the large accidental error when only using a single group of difference values.

[0128] After the first alternative installation angle θ1 is brought into formula (16), a corresponding Cost1 is obtained, and after the second alternative installation angle θ2 is brought into formula (16), a corresponding Cost2 is obtained. The smaller the Cost is, the higher the consistency of and is. Therefore, when Cost1 is greater than Cost2, θ2 is the installation angle. When Cost2 is greater than Cost1, θ1 is the installation angle.

[0129] In another possible implementation, a deviation function Cost of and is constructed as follows:

[0130] The deviation function Cost in formula (17) characterizes the absolute value of the difference between the inertial acceleration and the GNSS acceleration. The larger the absolute value is, the worse the consistency is, and the smaller the absolute value is, the higher the consistency is.

[0131] After the first alternative installation angle θ1 is brought into formula (17), a corresponding Cost3 is obtained, and after the second alternative installation angle θ2 is brought into formula (17), a corresponding Cost4 is obtained. When Cost3 is greater than Cost4, θ2 is the positive installation angle, and θ1 is the negative installation angle. When Cost3 is less than Cost4, θ1 is the positive installation angle, and θ2 is the negative installation angle.

[0132] In summary, the technical scheme provided by the embodiments of the present disclosure determines the loss function according to the relationship between the lateral acceleration of the vehicle and the installation angle, so as to minimize the loss value calculated by the loss function, and therefore converts the solution of the installation angle into an optimization problem. That is, when the function value of the loss function is the smallest, the lateral acceleration of the vehicle is close to zero, and the corresponding angle value includes the installation angle to be solved. Further, the present scheme can determine the correct installation angle based on the consistency of the inertial acceleration and the GNSS acceleration in the forward direction of the vehicle, and can avoid the problem of the installation angle appearing in the reverse direction.

[0133] In addition, when minimizing the loss value calculated by the loss function, the lateral acceleration of the vehicle can be minimized, for example, close to zero. The vertical angular velocity is introduced in the loss function, so that the installation angle can be accurately determined not only when the vehicle is driving straight, but also when the vehicle is turning. The influence of the centrifugal acceleration of the turning on the detection result is considered. Therefore, the present scheme can also accurately determine the installation angle when the vehicle is turning, and has high practicability.

[0134] Further, the data utilized in the present disclosure is the detection data of the accelerometer and gyroscope of the IMU, and the detection data of the GNSS. The detection data of other sensors such as the magnetometer is not relied on. This is because the present disclosure also takes into account the relative stability of the data source. If the data of the magnetometer is utilized, due to the different placement positions of the mobile phone in the vehicle, the hard magnetic interference and soft magnetic interference received are unknown, and thus the reliability of the magnetometer data is poor, and a large error is easily caused in the detection result. The detection data of the accelerometer and gyroscope of the IMU utilized in the present disclosure is from the accelerometer and gyroscope respectively, and is not easily affected by external environmental interference, and thus the present solution has high reliability.

[0135] Based on the method for determining the installation angle of the mobile device provided in the above embodiments, the present disclosure also provides a device for determining the installation angle of the mobile device, which will be specifically described below with reference to the accompanying drawings.

[0136] Referring to FIG. 7, it is a schematic diagram of the device for determining the installation angle of the mobile device provided in an embodiment of the present disclosure.

[0137] The device 70 for determining the installation angle of the mobile device comprises a first determining unit 71, a second determining unit 72, a third determining unit 73, and an installation angle determining unit 74.

[0138] The first determining unit 71 is configured to take the component of the acceleration data output by the accelerometer in the horizontal direction, the vertical direction angular velocity determined according to the angular velocity data output by the gyroscope, and the speed of the vehicle forward direction determined based on the speed data output by the GNSS chip as the known quantity of the loss function, take the installation angle of the mobile device and the vehicle as the variable of the loss function, and determine the candidate installation angle by taking the loss value calculated by minimizing the loss function as the target.

[0139] The loss function is used to represent the relationship between the lateral acceleration of the vehicle and the installation angle, and the minimum value of the loss function corresponds to two candidate installation angles, one of which is the correct installation angle, and the other is the reverse installation angle.

[0140] The horizontal direction is perpendicular to the direction of gravity.

[0141] The installation angle is the included angle between the heading angle of the mobile device and the forward direction of the vehicle.

[0142] The second determining unit 72 is configured to determine the GNSS acceleration in the forward direction of the vehicle based on the speed data output by the GNSS chip.

[0143] The third determining unit 73 is configured to determine the inertial navigation acceleration corresponding to each candidate installation angle in the forward direction of the vehicle according to each candidate installation angle and the component of the acceleration data output by the accelerometer in the horizontal direction.

[0144] The installation angle determination unit 74 is configured to determine the installation angle from the candidate installation angles based on a difference between the inertial navigation acceleration corresponding to the vehicle forward direction and the GNSS acceleration.

[0145] The time of the acceleration data output by the accelerometer, the time of determining the angular velocity in the vertical direction according to the angular velocity data output by the gyroscope, the time of determining the speed of the vehicle forward direction based on the speed data output by the GNSS chip, and the time of calculating the GNSS acceleration are in the same time window.

[0146] Referring to FIG. 8, a schematic diagram of a device for determining the installation angle of a mobile device according to another embodiment of the present disclosure is provided.

[0147] The first determination unit 71 in FIG. 8 specifically includes a gravity direction determination subunit 711, a component determination subunit 712, a lateral acceleration determination subunit 713, a loss function determination subunit 714, and a candidate installation angle determination subunit 715.

[0148] The gravity direction determination subunit 711 is configured to determine the gravity direction according to the average value of the detection data of the accelerometer.

[0149] The component determination subunit 712 is configured to determine the component of the acceleration data output by the accelerometer in the horizontal direction according to the gravity direction, and determine the angular velocity in the vertical direction according to the gravity direction and the detection data of the gyroscope.

[0150] The lateral acceleration determination subunit 713 is configured to determine the relationship between the lateral acceleration of the vehicle and the installation angle according to the component of the acceleration data output by the accelerometer in the horizontal direction and the angular velocity in the vertical direction.

[0151] The loss function determination subunit 714 is configured to determine the loss function according to the relationship between the lateral acceleration of the vehicle and the installation angle.

[0152] The candidate installation angle determination subunit 715 is configured to determine the candidate installation angle by taking the loss value calculated by minimizing the loss function as the target.

[0153] In a possible implementation, the candidate installation angle determination subunit 715 is specifically configured to determine more than two installation angle values from a preset angle value range of the installation angle; and for each installation angle value, perform the following steps: substitute the installation angle value into the loss function in sequence to obtain a function value; and determine the installation angle values corresponding to two local minimum function values from the obtained more than two function values as the first candidate installation angle and the second candidate installation angle.

[0154] In another possible implementation, the alternative installation angle determining subunit 715 is specifically configured to determine two or more initial angle values from the preset installation angle value range; determine the opposite directions of the gradients corresponding to the loss function at the plurality of initial angle values; determine the angle values used by the gradient descent method in the next iteration according to the preset step length, and iterate in each opposite direction until two local minimum function values of the loss function are determined; and determine the angle values corresponding to the two local minimum function values as the first alternative installation angle and the second alternative installation angle.

[0155] Optionally, when the iteration number of the gradient descent method is in a first number interval, the preset step length is a first angle; and when the iteration number of the gradient descent method is in a second number interval, the preset step length is a second angle, the first number interval is smaller than the second number interval, and the first angle is greater than the second angle. That is, the preset step length can gradually decrease with the increase of the iteration number, so as to reduce the iteration number and make the determined installation angle more accurate.

[0156] In addition, the installation angle value range of the mobile device is divided into two or more angle value ranges, and the probability of the installation angle of the mobile device being in a first angle value range and a second angle value range of the two or more angle value ranges is greater than the probability of the installation angle being in other angle value ranges of the two or more angle value ranges. Among the plurality of initial angle values, at least one initial angle value is in the first angle value range, and at least one initial angle value is in the second angle value range. This implementation can improve the convergence speed of the gradient descent method, and thus improve the speed of determining the installation angle.

[0157] The installation angle determining unit 74 determines the first alternative installation angle as the installation angle when the absolute value of the difference between the inertial navigation acceleration corresponding to the vehicle forward direction and the GNSS acceleration of the first alternative installation angle is greater than the absolute value of the difference between the inertial navigation acceleration corresponding to the vehicle forward direction and the GNSS acceleration of the second alternative installation angle, and otherwise determines the second alternative installation angle as the installation angle. For details, refer to the above formula (17), which will not be described here again.

[0158] The device provided by the embodiment of the present disclosure converts the solution of the installation angle into an optimization problem, reduces the difficulty of solving the installation angle, can determine the correct installation angle, and avoids the problem of reverse installation angle. In addition, because the angular velocity in the vertical direction is introduced into the loss function, the installation angle can also be accurately determined when the vehicle is turning, and has high practicability. In addition, the detection data sources of the accelerometer and the gyroscope of the IMU used by the scheme are the accelerometer and the gyroscope, respectively, and are not easy to be disturbed by the external environment, so the scheme has high reliability.

[0159] Based on the method for determining the installation angle of the mobile device provided in the above embodiments, the disclosure further provides a mobile device, which is specifically described below with reference to the accompanying drawings.

[0160] Referring to FIG. 9, it is a schematic diagram of a mobile device provided by the disclosure.

[0161] The mobile device 200 includes a bus 2001, a processor 2002, a communication structure 2003, a memory 2004, an IMU 2005, a wireless communication module and a wireless communication antenna 2006.

[0162] The mobile device 200 can be a mobile phone, a tablet computer or other device capable of running a navigation application.

[0163] The processor 2002, the memory 2004 and the communication interface 2003 communicate through the bus 2001.

[0164] The bus 2001 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (ESIA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of identification, only one bus is used in FIG. 9, but it does not mean that only one bus or only one type of bus is included.

[0165] The communication interface 2003 can be used for external communication.

[0166] The memory 2004 is used to store program codes, and the program is run by the processor 2002 to realize the method for determining the installation angle of the mobile device.

[0167] The IMU 2005 includes a three-axis accelerometer and multiple gyroscopes. The accelerometer is used to obtain acceleration data of the vehicle. The gyroscope is used to obtain the steering state of the vehicle.

[0168] The wireless communication module and the wireless communication antenna 2006 can provide a GNSS wireless communication solution applied to a mobile phone, so that the processor 2002 obtains GNSS data. The GNSS data can include position data, speed data and time data, etc.

[0169] The disclosure further provides a computer program product, which includes a computer program that is executed by a processor to realize the method for determining the installation angle of the mobile device in the above embodiments.

[0170] The embodiment of the present disclosure further provides a storage medium, which has a computer program stored thereon, and the computer program is executed by a processor to realize the method for determining the installation angle of the mobile device in the above embodiment.

[0171] The readable medium includes permanent and non-permanent, removable and non-removable media, and can realize information storage by any method or technology. The information can be computer readable instructions, data structures, program modules or other data. Examples of the storage medium of the computer include, but are not limited to, Parameter Random Access Memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other memory technologies.

[0172] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "multiple" means two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural.

[0173] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. The above-described device embodiments are only illustrative, and the units and modules described as separate components can be or can not be physically separated. In addition, part or all of the units and modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.

[0174] The above is only a specific embodiment of the present disclosure, and it should be noted that for those skilled in the art, without departing from the principles of the present disclosure, a number of improvements and refinements can be made, which should be considered as the protection scope of the present disclosure.

Claims

1. A method for determining the mounting angle of a mobile device, wherein, The mobile device is placed on a vehicle, and the mobile device is equipped with a three-axis accelerometer, a gyroscope, and a GNSS chip. The method includes: The horizontal component of the acceleration data output by the triaxial accelerometer, the vertical angular velocity determined based on the angular velocity data output by the gyroscope, and the vehicle's forward velocity determined based on the velocity data output by the GNSS chip are used as known quantities in the loss function. The installation angle of the mobile device is used as a variable in the loss function. The goal is to minimize the loss value calculated by the loss function to determine the alternative installation angle. Based on the speed data output by the GNSS chip, the GNSS acceleration in the vehicle's forward direction is determined; Based on the candidate installation angle and the horizontal component of the acceleration data output by the triaxial accelerometer, the inertial navigation acceleration corresponding to the candidate installation angle in the vehicle's forward direction is determined. The installation angle is determined from the candidate installation angles based on the difference between the inertial navigation acceleration and the GNSS acceleration corresponding to the vehicle's forward direction at the candidate installation angles. The time for the acceleration data output by the triaxial accelerometer, the time for determining the vertical angular velocity based on the angular velocity data output by the gyroscope, the time for determining the vehicle's forward velocity based on the velocity data output by the GNSS chip, and the calculation time for the GNSS acceleration all fall within the same time window.

2. The method according to claim 1, wherein, The candidate installation angles include a first candidate installation angle and a second candidate installation angle. Determining the installation angle from the candidate installation angles based on the difference between the inertial navigation acceleration and the GNSS acceleration corresponding to the candidate installation angle in the vehicle's forward direction includes: When the absolute value of the difference between the inertial acceleration and the GNSS acceleration corresponding to the first candidate installation angle in the vehicle's forward direction is greater than the absolute value of the difference between the inertial acceleration and the GNSS acceleration corresponding to the second candidate installation angle in the vehicle's forward direction, the first candidate installation angle is determined as the installation angle; otherwise, the second candidate installation angle is determined as the installation angle.

3. The method according to claim 2, wherein, The process of determining alternative installation angles with the objective of minimizing the loss value calculated by the loss function includes: From the preset range of installation angle values, determine two or more installation angle values; For each of the aforementioned installation angle values, the following steps are performed: Substitute the installation angle values ​​into the loss function sequentially to obtain the function value; The installation angle values ​​corresponding to the two local minimum function values ​​among the two or more obtained function values ​​are determined as the first alternative installation angle and the second alternative installation angle.

4. The method according to claim 2, wherein, The process of determining alternative installation angles with the objective of minimizing the loss value calculated by the loss function includes: Within the preset range of installation angle values, determine two or more initial angle values; Determine the opposite direction of the gradient of the loss function for each initial angle value; According to the preset step size, determine the angle value used in the next iteration of the gradient descent method, and iterate in the corresponding opposite direction until the two local minimum function values ​​of the loss function are determined. The angle values ​​corresponding to the two local minimum function values ​​are determined as the first alternative installation angle and the second alternative installation angle.

5. The method according to claim 4, wherein, When the number of iterations of the gradient descent method is in the first interval, the preset step size is the first angle; when the number of iterations of the gradient descent method is in the second interval, the preset step size is the second angle, the first interval is smaller than the second interval, and the first angle is larger than the second angle.

6. The method according to any one of claims 3-5, characterized in that, The preset installation angle range includes at least a preset first angle range and a preset second angle range; The two or more initial angle values ​​include at least one initial angle value that falls within the range of the first angle value and at least one initial angle value that falls within the range of the second angle value.

7. The method according to any one of claims 1-6, wherein, The loss function is used to characterize the lateral acceleration of the vehicle, and the loss function is determined through the following steps: Based on the direction of gravity, determine the horizontal component of the acceleration data output by the triaxial accelerometer; The angular velocity in the vertical direction is determined based on the direction of gravity and the angular velocity data output by the gyroscope. Based on the horizontal component of the acceleration data output by the triaxial accelerometer and the vertical angular velocity, the relationship between the lateral acceleration of the vehicle and the mounting angle is determined. The loss function is determined based on the relationship between the vehicle's lateral acceleration and the mounting angle.

8. A device for determining the mounting angle of a mobile device, wherein, Integrated into a mobile device, the mobile device is equipped with a three-axis accelerometer, a gyroscope and a GNSS chip, the device includes: a first determining unit, a second determining unit, a third determining unit and an installation angle determining unit; The first determining unit is used to take the horizontal component of the acceleration data output by the triaxial accelerometer, the vertical angular velocity determined based on the angular velocity data output by the gyroscope, and the vehicle's forward velocity determined based on the velocity data output by the GNSS chip as known quantities in the loss function, and the installation angle between the mobile device and the vehicle as variables in the loss function, with the goal of minimizing the loss value calculated by the loss function, to determine the candidate installation angle; The second determining unit is used to determine the GNSS acceleration in the direction of vehicle movement based on the speed data output by the GNSS chip; The third determining unit is used to determine the inertial navigation acceleration corresponding to each of the candidate installation angles in the vehicle's forward direction based on the horizontal component of the acceleration data output by the triaxial accelerometer. The installation angle determination unit is used to determine the installation angle from the candidate installation angles based on the difference between the inertial navigation acceleration and the GNSS acceleration corresponding to the candidate installation angle in the vehicle's forward direction. The time for the acceleration data output by the triaxial accelerometer, the time for determining the vertical angular velocity based on the angular velocity data output by the gyroscope, the time for determining the vehicle's forward velocity based on the velocity data output by the GNSS chip, and the calculation time for the GNSS acceleration all fall within the same time window.

9. A mobile device, wherein, The mobile device includes: a three-axis accelerometer, a gyroscope, a GNSS chip, a processor, and a memory; The triaxial accelerometer is used to detect and output acceleration data; The gyroscope is used to detect and output angular velocity data; The GNSS chip is used to detect and output positioning satellite-related data; The memory is used to store a program, which, when executed by the processor, performs the method for determining the installation angle of the mobile device as described in any one of claims 1-7.

10. A storage medium, wherein, The storage medium stores a computer program, which, when executed, implements the method for determining the installation angle of a mobile device as described in any one of claims 1-7.

11. A computer program product, wherein, Includes a computer program, which, when executed by a processor, implements the method for determining the installation angle of a mobile device as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and system for determining the pointing angle of a moving object

    CN110244292A

  • Method for estimating installation angle of mobile phone

    CN110986941A

  • Method for determining equipment installation angle and vehicle-mounted terminal

    CN112525143A

  • Array type POS installation deviation angle calibration method based on acceleration matching

    CN114993242A

  • Positioning method and device of movable mechanism, medium and electronic equipment

    CN117537807A