Trajectory determination method, wearable device, and storage medium

By integrating navigation system and sensor data into wearable devices, calculating attitude quaternions, and fusing trajectory data, the problem of low positioning accuracy caused by weak GNSS signals is solved, and accurate measurement of movement distance and speed is achieved.

CN122172249APending Publication Date: 2026-06-09SHENZHEN YANXIANG QIANDONG TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN YANXIANG QIANDONG TECH CO LTD
Filing Date
2026-01-30
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing wearable devices have low positioning accuracy when swimming outdoors due to the weak water penetration of GNSS signals and the movement of the device with arm movements, which affects the accuracy of distance and speed measurement.

Method used

By acquiring the first trajectory data and actual trajectory error at the end of the swing arm cycle, and combining the data collected by the navigation system and sensors, the attitude quaternion is calculated, and the trajectory data directly measured by GNSS signals is fused to generate the target trajectory data.

Benefits of technology

It improves the positioning accuracy of wearable devices in sports such as swimming, ensuring the accuracy of distance and speed measurements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122172249A_ABST
    Figure CN122172249A_ABST
Patent Text Reader

Abstract

This application relates to the field of positioning technology and discloses a trajectory determination method, a wearable device, and a computer-readable storage medium. The method includes: acquiring first trajectory data and actual trajectory error at the end of the previous arm swing cycle; collecting position and velocity information at the end of the current arm swing cycle through a navigation system to obtain second trajectory data; collecting acceleration information within the current arm swing cycle through a sensor and calculating attitude quaternions based on the acceleration information; calculating position and velocity information at the end of the current arm swing cycle based on the position information and attitude quaternions of the first trajectory data to obtain third trajectory data; and fusing the second and third trajectory data based on the actual trajectory error to generate target trajectory data at the end of the current arm swing cycle. This method improves the accuracy of the wearable device in measuring motion distance and velocity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of positioning technology, specifically to a trajectory determination method, a wearable device, and a computer-readable storage medium. Background Technology

[0002] Wearable devices such as smartwatches and smart bracelets are electronic devices that can be worn directly on the wrist. They are typically used to monitor and record users' physiological and physical data, or to provide other smart functions. For example, in outdoor swimming, wearable devices can record the swimmer's distance, speed, and other swimming information.

[0003] Existing wearable devices generally rely on GNSS (Global Navigation Satellite System) positioning signals to measure outdoor swimming distance and speed. However, since wearable devices move back and forth with the swimmer's arm movements while swimming, and GNSS signals have relatively weak water penetration, wearable devices often cannot accurately locate the swimmer's position, resulting in low accuracy in measuring distance and speed. Summary of the Invention

[0004] In view of the above problems, embodiments of this application provide a trajectory determination method, a wearable device, and a computer-readable storage medium to solve the problem of low measurement accuracy of motion distance and speed in the prior art.

[0005] According to one aspect of the embodiments of this application, a trajectory determination method is provided, applied to a wearable device. The method includes: acquiring first trajectory data and actual trajectory error at the end of the previous arm swing cycle, wherein the first trajectory data includes position information; acquiring position information and velocity information at the end of the current arm swing cycle through a navigation system to obtain second trajectory data; acquiring acceleration information during the current arm swing cycle through a sensor and calculating attitude quaternions based on the acceleration information; calculating position information and velocity information at the end of the current arm swing cycle based on the position information and attitude quaternions of the first trajectory data to obtain third trajectory data; and fusing the second trajectory data and the third trajectory data based on the actual trajectory error to generate target trajectory data at the end of the current arm swing cycle.

[0006] In one optional approach, before fusing the second trajectory data and the third trajectory data based on the actual trajectory error to generate the target trajectory data at the end of the current swing arm cycle, the method further includes: obtaining a preset target state transition matrix; calculating the predicted trajectory data at the end of the current swing arm cycle based on the first trajectory data and the target state transition matrix; and fusing the second trajectory data and the third trajectory data based on the actual trajectory error to generate the target trajectory data at the end of the current swing arm cycle, specifically including: fusing the second trajectory data, the third trajectory data, and the predicted trajectory data based on the actual trajectory error to generate the target trajectory data.

[0007] In one alternative approach, the second trajectory data, the third trajectory data, and the predicted trajectory data are fused based on the actual trajectory error to generate target trajectory data. Specifically, this includes: calculating the target gain based on the actual trajectory error; calculating trajectory correction data based on the target gain, the second trajectory data, and the third trajectory data; and correcting the predicted trajectory data based on the trajectory correction data to generate the target trajectory data.

[0008] In one optional approach, the target gain is calculated based on the actual trajectory error, specifically including: acquiring a preset trajectory estimation noise, and calculating the predicted trajectory error of the current swing arm cycle based on the trajectory estimation noise and the actual trajectory error; acquiring a preset trajectory acquisition noise, and calculating the target gain based on the trajectory acquisition noise and the predicted trajectory error.

[0009] In one alternative approach, after fusing the second trajectory data and the third trajectory data based on the actual trajectory error to generate the target trajectory data at the end of the current swing arm cycle, the method further includes: obtaining a preset target observation matrix; and calculating the actual trajectory error at the end of the current swing arm cycle based on the target gain, the predicted trajectory error, and the target observation matrix.

[0010] In one optional approach, based on the position information and attitude quaternions of the first trajectory data, the position information and velocity information at the end of the current arm swing cycle are calculated to obtain the third trajectory data. Specifically, this includes: calculating the motion acceleration corresponding to each moment within the current arm swing cycle based on the attitude quaternions; calculating the motion distance of the current arm swing cycle based on the maximum and minimum values ​​of the motion acceleration within the current arm swing cycle; calculating the position information at the end of the current arm swing cycle based on the position information and motion distance of the first trajectory data; calculating the velocity information at the end of the current arm swing cycle based on the motion acceleration within the current arm swing cycle; and determining the position information and velocity information at the end of the current arm swing cycle as the third trajectory data.

[0011] In an optional embodiment, the method further includes: in response to user input, acquiring the anthropometric parameters and movement type of the exerciser; calculating the movement distance of the current arm swing cycle based on the maximum and minimum values ​​of the movement acceleration within the current arm swing cycle, specifically including: acquiring corresponding movement parameters from a preset data table based on the anthropometric parameters and movement type, wherein the preset data table stores multiple movement parameters, and the movement parameters correspond to the anthropometric parameters and movement type; calculating the movement distance based on the movement parameters and the maximum and minimum values ​​of the movement acceleration.

[0012] In one alternative approach, acceleration information during the current swing arm cycle is acquired via sensors, and attitude quaternions are calculated based on the acceleration information. Specifically, this includes: acquiring three-dimensional acceleration in real time using an accelerometer on a wearable device; acquiring three-dimensional angular velocity using a gyroscope on a wearable device; and calculating attitude quaternions based on the three-dimensional acceleration and three-dimensional angular velocity.

[0013] According to another aspect of the embodiments of this application, a wearable device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the trajectory determination method described in any of the preceding claims.

[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the trajectory determination method described in any of the preceding claims.

[0015] In this embodiment, the wearable device collects the position and speed information of the athlete through a navigation system to obtain second trajectory data. At the same time, it calculates the third trajectory data of the athlete by collecting acceleration and position information from sensors. By fusing the second and third trajectory data, accurate target trajectory data is generated, thereby achieving accurate positioning of the athlete's movement trajectory and helping to improve the accuracy of the wearable device in measuring movement distance and speed.

[0016] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of this application are described below. Attached Figure Description

[0017] The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A schematic flowchart of the trajectory determination method provided in the first embodiment of this application is shown; Figure 2 A schematic flowchart of the trajectory determination method provided in the second embodiment of this application is shown; Figure 3 A schematic diagram of the structure of a wearable device provided in an embodiment of this application is shown. Detailed Implementation

[0018] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein.

[0019] Wearable devices are electronic devices that can be worn on the body. Among them, smartwatches and smart bracelets have become very common wearable devices due to their portability, multifunctionality, fashionability, technological advancements, and increased health awareness. For sports such as running and swimming, wearable devices can record data such as the type of exercise, distance, time, speed, and calorie consumption. This data can help athletes understand their athletic performance and provide professional data recording and analysis for different sports.

[0020] However, when athletes engage in sports such as running and swimming, they need to swing their arms to maintain body balance and coordination, as well as adjust their speed. For example, when running, arm swinging helps athletes maintain body balance and coordination, while increasing stride length and speed; when walking, arm swinging can increase the rhythm and stability of walking; and when swimming (especially in freestyle and breaststroke), arm swinging is an important movement for propelling the body forward.

[0021] Wearable devices such as smartwatches and smart bracelets are primarily worn on the wrist, and their movement during arm swings leads to the detection of significant noise data. Over extended periods of activity, this noise can accumulate, gradually increasing positioning errors and affecting accuracy. Furthermore, in certain activities (such as swimming), arm swings cause wearable devices to frequently switch between the surface and underwater, impacting GNSS signal reception. During brief periods of signal reception, GNSS signals may be unstable, further affecting positioning accuracy.

[0022] Based on this, in order to improve the positioning accuracy, this application provides a trajectory determination method. The wearable device calculates the attitude quaternion by collecting acceleration information from sensors, and then calculates the position and velocity information at the end of the current swing arm cycle based on the attitude quaternion and the position information at the end of the previous swing arm cycle to obtain trajectory data. Finally, based on the trajectory error at the end of the previous swing arm cycle, the above-calculated trajectory data and the trajectory data directly measured by GNSS signals are fused to generate the target trajectory data at the end of the current swing arm cycle.

[0023] In this method, the trajectory data of the mover at the end of the current swing cycle is calculated by calculating the attitude quaternion. Then, the calculated trajectory data and the trajectory signal directly measured by GNSS signal are fused according to the trajectory error to obtain more accurate target trajectory data. This avoids low positioning accuracy caused by the back and forth movement of the wearable device or the weak GNSS signal, and improves the accuracy of wearable devices in measuring movement distance and speed.

[0024] According to a first aspect of the embodiments of this application, a trajectory determination method is provided. The method includes, but is not limited to, determining the trajectory of movements such as running, walking, and swimming. For ease of explanation, this embodiment of the application will only use swimming as an example for illustration.

[0025] Please see Figure 1 , Figure 1 A flowchart of the trajectory determination method provided in the first embodiment of this application is shown. This method is executed by a wearable device, specifically a smartwatch, smart bracelet, or other wearable device. Figure 1 As shown, the method includes the following steps: Step S110: Obtain the first trajectory data and actual trajectory error at the end of the previous swing arm cycle, wherein the first trajectory data includes position information.

[0026] The arm swing cycle is the time required for an athlete to complete one arm swing motion during exercise. Taking swimming as an example, the arm swing cycle can include the entry phase (the phase when the athlete's hand or arm enters the water), the catch phase (the phase when the athlete's hand or arm catches the water and begins to push backward), the pull phase (the phase when the athlete's hand or arm pushes the water backward), the exit phase (the phase when the athlete's hand or arm leaves the water), and the recovery phase (the phase when the athlete's hand or arm moves in the air in preparation for the next entry into the water).

[0027] Wearable devices can collect data during movement using devices such as accelerometers, gyroscopes, and electromagnetic sensors. By using this data to identify different stages of the arm swing cycle, they can determine whether the exerciser has completed an arm swing cycle and determine the exerciser's trajectory data at the end of the arm swing cycle, thereby forming the exerciser's movement trajectory.

[0028] The first trajectory data is the trajectory data at the end of the previous arm swing cycle, which may include position information (i.e., the longitude and latitude of the athlete's location), velocity information (i.e., the athlete's eastward and northward velocity components), and heading. The actual trajectory error is used to characterize the accuracy of the first trajectory data. If the current arm swing cycle is the first arm swing cycle after the athlete begins to move, then the position information of the first trajectory data at the end of the previous arm swing cycle can be the initial position measured by GNSS signals, and the velocity information and actual trajectory error can be set to 0.

[0029] Step S120: Collect the position and velocity information at the end of the current swing arm cycle through the navigation system to obtain the second trajectory data.

[0030] Specifically, wearable devices can directly measure the second trajectory data through GNSS signals from navigation systems. Specifically, wearable devices can be equipped with GNSS receivers such as GPS receivers, GLONASS receivers, and BeiDou receivers to receive signals from satellites. These satellite signals are then used to perform positioning calculations to obtain multiple raw position information. Filtering algorithms such as low-pass filters, Kalman filters, and extended Kalman filters are then used to smooth the raw position information. The processed position information is then analyzed to obtain data such as velocity information and heading. Finally, the position information, velocity information, and heading data are used as the second trajectory data.

[0031] Step S130: Collect acceleration information during the current swing arm cycle using sensors, and calculate the attitude quaternion based on the acceleration information.

[0032] Wearable devices can collect acceleration information through sensors such as accelerometers and gyroscopes, and then process the acceleration information through attitude calculation algorithms such as complementary filters, Kalman filters, extended Kalman filters, orientation prematrix, and rotation vector methods to calculate attitude quaternions.

[0033] As an example, wearable devices can calculate the attitude angles (i.e., heading, roll, and pitch) of a person using acceleration measured by an accelerometer and heading measured by GNSS. Then, they can calculate the attitude quaternions based on these attitude angles. Specifically, assuming the acceleration measured by the accelerometer is... The heading measured by GNSS is Then the athlete's posture angle as follows: (1) Then, the attitude quaternion is calculated using the attitude angles. as follows: (2-1) (2-2) (2-3) (2-4) Furthermore, to make the attitude quaternion more accurate, wearable devices can collect data from multiple sensors and then fuse the data from these sensors to obtain the attitude quaternion. As an example, wearable devices can measure acceleration using an accelerometer. And measuring angular velocity using a gyroscope Then, the attitude quaternion is obtained by fusing the data collected by the two sensors. Specifically, step S130 may include the following steps (steps S131 to S133): Step S131: Real-time acquisition of three-dimensional acceleration using the accelerometer on the wearable device.

[0034] Step S132: Collect three-dimensional angular velocity using the gyroscope on the wearable device.

[0035] Step S133: Calculate the attitude quaternion based on the three-dimensional acceleration and three-dimensional angular velocity.

[0036] An accelerometer is a sensor that measures the three-dimensional acceleration of an object, that is, the acceleration of the object along three axes (X-axis, Y-axis, and Z-axis), including gravitational acceleration and acceleration caused by motion. A gyroscope, on the other hand, is a sensor that measures the angular velocity of an object, that is, the rotational speed of the object about three axes (X-axis, Y-axis, and Z-axis).

[0037] Three-dimensional acceleration and three-dimensional angular velocity can be fused using algorithms such as complementary filters, Madgwick filters, and quaternion extended Kalman filters to obtain attitude quaternions. Taking the quaternion extended Kalman filter as an example, assuming the three-dimensional acceleration is... The three-dimensional angular velocity is First, the wearable device obtains the attitude quaternion through three-dimensional acceleration calculation. Specifically, it can be calculated using the above formulas (1), (2-1), (2-2), (2-3), and (2-4).

[0038] Next, the wearable device obtains the pose quaternion from the previous moment. Actual error of attitude quaternion Simultaneously, the state transition matrix is ​​determined based on the three-dimensional angular velocity. Specifically, the state transition matrix The following formula can be used to set it:

[0039] Then, based on the attitude quaternion from the previous moment... and state transition matrix The predicted attitude quaternion is calculated. The specific formula is as follows:

[0040] Then, based on the actual error Calculate the prediction error at the current time. And based on the prediction error Calculate the Kalman filter gain The specific formula is as follows: ; ; in, Let be the covariance matrix of the process noise, and be the error parameters related to the gyroscope. This is the observation matrix, used to map state variables to the observation space. The covariance matrix of the observation noise is denoted as , and is the acceleration error output by the accelerometer.

[0041] Finally, based on the Kalman filter gain Attitude quaternions obtained through three-dimensional acceleration calculation and predicted pose quaternions The fusion process yields the final pose quaternion, as shown in the following formula:

[0042] Of course, after calculating the final attitude quaternion, the Kalman filter gain can also be used to determine the final attitude quaternion. and prediction error Calculate the actual error at the current time. This provides the data foundation for the attitude quaternion at the next time step, and the specific formula is as follows:

[0043] in, It is an identity matrix.

[0044] Through steps S131 to S133, the accelerometer can provide accurate information about the direction of gravity to determine the static posture of the athlete (such as tilt angle), while the gyroscope can provide dynamic information about the athlete's rotation to update the posture in real time. By fusing the data collected by the two, more accurate and stable posture information can be obtained, and more precise data can be provided for subsequent trajectory data calculation.

[0045] Of course, in addition to the above methods, wearable devices can also use data collected by one or more sensors such as accelerometers, gyroscopes, magnetometers, and GNSS sensors for fusion calculations. For example, angular velocity can be measured by a gyroscope, and attitude change can be obtained by integrating the angular velocity. Then, the attitude quaternion can be updated to obtain the attitude quaternion. Alternatively, the direction of gravity can be measured by an accelerometer, and the direction of the geomagnetic field can be measured by a magnetometer. Then, the attitude quaternion can be obtained by fusing the data from these two sensors.

[0046] After step S130, step S140 is executed: based on the position information and attitude quaternion of the first trajectory data, the position information and velocity information at the end of the current swing arm cycle are calculated to obtain the third trajectory data.

[0047] Wearable devices can calculate the athlete's speed, direction, and distance based on posture quaternions. Combined with the position information in the first trajectory data, the position information at the end of the athlete's current arm swing cycle can be calculated. Finally, the speed and position information are determined as the third trajectory data.

[0048] Specifically, wearable devices can first utilize attitude quaternions. The acceleration measured by the accelerometer in the carrier coordinate system is transformed to the navigation coordinate system to obtain the actual acceleration of the athlete. The specific formula is as follows: ; (3); in, The acceleration in the carrier coordinate system, Acceleration in the navigation coordinate system It is a rotation matrix from the vehicle coordinate system to the navigation coordinate system.

[0049] Next, the wearable device can calculate the distance the athlete travels within the current arm swing cycle based on motion acceleration. Specifically, this distance can be calculated using methods such as integral methods, numerical integration methods, and motion models. Then, combined with the position information at the end of the previous arm swing cycle, the position information at the end of the current arm swing cycle is calculated. The specific formula is as follows: (4) in, This refers to the location information in the first trajectory data. This refers to the position information at the end of the current swing arm cycle. This refers to the distance the athlete travels during the current arm swing cycle. To guide the athletes' course of action.

[0050] Finally, the third trajectory data is determined based on the calculated position information and the motion acceleration calculated through attitude quaternions.

[0051] Furthermore, to improve the accuracy of the third trajectory data, the wearable device can also collect acceleration information at each moment within the current arm swing cycle in real time, calculate the attitude quaternion corresponding to each moment, and then calculate the motion acceleration corresponding to each moment from the attitude quaternion to generate the third trajectory data. Specifically, step S140 may include the following steps (steps S141 to S145): Step S141: Calculate the motion acceleration corresponding to each moment in the current arm swing cycle based on the attitude quaternion.

[0052] Step S142: Calculate the distance traveled in the current arm swing cycle based on the maximum and minimum values ​​of the motion acceleration within the current arm swing cycle.

[0053] Step S143: Calculate the position information at the end of the current swing arm cycle based on the position information and movement distance of the first trajectory data.

[0054] Step S144: Calculate the velocity information at the end of the current arm swing cycle based on the motion acceleration during the current arm swing cycle.

[0055] Step S145: Determine the position and velocity information at the end of the current swing arm cycle as the third trajectory data.

[0056] The wearable device can calculate the motion acceleration corresponding to each moment in the current arm swing cycle by means of coordinate system transformation and attitude quaternion. Specifically, it can use formula (3) and then calculate the motion distance of the current arm swing cycle based on the maximum and minimum values ​​of the motion acceleration. The specific formula is as follows: (5) in, The preset exercise parameters are specifically related to the exerciser's anthropometric parameters, exercise type, and arm swing efficiency. Wearable devices can set an exercise parameter based on the average data of multiple exercisers. These data can be divided into multiple levels according to specific combinations, and corresponding exercise parameters can be preset for each level. and These represent the maximum and minimum values ​​of motion acceleration during one swing arm cycle.

[0057] Next, the wearable device can calculate the position information of the exerciser at the end of each arm swing cycle based on the movement distance and direction of each arm swing cycle, as can be found in formula (4).

[0058] Then, the velocity information at the end of the current arm swing cycle is calculated based on the motion acceleration during the current arm swing cycle. Specifically, the wearable device can use the average, median, or mode of the motion acceleration during the current arm swing cycle as the acceleration during the current arm swing cycle, and then calculate the velocity information at the end of the current arm swing cycle based on this acceleration.

[0059] Finally, the position and velocity information at the end of the current swing arm cycle are determined as the third trajectory data.

[0060] Through steps S141 to S145, the wearable device calculates the position and velocity information at the end of the current variable cycle by collecting data at each moment within the current arm swing cycle. This fully considers the motion state under different arm swing stages, ensuring the accuracy of the third trajectory data and providing more accurate data for subsequent steps.

[0061] After step S140, step S150 is executed: the second trajectory data and the third trajectory data are fused according to the actual trajectory error to generate the target trajectory data at the end of the current swing arm cycle.

[0062] The second and third trajectory data can be fused according to preset weights. For example, if the weights of both the second and third trajectory data are set to 0.5, the wearable device can obtain the target trajectory data by calculating the average of the second and third trajectory data. Of course, the wearable device can also dynamically adjust the weights of the second and third trajectory data based on the actual trajectory error to ensure data accuracy.

[0063] In addition, wearable devices can also fuse second and third trajectory data through algorithms such as Bayesian estimation, neural networks, decision trees and random forests, and support vector machines to generate target trajectory data at the end of the current arm swing cycle, ensuring the accuracy of the athlete's movement trajectory.

[0064] In the above embodiments, the wearable device collects the position and speed information of the athlete through the navigation system to obtain the second trajectory data. At the same time, it calculates the third trajectory data of the athlete through the acceleration information collected by the sensor. By fusing the second and third trajectory data, accurate target trajectory data is generated, thereby achieving accurate positioning of the athlete's movement trajectory and helping to improve the accuracy of the wearable device in measuring movement distance and speed.

[0065] Furthermore, to improve the accuracy of trajectory data, wearable devices can also filter the collected IMU data, such as position, velocity, and acceleration information. Specifically, a first-order low-pass filter can be used to remove high-frequency noise from the IMU data and reduce rapidly changing interference. The processing involves mixing the current input value with historical output values ​​according to weights, and adjusting the weight ratio to control the "smoothing degree" to eliminate the influence of high-frequency noise. The specific low-pass filter function is as follows:

[0066] in, For the current input, This is the current output. These are historical output values. These are the filter coefficients, rounded down to the nearest integer. It determines the cutoff frequency and response speed, parameters The setup method is as follows:

[0067] in, The cutoff frequency, The sampling period.

[0068] Considering that different athletes have different anthropometric parameters such as arm length, leg length, height, and weight, and these anthropometric measurements can affect an athlete's performance. For example, in running, athletes with longer legs usually have a longer stride and can run farther with the same energy expenditure; in swimming, athletes with longer arms can cover more water surface with each stroke, thereby generating greater propulsion and increasing swimming speed.

[0069] Therefore, in order to more accurately determine the athlete's movement trajectory, wearable devices can also acquire the athlete's anthropometric parameters and movement type when the athlete begins to exercise. This method includes the following steps: Step S210: In response to user input, obtain the anthropometric parameters and exercise type of the athlete.

[0070] Among them, anthropometry parameters refer to indicators that describe the structure of the human body by measuring the proportions of various parts of the body, including but not limited to height, weight, arm length, leg length, and body composition (such as body fat percentage and muscle mass). Sport type is used to characterize the sport performed by the athlete, and sport types include but are not limited to sprinting, marathon, freestyle swimming, and breaststroke.

[0071] Next, when the wearable device calculates the exercise distance of the exerciser using formula (5), it can select the corresponding exercise parameters based on the exerciser's anthropometric parameters and exercise type. Specifically, step S142 may include the following steps: Step S142a: Obtain the corresponding motion parameters from the preset data table according to the anthropometric parameters and the type of exercise. The preset data table stores multiple motion parameters, and the motion parameters correspond to the anthropometric parameters and the type of exercise.

[0072] Step S142b: Calculate the distance traveled based on the motion parameters, the maximum value and the minimum value of the motion acceleration.

[0073] Among them, a preset data table can be set in advance on the wearable device, and various human measurement parameters and corresponding motion parameters for different types of exercise can be stored in the data table. For example, the data table stores various values ​​of human measurement parameters and combinations of exercise types in advance, and each combination is set with corresponding motion parameters. When the exerciser starts exercising, the human measurement parameters and exercise type can be set. The wearable device finds the corresponding motion parameters by looking up the preset data table, and finally calculates the exercise distance using formula (5).

[0074] Of course, to make the exercise distance more accurate, wearable devices can also detect the exerciser's arm swing efficiency in real time and adjust the exercise parameters accordingly. Furthermore, to facilitate the use of preset data tables, human body measurement parameters can be divided into ranges, allowing the wearable device to look up the table based on the range selected by the exerciser.

[0075] In the above embodiments, the wearable device can calculate the movement distance of each arm swing cycle by acquiring the anthropometric parameters of the athlete and selecting the corresponding movement parameters according to the movement type. This allows the wearable device to calculate the third trajectory data based on the size and proportion of various parts of different athletes, so as to provide a more accurate data basis for determining the subsequent target trajectory data.

[0076] Furthermore, in order to improve the accuracy of fusing the second and third trajectory data, such as Figure 2 As shown, Figure 2 A flowchart illustrating the trajectory determination method provided in the second embodiment of this application is shown. Before step S150, the method includes the following steps: Step S310: Obtain the preset target state transition matrix.

[0077] Step S320: Calculate the predicted trajectory data at the end of the current swing arm cycle based on the first trajectory data and the target state transition matrix.

[0078] The target state transition matrix is ​​used to predict the state variables at the current moment based on the state variables at the previous moment. That is, the wearable device can calculate the predicted trajectory data at the end of the current swing arm cycle based on the first trajectory data and the target state transition matrix. Assume the trajectory data is... ,in, and The location information in the trajectory data represents the eastward and northward positions of the mover, respectively. and The velocity information in the trajectory data represents the eastward and northward velocity components of the athlete, respectively. The target state transition matrix represents the heading in the trajectory data. It can be set to:

[0079] in, The preset sampling period is used. The predicted trajectory data can be calculated using the following formula:

[0080] in, To predict trajectory data, The target state transition matrix, This is the first trajectory data.

[0081] Wearable devices further combine predicted trajectory data to achieve data fusion. Step S150 specifically includes: Step S330: Based on the actual trajectory error, fuse the second trajectory data, the third trajectory data, and the predicted trajectory data to generate the target trajectory data.

[0082] The second trajectory data, the third trajectory data, and the predicted trajectory data can be fused according to preset weights, or they can be fused using algorithms such as Bayesian estimation, neural networks, decision trees and random forests, and support vector machines.

[0083] As an example, a wearable device can fuse second trajectory data, third trajectory data, and predicted trajectory data using the Kalman rate. Specifically, step S330 may include the following steps: Step S410: Calculate the target gain based on the actual trajectory error.

[0084] Specifically, the wearable device can predict the error of the target trajectory data when the swing arm cycle ends based on the actual trajectory error, and calculate the target gain based on the error. Specifically, step S410 may include the following steps (steps S411 to S412): Step S411: Obtain the preset trajectory estimation noise, and calculate the predicted trajectory error of the current swing arm cycle based on the trajectory estimation noise and the actual trajectory error.

[0085] Step S412: Obtain the preset trajectory acquisition noise, and calculate the target gain based on the trajectory acquisition noise and the predicted trajectory error.

[0086] The trajectory estimation noise refers to the relevant error parameters when calculating the third trajectory data based on attitude quaternions, while the trajectory acquisition noise refers to the relevant error parameters when the wearable device acquires the second trajectory data, such as the variance of GNSS positioning, velocity measurement, and heading errors. Both trajectory estimation noise and trajectory acquisition noise can be set according to the characteristics of the sensors on the wearable device to reflect the uncertainties in sensor measurements and system dynamics.

[0087] Specifically, the wearable device first calculates the predicted trajectory error for the current swing arm cycle based on the trajectory estimation noise and the actual trajectory error of the previous swing arm cycle. The specific formula is as follows:

[0088] in, The predicted trajectory error for the current swing arm cycle. This represents the actual trajectory error of the previous swing arm cycle. The noise is calculated based on the preset trajectory.

[0089] Then, the wearable device can calculate the target gain based on the trajectory acquisition noise and the predicted trajectory error, using the following formula:

[0090] in, For target gain, For the target observation matrix, The preset trajectory acquisition noise.

[0091] Through steps S411 to S412, the target gain is calculated by using trajectory estimation noise and trajectory acquisition noise. This can fuse information from different sensors, improve the reliability and accuracy of the data, and provide more accurate data for subsequent target trajectory data calculation.

[0092] After step S410, step S420 is executed: calculate trajectory correction data based on the target gain, the second trajectory data, and the third trajectory data.

[0093] Step S420: Correct the predicted trajectory data based on the trajectory correction data to generate the target trajectory data.

[0094] The trajectory correction data can be used to correct the predicted trajectory data, and the second trajectory data, third trajectory data, and predicted trajectory data can be fused using Kalman filtering. The specific formula is as follows:

[0095] in, For target trajectory data, To predict trajectory data, Correcting trajectory data, For the second trajectory data, This is the third trajectory data.

[0096] In the above embodiments, the wearable device calculates the target gain and calculates trajectory correction data based on the target gain, the second trajectory data, and the third trajectory data. The predicted trajectory data is then corrected using trajectory correction coefficients to obtain the target trajectory data, thereby achieving the fusion of the second trajectory data, the third trajectory data, and the predicted trajectory data to ensure the accuracy of the target trajectory data.

[0097] Furthermore, in order to provide accurate data for the next swing arm cycle, in some embodiments, after step S150, the method further includes the following steps: Step S510: Obtain the preset target observation matrix.

[0098] Step S520: Calculate the actual trajectory error at the end of the current swing arm cycle based on the target gain, predicted trajectory error, and target observation matrix.

[0099] In addition, after determining the target trajectory data, the wearable device can also update the trajectory error in real time, so as to provide an accurate data basis for determining the target trajectory data at the end of the next swing arm cycle. The specific formula is as follows:

[0100] in, This represents the actual trajectory error at the end of the current swing arm cycle. For target gain, For the target observation matrix, This is the error in predicting the trajectory.

[0101] According to another aspect of the embodiments of this application, a wearable device is provided, such as... Figure 3 As shown, Figure 3 The diagram shows a structural schematic of a wearable device provided in an embodiment of this application. The specific embodiments of this application do not limit the specific implementation of the wearable device.

[0102] like Figure 3 As shown, the wearable device 1 may include a processor 11 and a memory 12.

[0103] The memory 12 is used to store the computer program 13. The memory 12 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device. The computer program 13 may include computer-executable instructions.

[0104] The processor 11 is used to execute the computer program 13 to implement the above-described trajectory determination method embodiment.

[0105] Processor 11 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The wearable device may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.

[0106] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described trajectory determination method embodiment.

[0107] This application provides a computer program that can be executed by a processor to implement the above-described trajectory determination method embodiment.

[0108] This application provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described trajectory determination method embodiment.

[0109] In the several embodiments provided in this application, any function, if implemented as a software functional module / unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, part or all of the technical solutions of this application can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or other electronic device) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0110] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of this application are not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of this application.

[0111] It should be noted that the above embodiments are illustrative of this application and not restrictive, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In claims enumerating several means, several units or modules of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

[0112] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A trajectory determination method, characterized in that, Applied to wearable devices, the method includes: Obtain the first trajectory data and the actual trajectory error at the end of the previous swing arm cycle, wherein the first trajectory data includes position information; The second trajectory data is obtained by collecting position and velocity information at the end of the current swing arm cycle through the navigation system; Acceleration information during the current swing arm cycle is collected by sensors, and attitude quaternions are calculated based on the acceleration information; Based on the position information of the first trajectory data and the attitude quaternion, the position information and velocity information at the end of the current swing arm cycle are calculated to obtain the third trajectory data; The second trajectory data and the third trajectory data are fused based on the actual trajectory error to generate the target trajectory data at the end of the current swing arm cycle.

2. The trajectory determination method according to claim 1, characterized in that, Before fusing the second trajectory data and the third trajectory data according to the actual trajectory error to generate the target trajectory data at the end of the current swing arm cycle, the method further includes: Obtain the preset target state transition matrix; Based on the first trajectory data and the target state transition matrix, calculate the predicted trajectory data at the end of the current swing arm cycle; The step of fusing the second trajectory data and the third trajectory data based on the actual trajectory error to generate the target trajectory data at the end of the current swing arm cycle specifically includes: The second trajectory data, the third trajectory data, and the predicted trajectory data are fused based on the actual trajectory error to generate the target trajectory data.

3. The trajectory determination method according to claim 2, characterized in that, The step of fusing the second trajectory data, the third trajectory data, and the predicted trajectory data based on the actual trajectory error to generate the target trajectory data specifically includes: Calculate the target gain based on the actual trajectory error; Calculate trajectory correction data based on the target gain, the second trajectory data, and the third trajectory data; The predicted trajectory data is corrected based on the trajectory correction data to generate the target trajectory data.

4. The trajectory determination method according to claim 3, characterized in that, The calculation of the target gain based on the actual trajectory error specifically includes: Obtain the preset trajectory estimation noise, and calculate the predicted trajectory error of the current swing arm cycle based on the trajectory estimation noise and the actual trajectory error; The trajectory acquisition noise is acquired, and the target gain is calculated based on the trajectory acquisition noise and the predicted trajectory error.

5. The trajectory determination method according to claim 4, characterized in that, After fusing the second trajectory data and the third trajectory data based on the actual trajectory error to generate the target trajectory data at the end of the current swing arm cycle, the method further includes: Obtain the preset target observation matrix; The actual trajectory error at the end of the current swing arm cycle is calculated based on the target gain, the predicted trajectory error, and the target observation matrix.

6. The trajectory determination method according to any one of claims 1-5, characterized in that, The step of calculating the position and velocity information at the end of the current swing arm cycle based on the position information of the first trajectory data and the attitude quaternion to obtain the third trajectory data specifically includes: Calculate the motion acceleration corresponding to each moment within the current arm swing cycle based on the posture quaternion; Calculate the distance traveled in the current arm swing cycle based on the maximum and minimum values ​​of the motion acceleration within the current arm swing cycle; Based on the position information of the first trajectory data and the movement distance, calculate the position information at the end of the current swing arm cycle; Calculate the velocity information at the end of the current arm swing cycle based on the motion acceleration during the current arm swing cycle; The position and velocity information at the end of the current swing arm cycle are determined as the third trajectory data.

7. The trajectory determination method according to claim 6, characterized in that, The method further includes: In response to user input, obtain the athlete's anthropometric parameters and exercise type; The step of calculating the movement distance of the current arm swing cycle based on the maximum and minimum values ​​of the motion acceleration within the current arm swing cycle specifically includes: According to the human body measurement parameters and the exercise type, the corresponding exercise parameters are obtained from a preset data table, wherein the preset data table stores multiple exercise parameters, and the exercise parameters correspond to the human body measurement parameters and the exercise type; The distance traveled is calculated based on the motion parameters, the maximum value and the minimum value of the motion acceleration.

8. The trajectory determination method according to any one of claims 1-5, characterized in that, The process of acquiring acceleration information within the current swing arm cycle via sensors and calculating attitude quaternions based on the acceleration information specifically includes: The wearable device uses an accelerometer to collect three-dimensional acceleration in real time. The three-dimensional angular velocity is collected using the gyroscope on the wearable device; The attitude quaternion is calculated based on the three-dimensional acceleration and the three-dimensional angular velocity.

9. A wearable device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the trajectory determination method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the trajectory determination method according to any one of claims 1 to 8.