Equipment attitude data processing method, system and device, equipment and storage medium
By obtaining the IMU and magnetic data of the terminal device, determining the coordinate conversion coefficient and performing coordinate conversion, the problem of inconsistent coordinate systems of different devices is solved, the conversion efficiency and accuracy of multi-device posture data is improved, and the user experience of the terminal device is improved.
Patent Information
- Application Number
- CN202411975289.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-29
AI Technical Summary
The coordinate systems of the inertial measurement units (IMUs) and magnetometers of different devices are different, which leads to difficulty in converting and alignment of the coordinate system, high error rate, and it is difficult to obtain accurate equipment attitude data under the target coordinate system when multi-device attitude linkage and coordinate control.
By obtaining the IMU data and magnetic data of the terminal device under the coordinate system of its own equipment, determining the coordinate conversion coefficients of the coordinate system conversion, and converting the data according to these coefficients, obtaining the target IMU data and target magnetic data under the target coordinate system, and finally determining the target 3DoF posture of the terminal device under the target coordinate system.
It improves the conversion efficiency and accuracy of device attitude data in the target coordinate system, solves the problem of coordinate conversion in multi-device attitude linkage and coordinated control, and improves the user's experience of using terminal devices.
Smart Images

Figure CN119901287A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, system, device, equipment and storage medium for processing device posture data. Background Art
[0002] With the rapid development of smart devices, more and more devices are integrating inertial measurement units (IMU) and magnetometers. IMU can provide acceleration and angular velocity data of the device, and magnetometer can be used to provide magnetic field information of the device. By fusing IMU data and magnetic data, the 3 degrees of freedom (3DoF) attitude information of the device in the earth coordinate system can be obtained.
[0003] At present, although smart devices can independently calculate their posture information, there are still great difficulties in the coordination and interaction between devices. For example, the IMU and magnetometer coordinate systems of different devices are different. Therefore, when the information of multiple devices is linked and collaboratively controlled, their coordinate systems must be unified. Then, the device posture in the same coordinate system can be obtained to facilitate multi-device posture linkage and collaborative control. However, it is difficult and large to convert and align the coordinates of each device, and the error rate is high, which makes it difficult for the device to obtain accurate posture data in the target coordinate system. In order to improve the efficiency of multi-device posture linkage and collaborative control, the device posture is generally converted to the same target coordinate in advance.
[0004] Therefore, how to convert the posture data of the terminal device in the device coordinate system into the posture data in the target coordinate system is a problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of this application is to provide a device posture data processing method, system, device, equipment and storage medium, aiming to improve the efficiency and accuracy of converting posture data to posture data in a target coordinate system.
[0006] In a first aspect, the present application provides a method for processing device posture data, the method comprising the following steps:
[0007] Obtaining IMU data and magnetic data of the terminal device in its own device coordinate system, and determining a coordinate conversion coefficient for coordinate system conversion based on the IMU data and the magnetic data;
[0008] Performing coordinate transformation on the IMU data and magnetic data according to the coordinate transformation coefficient to obtain target IMU data and target magnetic data in a target coordinate system;
[0009] The target 3DoF posture of the terminal device in the target coordinate system is determined based on the target IMU data and the target magnetic data.
[0010] In a second aspect, the present application further provides a device posture data processing system, the device posture data processing system comprising a central control device and a plurality of terminal devices, the central control device being communicatively connected with each of the terminal devices, wherein:
[0011] The terminal device is used to obtain the IMU data and magnetic data of each device in its own device coordinate system, and send the IMU data and the magnetic data to the central control device;
[0012] The central control device is used to obtain IMU data and magnetic data of each terminal device;
[0013] The central control device is also used to determine the target 3DoF posture of each terminal device in the target coordinate system based on the IMU data and magnetic data of each terminal device.
[0014] In a third aspect, the present application further provides a device posture data processing apparatus, the device posture data processing apparatus comprising an acquisition module, a generation module and a determination module, wherein:
[0015] The acquisition module is used to acquire the IMU data and magnetic data of the terminal device in its own device coordinate system;
[0016] The determination module is used to determine the coordinate conversion coefficient of the coordinate system conversion according to the IMU data and the magnetic data;
[0017] The generating module is used to perform coordinate conversion on the IMU data and magnetic data according to the coordinate conversion coefficient to obtain target IMU data and target magnetic data in a target coordinate system;
[0018] The determination module is also used to determine the target 3DoF posture of the terminal device in the target coordinate system based on the target IMU data and the target magnetic data.
[0019] In a fourth aspect, the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the device posture data processing method as described above are implemented.
[0020] In a fifth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the device posture data processing method as described above are implemented.
[0021] The present application provides a device attitude data processing method, system, device, equipment and storage medium. The present application obtains the IMU data and magnetic data of the terminal device in its own device coordinate system, and determines the coordinate conversion coefficient of the coordinate system conversion according to the IMU data and magnetic data; then the IMU data and magnetic data are coordinate-converted according to the coordinate conversion coefficient to obtain the target IMU data and target magnetic data in the target coordinate system; then the target 3DoF attitude of the terminal device in the target coordinate system is determined according to the target IMU data and target magnetic data. In the present application, the coordinate conversion coefficient of the coordinate system conversion is determined by the IMU data and magnetic data, and the IMU data and magnetic data of the terminal device are coordinate-converted based on the coordinate conversion coefficient, so that the target IMU data and target magnetic data in the target coordinate system can be accurately obtained. After the target IMU data and target magnetic data are attitude-converted, the target 3DoF attitude in the unified target coordinate system can be obtained, so as to improve the data accuracy of the 3DoF attitude, thereby greatly improving the user's experience of using the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 A schematic diagram of a process flow of a device posture data processing method provided in an embodiment of the present application;
[0024] Figure 2 for Figure 1 A schematic diagram of the sub-step flow chart of the device posture data processing method in FIG.
[0025] Figure 3 A schematic block diagram of a device posture data processing system provided for implementing this embodiment;
[0026] Figure 4 A schematic block diagram of a device posture data processing apparatus provided in an embodiment of the present application;
[0027] Figure 5 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application.
[0028] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0031] With the rapid development of smart devices, more and more devices are integrating inertial measurement units (IMU) and magnetometers. IMU can provide acceleration and angular velocity data of the device, and magnetometer can be used to provide magnetic field information of the device. By fusing IMU data and magnetic data, the 3 degrees of freedom (3DoF) attitude information of the device in the earth coordinate system can be obtained.
[0032] At present, although smart devices can independently calculate their posture information, there are still great difficulties in the coordination and interaction between devices. For example, the IMU and magnetometer coordinate systems of different devices are different. Therefore, when the information of multiple devices is linked and collaboratively controlled, their coordinate systems must be unified. Then, the device posture in the same coordinate system can be obtained to facilitate multi-device posture linkage and collaborative control. However, it is difficult and large to convert and align the coordinates of each device, and the error rate is high, which makes it difficult for the device to obtain accurate posture data in the target coordinate system. In order to improve the efficiency of multi-device posture linkage and collaborative control, the device posture is generally converted to the same target coordinate in advance.
[0033] To solve the above problems, the embodiments of the present application provide a device attitude data processing method, system, apparatus, device and storage medium. The device attitude data processing method includes obtaining IMU data and magnetic data of the terminal device in its own device coordinate system, and determining the coordinate conversion coefficient of the coordinate system conversion according to the IMU data and the magnetic data; performing coordinate conversion on the IMU data and the magnetic data according to the coordinate conversion coefficient to obtain target IMU data and target magnetic data in the target coordinate system; and determining the target 3DoF attitude of the terminal device in the target coordinate system according to the target IMU data and the target magnetic data.
[0034] Among them, the terminal device can be AR glasses, AR helmets, VR glasses, smart rings, smart watches, smart bracelets, mobile phones, drones, gimbals and other devices.
[0035] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0036] Please refer to Figure 1 , Figure 1 A flowchart of a method for processing device posture data provided in an embodiment of the present application.
[0037] like Figure 1 As shown, the device posture data processing method includes steps S101 to S103.
[0038] Step S101, obtaining IMU data and magnetic data of the terminal device in its own device coordinate system, and determining the coordinate conversion coefficient of the coordinate system conversion based on the IMU data and the magnetic data.
[0039] Among them, the terminal device is provided with an inertial measurement unit (IMU) and a magnetometer, the IMU is used to collect IMU data of the terminal device, the IMU data includes acceleration data and angular velocity data, and the magnetometer is used to collect magnetic data of the terminal device.
[0040] In some embodiments, when a posture acquisition instruction is received, the IMU and the magnetometer are started according to the posture acquisition instruction, and the IMU data and the magnetic data collected by the IMU and the magnetic data collected by the magnetometer are used to obtain the IMU data and the magnetic data. The IMU data and the magnetic data of the terminal device can be accurately collected by the IMU and the magnetometer.
[0041] It should be noted that the IMU data and magnetic data are the IMU data and magnetic data of the terminal device in its own device coordinate system. It can be understood that the IMU data and magnetic data are coordinate systems established with the terminal device coordinate origin, that is, each terminal device establishes a coordinate system with itself as the origin, and collects IMU data and magnetic data. Therefore, the IMU data and magnetic data of terminal devices in different positions are in different coordinate systems.
[0042] In some embodiments, when multiple terminal devices need to perform posture control and coordination, the posture data of the terminal devices are unified into the same target coordinate system. When multiple terminal devices do not need to perform posture control and coordination, the posture data of the terminal devices are not unified into the same target coordinate system to save the computing power of the terminal devices and reduce energy consumption. In other embodiments, when the computing power resources of the terminal devices are sufficient, the posture data of the terminal devices are unified into the same target coordinate system, so that when multiple terminal devices need to perform posture control and coordination, the posture data in the same target coordinate system can be directly used to improve the efficiency of posture control and coordination of multiple terminal devices.
[0043] It should be noted that the generation of the posture collection instruction can be set according to actual conditions, and the embodiment of the present application does not make specific limitations on this. For example, upon receiving a data collection instruction triggered by a user, a posture collection instruction is generated.
[0044] In some embodiments, Figure 2 As shown, step S101 includes sub-steps S1011 to S1012.
[0045] Sub-step S1011: fusing the IMU data and the magnetic data through a preset AHRS algorithm to obtain an initial 3DoF posture.
[0046] The preset AHRS algorithm may be selected according to actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the preset AHRS algorithm may be a complementary filter or a Kalman filter. The initial 3DoF attitude includes roll data, pitch data, and yaw data.
[0047] In some embodiments, the direction of the earth's magnetic field is set as the initial direction, the IMU data and the magnetic data are fused through complementary filtering to obtain attitude parameters, and the attitude of the terminal device is updated according to the attitude parameters to obtain the initial 3DoF attitude. By fusing the IMU data and the magnetic data through the complementary filtering algorithm, the initial 3DoF attitude of the terminal device can be accurately obtained.
[0048] It should be noted that the method of fusing IMU data and magnetic data through complementary filtering to obtain attitude parameters is an existing conventional technical means, and the embodiments of the present application will not go into details about this.
[0049] In some embodiments, the direction of the earth's magnetic field is set as the initial direction, the IMU data and the magnetic data are fused through Kalman filtering to obtain attitude parameters, and the attitude of the terminal device is updated according to the attitude parameters to obtain the initial 3DoF attitude. By fusing the IMU data and the magnetic data through Kalman filtering, the initial 3DoF attitude of the terminal device can be accurately obtained.
[0050] Sub-step S1012: determining the coordinate conversion coefficients of the coordinate system conversion according to the initial 3DoF posture.
[0051] The coordinate conversion coefficient is a 3*3 matrix.
[0052] In some embodiments, the initial 3DoF posture is converted into a matrix representation in a target coordinate system to obtain a target matrix, and the target matrix is used as a coordinate conversion coefficient. By converting the initial 3DoF posture into a matrix representation in a target coordinate system, the coordinate conversion coefficient can be accurately obtained.
[0053] In some embodiments, the initial 3DoF posture is converted into a matrix representation in a target coordinate system. The target matrix can be obtained by obtaining the target coordinate system, and obtaining the rotation angle between the device coordinate system and the target coordinate system, and rotating the matrix of the initial 3DoF posture according to the rotation angle to obtain the target matrix.
[0054] Exemplarily, the northeast celestial coordinate system is used as the target coordinate system, the rotation deflection of the device coordinate system and the target coordinate system is obtained, and the matrix of the initial 3DoF posture is rotated according to the rotation deflection to obtain the target matrix, and the target matrix is used as the coordinate conversion coefficient.
[0055] Step S102: performing coordinate transformation on the IMU data and magnetic data according to the coordinate transformation coefficient to obtain target IMU data and target magnetic data in a target coordinate system.
[0056] In some embodiments, the coordinate conversion coefficient and the IMU data are matrix multiplied to obtain the target IMU data; the coordinate conversion coefficient and the magnetic data are matrix multiplied to obtain the target magnetic data. By calculating the IMU data and the magnetic data respectively through the coordinate conversion coefficient, the target IMU data and the target magnetic data in the target coordinate system can be accurately obtained, which greatly improves the efficiency and accuracy of data unification.
[0057] Exemplarily, a preset coordinate statistical formula is obtained, and the preset coordinate statistical formula is Z=A*S, wherein Z is the target IMU data or target magnetic data in the target coordinate system, A is the coordinate conversion coefficient, and S is the IMU data or magnetic data in the device coordinate system. Based on the preset coordinate statistical formula, a matrix multiplication operation is performed on the coordinate conversion coefficient and the IMU data to obtain the target IMU data; and a matrix multiplication operation is performed on the coordinate conversion coefficient and the magnetic data to obtain the target magnetic data.
[0058] Step S103: Determine the target 3DoF posture of the terminal device in the target coordinate system according to the target IMU data and the target magnetic data.
[0059] It should be noted that the target 3DoF posture is the posture information in the target coordinate system.
[0060] In some embodiments, the target IMU data and the target magnetic data are fused by a preset AHRS algorithm to obtain the target 3DoF posture of the terminal device in the target coordinate system. The IMU data and the magnetic data are converted by the coordinate conversion coefficient to obtain the target IMU data and the target magnetic data in the target coordinate system. The target IMU data and the target magnetic data are fused based on the preset AHRS algorithm to accurately obtain the target 3DoF posture of the terminal device in the target coordinate system. This allows the various terminal devices to be compared and linked.
[0061] Exemplarily, the target IMU data and the target magnetic data are fused by complementary filtering to obtain the target attitude parameters, and the attitude of the terminal device is updated according to the target attitude parameters to obtain the target 3DoF attitude. By fusing the target IMU data and the target magnetic data by the complementary filtering algorithm, the target 3DoF attitude of the terminal device can be accurately obtained.
[0062] In some embodiments, the target IMU data and the target magnetic data are fused by Kalman filtering to obtain the target attitude parameters, and the attitude of the terminal device is updated according to the target attitude parameters to obtain the target 3DoF attitude. By fusing the IMU data and the magnetic data by Kalman filtering, the target 3DoF attitude of the terminal device can be accurately obtained.
[0063] It should be noted that the method of fusing the target IMU data and the target magnetic data through complementary filtering and / or Kalman filtering to obtain the attitude parameters is an existing conventional technical means, and the embodiments of the present application will not go into details about this.
[0064] The device attitude data processing method provided in the above embodiment obtains the IMU data and magnetic data of the terminal device in the coordinate system of its own device, and determines the coordinate conversion coefficient of the coordinate system conversion based on the IMU data and the magnetic data; then the IMU data and the magnetic data are coordinate-converted according to the coordinate conversion coefficient to obtain the target IMU data and the target magnetic data in the target coordinate system; then the target 3DoF attitude of the terminal device in the target coordinate system is determined according to the target IMU data and the target magnetic data. In this application, the coordinate conversion coefficient of the coordinate system conversion is determined by the IMU data and the magnetic data, and the IMU data and the magnetic data of the terminal device are coordinate-converted based on the coordinate conversion coefficient, so that the target IMU data and the target magnetic data in the target coordinate system can be accurately obtained. After the target IMU data and the target magnetic data are attitude-converted, the target 3DoF attitude in the unified target coordinate system can be obtained, so as to improve the data accuracy of the 3DoF attitude, thereby greatly improving the user's experience of using the terminal device.
[0065] See also Figure 3 , Figure 3 A schematic block diagram of a device posture data processing system provided in an embodiment of the present application.
[0066] like Figure 3 As shown, the device posture data processing system 200 includes a central control device 210 and a plurality of terminal devices 220, wherein the central control device 210 is in communication connection with each of the terminal devices 220, wherein:
[0067] The terminal device 220 is used to obtain the IMU data and magnetic data of each device in its own device coordinate system, and send the IMU data and the magnetic data to the central control device;
[0068] The central control device 210 is used to obtain IMU data and magnetic data of each terminal device;
[0069] The central control device 210 is further used to determine the target 3DoF posture of each of the terminal devices in the same coordinate system according to the IMU data and magnetic data of each of the terminal devices.
[0070] In some embodiments, when the terminal device receives the attitude acquisition instruction, it starts the IMU and the magnetometer according to the attitude acquisition instruction, obtains the IMU data and the magnetic data through the IMU data collected by the IMU and the magnetic data collected by the magnetometer, and sends the IMU data and the magnetic data to the central control device. The IMU data and the magnetic data of the terminal device can be accurately collected through the IMU and the magnetometer.
[0071] It should be noted that the central control device includes but is not limited to mobile phones, laptops, desktop computers, etc. The terminal device and the central control device establish a communication connection, and the communication connection method includes but is not limited to Bluetooth, WiFi, 5G communication connection, and 4G communication connection, etc.
[0072] In some embodiments, after acquiring the IMU data and magnetic data of each terminal device, the coordinate conversion coefficient of the coordinate system conversion of each terminal device is determined based on the IMU data and magnetic data of the terminal device; the respective IMU data and magnetic data are coordinate-converted according to the coordinate conversion coefficient of each terminal device to obtain the target IMU data and target magnetic data of each terminal device in the target coordinate system; the target 3DoF posture of each terminal device is determined based on the target IMU data and target magnetic data of each terminal device.
[0073] It should be noted that the specific implementation process of the central control device determining the target 3DoF posture of each terminal device can refer to the aforementioned device posture data processing method, and this embodiment will not be described in detail here.
[0074] In some embodiments, the terminal device obtains its own target 3DoF posture and the target 3DoF posture of other terminal devices, determines the relative relationship between the postures of the devices based on its own target 3DoF posture and the target 3DoF posture of other terminal devices, and generates a control strategy based on the relative relationship between the postures of the devices. By obtaining the target 3DoF posture of other terminal devices, the efficiency and accuracy of linkage control can be effectively improved.
[0075] Exemplarily, terminal device 1 obtains its own first target 3DoF posture and obtains the second target 3DoF posture of terminal device 2, determines the relative position relationship between terminal device 1 and terminal device 2 based on the first target 3DoF posture and the second target 3DoF posture, and generates a movement instruction, which is used to instruct terminal device 1 to prevent terminal device 1 from colliding with terminal device 2.
[0076] Exemplarily, the central control device determines the coordinate conversion coefficient of the coordinate system conversion of each terminal device based on the IMU data and magnetic data of each terminal device; performs coordinate conversion on each IMU data and magnetic data according to the coordinate conversion coefficient of each terminal device to obtain the target IMU data and target magnetic data of each terminal device in the target coordinate system; determines the target 3DoF posture of each terminal device based on the target IMU data and target magnetic data of each terminal device. In a scenario where each terminal device needs to maintain the same posture, the rotation strategy of each terminal device is determined based on the target 3DoF posture of each terminal device to keep the posture of each terminal device consistent, thereby greatly improving the linkage efficiency and accuracy of each terminal device.
[0077] See also Figure 4 , Figure 4 A schematic block diagram of a device posture data processing apparatus provided in an embodiment of the present application.
[0078] like Figure 4 As shown, the device posture data processing apparatus 300 includes an acquisition module 310, a generation module 320 and a determination module 330, wherein:
[0079] The acquisition module 310 is used to acquire the IMU data and magnetic data of the terminal device in its own device coordinate system;
[0080] The determination module 320 is used to determine the coordinate conversion coefficient of the coordinate system conversion according to the IMU data and the magnetic data;
[0081] The generating module 330 is used to perform coordinate conversion on the IMU data and magnetic data according to the coordinate conversion coefficient to obtain target IMU data and target magnetic data in a target coordinate system;
[0082] The determination module 320 is further used to determine the target 3DoF posture of the terminal device in the target coordinate system based on the target IMU data and the target magnetic data.
[0083] In some embodiments, the determining module 320 is further configured to:
[0084] The IMU data and the magnetic data are fused by a preset AHRS algorithm to obtain an initial 3DoF posture;
[0085] The coordinate conversion coefficients of the coordinate system conversion are determined according to the initial 3DoF posture.
[0086] In some embodiments, the determining module 320 is further configured to:
[0087] The initial 3DoF posture is converted into a matrix representation in a target coordinate system to obtain a target matrix, and the target matrix is used as the coordinate conversion coefficient.
[0088] In some embodiments, the generating module 330 is further used to:
[0089] Performing a matrix multiplication operation on the coordinate conversion coefficient and the IMU data to obtain the target IMU data;
[0090] A matrix multiplication operation is performed on the coordinate conversion coefficient and the magnetic data to obtain the target magnetic data.
[0091] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned device posture data processing apparatus can refer to the corresponding process in the aforementioned device posture data processing method embodiment, and will not be repeated here.
[0092] See also Figure 5 , Figure 5 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application.
[0093] like Figure 5 As shown, the terminal device 400 includes a processor 402 and a memory 403 connected via a system bus 401, wherein the memory may include a storage medium and an internal memory.
[0094] The storage medium can store a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any device posture data processing method.
[0095] The processor 402 is used to provide computing and control capabilities to support the operation of the entire terminal device.
[0096] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any device posture data processing method.
[0097] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0098] It should be understood that the processor 402 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0099] In one embodiment, the processor 402 is used to run a computer program stored in the memory to implement the following steps:
[0100] Obtaining IMU data and magnetic data of the terminal device in its own device coordinate system, and determining a coordinate conversion coefficient for coordinate system conversion based on the IMU data and the magnetic data;
[0101] Performing coordinate transformation on the IMU data and magnetic data according to the coordinate transformation coefficient to obtain target IMU data and target magnetic data in a target coordinate system;
[0102] The target 3DoF posture of the terminal device in the target coordinate system is determined based on the target IMU data and the target magnetic data.
[0103] In one embodiment, when the processor 402 determines the coordinate conversion coefficient of the coordinate system conversion according to the IMU data and the magnetic data, it is used to implement:
[0104] The IMU data and the magnetic data are fused by a preset AHRS algorithm to obtain an initial 3DoF posture;
[0105] The coordinate conversion coefficients of the coordinate system conversion are determined according to the initial 3DoF posture.
[0106] In one embodiment, the processor 402, when implementing the determination of the coordinate conversion coefficient of the coordinate system conversion according to the initial 3DoF posture, is used to implement:
[0107] The initial 3DoF posture is converted into a matrix representation in a target coordinate system to obtain a target matrix, and the target matrix is used as the coordinate conversion coefficient.
[0108] In one embodiment, when the processor 402 performs coordinate conversion on the IMU data and magnetic data according to the coordinate conversion coefficient to obtain target IMU data and target magnetic data in the target coordinate system, it is used to implement:
[0109] Performing a matrix multiplication operation on the coordinate conversion coefficient and the IMU data to obtain the target IMU data;
[0110] A matrix multiplication operation is performed on the coordinate conversion coefficient and the magnetic data to obtain the target magnetic data.
[0111] It should be noted that technicians in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned device posture data processing method embodiment, and will not be repeated here.
[0112] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the device posture data processing method of the present application.
[0113] The computer-readable storage medium may be an internal storage unit of the terminal device described in the foregoing embodiment, such as a hard disk or memory of the terminal device. The computer-readable storage medium may be non-volatile or volatile. The computer-readable storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc., equipped on the terminal device.
[0114] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0115] It should also be understood that the term "and / or" used in the present specification refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0116] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application.
Claims
1. A method for processing device posture data, characterized in that: include: Obtaining IMU data and magnetic data of the terminal device in its own device coordinate system, and determining a coordinate conversion coefficient for coordinate system conversion based on the IMU data and the magnetic data; Performing coordinate transformation on the IMU data and magnetic data according to the coordinate transformation coefficient to obtain target IMU data and target magnetic data in a target coordinate system; The target 3DoF posture of the terminal device in the target coordinate system is determined based on the target IMU data and the target magnetic data.
2. The device posture data processing method according to claim 1, characterized in that: Determining the coordinate conversion coefficient of the coordinate system conversion according to the IMU data and the magnetic data includes: The IMU data and the magnetic data are fused by a preset AHRS algorithm to obtain an initial 3DoF posture; The coordinate conversion coefficients of the coordinate system conversion are determined according to the initial 3DoF posture.
3. The device posture data processing method according to claim 2, characterized in that: The determining the coordinate conversion coefficient of the coordinate system conversion according to the initial 3DoF posture includes: The initial 3DoF posture is converted into a matrix representation in a target coordinate system to obtain a target matrix, and the target matrix is used as the coordinate conversion coefficient.
4. The device posture data processing method according to claim 1, characterized in that: The step of performing coordinate conversion on the IMU data and the magnetic data according to the coordinate conversion coefficient to obtain target IMU data and target magnetic data in a target coordinate system includes: Performing a matrix multiplication operation on the coordinate conversion coefficient and the IMU data to obtain the target IMU data; A matrix multiplication operation is performed on the coordinate conversion coefficient and the magnetic data to obtain the target magnetic data.
5. A device posture data processing system, characterized in that: The device posture data processing system includes a central control device and a plurality of terminal devices, wherein the central control device is in communication connection with each of the terminal devices, wherein: The terminal device is used to obtain the IMU data and magnetic data of each device in its own device coordinate system, and send the IMU data and the magnetic data to the central control device; The central control device is used to obtain IMU data and magnetic data of each terminal device; The central control device is also used to determine the target 3DoF posture of each terminal device in the target coordinate system based on the IMU data and magnetic data of each terminal device.
6. The device posture data processing system according to claim 5, characterized in that: Determining the target 3DoF posture of each terminal device in the target coordinate system according to the IMU data and the magnetic data of each terminal device includes: Determine the coordinate conversion coefficients for coordinate system conversion of each terminal device according to the IMU data and magnetic data of the terminal device; Performing coordinate transformation on the respective IMU data and the magnetic data according to the coordinate transformation coefficient of each terminal device to obtain target IMU data and target magnetic data of each terminal device in a target coordinate system; According to the target IMU data and target magnetic data of each terminal device, the target 3DoF posture of each terminal device in the target coordinate system is determined.
7. The device posture data processing system according to claim 5, characterized in that: The terminal device is further used for: Receive the target 3DoF posture of each terminal device; Determine the relative relationship between the postures of the devices according to the target 3DoF posture of the device and the target 3DoF posture of the other terminal devices; A control strategy is generated according to the relative relationship between the postures of the devices.
8. A device posture data processing device, characterized in that: The device posture data processing device comprises an acquisition module, a generation module and a determination module, wherein: The acquisition module is used to acquire the IMU data and magnetic data of the terminal device in its own device coordinate system; The determination module is used to determine the coordinate conversion coefficient of the coordinate system conversion according to the IMU data and the magnetic data; The generating module is used to perform coordinate conversion on the IMU data and magnetic data according to the coordinate conversion coefficient to obtain target IMU data and target magnetic data in a target coordinate system; The determination module is also used to determine the target 3DoF posture of the terminal device in the target coordinate system based on the target IMU data and the target magnetic data.
9. A terminal device, characterized in that: The terminal device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the device posture data processing method as described in any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the device posture data processing method according to any one of claims 1 to 4 are implemented.