Motion posture determination method and device, processing equipment and storage medium
By determining the intensity and direction of the magnetic field and optimizing the attitude solution algorithm, the problem of magnetometers being susceptible to magnetic interference is solved, the accuracy and robustness of the moving attitude are improved, and it is suitable for a wider range of application scenarios.
Patent Information
- Application Number
- CN202310674481.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, magnetometers are susceptible to external magnetic fields, which makes it impossible to accurately measure the motion posture of the carrier. The existing methods are not effective when the magnetic interference intensity is not large, and their application range and accuracy are limited.
By determining the magnetic field strength and magnetic field direction, calculating the target parameters of the degree of magnetic interference, optimizing the attitude solution algorithm, eliminating the influence of magnetic interference, and ensuring the accuracy and robustness of the moving attitude.
It improves the sensitivity of magnetic interference detection, control errors within a small range, enhances the accuracy and application range of motion posture data, and is suitable for a wider range of application scenarios.
Smart Images

Figure CN119104055A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of navigation and positioning technology, and in particular to a method, device, processing equipment, and storage medium for determining a motion posture. Background Art
[0002] The Attitude and Heading Reference System (AHRS) is a measurement device that can accurately measure the three-axis attitude of a carrier in a spatial coordinate system. It is generally composed of hardware such as a three-axis magnetometer, a three-axis gyroscope, and a three-axis accelerometer, and corresponding software, providing real-time attitude and heading information for the carrier. It is widely used in the fields of aerospace, robotics, automotive industry, and pedestrian navigation and positioning. Among them, the magnetometer is the key sensor for attitude angle calculation, but the magnetometer is easily interfered by the external magnetic field and cannot measure accurate magnetic field signals, resulting in the inability to determine the accurate motion attitude of the carrier.
[0003] In the related art, the confidence of the magnetometer signal can be adjusted according to the magnetic field strength to reduce the influence of magnetic interference to a certain extent. However, since the calibration parameters of the magnetometer usually have a certain deviation, the confidence of the magnetometer signal will be set relatively loosely. In this way, this method will not work when the magnetic interference intensity is not large enough, making the scope of application of this method small and the accuracy low.
[0004] Therefore, the related technology urgently needs a high-accuracy motion posture determination method. Summary of the invention
[0005] Based on this, in response to the above technical problems, the present application provides a motion posture determination method, device, processing equipment, and storage medium, which can solve the problem of unsatisfactory elimination of magnetic interference in the prior art.
[0006] In a first aspect, an embodiment of the present application provides a method for determining a motion posture, the method comprising:
[0007] Determine the magnetic field strength and magnetic field direction according to the motion data of the target object;
[0008] Determining a target parameter for characterizing a degree of magnetic interference according to the magnetic field strength and the magnetic field direction;
[0009] Based on the target parameters, determining a corresponding attitude solution algorithm;
[0010] The motion posture of the target object is determined according to the posture solving algorithm.
[0011] The motion posture determination method provided in the embodiment of the present application can determine the magnetic field direction and the magnetic field strength according to the motion data collected by the motion sensor. Among them, the magnetic field direction and the magnetic field strength can characterize the degree of influence of magnetic interference in the direction dimension and the intensity dimension respectively. Then, the target parameters for characterizing the degree of magnetic interference can be determined according to the magnetic field direction and the magnetic field strength, so that the sensitivity of magnetic interference detection is higher, and the error caused by magnetic interference can be controlled within a smaller range. Finally, the posture solution algorithm can be optimized according to the target parameters to accurately eliminate the influence of magnetic interference, thereby ensuring the accuracy of the determined motion posture of the target object and improving the robustness of the motion posture data.
[0012] Optionally, in an embodiment of the present application, determining a target parameter for characterizing a degree of magnetic interference according to the magnetic field strength and the magnetic field direction includes:
[0013] Obtaining a first weight corresponding to the magnetic field intensity and a second weight corresponding to the magnetic field direction;
[0014] A target parameter for characterizing the degree of magnetic interference is determined according to the magnetic field strength, the magnetic field direction, the first weight, and the second weight.
[0015] Optionally, in one embodiment of the present application, the motion data includes magnetometer data; correspondingly, the magnetic field strength is determined in the following manner:
[0016] Obtaining a reference magnetic field strength corresponding to the environment where the target object is located;
[0017] Determining a measured magnetic field strength corresponding to the environment according to the magnetometer data;
[0018] The magnetic field strength is determined based on the reference magnetic field strength and the measured magnetic field strength.
[0019] Optionally, in one embodiment of the present application, the motion data includes magnetometer data and accelerometer data; correspondingly, the magnetic field direction is determined in the following manner:
[0020] Determining, based on the magnetometer data, a measured magnetic field strength corresponding to the environment where the target object is located;
[0021] determining an acceleration of the target object based on the accelerometer data;
[0022] The magnetic field direction is determined based on the measured magnetic field strength and an angle between the acceleration.
[0023] Optionally, in one embodiment of the present application, the magnetic field direction is determined in the following manner:
[0024] Acquire magnetometer data contained in the motion data; the magnetometer data at least includes a first measured magnetic field intensity corresponding to a current moment and a second measured magnetic field intensity corresponding to a previous moment;
[0025] Determining a predicted magnetic field strength corresponding to a current moment according to the second measured magnetic field strength;
[0026] The magnetic field direction is determined according to an angle between the first measured magnetic field strength and the predicted magnetic field strength.
[0027] Optionally, in one embodiment of the present application, determining a corresponding posture solution algorithm based on the target parameter includes:
[0028] Obtain multiple parameters to be adjusted corresponding to the attitude solution algorithm;
[0029] Based on the target parameters, respectively adjust the preset posture solving algorithms corresponding to the parameters to be adjusted;
[0030] The posture solving algorithm is determined according to the mean function corresponding to the plurality of adjusted preset posture solving algorithms.
[0031] Optionally, in one embodiment of the present application, determining the posture solving algorithm according to the mean function corresponding to the plurality of adjusted preset posture solving algorithms includes:
[0032] Determining, according to the target parameter, a third weight corresponding to each of the adjusted preset posture solving algorithms;
[0033] Based on each of the third weights, determining a mean function corresponding to a plurality of the adjusted preset posture solving algorithms;
[0034] Based on the mean function, the posture solving algorithm is determined.
[0035] Optionally, in one embodiment of the present application, the method further includes:
[0036] In response to the target parameter being less than a preset target parameter threshold, acquiring historical motion data of the target object;
[0037] The historical motion data is updated based on the motion data corresponding to the target object at the current moment to obtain updated target motion data;
[0038] According to the target motion data, the magnetometer parameters in the motion sensor are calibrated; wherein the motion sensor is used to collect the motion data of the target object.
[0039] In a second aspect, an embodiment of the present application further provides a motion posture determination device, the device comprising:
[0040] A magnetic field strength and direction determination module, used to determine the magnetic field strength and magnetic field direction according to the motion data of the target object;
[0041] A target parameter determination module, used to determine a target parameter for characterizing the degree of magnetic interference according to the magnetic field strength and the magnetic field direction;
[0042] An attitude solution algorithm determination module is used to determine a corresponding attitude solution algorithm based on the target parameters;
[0043] The motion posture determination module is used to determine the motion posture of the target object according to the posture solution algorithm.
[0044] In a third aspect, an embodiment of the present application further provides a processing device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in each of the above embodiments when executing the computer program.
[0045] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of the methods described in the above embodiments are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0047] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0048] Figure 2 is a method flow chart of a method for determining a motion posture provided by an embodiment of the present application;
[0049] Figure 3 is a schematic diagram of the module structure of the motion posture determination device provided in an embodiment of the present application;
[0050] Figure 4 It is a schematic diagram of the module structure of the processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.
[0052] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0053] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to greater than or equal to two. The terms "first", "second", "third" and the like involved in this application are merely to distinguish similar objects and do not represent a specific ordering of objects.
[0054] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, devices, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
[0055] At present, the gyroscope in the nine-axis MEMS sensor can measure the angular velocity data of the moving object, and the angular velocity of the moving object can be obtained by integrating the angular velocity data. However, due to the errors such as zero bias and temperature drift of the gyroscope, the error of the angle obtained by direct integration will accumulate over time. In order to solve this problem, the accelerometer and magnetometer can be used to provide attitude correction in horizontal attitude and heading respectively, thereby reducing the accumulation of angle errors generated by directly integrating the angular velocity data read by the gyroscope. This attitude calculation method can be called the nine-axis MEMS sensor attitude algorithm, and the nine-axis MEMS sensor plus the attitude algorithm constitutes the attitude and heading reference system (AHRS), which is widely used in drones, smart phones, tablets, robots and other fields. The magnetometer determines the heading by the geomagnetic field, and the geomagnetic field is weak and easily disturbed by the environmental magnetic field. For example, when using a device containing a nine-axis MEMS sensor in a hospital or residence, because there are more instruments in the hospital and most of them have a strong magnetic field, there will be more furniture with metal materials in the residence, and the use of the device will be greatly affected by the surrounding environment. Avoid placing metal or magnetic objects around the sensor when using it, as this will affect the usability of the device.
[0056] In order to solve the problem that the motion sensor orientation calculation is susceptible to magnetic interference, there are currently two main methods: 1) Do not use a magnetometer. This method avoids the problem that the sensor orientation calculation result is susceptible to magnetic interference. However, when calculating the heading angle of the sensor orientation in the horizontal direction, this method cannot calculate the absolute angle, but can only calculate the relative value of the heading angle in the initial orientation. In addition, the heading angle calculated by this method for the sensor orientation is completely dependent on the integral operation of the angular velocity. Since the zero bias of the angular velocity will cause cumulative errors, the measurement result error of this method will increase over time. Therefore, this method can only be applied to scenarios where the absolute orientation of the sensor does not need to be calculated, the accuracy requirement is low, and the measurement time is short. 2) Adjust the confidence of the magnetometer signal according to the magnetic field strength. This method can reduce magnetic interference to a certain extent. However, because the calibration parameters of the magnetometer usually have a certain deviation, the confidence of the magnetometer signal will be set relatively loosely, and this method will not work if the magnetic interference intensity is not large enough. And when the magnetic field intensity exceeds the preset range, the error caused by interference when it does not exceed the preset range will continue to exist until there is no magnetic interference at all.
[0057] Based on the above technical requirements, the embodiment of the present application provides a method for determining a motion posture, which can detect the intensity of magnetic interference and correspondingly remove the influence of magnetic interference in the process of determining the motion posture of the target object, so that the motion posture of the target object determined in this way is more accurate and has a wider scope of application. Specifically, according to the motion data of the target object, the magnetic field strength and magnetic field direction are determined; according to the magnetic field strength and magnetic field direction, the target parameters for characterizing the degree of magnetic interference are determined; based on the target parameters, the corresponding posture solution algorithm is determined; according to the posture solution algorithm, the motion posture of the target object is determined.
[0058] Figure 1 A schematic diagram of the system architecture of an exemplary application environment in which a motion posture determination method according to an embodiment of the present application can be applied is shown. Figure 1 As shown, the system includes a client 101 and a motion posture determination device 103. The client 101 can be various electronic devices equipped with sensor modules, including but not limited to drones, robots, smart phones and tablet computers, etc. Among them, the sensor module 160 can include a gyroscope sensor (Gyroscope), an accelerometer sensor (Accelerometer), a magnetometer sensor (Magnetometer), etc. The gyroscope sensor refers to an angular motion detection device that uses the momentum moment of a high-speed rotating body to sense the shell relative to the inertial space around one or two axes orthogonal to the rotation axis. By integrating and calculating the data read by the gyroscope sensor, the angular velocity of the target object around the three axes can be obtained. The accelerometer sensor refers to a device for measuring the linear acceleration of the target object, which can sense the acceleration in any direction. The acceleration components of the acceleration of the target object on the three axes can be read through the accelerometer sensor. The magnetometer sensor refers to a vector magnetic sensor used to measure the size and direction of the geomagnetic field. The magnetometer sensor can read the components of the geomagnetic field intensity vector of the environment where the target object is located on the three axes. On this basis, the client 101 can collect motion data of the target object, and the motion data may include accelerometer data, magnetometer data, gyroscope data, etc. The client 101 and the motion posture determination device 103 can communicate through a network to send the collected motion data of the target object to the motion posture determination device 103, and the motion posture determination device 103 completes the determination of the motion posture of the target object. The motion posture determination device 103 can be an electronic device with data processing capabilities and data receiving and sending capabilities, and can be a physical device such as a host, a rack server, a blade server, etc., or a virtual device such as a virtual machine, a container, etc.
[0059] A possible application scenario of the present application is that the client 101 swings along the moving direction of the target object at the same frequency as the walking frequency. For example, the client 101 is a smart bracelet or a mobile phone, and the target object is such as a user who swings his hands at the same frequency as the walking frequency while walking, and the smart bracelet is worn on the user's wrist or the mobile phone is held in the user's hand.
[0060] It should be understood that Figure 1 The number of the client 101, the network and the motion posture determination device 103 is only illustrative. According to the implementation requirements, there can be any number of the client 101, the network and the motion posture determination device 103. For example, the motion posture determination device 103 can be a server cluster composed of multiple servers. It should be noted that the motion posture determination device 103 can also be integrated into the client 101, for example, a drone or a surgical robot completes the workflow of collecting the motion data of the target object and determining the motion posture of the target object.
[0061] The motion posture determination method described in this application is described in detail below with reference to the accompanying drawings. Figure 2 It is a schematic flow diagram of an embodiment of the motion posture determination method provided by the present application. Although the present application provides the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. The method can be executed in the order of the methods shown in the embodiments or drawings or in parallel (for example, in the environment of parallel processors or multi-threaded processing) during the actual motion posture determination process or when the method is executed.
[0062] Specifically, an implementation of the motion posture determination method provided by the present application is as follows: Figure 2 As shown, the method may include:
[0063] S201: Determine the magnetic field strength and magnetic field direction according to the motion data of the target object.
[0064] In an embodiment of the present application, the target object may be an object equipped with a motion sensor device and capable of free movement. For example, the target object may be a user of a device carrying a motion sensor, or an animal or kite equipped with a motion sensor device. Among them, the motion sensor may be a device with a nine-axis MEMS sensor, or a device equipped with a gyroscope sensor, an accelerometer sensor, and a magnetometer sensor at the same time, and the embodiment of the present application does not specifically limit this. The motion data may include a combination of data consisting of multiple sensors collected in real time by a motion sensor device such as a drone, a mobile phone, etc. associated with the target object, such as motion data may be combined inertial navigation data collected by a nine-axis MEMS sensor, and the combined inertial navigation data may be composed of gyroscope data, accelerometer data, and magnetometer data. The motion data may also be data composed of gyroscope data and accelerometer data, or data composed of gyroscope data and magnetometer data. In one embodiment of the present application, the magnetic field strength may be used to characterize the magnitude of the magnetic field strength measured in the presence of magnetic interference, which includes the magnitude of the magnetic field strength of the interfering magnetic field generated by other devices or instruments. That is to say, the magnetometer data measured by the magnetometer includes the strength of the geomagnetic field and the strength of the interfering magnetic field generated by other devices. Based on this, from another perspective, the magnetic field strength can be used to characterize the degree of influence of magnetic interference in the magnetic field strength dimension. In one embodiment of the present application, the motion data includes magnetometer data; correspondingly, the magnetic field strength can be determined in the following manner:
[0065] S301: Obtaining a reference magnetic field strength corresponding to the environment where the target object is located;
[0066] S303: Determine the measured magnetic field strength corresponding to the environment according to the magnetometer data;
[0067] S305: Determine the magnetic field strength based on the reference magnetic field strength and the measured magnetic field strength.
[0068] In an embodiment of the present application, the environment where the target object is located may be the actual environment where the target object is located when the motion data is generated, such as a hospital, a sidewalk, a residential area, etc. The reference magnetic field strength refers to the magnetic field strength corresponding to different geographical locations around the world and officially measured and published. Of course, in order to save storage resources, the magnetic field strength measured in the environment where the target object is located may be used as the reference magnetic field strength in the absence of magnetic interference. For example, the reference magnetic field strength may be the modulus of the magnetic field strength vector collected by the magnetometer sensor at the current moment. Of course, in other embodiments, in order to improve the accuracy of the measured reference magnetic field strength, the reference magnetic field strength may also be the modulus of the average value of multiple magnetic field strength vectors collected within a preset time period. In one embodiment of the present application, the measured magnetic field strength may be the data measured by the magnetometer sensor at the current moment, such as the modulus of the measured magnetic field strength vector. Of course, the measured magnetic field strength may also be the average value of multiple magnetic field strength vectors measured within a preset time period, or the modulus of the average value. In one embodiment of the present application, after determining the measured magnetic field strength and the reference magnetic field strength, the magnetic field strength may be determined according to the difference between the measured magnetic field strength and the reference magnetic field strength. For example, in one example, Norm MAG To measure the magnetic field strength, the Norm MAG =||MAG||, wherein ||MAG|| is the modulus of the measured magnetic field strength obtained by the magnetometer, which can be calculated according to OK, where MAG x It can represent the component of magnetometer data on the X-axis, MAG y It can represent the component of magnetometer data on the Y axis, MAG z It can represent the component of magnetometer data on the Z axis. MAGref is the reference magnetic field strength, the Norm MAGref =||MAG ref ||, the ||MAG ref || is the modulus of the reference magnetic field strength. Then, the magnetic field strength a=|Norm MAG -Norm MAGref |.
[0069] In an embodiment of the present application, the magnetic field direction can be used to characterize the direction of the magnetic field in the presence of magnetic interference, that is, it can be used to characterize the degree of influence of magnetic interference in the directional dimension. In practical applications, in the absence of magnetic interference, the range of variation of the magnetic inclination at similar positions or positions at the same longitude and latitude is small, and the change in the magnetic inclination caused by magnetic interference usually far exceeds the normal variation range when there is no magnetic interference. Based on this, in one embodiment of the present application, the magnetic field direction may include the magnetic inclination. The magnetic inclination refers to the angle between the magnetic field direction measured by the magnetometer and the horizontal direction.
[0070] In another embodiment of the present application, the magnetic field direction can also be characterized by the angle between the magnetic field direction and the vertical direction. Specifically, the motion data includes magnetometer data and accelerometer data; correspondingly, the magnetic field direction is determined in the following manner:
[0071] S401: Determine, according to the magnetometer data, a measured magnetic field strength corresponding to the environment where the target object is located;
[0072] S403: Determine the acceleration of the target object according to the accelerometer data;
[0073] S405: Determine the direction of the magnetic field based on the measured magnetic field strength and the angle between the acceleration.
[0074] In the embodiment of the present application, the accelerometer data measured by the acceleration sensor always contains the component of gravity acceleration. Since in daily activities, the acceleration of the target object such as the user is smaller than the gravity acceleration, the angle between the acceleration and the magnetic field strength can be used as the angle between the gravity acceleration and the magnetic field strength, that is, the angle between the magnetic field direction and the vertical direction. For example, the angle between the measured magnetic field strength MAG measured by the magnetometer and the acceleration ACC measured by the accelerometer can be calculated by the following formula to determine the magnetic field direction Dir MAG .
[0075]
[0076] Wherein, the cos<> may represent the direction cosine between two vectors. It is understandable that the angle between the measured magnetic field strength and the acceleration is complementary to the magnetic inclination, that is, the magnetic field direction may be determined in different forms.
[0077] In practical applications, the direction of the magnetometer data measured by the magnetometer is determined only by the geomagnetic field and the interfering magnetic field, and will deviate from the direction of the geomagnetic field at the moment of magnetic interference. Based on this, in one embodiment of the present application, the magnetic field direction can be determined by the angle between the magnetic field directions contained in the different magnetometer data measured at different times. Specifically, the magnetic field direction is determined in the following manner:
[0078] S501: Acquire magnetometer data included in the motion data; the magnetometer data at least includes a first measured magnetic field intensity corresponding to a current moment and a second measured magnetic field intensity corresponding to a previous moment;
[0079] S503: Determine a predicted magnetic field strength corresponding to a current moment according to the second measured magnetic field strength;
[0080] S505: Determine the magnetic field direction according to the angle between the first measured magnetic field strength and the predicted magnetic field strength.
[0081] In an embodiment of the present application, the magnetometer data collected by the magnetometer sensor at the current moment and the previous moment can be obtained, and then the first measured magnetic field strength is determined according to the magnetometer data collected at the current moment, and the second measured magnetic field strength is determined according to the magnetometer data collected at the previous moment. For example, the first measured magnetic field strength can be determined according to the magnetometer data collected by the magnetometer sensor at 8:30, and the second measured magnetic field strength can be determined according to the magnetometer data collected by the magnetometer sensor at 8:28. In one embodiment of the present application, after determining the second measured magnetic field strength, the predicted magnetic field strength corresponding to the current moment can be determined according to the second measured magnetic field strength. Specifically, the time interval between the current moment and the previous moment can be determined first, and then the angular velocity measured by the gyroscope sensor at the current moment such as 8:30 can be determined. Finally, the predicted magnetic field strength can be determined according to the second measured magnetic field strength, the time interval, and the angular velocity. For example, in one example, the following can be used to determine the predicted magnetic field strength MAG'.
[0082]
[0083] Wherein, Δt is the time interval, and GYR x It can represent the component of gyroscope data on the X axis, GRY y It can represent the component of gyroscope data on the Y axis, GYR z It can represent the component of the gyroscope data on the Z axis. t-1In one embodiment of the present application, after the predicted magnetic field strength is determined, the magnetic field direction can be determined according to the angle between the predicted magnetic field strength and the first measured magnetic field strength.
[0084] S203: Determine a target parameter for characterizing the degree of magnetic interference according to the magnetic field strength and the magnetic field direction.
[0085] In an embodiment of the present application, after determining the magnetic field strength and the magnetic field direction, the target parameter can be determined by combining the two, so that the degree to which the motion sensor is affected by magnetic interference in the magnetic field strength dimension can be clarified, and the degree to which the motion sensor is affected by magnetic interference in the direction dimension can also be clarified. In one embodiment of the present application, the target parameter can be determined based on the sum of the magnetic field strength and the magnetic field direction. In order to improve the accuracy of the determined target parameter, so as to more accurately describe the degree of influence of magnetic interference, it is possible to assign weights to the magnetic field strength and the magnetic field direction in combination with actual observation needs, and determine the weighted sum of the magnetic field strength and the magnetic field direction to determine the target parameter. Specifically, the target parameter used to characterize the degree of magnetic interference is determined based on the magnetic field strength and the magnetic field direction, including:
[0086] S601: Obtain a first weight corresponding to the magnetic field intensity and a second weight corresponding to the magnetic field direction;
[0087] S603: Determine a target parameter for characterizing the degree of magnetic interference according to the magnetic field strength, the magnetic field direction, the first weight, and the second weight.
[0088] In an embodiment of the present application, the first weight can be used to characterize the degree of influence of the magnetic field strength on magnetic interference detection. The first weight can be a specific value such as 0.9. The second weight can be used to characterize the degree of influence of the magnetic field direction on magnetic interference detection. After determining the first weight and the second weight, the target parameter can be determined according to the weighted sum of the magnetic field direction and the magnetic field strength. For example, in one example, when the magnetic field direction is a, the second weight is b, the magnetic field strength is c, and the first weight is d, the target parameter can be determined to be ab+cd. Through the above embodiment, the degree of magnetic interference is characterized by two indicators, the magnetic field strength and the magnetic field direction, which is more accurate and has a more accurate scope of application compared to the prior art that only characterizes according to the magnetic field strength indicator. In addition, by fusing these two indicators through the weight vector, the probability of being subjected to greater interference but still not being detected can be reduced while improving the sensitivity to magnetic interference.
[0089] S205: Determine a corresponding posture calculation algorithm based on the target parameters.
[0090] In an embodiment of the present application, after determining the target parameters, the attitude solution algorithm can be modified to remove the influence of the interfering magnetic field generated by other devices. The attitude solution algorithm can use a nonlinear optimization method to constrain the attitude by minimizing the difference between the attitude-related output of the accelerometer data and the actual output of the magnetometer data, and perform attitude optimization. The attitude solution algorithm may include an explicit complement filter (ECF) based on mahony, an extended Kalman filter (EKF) based on kalman, a gradient descent (GD) algorithm based on madgwick, etc. In an embodiment of the present application, the attitude solution algorithm may include multiple attitude vector parameters, and different attitude vector parameters may be affected by magnetic interference to different degrees. In this way, some attitude vector parameters may not need to be adjusted when the degree of influence of magnetic interference is small, and some attitude vector parameters need to be adjusted when the degree of influence of magnetic interference is large. These attitude vector parameters that need to be adjusted can be referred to as parameters to be adjusted. In one embodiment of the present application, the parameters to be adjusted may be adjusted using the same preset attitude solution algorithm, or may be adjusted using different preset attitude solution algorithms. Specifically, in one embodiment of the present application, the corresponding attitude solution algorithm is determined based on the target parameter, including:
[0091] S701: Acquire multiple parameters to be adjusted corresponding to the attitude solution algorithm;
[0092] S703: adjusting the preset posture solving algorithms corresponding to the parameters to be adjusted based on the target parameters respectively;
[0093] S705: Determine the posture solving algorithm according to the mean function corresponding to the plurality of adjusted preset posture solving algorithms.
[0094] In the embodiment of the present application, the preset posture solving algorithm corresponding to each parameter to be adjusted can be determined according to the preset association relationship between the parameter to be adjusted and the preset posture solving algorithm. The preset association relationship can have various forms, for example, it can include a preset association table, a preset association model, a preset association function, etc. The preset association relationship can be set by the user according to the actual application requirements or according to the size of the target parameter. Specifically, when the target parameter is less than the preset threshold, a more accurate preset posture solving algorithm can be selected, and when the target parameter is greater than the preset threshold, a preset posture solving algorithm with a smaller number of parameters and more convenient calculation can be selected. Among them, the preset threshold can be set by the user according to the actual application requirements. For example, in one example, the parameter to be adjusted Arg AHRS1 The corresponding preset attitude solution algorithm is FilterAHRS1, and the parameter to be adjusted Arg AHRS2 The corresponding preset attitude solution algorithm is FilterAHRS2, and the parameter to be adjusted Arg AHRS3 The corresponding preset attitude solution algorithm is FilterAHRS3. After determining the preset attitude solution algorithm, since the AHRS parameters in the preset attitude solution algorithm will be affected by magnetic interference, the AHRS parameters can be adjusted according to the target parameters to determine the adjusted preset attitude solution algorithm. In one embodiment of the present application, the AHRS parameters can be adjusted according to the target parameters using a parameter determination function. Different preset attitude solution algorithms contain different AHRS parameters, and the parameter determination functions that can be used may also be different. For example, in one example, a form of the determination method is as follows:
[0095]
[0096] Wherein, the FA is a parameter determination function, and the parameter determination function has multiple function forms, for example, it can be a ReLU function, then the Wherein, the MI is the target parameter, the S FA The parameter vector of the parameter determination function FA. i is the preset posture solution algorithm. i The length of the output vector is the same as that of FilterAHRS i Since the number of parameters required by the Madgwick algorithm is one, the length of the output vector here is 1. AHRS The vector length of the FilterAHRS vector.
[0097] In an embodiment of the present application, after obtaining each adjusted preset posture solution algorithm according to the above method, each adjusted preset posture solution algorithm can be combined to determine the final posture solution algorithm. For example, the posture solution algorithm can be determined according to the mean function corresponding to each adjusted preset posture solution algorithm. For example, in one example, the posture solution algorithm can be determined using the following formula:
[0098]
[0099] Wherein, the QuatAve is the quaternion mean function, and the X is the motion data, which may include, for example, gyroscope data GYR, accelerometer data ACC, and magnetometer data MAG. Through the above embodiment, not only can the preset attitude solution algorithm corresponding to the parameter to be adjusted be selected according to the target parameter, but also the AHRS parameter can be adjusted and calculated according to the target parameter, so that not only the appropriate algorithm can be selected in different situations to improve the accuracy, but also the difficulty in designing the corresponding relationship between magnetic interference and calculation parameters can be reduced, thereby shortening the research and development cycle.
[0100] Of course, in another embodiment of the present application, in order to improve the accuracy of determining the posture solution algorithm, the proportion of each preset posture solution algorithm in the posture solution algorithm can be determined according to the target parameter to determine a more accurate posture solution algorithm. Specifically, the posture solution algorithm is determined according to the mean function corresponding to the multiple adjusted preset posture solution algorithms, including:
[0101] S801: Determine, according to the target parameter, a third weight corresponding to each of the adjusted preset posture solving algorithms;
[0102] S803: Determine, based on each of the third weights, a mean function corresponding to a plurality of the adjusted preset posture solving algorithms;
[0103] S805: Determine the posture solution algorithm based on the mean function.
[0104] In the embodiment of the present application, the algorithm adjustment function can be used to determine the third weight corresponding to each of the adjusted preset posture solving algorithms. Specifically, the target parameter can be substituted into the algorithm adjustment function to determine the function value of the algorithm adjustment function corresponding to each of the adjusted preset posture solving algorithms. The algorithm adjustment function can have a variety of function forms, such as a linear function, a step function, a trigonometric function, etc. Specifically, in one example, the algorithm adjustment function can be a unit step function, and the algorithm adjustment function Said Said is the parameter vector of the algorithm adjustment function, and ε() is a unit step function. In one embodiment of the present application, and the The user can adjust the value according to the size of the target parameter. In one embodiment of the present application, the algorithm adjustment functions corresponding to different preset posture solving algorithms after adjustment can be the same or different. For example, in one embodiment, the algorithm adjustment functions corresponding to multiple preset posture solving algorithms after adjustment are as follows:
[0105]
[0106] In the embodiment of the present application, after determining each of the third weights, the mean function corresponding to the adjusted preset posture solving algorithm can be determined according to each of the adjusted preset posture solving algorithms and their corresponding third weights. For example, in one example, the mean function can be determined using the following formula:
[0107]
[0108] Among them, the FB T (MI) is the transposed matrix of the FB(MI).
[0109] Through the above-mentioned embodiments, the weight values of each preset posture solution algorithm can be adjusted according to the determined target parameters. In this way, in the absence of magnetic interference, the weight value of the preset posture solution algorithm after adjustment can be increased, and in the presence of magnetic interference, the weight value of the preset posture solution algorithm after adjustment can be reduced, so that a more accurate posture solution algorithm can be obtained in different situations, and the motion posture of the target object obtained by subsequent calculation is also more accurate. In addition, the scope of application is also wider, and the method described in the embodiment of the present application can be used with or without magnetic interference.
[0110] S207: Determine the motion posture of the target object according to the posture calculation algorithm.
[0111] In an embodiment of the present application, after determining the attitude solution algorithm, the motion attitude of the target object can be determined using the attitude solution algorithm. For example, the attitude solution algorithm can use the angular velocity data collected by the gyroscope sensor as the main control quantity, and process the accelerometer data and the magnetometer data through different algorithms to correct and compensate the attitude estimated by the gyroscope sensor to obtain the optimal motion attitude. For example, in the case where the attitude solution algorithm is a gradient descent algorithm based on Madgwick, the attitude quaternion obtained by the gradient descent method using the accelerometer data and the magnetometer data can be linearly fused with the attitude obtained by integrating the gyroscope data to obtain the optimal motion attitude. In one embodiment of the present application, the motion attitude can include the speed of the translational motion of the target object, the direction of the translational motion, the angular velocity of the rotation, the direction of the rotation, etc. The attitude quaternion can be used to characterize the quaternion of the motion attitude of the target object in the current environment and at the current moment. The quaternion is a simple hypercomplex number. The quaternion is composed of a real number plus three imaginary units i, j and k. Each quaternion is a linear combination of 1, i, j and k, that is, the quaternion can generally be expressed as a+bi+cj+dk. Among them, a, b, c, d are real numbers. The geometric meaning of i, j and k themselves can be understood as a rotation, wherein the i rotation represents the rotation of the positive direction of the Z axis to the positive direction of the Y axis in the plane where the Z axis intersects with the Y axis, the j rotation represents the rotation of the positive direction of the X axis to the positive direction of the Z axis in the plane where the X axis intersects with the Z axis, and the k rotation represents the rotation of the positive direction of the Y axis to the positive direction of the X axis in the plane where the Y axis intersects with the X axis, and -i, -j, and -k represent the reverse rotation of the i, j, and k rotations, respectively. Through the above embodiment, in the presence of magnetic interference, since the determined posture solution algorithm has been optimized according to the target parameters, the influence of magnetic interference is eliminated, thereby ensuring the accuracy of the determined motion posture of the target object.
[0112] The motion posture determination method provided in the embodiment of the present application can determine the magnetic field direction and the magnetic field strength according to the motion data collected by the motion sensor. Among them, the magnetic field direction and the magnetic field strength can characterize the degree of influence of magnetic interference in the direction dimension and the intensity dimension respectively. Then, the target parameters for characterizing the degree of magnetic interference can be determined according to the magnetic field direction and the magnetic field strength, so that the sensitivity of magnetic interference detection is higher, and the error caused by magnetic interference can be controlled within a smaller range. Finally, the posture solution algorithm can be optimized according to the target parameters to accurately eliminate the influence of magnetic interference, thereby ensuring the accuracy of the determined motion posture of the target object and improving the robustness of the motion posture data.
[0113] In practical applications, since magnetic interference detection has a certain degree of hysteresis, and the posture solution algorithm generally adopts a recursive form, that is, the motion posture at the current moment is related to the motion posture at the previous moment. If the degree of magnetic interference is small or non-existent, the motion data of the target object is not updated in time, then the motion posture of the target object at the current moment will be inaccurate. Based on this, in one embodiment of the present application, the method further includes:
[0114] S901: In response to the target parameter being less than a preset target parameter threshold, acquiring historical motion data of the target object;
[0115] S903: updating the historical motion data based on the motion data corresponding to the target object at the current moment to obtain updated target motion data;
[0116] S905: Calibrate magnetometer parameters in a motion sensor according to the target motion data; wherein the motion sensor is used to collect the motion data of the target object.
[0117] In an embodiment of the present application, a user can set a preset target parameter threshold according to detection requirements. When it is determined that the obtained target parameter is less than the preset target parameter threshold, the historical motion data collected by the motion sensor can be obtained. Among them, the historical motion data may be the motion data collected by the motion sensor at a moment before the current moment. The current moment may be the moment when it is detected that the target parameter is less than the preset target parameter threshold. In one embodiment of the present application, after obtaining the historical motion data, the historical motion data can be updated based on the motion data corresponding to the target object at the current moment. For example, the target historical motion data with the longest time interval between the acquisition moment and the current moment in the historical motion data can be replaced with the motion data. For example, in one example, the updated target motion data may be as follows:
[0118]
[0119] Among them, the is the updated target motion data, is the historical motion data before updating, is the i-th data point in the historical motion data. In one embodiment of the present application, after obtaining the updated target motion data, the magnetometer parameters of the motion sensor may be calibrated. For example, in one example, the magnetometer parameters may be calibrated using the following formula:
[0120]
[0121] Among them, the are the parameters of the calibrated magnetometer, is the calculation result of the magnetometer bias parameter, The FitSphere is a spherical fitting algorithm. In one embodiment of the present application, after obtaining the calibrated magnetometer parameters, the magnetometer parameters at the current moment can be updated. Before updating, it is necessary to determine whether the update conditions are met. For example, in one example, the update condition can be: Among them, the The Bias is the calibration parameter actually used when calibrating the magnetometer signal. MAG is the actual magnetometer bias parameter used. is the maximum distance allowed before and after the magnetometer bias parameter is updated, It is the maximum allowable difference between the measured magnetic field strength and the reference value after calibration when there is no magnetic interference.
[0122] It is understandable that after the magnetometer parameters of the motion sensor are calibrated, the motion data collected by the motion sensor can be calibrated with the latest calibration parameters. For example, the acceleration data ACC can be replaced with the calibrated accelerometer data And replace the gyroscope data GYR with the calibrated gyroscope data Afterwards, the measured magnetic field strength MAG can also be replaced by the calibrated measured magnetic field strength And the actual magnetometer bias parameter Bias MAG Of course, in other embodiments of the present application, in order to eliminate hard magnetic interference and soft magnetic interference, ellipsoid fitting can also be used as an online calibration method of the magnetometer, and the present application does not limit this.
[0123] Through the above embodiments, the magnetometer parameters of the motion sensor can be updated in time when there is no magnetic interference. Compared with using fixed magnetometer parameters for measurement, the accuracy of the magnetometer sensor measurement result can be improved, and the stability of long-term measurement can also be improved.
[0124] In one embodiment of the present application, after calibrating the magnetometer data of the motion sensor, the orientation of the motion sensor can be calculated according to the adjusted attitude solution algorithm, that is, the motion attitude of the target object can be determined. For example, the quaternion of the orientation of the motion sensor can be obtained by the following calculation: Among them, the A quaternion that can be used to represent the orientation of the motion sensor, the is the calibrated motion data, specifically After calculating the quaternion of the motion sensor orientation, the current joint activity angle can be calculated using the following formula:
[0125]
[0126]
[0127] The ROM is the real-time activity state of the measured joint, which is composed of the front and rear flexion and extension angle FE, the lateral flexion angle AA, and the rotation angle IER. and is a quaternion representing the orientation of two motion sensors worn on the limbs at both ends of the joint. Of course, in other embodiments of the present application, other methods can also be used to calculate the joint activity angle, for example, in one example, as shown below:
[0128]
[0129]
[0130] in, and The quaternion representing the orientation of the two motion sensors worn on the limbs at both ends of the joint is calculated as Among them, the is the orientation of the limbs when standing still, is the orientation of the motion sensor when standing still. When using this method to calculate the joint motion angle, the errors caused by wearing problems and body shape differences can be largely eliminated.
[0131] The above describes in detail the motion posture determination method provided by the present application. Figure 3 , describing the motion posture determination device 103 provided by the present application, including:
[0132] A magnetic field strength and direction determination module 1031 is used to determine the magnetic field strength and magnetic field direction according to the motion data of the target object;
[0133] A target parameter determination module 1033 is used to determine a target parameter for characterizing a degree of magnetic interference according to the magnetic field strength and the magnetic field direction;
[0134] The attitude calculation algorithm determination module 1035 is used to determine the corresponding attitude calculation algorithm based on the target parameters;
[0135] The motion posture determination module 1037 is used to determine the motion posture of the target object according to the posture calculation algorithm.
[0136] Optionally, in an embodiment of the present application, determining a target parameter for characterizing a degree of magnetic interference according to the magnetic field strength and the magnetic field direction includes:
[0137] Obtaining a first weight corresponding to the magnetic field intensity and a second weight corresponding to the magnetic field direction;
[0138] A target parameter for characterizing the degree of magnetic interference is determined according to the magnetic field strength, the magnetic field direction, the first weight, and the second weight.
[0139] Optionally, in one embodiment of the present application, the motion data includes magnetometer data; correspondingly, the magnetic field strength is determined in the following manner:
[0140] Obtaining a reference magnetic field strength corresponding to the environment where the target object is located;
[0141] Determining a measured magnetic field strength corresponding to the environment according to the magnetometer data;
[0142] The magnetic field strength is determined based on the reference magnetic field strength and the measured magnetic field strength.
[0143] Optionally, in one embodiment of the present application, the motion data includes magnetometer data and accelerometer data; correspondingly, the magnetic field direction is determined in the following manner:
[0144] Determining, based on the magnetometer data, a measured magnetic field strength corresponding to the environment where the target object is located;
[0145] determining an acceleration of the target object based on the accelerometer data;
[0146] The magnetic field direction is determined based on the measured magnetic field strength and an angle between the acceleration.
[0147] Optionally, in one embodiment of the present application, the magnetic field direction is determined in the following manner:
[0148] Acquire magnetometer data contained in the motion data; the magnetometer data at least includes a first measured magnetic field intensity corresponding to a current moment and a second measured magnetic field intensity corresponding to a previous moment;
[0149] Determining a predicted magnetic field strength corresponding to a current moment according to the second measured magnetic field strength;
[0150] The magnetic field direction is determined according to an angle between the first measured magnetic field strength and the predicted magnetic field strength.
[0151] Optionally, in one embodiment of the present application, determining a corresponding posture solution algorithm based on the target parameter includes:
[0152] Obtain multiple parameters to be adjusted corresponding to the attitude solution algorithm;
[0153] Based on the target parameters, respectively adjust the preset posture solving algorithms corresponding to the parameters to be adjusted;
[0154] The posture solving algorithm is determined according to the mean function corresponding to the plurality of adjusted preset posture solving algorithms.
[0155] Optionally, in one embodiment of the present application, determining the posture solving algorithm according to the mean function corresponding to the plurality of adjusted preset posture solving algorithms includes:
[0156] Determining, according to the target parameter, a third weight corresponding to each of the adjusted preset posture solving algorithms;
[0157] Based on each of the third weights, determining a mean function corresponding to a plurality of the adjusted preset posture solving algorithms;
[0158] Based on the mean function, the posture solving algorithm is determined.
[0159] Optionally, in one embodiment of the present application, the device further includes:
[0160] In response to the target parameter being less than a preset target parameter threshold, acquiring historical motion data of the target object;
[0161] The historical motion data is updated based on the motion data corresponding to the target object at the current moment to obtain updated target motion data;
[0162] According to the target motion data, the magnetometer parameters in the motion sensor are calibrated; wherein the motion sensor is used to collect the motion data of the target object.
[0163] According to the embodiment of the present application, the motion posture determination device 103 can correspond to the method described in the embodiment of the present application, and the above and other operations and / or functions of each module in the motion posture determination device 103 are respectively for implementing the corresponding processes of the methods provided in the above embodiments. For the sake of brevity, they will not be repeated here.
[0164] It should also be noted that the embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0165] On the other hand, the present application further provides a processing device, including a memory and a processor, wherein the memory stores computer program instructions, and the processor is configured to run the computer program instructions to execute the methods described in the above embodiments.
[0166] The processing device may be a physical device or a cluster of physical devices, or a virtualized cloud device, such as at least one cloud computing device in a cloud computing cluster. For ease of understanding, the present application uses the processing device as an independent physical device to illustrate the structure of the processing device.
[0167] like Figure 4 As shown, the processing device 400 includes: a processor and a memory for storing processor computer program instructions; wherein the processor is configured to implement the above-mentioned apparatus when executing the computer program instructions. The processing device 400 includes a memory 401, a processor 403, a bus 405 and a communication interface 407. The memory 401, the processor 403 and the communication interface 407 communicate with each other via the bus 405. The bus 405 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The bus is represented by only one thick line, but it does not mean that there is only one bus or one type of bus. The communication interface 407 is used for communicating with the outside.
[0168] The processor 403 may be a central processing unit (CPU). The memory 401 may include a volatile memory, such as a random access memory (RAM). The memory 401 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a HDD or a SSD, etc.
[0169] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0170] On the other hand, the present application further provides a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the steps of the above method when executed by a processor.
[0171] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (Random Access Memory, RAM), a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Electrically Programmable Read-Only-Memory, EPROM or flash memory), a static random access memory (Static Random-Access Memory, SRAM), a portable compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), a digital versatile disc (Digital Video Disc, DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.
[0172] The computer program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer program instructions from the network and forwards the computer program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0173] The computer program instructions for performing the operation of the present application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Small talk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. The computer program instructions may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, by utilizing the status information of computer program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute the computer program instructions to implement various aspects of the present application.
[0174] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods and devices according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer program instructions.
[0175] These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0176] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0177] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, system and method according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the functions involved.
[0178] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for determining a motion posture, characterized in that: The method comprises: Determine the magnetic field strength and magnetic field direction according to the motion data of the target object; Determining a target parameter for characterizing a degree of magnetic interference according to the magnetic field strength and the magnetic field direction; Based on the target parameters, determining a corresponding attitude solution algorithm; The motion posture of the target object is determined according to the posture solving algorithm.
2. The method according to claim 1, characterized in that Determining a target parameter for characterizing the degree of magnetic interference according to the magnetic field strength and the magnetic field direction includes: Obtaining a first weight corresponding to the magnetic field intensity and a second weight corresponding to the magnetic field direction; A target parameter for characterizing the degree of magnetic interference is determined according to the magnetic field strength, the magnetic field direction, the first weight, and the second weight.
3. The method according to claim 1, characterized in that The motion data includes magnetometer data; correspondingly, the magnetic field strength is determined in the following manner: Obtaining a reference magnetic field strength corresponding to the environment where the target object is located; Determining a measured magnetic field strength corresponding to the environment according to the magnetometer data; The magnetic field strength is determined based on the reference magnetic field strength and the measured magnetic field strength.
4. The method according to claim 1, characterized in that: The motion data includes magnetometer data and accelerometer data; correspondingly, the magnetic field direction is determined in the following manner: Determining, based on the magnetometer data, a measured magnetic field strength corresponding to the environment where the target object is located; determining an acceleration of the target object based on the accelerometer data; The magnetic field direction is determined based on the measured magnetic field strength and an angle between the acceleration.
5. The method according to claim 1, characterized in that The magnetic field direction is determined as follows: Acquire magnetometer data contained in the motion data; the magnetometer data at least includes a first measured magnetic field intensity corresponding to a current moment and a second measured magnetic field intensity corresponding to a previous moment; Determining a predicted magnetic field strength corresponding to a current moment according to the second measured magnetic field strength; The magnetic field direction is determined according to an angle between the first measured magnetic field strength and the predicted magnetic field strength.
6. The method according to claim 1, characterized in that The step of determining a corresponding attitude calculation algorithm based on the target parameters includes: Obtain multiple parameters to be adjusted corresponding to the attitude solution algorithm; Based on the target parameters, respectively adjust the preset posture solving algorithms corresponding to the parameters to be adjusted; The posture solving algorithm is determined according to the mean function corresponding to the plurality of adjusted preset posture solving algorithms.
7. The method according to claim 1, characterized in that The step of determining the posture solving algorithm according to the mean function corresponding to the plurality of adjusted preset posture solving algorithms comprises: Determining, according to the target parameter, a third weight corresponding to each of the adjusted preset posture solving algorithms; Based on each of the third weights, determining a mean function corresponding to a plurality of the adjusted preset posture solving algorithms; Based on the mean function, the posture solving algorithm is determined.
8. The method according to claim 1, characterized in that The method further comprises: In response to the target parameter being less than a preset target parameter threshold, acquiring historical motion data of the target object; The historical motion data is updated based on the motion data corresponding to the target object at the current moment to obtain updated target motion data; According to the target motion data, the magnetometer parameters in the motion sensor are calibrated; wherein the motion sensor is used to collect the motion data of the target object.
9. A motion posture determination device, characterized in that: The device comprises: A magnetic field strength and direction determination module, used to determine the magnetic field strength and magnetic field direction according to the motion data of the target object; A target parameter determination module, used to determine a target parameter for characterizing the degree of magnetic interference according to the magnetic field strength and the magnetic field direction; An attitude solution algorithm determination module is used to determine a corresponding attitude solution algorithm based on the target parameters; The motion posture determination module is used to determine the motion posture of the target object according to the posture solution algorithm.
10. A processing device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the motion posture determination method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the motion posture determination method according to any one of claims 1 to 8 are implemented.
