Altitude measurement method and device, computer equipment and storage medium
By combining the altitude data of GNSS and barometers, using their respective advantages, the problem of low altitude measurement accuracy in the prior art is solved, and higher altitude measurement accuracy and lower equipment requirements are achieved.
Patent Information
- Application Number
- CN202311756075.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2025-06-20
AI Technical Summary
In the prior art, the altitude accuracy of GPS-dependent computing devices is low, resulting in large altitude measurement errors.
By combining the altitude collected by GNSS and the altitude collected by the barometer, loosely coupled altitude measurements are performed using the advantages of GNSS in absolute altitude measurement and the advantages of barometer in relative altitude measurement.
The altitude measurement accuracy during movement is improved, the equipment hardware requirements, resource occupation and power consumption are reduced, so that the method can be applied to lightweight devices, such as wearable devices, taking into account the universality of the method.
Smart Images

Figure CN120176618A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of altitude measurement, and in particular, to an altitude measurement method, apparatus, computer device, and storage medium. Background Art
[0002] With the improvement of residents' living standards and strong support from the country, skiing has become closer to residents' lives. During the skiing process, the altitude parameter can not only reflect the absolute altitude of the current location but also show the altitude drop (i.e., the altitude difference generated during the movement) during the skiing process. It is one of the parameters that skiers hope to accurately record and display.
[0003] In related technologies, GPS (Global Positioning System) is usually used to obtain altitude values. However, relying solely on GPS to calculate the altitude of the device often has low accuracy and large altitude measurement errors. Summary of the Invention
[0004] To overcome the problems in related technologies, the present disclosure provides an altitude measurement method, apparatus, computer device, and storage medium.
[0005] The first aspect of the present disclosure provides an altitude measurement method, including:
[0006] Obtaining the altimeter altitude of the current frame, and determining the altitude change amount of the current frame compared to the Nth previous frame according to the altimeter altitude of the current frame and the altimeter altitude of the Nth previous frame, where N is a positive integer, and the altimeter altitude is the altitude collected by the altimeter;
[0007] Determining the output altitude of the current frame according to the output altitude of the Nth previous frame and the altitude change amount, where the output altitude of the first frame is the altitude collected by the Global Navigation Satellite System (GNSS).
[0008] Optionally, the method further includes:
[0009] In response to the current frame meeting the calibration opportunity, calibrating the output altitude of the current frame based on the altitude collected by the GNSS.
[0010] Optionally, the calibration opportunity includes:
[0011] Receiving a calibration instruction from the user;
[0012] And / or, identifying the end of a motion cycle.
[0013] Optionally, the method further includes:
[0014] In response to the completion of the barometer calibration, calibrate the output altitude of the current frame based on the altitude after the barometer calibration.
[0015] Optionally, the method further includes:
[0016] Obtain a standard air pressure-altitude reference curve of the location where the movement is located, and calibrate the barometer according to the standard altitude, where the standard altitude is the altitude obtained based on the reference curve and the air pressure collected by the barometer;
[0017] And / or, receive an instruction indicating the standard altitude, and calibrate the barometer according to the standard altitude.
[0018] Optionally, the method further includes:
[0019] In response to the difference between the output altitude of the current frame before and after calibration being greater than a first threshold, split the difference into multiple sub-differences, and compensate the output altitude according to the sub-differences in multiple frames including the current frame, where the sub-difference is less than or equal to the first threshold, and the multiple sub-differences correspond to the multiple frames one by one.
[0020] Optionally, the splitting the difference into multiple sub-differences includes:
[0021] Determine the number of sub-differences according to the relationship between the difference and the first threshold, and split the difference into multiple sub-differences.
[0022] Optionally, the method further includes:
[0023] In response to the output altitude of the current frame being greater than a second threshold, split the output altitude of the current frame into multiple sub-altitudes, and compensate the output altitude according to the sub-altitudes in multiple frames including the current frame, where the sub-altitude is less than or equal to the second threshold, and the multiple sub-altitudes correspond to the multiple frames one by one.
[0024] Optionally, the method further includes:
[0025] In response to the altitude change amount being greater than a third threshold, split the altitude change amount into multiple sub-altitude change amounts, and compensate the output altitude according to the sub-altitude change amounts in multiple frames including the current frame, where the sub-altitude change amount is less than or equal to the third threshold, and the multiple sub-altitude change amounts correspond to the multiple frames one by one.
[0026] Optionally, the method further includes:
[0027] Generate an altitude map according to the output altitude of at least one frame and the moment corresponding to the output altitude, where the coordinate axes of the altitude map include a time axis and an altitude axis.
[0028] Optionally, obtaining the barometric altitude of the current frame includes:
[0029] In response to the time interval between the current moment and the last time the barometric altitude of the current frame was obtained reaching a fourth threshold, obtaining the barometric altitude of the current frame;
[0030] And / or, in response to receiving a user instruction to obtain the output altitude, obtaining the barometric altitude of the current frame.
[0031] A second aspect of the present disclosure provides an altitude measurement device, the device includes:
[0032] A barometric altitude acquisition module, configured to obtain the barometric altitude of the current frame, and determine the altitude change amount of the current frame compared to the barometric altitude of the previous Nth frame based on the barometric altitude of the current frame and the barometric altitude of the previous Nth frame, where N is a positive integer, and the barometric altitude is the altitude collected by the barometer;
[0033] An output altitude determination module, configured to determine the output altitude of the current frame based on the output altitude of the previous Nth frame and the altitude change amount, where the output altitude of the first frame is the altitude collected by the Global Navigation Satellite System (GNSS).
[0034] Optionally, the device further includes:
[0035] A first calibration module, configured to calibrate the output altitude of the current frame based on the altitude collected by the GNSS in response to the current frame meeting the calibration timing.
[0036] Optionally, the calibration timing includes:
[0037] Receiving a calibration instruction from the user;
[0038] And / or, recognizing the end of a motion cycle.
[0039] Optionally, the device further includes:
[0040] A second calibration module, configured to calibrate the output altitude of the current frame based on the altitude after the barometer calibration in response to the completion of the barometer calibration.
[0041] Optionally, the device further includes:
[0042] A barometer calibration module, configured to perform the following steps:
[0043] Obtain the standard barometric pressure - altitude reference curve of the motion location, and calibrate the barometer according to the standard altitude, where the standard altitude is the altitude obtained based on the reference curve and the pressure collected by the barometer;
[0044] And / or, receive an instruction indicating the standard altitude, and calibrate the barometer according to the standard altitude.
[0045] Optionally, the device further includes:
[0046] A first splitting module, configured to, in response to a difference between the output altitude before and after calibration of the current frame being greater than a first threshold, split the difference into multiple sub-differences, and compensate the output altitude according to the sub-differences in multiple frames including the current frame, where the sub-difference is less than or equal to the first threshold, and the multiple sub-differences correspond to the multiple frames one by one.
[0047] Optionally, when the first splitting module is configured to split the difference into multiple sub-differences, it is configured to:
[0048] Determine the number of sub-differences according to the relationship between the difference and the first threshold, and split the difference into multiple sub-differences.
[0049] Optionally, the device further includes:
[0050] A second splitting module, configured to, in response to the output altitude of the current frame being greater than a second threshold, split the output altitude of the current frame into multiple sub-altitudes, and compensate the output altitude according to the sub-altitudes in multiple frames including the current frame, where the sub-altitude is less than or equal to the second threshold, and the multiple sub-altitudes correspond to the multiple frames one by one.
[0051] Optionally, the device further includes:
[0052] A third splitting module, configured to, in response to the altitude change amount being greater than a third threshold, split the altitude change amount into multiple sub-altitude change amounts, and compensate the output altitude according to the sub-altitude change amounts in multiple frames including the current frame, where the sub-altitude change amount is less than or equal to the third threshold, and the multiple sub-altitude change amounts correspond to the multiple frames one by one.
[0053] Optionally, the device further includes:
[0054] An altitude map generation module, configured to generate an altitude map according to the output altitude of at least one frame and the moment corresponding to the output altitude, where the coordinate axes of the altitude map include a time axis and an altitude axis.
[0055] Optionally, when the barometer altitude acquisition module is configured to acquire the barometer altitude of the current frame, it is configured to perform the following steps:
[0056] In response to the time interval between the current moment and the time when the barometer altitude of the current frame was last acquired reaching a fourth threshold, acquire the barometer altitude of the current frame;
[0057] And / or, in response to receiving a user instruction to obtain the output altitude, obtain the barometer altitude of the current frame.
[0058] A third aspect of the present disclosure provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the first aspect is implemented.
[0059] A fourth aspect of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect is implemented.
[0060] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0061] In the embodiments of the present disclosure, the altitude collected by GNSS is used as the output altitude of the first frame. At the same time, during the movement, the barometer altitude of the current frame is obtained, and by adding the change amount of the barometer altitude of the current frame compared with the barometer altitude of the previous Nth frame to the output altitude of the previous Nth frame, the output altitude of the current frame is determined. Since GNSS altitude has an advantage in absolute altitude measurement, and the geographical range involved in user movement is usually small, the corresponding relationship between pressure and altitude usually does not change significantly. Therefore, barometer altitude has an advantage in relative altitude. The present disclosure decouples GNSS altitude and barometer altitude, making full use of the respective advantages of GNSS and barometer sensors in absolute altitude and relative altitude changes, solving the problem of large altitude measurement errors caused by relying solely on GNSS altitude or strongly coupling GNSS altitude and barometer altitude as fixed inputs, improving the altitude measurement accuracy during movement, and enhancing the user experience. In addition, the method provided by the present disclosure decouples the altitude obtained based on GNSS and the altitude obtained based on the barometer. On the basis of greatly improving the accuracy of altitude measurement, it reduces the hardware requirements, resource occupancy, and power consumption of the device executing the method, thereby reducing the running latency of this method and enabling this method to be applied to lightweight devices (such as wearable devices), taking into account the universality of this method.
[0062] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings herein are incorporated into the specification and form a part of the present disclosure, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.
[0064] Figure 1 It is a flowchart of an altitude measurement method shown in some exemplary embodiments.
[0065] Figure 2 is a flowchart of another altitude measurement method shown in some exemplary embodiments.
[0066] Figure 3 is a flowchart of yet another altitude measurement method shown in some exemplary embodiments.
[0067] Figure 4 is a flowchart of yet another altitude measurement method shown in some exemplary embodiments.
[0068] Figure 5 is a flowchart of yet another altitude measurement method shown in some exemplary embodiments.
[0069] Figure 6 is a flowchart of yet another altitude measurement method shown in some exemplary embodiments.
[0070] Figure 7 is a flowchart of yet another altitude measurement method shown in some exemplary embodiments.
[0071] Figure 8 is an application scenario diagram of an altitude measurement method shown in some exemplary embodiments.
[0072] Figure 9 is a block diagram of an altitude measurement device shown in some exemplary embodiments.
[0073] Figure 10 is a hardware structure diagram of a computer device shown in some exemplary embodiments. Detailed implementation manners
[0074] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0075] The terms used in the present disclosure are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. The singular forms "a", "the", and "said" used in the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0076] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".
[0077] With the improvement of residents' living standards and the strong support of the country, skiing has become increasingly close to residents' lives. During the skiing process, the parameter of altitude can not only reflect the absolute altitude of the current terrain but also reflect the altitude drop during the skiing process (i.e., the altitude difference generated during the movement), which is one of the parameters that skiers hope to accurately record and display.
[0078] In the related art, GPS (Global Positioning System) is usually used to obtain altitude values. However, relying solely on GPS to calculate the altitude of the device often has low accuracy and large altitude measurement errors.
[0079] In view of this, the present disclosure provides an altitude measurement method, device, computer device, and storage medium.
[0080] First, an explanation of the concept of "frame" involved in the present disclosure is given. A "frame" refers to a discrete data point in a continuous time series. Each frame represents obtaining a set of data or performing an operation at a specific time point, such as measuring or recording the value of a physical quantity. Specifically, in the present disclosure, a "frame" includes the time points (which can also be referred to as "moments") when the sensor collects altitude data each time. These time points can have a fixed interval or can be determined according to preset conditions or user instructions.
[0081] Preferably, the method can be applied to a wearable device. Herein, a wearable device can refer to an electronic device that can be worn on the body or attached to a body part, and it can usually achieve complete or partial functions without relying on other devices such as a mobile phone. Specifically, it can be a smart bracelet, a smart watch, smart glasses, wireless earphones, a wearable vital sign monitor, etc.
[0082] When the method is applied to a wearable device or other lightweight devices, due to the small hardware volume, these devices usually do not have the ability to directly connect to the network (and the sports scenarios they apply to may also not have network conditions), and the method provided by the present disclosure can be applied to wearable devices to provide an altitude measurement solution that takes into account both lightweight and measurement accuracy.
[0083] In addition, preferably, the method can be applied to at least one of the following sports scenarios: skiing, rock climbing, and mountaineering. The above scenarios usually involve relatively strong altitude measurement requirements and are also common scenarios for the above wearable devices.
[0084] Next, the embodiments of the present disclosure will be described in detail.
[0085] In a first aspect, an altitude measurement method is provided. Please refer to Figure 1 , including the following steps:
[0086] In step S101, obtain the barometer altitude of the current frame, and determine the altitude change amount of the current frame compared to the Nth previous frame according to the barometer altitude of the current frame and the barometer altitude of the Nth previous frame, where N is a positive integer, and the barometer altitude is the altitude collected by the barometer.
[0087] Among them, the altitude change amount can be the change amount determined by the subtraction difference between the barometer altitude of the current frame and the barometer altitude of the Nth previous frame, or the change amount obtained by fitting the barometer altitude of the current frame and the barometer altitude of the Nth previous frame based on a fitting function.
[0088] The barometer altitude refers to the height of a certain location relative to the sea level measured by a barometer. Exemplarily, the barometer can use the relationship between air pressure and altitude to calculate the altitude, that is, measure the current atmospheric pressure using a barometer sensor and calculate the altitude by comparing it with the known standard atmospheric pressure. Generally, the standard atmospheric pressure refers to the air pressure value under standard atmospheric conditions at sea level, such as the standard sea level pressure defined in the international standard atmosphere model. Its specific calculation formula can refer to the reference formula given by the barometer manufacturer or the international standard atmosphere model, which will not be elaborated here.
[0089] Optionally, the obtaining of the barometer altitude of the current frame includes at least one of the following two optional triggering methods:
[0090] In response to the time interval between the current moment and the last time the barometer altitude of the current frame was obtained reaching a fourth threshold, obtain the barometer altitude of the current frame.
[0091] In response to receiving a user instruction to obtain the output altitude, obtain the barometer altitude of the current frame.
[0092] That is, make the time interval between each frame fixed, or obtain the altitude and calculate the output altitude at the current moment based on the user instruction to obtain the output altitude.
[0093] In step S102, the output altitude of the current frame is determined according to the output altitude of the previous Nth frame and the altitude change amount, where the output altitude of the first frame is the altitude collected by the Global Navigation Satellite System (GNSS).
[0094] Among them, the altitude change amount is the change amount of the current frame compared with the output altitude of the previous Nth frame. Based on this change amount and the output altitude of the previous Nth frame, the output altitude of the current frame can be determined. Specifically, the output altitude of the current frame can be the sum obtained by adding the barometer altitude of the previous Nth frame and the altitude change amount, or it can be the superimposed value obtained by fitting based on the barometer altitude of the current frame and the altitude change amount using a fitting function. Preferably, N can take the value of 1, that is, calculate the altitude change amount between the current frame and the previous frame, and superimpose this change amount on the output altitude of the previous frame. It should be understood that for the convenience of description, the present disclosure may describe the embodiment by taking the case where N takes the value of 1 as an example, but the present disclosure does not limit the specific value of N; when N takes an integer greater than 1, it does not affect the present disclosure from achieving its original technical effects.
[0095] In addition, to implement the technical solution provided by the present disclosure, in the first frame, two values of the current GNSS (Global Navigation Satellite System) altitude and the barometer altitude can be recorded, and the GNSS altitude can be output as the output altitude, while the barometer altitude can be used as a parameter for calculating the altitude change amount of the next Nth frame. It should be noted that if N takes an integer greater than 1, then exemplarily, for each frame except the first frame among the previous N frames, calculate the altitude change amount between the current frame and the previous frame and superimpose this change amount on the output altitude of the previous frame to obtain the output altitude of the current frame until the output altitudes of the previous N frames are obtained; again exemplarily, for each frame among the previous N frames, record two values of the current GNSS (Global Navigation Satellite System) altitude and the barometer altitude, and output the GNSS altitude as the output altitude. The present disclosure does not limit this.
[0096] In the embodiments of the present disclosure, the altitude collected by GNSS is used as the output altitude of the first frame. Meanwhile, during the movement, the barometer altitude of the current frame is obtained, and the change amount of the barometer altitude of the current frame compared with the barometer altitude of the previous Nth frame is accumulated on the output altitude of the previous Nth frame to determine the output altitude of the current frame. Since GNSS altitude has an advantage in absolute altitude measurement, and the geographical range involved in user movement is usually small, the barometric-altitude correspondence usually does not change significantly. Therefore, barometer altitude has an advantage in relative altitude. The present disclosure decouples GNSS altitude and barometer altitude, making full use of the respective advantages of the two sensors of GNSS and barometer in absolute altitude and relative altitude changes, solving the problem of large altitude measurement errors caused by relying solely on GNSS altitude or strongly coupling GNSS altitude and barometer altitude as fixed inputs, improving the altitude measurement accuracy during movement, and enhancing the user experience. In addition, the method provided by the present disclosure decouples the altitude obtained based on GNSS and the altitude obtained based on barometer, greatly improving the accuracy of altitude measurement, reducing the hardware requirements, resource occupancy, and power consumption of the device executing the method, thereby reducing the operation delay of the method, and enabling the method to be applied to lightweight devices (such as wearable devices), taking into account the universality of the method.
[0097] In some embodiments of the present disclosure, to further prevent the accumulation of altitude measurement errors over time, the present disclosure also provides optional calibration steps for the output altitude. Two exemplary calibration dimensions are described below.
[0098] As the first dimension, please refer to Figure 2 , which includes the following steps:
[0099] S201, in response to the current frame meeting the calibration timing, calibrate the output altitude of the current frame based on the altitude collected by the GNSS.
[0100] Among them, the calibration timing may include receiving a calibration instruction from the user and recognizing the end of a movement cycle.
[0101] Specifically, the end of the motion cycle can be determined based on a preset condition or according to a user instruction. Exemplarily, in a skiing scenario, the user's gliding to the bottom of the slope can be used as a judgment condition for the end of a motion cycle (i.e., the process of the user gliding from the top of the slope to the bottom is regarded as a motion cycle). Specifically, the altitude change of the device executing the method can be judged. When the altitude change within a preset time threshold is less than a preset altitude change threshold, it is determined that a motion cycle ends. It can also be judged that a motion cycle ends when the altitude value of the device executing the method changes from a decreasing process to an increasing process. Another example is that in a jogging scenario, based on sensors such as a GNSS module, each time the user returns to the starting point during the exercise process can be used as a sign of the end of a motion cycle.
[0102] In the above embodiments, based on the recognition of the motion cycle, automatic altitude calibration during the motion process is achieved. In special motion scenarios such as skiing, mountain climbing, and rock climbing, the user device may be covered by thick clothes, the user's limbs may be restricted by sports equipment, and the user's voice may be interfered by environmental noise. In the above scenarios and similar scenarios, it is inconvenient for the user to interact with the device. Then, the altitude calibration based on motion cycle recognition can achieve the calibration of the output altitude without affecting the user experience. In addition, during special sports such as skiing, the user's motion speed may be very fast. At this time, due to the principles of gas dynamics, device positioning delay, and the complexity of the user's actions, there are often more influencing factors when performing altitude calibration, and these factors may limit the accuracy of calibration. When a motion cycle ends, the above influencing factors usually decrease significantly. Therefore, calibrating after recognizing the end of the motion cycle can also further improve the accuracy of altitude calibration.
[0103] As the second dimension, please refer to Figure 3 , which includes the following steps:
[0104] S301, in response to the completion of the barometer calibration, calibrate the output altitude of the current frame based on the altitude after the barometer calibration.
[0105] In step S301, the calibration of the barometer can be based on at least one of the following methods:
[0106] Obtain the standard air pressure - altitude reference curve of the motion location, and calibrate the barometer according to the standard altitude, where the standard altitude is the altitude obtained based on the reference curve and the air pressure collected by the barometer;
[0107] Receive an instruction indicating the standard altitude, and calibrate the barometer according to the standard altitude.
[0108] Among them, the standard air pressure - altitude reference curve of the location where the movement occurs can be obtained from a meteorological station or other similar institutions, or can be input based on an external device or a user instruction. The instruction indicating the standard altitude can be input by the user or obtained by receiving an external request. After the barometer is calibrated based on the above method, the accuracy of the altitude based on the barometer is significantly higher than that obtained by other methods. Therefore, the output altitude of the current frame can be calibrated based on the altitude after the barometer is calibrated to obtain a higher output altitude accuracy.
[0109] In some embodiments of the present disclosure, in order to further reduce the abnormal altitude and jumps caused by altitude measurement errors, and thus further improve the user experience, the present disclosure also provides optional processing methods for abnormal altitude or abnormal altitude changes. Three exemplary processing methods are described below.
[0110] As the first processing method, please refer to Figure 4 , which includes the following steps:
[0111] S401, in response to the difference between the output altitude of the current frame before and after calibration being greater than the first threshold, splitting the difference into multiple sub - differences, and compensating the output altitude according to the sub - differences in multiple frames including the current frame, where the sub - difference is less than or equal to the first threshold, and the multiple sub - differences correspond to the multiple frames one by one.
[0112] Optionally, the splitting the difference into multiple sub - differences includes: determining the number of sub - differences according to the relationship between the difference and the first threshold, and splitting the difference into multiple sub - differences.
[0113] The above - mentioned processing method can be used for the mutation that occurs after calibration of the output altitude. For example, after calibrating the output altitude by using the optional calibration method or other calibration methods in the above - mentioned embodiments, jumps in the output altitude may occur due to errors in the altitude measurement process when the calibration process is completed.
[0114] Specifically, the first threshold can be determined according to parameters such as the maximum drop, maximum slope, and maximum skiing speed recorded by sensors such as gyroscopes and GNSS during skiing, or can be determined according to the quotient of the highest altitude of the movement and the elapsed time. In addition, it can also be a preset value. Preferably, the preset value can be taken as the initial first threshold, and the reasonable value of the first threshold can be determined in real time according to the above - mentioned parameters during the movement. The number of sub - differences can be determined according to the quotient between the difference and the first threshold, or can be determined according to the quotient between the difference and other values smaller than the first threshold. It can also be determined based on other algorithms.
[0115] After obtaining the number of sub-differences, according to the number of sub-differences, the value of the original difference can be evenly distributed to each sub-difference, or the sub-differences except the last one can be the quotient of the original difference and the number of sub-differences (preferably, it can be rounded down), and the last sub-difference is the remainder of the original difference divided by the number of sub-differences. The present disclosure does not limit this. After obtaining multiple sub-differences, compensate each of the multiple sub-differences to the output altitudes of multiple frames including the current frame. The specific compensation method can be addition calculation, or based on a fitting function. According to the altitude change during the movement process, using the altitude value of the frame to be compensated and the corresponding sub-difference as inputs, calculate the fitted altitude value.
[0116] The following is an exemplary illustration of the above process with specific examples:
[0117] For example, the current frame is a, and altitude calibration has been performed on the current frame. The subsequent frames are b and c respectively. Among them, the value of frame a before calibration is 500 m, and the value after calibration is 488 m. The first threshold is 10 m. Then, the difference before and after calibration can be determined to be 12 m, and this difference is greater than the first threshold. Next, 12 m can be split into two sub-differences of 10 m and 2 m, and the value of frame a is determined to be 500 m - 10 m = 490 m. Then, compensate the sub-difference of 2 m to frame b. For example, if the output altitude of frame b is determined to be 485 m, then the output altitude of frame b can be compensated to 485 m - 2 m = 483 m. It should be understood that if the differences generated by multiple frames are all greater than the first threshold, these differences can be split into multiple sub-differences respectively and the compensation for multiple frames can be repeated. For example, before compensating frame b (at this time, the output altitude of frame b is 485 m), altitude calibration is performed on frame b, and the value after calibration is 470 m. Then, the difference of 15 m is greater than the first threshold, so it can be split into two sub-differences of 10 m and 5 m. The output altitude of frame b is set to 485 m - 10 m = 475 m. Then, compensate the sub-difference of 2 m to frame b, or compensate the sub-difference that should have been compensated to frame b to frame c, and compensate the sub-difference of 5 m to frame c. In the above optional cases, if the original output altitude of frame c is 470 m, then situations such as (b = 473 m, c = 465 m) and (b = 475 m, c = 463 m) may be obtained. The specific logic can be set according to the actual situation. It should be understood that the above examples are only exemplary illustrations of the optional solutions in the present disclosure, and they cannot limit the scope of the present disclosure.
[0118] As a second processing method, please refer to Figure 5 , which includes the following steps:
[0119] S501, in response to the output altitude of the current frame being greater than the second threshold, split the output altitude of the current frame into multiple sub-altitudes, and compensate the output altitude according to the sub-altitudes in multiple frames including the current frame, where the sub-altitudes are less than or equal to the second threshold, and the multiple sub-altitudes correspond to the multiple frames one by one.
[0120] The above processing method can split the relatively large altitude value obtained due to sensor anomalies. Among them, the output altitude can be the output altitude before calibration or the output altitude after calibration; it can be the output altitude before compensation or the output altitude after compensation; the second threshold can be determined according to the altitude recorded during the movement through an algorithm (for example, setting 1.2 times or other multiples of the maximum altitude value recorded during the previous movement as the second threshold), and in addition, it can also be a preset value. The number of sub-altitudes can be determined according to the quotient between the output altitude and the second threshold, or according to the quotient between the output altitude and other values smaller than the second threshold, and can also be determined based on other algorithms. After obtaining the number of sub-altitudes, the value of the original output altitude can be evenly distributed to each sub-altitude according to the number of sub-altitudes, or the sub-altitudes except the last one can be the quotient of the original output altitude and the number of sub-altitudes (preferably, rounded down), and the last sub-altitude is the remainder of the original output altitude divided by the number of sub-altitudes. The present disclosure does not limit this.
[0121] Among them, for the specific compensation method, reference can be made to the examples in the above relevant embodiments. In addition, it should be understood that if the output altitudes generated by multiple frames are all greater than the second threshold, these output altitudes can be split into multiple sub-altitudes respectively and the multiple frames can be compensated repeatedly, which will not be elaborated here.
[0122] As a third processing method, please refer to Figure 6 , which includes the following steps:
[0123] S601, in response to the altitude change amount being greater than the third threshold, split the altitude change amount into multiple sub-altitude change amounts, and compensate the output altitude according to the sub-altitude change amounts in multiple frames including the current frame, where the sub-altitude change amounts are less than or equal to the third threshold, and the multiple sub-altitude change amounts correspond to the multiple frames one by one.
[0124] Specifically, the altitude change amount can be determined according to the compensated output altitude or the output altitude before compensation; the third threshold can be determined according to parameters such as the maximum descent, maximum slope, and maximum skiing speed recorded by sensors such as gyroscopes and GNSS during skiing, or according to the quotient of the highest altitude of the movement and the elapsed time. In addition, it can also be a preset value. Preferably, the preset value can be taken as the initial third threshold, and the reasonable value of the third threshold can be determined in real time according to the above parameters during the movement. The number of sub-altitude change amounts can be determined according to the quotient between the altitude change amount and the third threshold, or according to the quotient between the altitude change amount and other values smaller than the third threshold. It can also be determined based on other algorithms. After obtaining the number of sub-altitude change amounts, the value of the original altitude change amount can be evenly distributed to each sub-altitude change amount according to the number of sub-altitude change amounts, or the sub-altitude change amounts except the last one can be set as the quotient of the original altitude change amount and the number of sub-altitude change amounts (preferably, rounded down), and the last sub-altitude change amount can be set as the remainder of the original altitude change amount divided by the number of sub-altitude change amounts. The present disclosure does not limit this.
[0125] Continuing with the above example, if there are three consecutive frames of a = 490m, b = 473m, and c = 465m, the altitude change amount from a to b is 17m, and the altitude change amount from b to c is 8m. If the third threshold is 15m, the altitude change amount from a to b can be split into two sub-altitude change amounts of 15m and 2m. The altitude of b can be determined as 490m - 15m = 475m, and the sub-altitude change amount of 2m can be compensated to frame c, that is, the altitude value of frame c is set to 465m - 2m = 463m. The compensated altitude change amounts are all less than or equal to the third threshold. Among them, the specific compensation method can refer to the examples in the above related embodiments. In addition, it should be understood that if the output altitudes generated by multiple frames are all greater than the first threshold, these output altitudes can be respectively split into multiple sub-altitudes and the compensation for multiple frames can be repeated.
[0126] In addition, it should be understood that if the differences generated by multiple frames are all greater than the first threshold, these differences can be respectively split into multiple sub-differences and the compensation for multiple frames can be repeated, which will not be elaborated here.
[0127] It should be understood that when obvious outliers appear, the corresponding threshold can be taken as the value corresponding to the outlier, or the values of the previous and / or subsequent frame(s) can be fitted through an interpolation algorithm to replace the outlier, and the other parts of the outlier can be discarded, so as to avoid the large errors caused by obvious outliers remaining during the compensation process.
[0128] In addition, the above three processing methods can be comprehensively applied. For example, after the second processing method is completed, the altitude change of each frame can be checked again according to the third processing method, or after the first processing method is completed, the altitude value or altitude change can be checked again according to the second or third processing method and re-split and compensated. Or after the third processing method is completed, the altitude value can be checked according to the second processing method; at the same time, the compensation values obtained by different processing methods can be applied to the same frame, and the present disclosure does not limit this. Preferably, at the end of or after the movement, the data of each frame can be smoothed and filtered again based on at least one of the above processing methods in combination with the motion state quantities recorded during the movement to ensure the smoothness and rationality of the finally presented motion data.
[0129] The above three processing methods respectively give splitting methods for large change values or large altitudes from the perspectives of calibrating jumps, abnormal data, error jumps, etc., so as to be able to present smoother and more reasonable altitude values and altitude changes for users, effectively improving the user experience.
[0130] In order to better present the movement process to the user, the method can also generate and present an altitude map according to the moments and output altitudes corresponding to some or all frames. Please refer to Figure 7 , which includes the following steps:
[0131] S701, generate an altitude map according to the output altitude of at least one frame and the moment corresponding to the output altitude, and the coordinate axes of the altitude map include a time axis and an altitude axis.
[0132] For example, if three frames a=(0s, 500m), b=(1s, 485m), c=(2s, 475m) are taken as the at least one frame, then the above discrete points can be plotted in a two-dimensional coordinate map with a time axis and an altitude axis. Further, an altitude map can be presented to the user in the form of a line based on the above discrete points according to methods such as direct connection, polynomial fitting, spline interpolation, linear regression or non-linear regression algorithms, so as to facilitate the user to view their own movement records and improve the user experience.
[0133] In some embodiments of the present disclosure, an exemplary application scenario of the present method is provided, which is described as follows:
[0134] The method is applied to a wearable device.
[0135] Among them, a wearable device can refer to an electronic device that can be worn on the body or attached to a body part, and it can usually achieve complete or partial functions without relying on other devices such as a mobile phone. Specifically, it can be a smart bracelet, a smart watch, smart glasses, wireless earphones, a wearable vital sign monitor, etc. For example, Figure 8There is shown a smart bracelet 800, wherein the smart bracelet 801 is equipped with a GNSS component 801 and a barometer component 802.
[0136] When the method is applied to wearable devices or other lightweight devices, due to the small hardware volume, these devices usually do not have the ability to directly connect to the network (and the motion scenarios in which they are applied may also not have network conditions), and the method provided by the present disclosure can be applied to wearable devices to provide an altitude measurement solution that takes into account both lightweight and measurement accuracy.
[0137] The method is applied to at least one of the following motion scenarios: skiing, rock climbing, and mountaineering.
[0138] The above scenarios usually involve relatively strong altitude measurement requirements and are also common scenarios for the above wearable devices. Therefore, in the above scenarios, the advantages that the present disclosure can achieve are particularly significant.
[0139] Corresponding to the embodiments of the foregoing method, the present disclosure also provides embodiments of a device and a terminal to which the device is applied.
[0140] A second aspect of the present disclosure provides an altitude measurement device. Please refer to Figure 9 , the device includes:
[0141] A barometer altitude acquisition module 901, configured to acquire the barometer altitude of the current frame, and determine the altitude change amount of the current frame compared to the barometer altitude of the previous Nth frame according to the barometer altitude of the current frame and the barometer altitude of the previous Nth frame, where N is a positive integer, and the barometer altitude is the altitude collected by the barometer;
[0142] An output altitude determination module 902, configured to determine the output altitude of the current frame according to the output altitude of the previous Nth frame and the altitude change amount, where the output altitude of the first frame is the altitude collected by the Global Navigation Satellite System GNSS.
[0143] Optionally, the device further includes:
[0144] A first calibration module, configured to calibrate the output altitude of the current frame based on the altitude collected by the GNSS in response to the current frame meeting the calibration timing.
[0145] Optionally, the calibration timing includes:
[0146] Receiving a calibration instruction from the user;
[0147] And / or, recognizing the end of a motion cycle.
[0148] Optionally, the device further includes:
[0149] A second calibration module, configured to, in response to completion of barometer calibration, calibrate the output altitude of the current frame based on the altitude after barometer calibration.
[0150] Optionally, the device further includes:
[0151] A barometer calibration module, configured to perform the following steps:
[0152] Obtain a standard air pressure - altitude reference curve at the location of movement, and calibrate the barometer according to the standard altitude, where the standard altitude is the altitude obtained based on the reference curve and the air pressure collected by the barometer;
[0153] And / or, receive an instruction indicating the standard altitude, and calibrate the barometer according to the standard altitude.
[0154] Optionally, the device further includes:
[0155] A first splitting module, configured to, in response to the difference between the output altitudes of the current frame before and after calibration being greater than a first threshold, split the difference into multiple sub - differences, and compensate the output altitude according to the sub - differences in multiple frames including the current frame, where the sub - difference is less than or equal to the first threshold, and the multiple sub - differences correspond to the multiple frames one by one.
[0156] Optionally, when the first splitting module is used to split the difference into multiple sub - differences, it is configured to:
[0157] Determine the number of sub - differences according to the relationship between the difference and the first threshold, and split the difference into multiple sub - differences.
[0158] Optionally, the device further includes:
[0159] A second splitting module, configured to, in response to the output altitude of the current frame being greater than a second threshold, split the output altitude of the current frame into multiple sub - altitudes, and compensate the output altitude according to the sub - altitudes in multiple frames including the current frame, where the sub - altitude is less than or equal to the second threshold, and the multiple sub - altitudes correspond to the multiple frames one by one.
[0160] Optionally, the device further includes:
[0161] A third splitting module, configured to, in response to the altitude change amount being greater than a third threshold, split the altitude change amount into multiple sub - altitude change amounts, and compensate the output altitude according to the sub - altitude change amounts in multiple frames including the current frame, where the sub - altitude change amount is less than or equal to the third threshold, and the multiple sub - altitude change amounts correspond to the multiple frames one by one.
[0162] Optionally, the device further includes:
[0163] An altitude map generation module, configured to generate an altitude map according to the output altitude of at least one frame and the moment corresponding to the output altitude, wherein the coordinate axes of the altitude map include a time axis and an altitude axis.
[0164] Optionally, when the barometer altitude acquisition module is used to acquire the barometer altitude of the current frame, the following steps are executed:
[0165] In response to that the time interval between the current moment and the last time of acquiring the barometer altitude of the current frame reaches a fourth threshold, acquire the barometer altitude of the current frame;
[0166] And / or, in response to receiving an instruction from the user to acquire the output altitude, acquire the barometer altitude of the current frame.
[0167] Optionally, the device is applied to a wearable device.
[0168] Optionally, the device is applied to at least one of the following sports scenarios: skiing, rock climbing, mountaineering.
[0169] For the implementation processes of the functions and roles of each module in the above device, please refer to the implementation processes of the corresponding steps in the above method for details, and will not be elaborated here.
[0170] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiments described above are only illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present disclosure solution. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0171] In a third aspect, the embodiment of the altitude measurement device provided by the present disclosure can be applied to a computer device. Please refer to the appendix Figure 10 , which exemplarily shows a hardware schematic diagram of a computer device. For example, the device 1000 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0172] The device 1000 may include one or more of the following components: a processing component 1001, a memory 1002, a power component 1003, a multimedia component 1004, an audio component 1005, an input / output (I / O) interface 1006, a sensor component 1007, and a communication component 1008.
[0173] The processing component 1001 generally controls the overall operation of the device 1000, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 1001 may include one or more processors 1009 to execute instructions to complete all or part of the steps of the above-described methods. In addition, the processing component 1001 may include one or more modules to facilitate the interaction between the processing component 1001 and other components. For example, the processing component 1001 may include a multimedia module to facilitate the interaction between the multimedia component 1004 and the processing component 1001.
[0174] The memory 1002 is configured to store various types of data to support the operation of the device 1000. Examples of such data include instructions for any application or method operating on the device 1000, contact data, phone book data, messages, pictures, videos, and the like. The memory 1002 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0175] The power component 1003 provides power to various components of the device 1000. The power component 1003 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 1000.
[0176] The multimedia component 1004 includes a screen that provides an output interface between the device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 1004 includes a front camera and / or a rear camera. When the device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each of the front camera and the rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0177] The audio component 1005 is configured to output and / or input audio signals. For example, the audio component 1005 includes a microphone (MIC) that is configured to receive external audio signals when the device 1000 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 1002 or transmitted via the communication component 1008. In some embodiments, the audio component 1005 further includes a speaker for outputting audio signals.
[0178] The I / O interface 1006 provides an interface between the processing component 1001 and peripheral interface modules, and the peripheral interface modules may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
[0179] The sensor component 1007 includes one or more sensors for providing status assessments of various aspects of the device 1000. For example, the sensor component 1007 can detect the on / off state of the device 1000, the relative positioning of components, such as the display and keypad of the device 1000. The sensor component 1007 can also detect a change in the position of the device 1000 or a component of the device 1000, the presence or absence of user contact with the device 1000, the orientation or acceleration / deceleration of the device 1000, and the temperature change of the device 1000. The sensor component 1007 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 1007 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 1007 can further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0180] The communication component 1008 is configured to facilitate communication between the device 1000 and other devices in a wired or wireless manner. The device 1000 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 1008 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1008 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0181] In an exemplary embodiment, the device 1000 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the altitude measurement method of the above computer device.
[0182] In a fourth aspect, in an exemplary embodiment of the present disclosure, there is also provided a non-transitory computer-readable storage medium including instructions, such as a memory 1002 including instructions, and the above instructions can be executed by a processor 1009 of the device 1000 to complete the altitude measurement method of the above computer device. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0183] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0184] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not claimed in the present disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0185] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
[0186] The above are only the preferred embodiments of the present disclosure and are not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present disclosure shall be included within the scope of protection of the present disclosure.
Claims
1. An altitude measurement method, characterized in that, Including: Obtain the barometer altitude of the current frame, and determine the altitude change amount of the current frame compared to the barometer altitude of the previous Nth frame according to the barometer altitude of the current frame and the barometer altitude of the previous Nth frame, where N is a positive integer, and the barometer altitude is the altitude collected by the barometer; Determine the output altitude of the current frame according to the output altitude of the previous Nth frame and the altitude change amount, where the output altitude of the first frame is the altitude collected by the Global Navigation Satellite System (GNSS).
2. The altitude measurement method according to claim 1, characterized in that, The method further includes: In response to the current frame meeting the calibration timing, calibrate the output altitude of the current frame based on the altitude collected by the GNSS.
3. The altitude measurement method according to claim 2, characterized in that, The calibration timing includes: Receiving a calibration instruction from the user; And / or, identifying the end of a motion cycle.
4. The altitude measurement method according to claim 1, characterized in that, The method further includes: In response to the completion of barometer calibration, calibrate the output altitude of the current frame based on the altitude after barometer calibration.
5. The altitude measurement method according to claim 4, characterized in that, The method further includes: Obtain the standard air pressure - altitude reference curve of the motion location, and calibrate the barometer according to the standard altitude, where the standard altitude is the altitude obtained based on the reference curve and the air pressure collected by the barometer; And / or, receive an instruction indicating the standard altitude, and calibrate the barometer according to the standard altitude.
6. The altitude measurement method according to any one of claims 2 to 5, characterized in that, The method further includes: In response to the difference between the output altitude of the current frame before and after calibration being greater than the first threshold, split the difference into multiple sub - differences, and compensate the output altitude according to the sub - differences in multiple frames including the current frame, where the sub - difference is less than or equal to the first threshold, and the multiple sub - differences correspond to the multiple frames one by one.
7. The altitude measurement method according to claim 6, characterized in that, The splitting the difference into multiple sub - differences includes: Determine the number of sub - differences according to the relationship between the difference and the first threshold, and split the difference into multiple sub - differences.
8. The altitude measurement method according to claim 1, characterized in that, The method further includes: In response to the output altitude of the current frame being greater than the second threshold, split the output altitude of the current frame into multiple sub - altitudes, and compensate the output altitude according to the sub - altitudes in multiple frames including the current frame, where the sub - altitude is less than or equal to the second threshold, and the multiple sub - altitudes correspond to the multiple frames one by one.
9. The altitude measurement method according to claim 1, characterized in that, The method further includes: In response to the altitude change amount being greater than the third threshold, split the altitude change amount into multiple sub - altitude change amounts, and compensate the output altitude according to the sub - altitude change amounts in multiple frames including the current frame, where the sub - altitude change amount is less than or equal to the third threshold, and the multiple sub - altitude change amounts correspond to the multiple frames one by one; And / or, The method further includes: Generate an altitude map according to the output altitude of at least one frame and the corresponding time of the output altitude, where the coordinate axes of the altitude map include a time axis and an altitude axis.
10. The altitude measurement method according to claim 1, characterized in that, The obtaining the barometer altitude of the current frame includes: In response to the time interval between the current moment and the last time of obtaining the barometer altitude of the current frame reaching the fourth threshold, obtain the barometer altitude of the current frame; And / or, in response to receiving an instruction from the user to obtain the output altitude, obtain the barometer altitude of the current frame.
11. An altitude measurement device, characterized in that, The device includes: A barometer altitude acquisition module, which is used to acquire the barometer altitude of the current frame, and determine the altitude change amount of the current frame compared to the barometer altitude of the previous Nth frame according to the barometer altitude of the current frame and the barometer altitude of the previous Nth frame, where N is a positive integer, and the barometer altitude is the altitude collected by the barometer; An output altitude determination module, which is used to determine the output altitude of the current frame according to the output altitude of the previous Nth frame and the altitude change amount, where the output altitude of the first frame is the altitude collected by the Global Navigation Satellite System (GNSS).
12. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the program is executed by the processor, the method described in any one of claims 1 to 10 is implemented.