Accumulative climbing algorithm and system, electronic equipment and storage medium
By acquiring real-time data on air pressure, speed, and slope, and calculating and correcting changes in air pressure elevation, the problem of poor accuracy in traditional cumulative climb algorithms is solved, achieving more accurate cumulative climb calculations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional cumulative climb algorithms are affected by fluctuations in air pressure data and changes in velocity, resulting in poor accuracy and large errors in cumulative climb.
By acquiring air pressure, speed, and slope in real time, the difference between the air pressure elevation change value and the slope elevation change value is calculated, and the air pressure elevation change value is judged and corrected to ensure its accuracy, including filtering and adaptive correction.
It improves the accuracy of barometric elevation change values, reduces the error of cumulative climb values, and enhances the accuracy of cumulative climb values.
Smart Images

Figure CN121761837A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of motion analysis technology, specifically, it relates to a cumulative climb algorithm and system, electronic equipment, and storage medium. Background Technology
[0002] Cumulative elevation gain is an important indicator in outdoor cycling, and it is generally calculated and updated using the built-in sensors of the cycling computer. Traditional elevation calculation methods mostly use GPS to provide an initial elevation, then extrapolate elevation changes based on air pressure variations to obtain real-time elevation changes, and finally accumulate the cumulative elevation gain through iterative summation.
[0003] Traditional methods are simple and easy to implement, but the noise introduced by the following situations can greatly affect the cumulative climb rate, resulting in poor accuracy and large errors.
[0004] (1) High-frequency fluctuations in air pressure data itself: This can lead to these fluctuation values being misjudged as cycling ascents when accumulating elevations.
[0005] (2) Rapid changes in cycling speed and ambient wind: Rapid changes in speed and wind information will cause low-frequency baseline fluctuations in barometer data. Short-delay filtering is difficult to handle this kind of noise, and this situation is easily identified as climbing / descending. Summary of the Invention
[0006] This invention provides a cumulative climbing algorithm, which solves the technical problem of poor accuracy of air pressure elevation change values in the prior art.
[0007] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution: Cumulative climb algorithms include: S1. During cycling, the air pressure, speed, and gradient are obtained in real time. S2. Calculate the change in air pressure elevation at the current moment based on the air pressure value at the previous moment. Calculate the slope elevation change value based on the average slope and average speed within the most recently set time period; Calculate the absolute value of the difference between the change in air pressure elevation and the change in slope elevation; S3. Determine whether the first condition or the second condition is met; If the first condition is met: the change in air pressure elevation ≤ 0, then the change in air pressure elevation is updated to 0. If the second condition is met: the absolute value of the difference is greater than or equal to the difference threshold, then the pressure elevation change value is corrected and updated to the corrected pressure elevation change value. If the first and second conditions are not met, the change in air pressure elevation remains unchanged. S4. Add the changes in air pressure elevation to the cumulative climb value.
[0008] In some embodiments of this application, the slope elevation change value is calculated based on the average slope and average speed within a recently set time period; specifically including: The slope elevation change value is obtained by multiplying the gain coefficient, the average slope within the most recent set time period, and the average speed within the most recent set time period; where the gain coefficient is any value within (0, 1).
[0009] In some embodiments of this application, the difference threshold is positively correlated with the product of the current speed and the slope.
[0010] In some embodiments of this application, the change in air pressure elevation is corrected, specifically including: Multiply the change in air pressure elevation by a correction factor to obtain the corrected change in air pressure elevation.
[0011] In some embodiments of this application, the calculation steps of the correction coefficient include: Calculate the product of the current slope and the current speed, and then calculate the sum of the product and the change in air pressure elevation. The ratio of the product value to the sum value is calculated to obtain the correction coefficient.
[0012] In some embodiments of this application, a filter is used to filter the acquired air pressure value.
[0013] In some embodiments of this application, the air pressure value is obtained by a barometer; the speed and slope are obtained by a GPS navigation chip.
[0014] The cumulative climb system includes: The acquisition module is used to: acquire air pressure, speed, and gradient in real time during cycling; The calculation module is used to: calculate the change in air pressure elevation at the current moment based on the air pressure value at the current moment and the air pressure value at the previous moment; calculate the change in slope elevation based on the average slope and average speed within the most recent set time period; and calculate the absolute value of the difference between the change in air pressure elevation and the change in slope elevation. The judgment module is used to determine whether the first condition or the second condition is met. If the first condition is met: the change in air pressure elevation ≤ 0, then the change in air pressure elevation is updated to 0. If the second condition is met: the absolute value of the difference is greater than or equal to the difference threshold, then the pressure elevation change value is corrected and updated to the corrected pressure elevation change value. If the first and second conditions are not met, the change in air pressure elevation remains unchanged. The cumulative climb module is used to add the changes in air pressure elevation to the cumulative climb value.
[0015] Electronic devices, including: Memory is used to store instructions executed by the computer; A processor is configured to execute computer execution instructions stored in the memory to implement the cumulative climb algorithm.
[0016] A storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the cumulative climb algorithm.
[0017] Compared with the prior art, the advantages and positive effects of the present invention are as follows: The cumulative climb algorithm and system, electronic device, and storage medium of the present invention calculate the change in air pressure elevation at the current moment based on the air pressure value at the current moment and the air pressure value at the previous moment; calculate the change in slope elevation based on the average slope and average speed within the most recent set time period; calculate the absolute value of the difference between the change in air pressure elevation and the change in slope elevation; determine whether a first condition or a second condition is met; if the first condition is met: the change in air pressure elevation ≤ 0; then the change in air pressure elevation is updated to 0; if the second condition is met: the absolute value of the difference ≥ the difference threshold; then the change in air pressure elevation is corrected and updated to the corrected change in air pressure elevation; if neither the first nor the second condition is met, the change in air pressure elevation remains unchanged; and the change in air pressure elevation is added to the cumulative climb value. Therefore, the cumulative climb algorithm and system, electronic device, and storage medium of the present invention update the air pressure elevation change value to 0 when the air pressure elevation change value is ≤0; and correct the air pressure elevation change value when the absolute value of the difference between the air pressure elevation change value and the slope elevation change value is ≥ the difference threshold, so as to improve the accuracy of the air pressure elevation change value, reduce the error of the cumulative climb value, and thus improve the accuracy of the cumulative climb value, thereby solving the technical problem of poor accuracy of air pressure elevation change value in the prior art.
[0018] Other features and advantages of the present invention will become clearer after reading the detailed embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of an embodiment of the cumulative climbing algorithm proposed in this invention; Figure 2This is a flowchart of another embodiment of the cumulative climbing algorithm proposed in this invention; Figure 3 It is a system interaction diagram; Figure 4 This is a diagram showing the effect of air pressure filtering. Figure 5 This is a structural block diagram of an embodiment of the cumulative climb system proposed in this invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0022] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0023] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "multiple" means two or more.
[0024] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Example 1
[0025] The cumulative climb algorithm in this embodiment mainly includes the following steps, see below. Figure 1 As shown.
[0026] Step S1: During the ride, obtain the air pressure, speed, and gradient in real time.
[0027] In some embodiments of this application, the air pressure value is obtained by a barometer, which makes data acquisition convenient.
[0028] In some embodiments of this application, speed and gradient are obtained by a GPS navigation chip, making data acquisition simple, convenient, and accurate.
[0029] In some embodiments of this application, the obtained air pressure value is filtered using a filter to remove noise, thereby obtaining a highly accurate air pressure value.
[0030] Filtering out high-frequency noise from the air pressure value before calculating the air pressure elevation change value can improve the accuracy of the calculated air pressure elevation change value.
[0031] Step S2: Calculate the change in air pressure elevation at the current moment based on the air pressure value at the previous moment and the air pressure value at the current moment.
[0032] Calculate the slope elevation change value based on the average slope and average speed within the most recently set time period.
[0033] Calculate the absolute value of the difference between the change in air pressure elevation and the change in slope elevation.
[0034] Step S3: Determine whether the first condition or the second condition is met.
[0035] First condition: Change in air pressure elevation ≤ 0; Second condition: The absolute value of the difference is greater than or equal to the difference threshold.
[0036] If the first condition is met: the change in air pressure elevation is ≤0, then the change in air pressure elevation is updated to 0.
[0037] If the second condition is met: the absolute value of the difference is greater than or equal to the difference threshold, then the change value of air pressure elevation is corrected and updated to the corrected change value of air pressure elevation.
[0038] If the first and second conditions are not met, the change in air pressure elevation will remain unchanged.
[0039] Step S4: Add the changes in air pressure elevation to the cumulative climb value.
[0040] If the change in air pressure elevation is less than or equal to 0, it indicates that the air pressure elevation is not in a climbing state, and the change in air pressure elevation is updated to 0.
[0041] The change in air pressure elevation is calculated based on the air pressure value, and the change in slope elevation is calculated based on the average slope and average speed. If the absolute value of the difference between the change in air pressure elevation and the change in slope elevation is greater than or equal to the difference threshold, it indicates that the change in air pressure elevation and the change in slope elevation differ significantly, and the change in air pressure elevation needs to be corrected to improve the accuracy of the change in air pressure elevation.
[0042] If the first and second conditions are not met, it means that the change in air pressure elevation is relatively accurate and remains unchanged.
[0043] The changes in air pressure elevation are added to the cached cumulative rise value to complete the update of the cumulative rise value at the current moment.
[0044] The cumulative climb algorithm in this embodiment calculates the change in air pressure elevation at the current moment based on the air pressure value at the previous moment; calculates the change in slope elevation based on the average slope and average speed within the most recent set time period; calculates the absolute value of the difference between the change in air pressure elevation and the change in slope elevation; determines whether a first condition or a second condition is met; if the first condition is met (change in air pressure elevation ≤ 0), the change in air pressure elevation is updated to 0; if the second condition is met (absolute value of the difference ≥ difference threshold), the change in air pressure elevation is corrected and updated to the corrected change in air pressure elevation; if neither the first nor the second condition is met, the change in air pressure elevation remains unchanged; and the change in air pressure elevation is added to the cumulative climb value. Therefore, the cumulative climb algorithm in this embodiment updates the air pressure elevation change value to 0 when the air pressure elevation change value is ≤0; when the absolute value of the difference between the air pressure elevation change value and the slope elevation change value is ≥ the difference threshold, the air pressure elevation change value is corrected to improve the accuracy of the air pressure elevation change value, reduce the error of the cumulative climb value, and thus improve the accuracy of the cumulative climb value, solving the technical problem of poor accuracy of air pressure elevation change value in the prior art.
[0045] In some embodiments of this application, the slope elevation change value is calculated based on the average slope and average speed within a recently set time period; specifically including: The slope elevation change value is obtained by multiplying the gain coefficient d, the average slope slope_m within the most recent set time period (e.g., within the most recent 10 seconds), and the average speed v_m within the most recent set time period (e.g., within the most recent 10 seconds); where the gain coefficient d is any value within (0, 1), i.e., 0 < d < 1.
[0046] That is, the slope elevation change value = d * slope_m * v_m.
[0047] The above calculation formula is used to calculate the product of the gain coefficient d, the average slope slope_m within the most recent set time period, and the average speed v_m within the most recent set time period, to obtain the slope elevation change value. The calculation is simple, fast and accurate.
[0048] In some embodiments of this application, the difference threshold h_threshold is positively correlated with the product of the current speed and the slope.
[0049] The difference threshold exhibits an adaptive change that is positively correlated with the product of speed and slope. Because the difference threshold is positively correlated with both speed and slope, and adapts accordingly, the accuracy of the difference threshold is ensured, thus avoiding misjudgments.
[0050] In some embodiments of this application, the change in air pressure elevation is corrected, specifically including: Multiply the change in air pressure elevation by a correction factor to obtain the corrected change in air pressure elevation.
[0051] By using a correction factor to correct the change in air pressure elevation, an accurate corrected change in air pressure elevation can be obtained.
[0052] In some embodiments of this application, the calculation steps for the correction coefficient k include: Calculate the slope at the current moment. i With the velocity v at the current moment i The product of the product and the sum of the product and the change in air pressure elevation Δh(i) are calculated; the ratio of the product to the sum is calculated to obtain the correction coefficient k.
[0053] Right now, .
[0054] By calculating the correction factor k using the current slope, speed, and pressure elevation changes, a more accurate correction factor can be obtained, thus leading to an accurate corrected pressure elevation change value.
[0055] Below, in conjunction with Figure 2 This section explains the specific steps of the cumulative climb algorithm.
[0056] Speed, gradient, and elevation data are acquired using a GPS navigation chip, and air pressure values are collected using a barometer. A speedometer or mobile phone serves as a computing device to execute the cumulative climb algorithm of this application; simultaneously, the speedometer or mobile phone also functions as a data display terminal. (See [reference]). Figure 3 As shown.
[0057] (1) Initial elevation calibration and update.
[0058] At the start of the ride, speed, gradient, and elevation data are obtained from the GPS navigation chip of the cycling computer. During the ride, the barometer readings are monitored in real time to calculate the elevation changes, thereby achieving iterative elevation updates and real-time elevation data acquisition.
[0059] h i =44330.8*[1-(100*p i / p0) 0.19026 ]; h i-1 =44330.8*[1-(100*pi-1 / p0) 0.19026 ]; △h(i)= h i - h i-1 ; △h(i)=44330.8*[(100*p i-1 / p0) 0.19026 -( 100*p i / p0) 0.19026 ]; Where p0 represents standard atmospheric pressure; p i p i-1 These represent the air pressure values at time i (current time) and time i-1 (previous time), respectively. h i h i-1 Let represent the air pressure elevation at time i (current time) and time i-1 (previous time), respectively; △h(i) represents the change in air pressure elevation at time i (the current time) (relative air pressure elevation); the air pressure values p at adjacent times are also considered. i p i-1 And the standard atmospheric pressure p0 is calculated.
[0060] If it is at the start of the ride, then h i-1 The elevation obtained by the GPS navigation chip is denoted as hgps.
[0061] Calculate the product of the gain coefficient d, the average slope slope_m over the last 10 seconds, and the average speed v_m over the last 10 seconds to obtain the slope elevation change value (i.e., the speed slope relative elevation).
[0062] The slope elevation change value = d * slope_m * v_m.
[0063] (2) Use filters for filtering.
[0064] Barometer data typically exhibits high-frequency fluctuations. Although these fluctuations are relatively small compared to elevation calculations, the cumulative elevation gain is calculated through summation, so even small fluctuations can result in significant sums. This application designs a filter suitable for handling high-frequency fluctuations, specifically designed to remove high-frequency fluctuations from barometer pressure values.
[0065]
[0066] Where n and m represent counter symbols and have no special meaning; The length of the filter's input buffer sequence is M+1; The length of the filter's output buffer sequence is N; b0, b1, b2, ..., b M This is a preset constant; a1, a2, ..., a N This is a preset constant; input(n), input(n-1), input(n-2), ..., input(nM) represent the nth, n-1th, n-2th, ..., nMth input values of the filter's input buffer sequence, respectively. output(n-1), output(n-2), ..., output(nN) represent the (n-1), n-2, ..., nNth output values of the filter's output buffer sequence, respectively. output(n) represents the nth output value of the filter; output(n) is the current output value of the filter, calculated based on M+1 input values and N historical output values.
[0067] The filter takes a pressure value as its input and is used to filter the pressure value obtained from the barometer to remove high-frequency noise.
[0068] Alternatively, the filter can be used to filter barometric elevation by taking barometric elevation as its input.
[0069] (3) The judgment module judges the change value of air pressure elevation (i.e., relative air pressure elevation).
[0070] During cycling, sudden braking and rapid gear changes cause rapid speed variations, which in turn lead to changes in relative wind speed and low-frequency fluctuations in air pressure data. This application uses real-time speed data collected by a GPS navigation chip to obtain the trend of speed changes. When excessively rapid speed changes are detected, the elevation change data is adaptively corrected, as follows.
[0071] If the first condition is met: the change in air pressure elevation Δh(i) ≤ 0, then the change in air pressure elevation Δh(i) is updated to 0.
[0072] If the second condition is met: the absolute value of the difference temp ≥ the difference threshold h_threshold; then the pressure elevation change value △h(i) is corrected to obtain the corrected pressure elevation change value △h'(i), and the pressure elevation change value △h(i) is updated to the corrected pressure elevation change value △h'(i).
[0073] If the first and second conditions are not met, the change in air pressure elevation Δh(i) remains unchanged.
[0074]
[0075] Where temp is the absolute value of the difference between the change in air pressure elevation and the change in slope elevation; d represents the gain coefficient, which is between 0 and 1; slope_m and v_m represent the average slope and average speed over the last 10 seconds; slope i v represents the slope at time i (the current time); i Represents the velocity at time i (the current time); h i and h i-1 This represents the air pressure elevation at time i (the current time) and time i-1 (the previous time); △h(i) represents the change in air pressure elevation at time i (the current time); △h(i) = h i -h i-1 ; △h'(i) represents the corrected change in air pressure elevation at time i; k represents the elevation difference correction factor; h_threshold represents the threshold for differences in elevation.
[0076] (4) Cumulative climb calculation.
[0077] After completing a series of processes, the updated air pressure elevation change value for the current moment will be obtained. This value will be added to the cached cumulative rise value, thus completing the update of the cumulative rise value for the current moment.
[0078] h_sum i =h_sum i-1 +Δh(i); Where h_sum i h_sum represents the cumulative climb value at time i (the current time). i-1 This represents the cumulative climb value at time i-1 (the previous time).
[0079] The air pressure value filtering effect of this application is as follows: Figure 4 As shown.
[0080] This application designs an optimization algorithm for estimating cumulative elevation gain based on barometer data, belonging to the field of sports health and intelligent sports hardware. This application mainly relies on barometer data to continuously update elevation changes and perform cumulative elevation gain calculations; it designs a filter to remove high-frequency noise from the barometer data and uses speed and GPS information (such as slope) to obtain correction coefficients to correct for low-frequency fluctuation noise (caused by speed and wind speed changes).
[0081] This application designs a high-frequency noise reduction filter suitable for raw air pressure data / raw elevation data, which can filter out high-frequency noise in the raw data at the cost of low latency; and combines GPS speed to obtain the speed change trend, and when the speed changes rapidly, it uses correction coefficients and difference thresholds to detect and correct baseline changes in the raw data.
[0082] The filter cannot completely eliminate all noise. In order to increase the stability of the output results, this application uses the solution slope and speed of the previous moment to calculate the correction coefficient, constrains the approximate climbing range of the next moment, and removes noise a second time through an adaptive difference threshold method.
[0083] This application designs a filter to eliminate high-frequency fluctuations in the barometer and uses elevation superposition conditions to adaptively accumulate elevation; it also uses real-time speed data obtained from the GPS navigation chip to determine the state of low-frequency noise and correct baseline fluctuations.
[0084] The greatest advantage of this application is that it can solve the cumulative rise error caused by rapid fluctuation noise of barometer and low-frequency baseline noise without the need for additional sensors. Example 2
[0085] Based on the cumulative climbing algorithm in Embodiment 1 above, Embodiment 2 proposes a cumulative climbing system, including an acquisition module, a calculation module, a judgment module, and a cumulative climbing module, etc., see [link to documentation]. Figure 5 As shown.
[0086] The acquisition module is used to acquire air pressure, speed, and gradient in real time during cycling.
[0087] The calculation module is used to: calculate the change in air pressure elevation at the current moment based on the air pressure value at the current moment and the air pressure value at the previous moment; calculate the change in slope elevation based on the average slope and average speed within the most recent set time period; and calculate the absolute value of the difference between the change in air pressure elevation and the change in slope elevation.
[0088] The judgment module is used to determine whether the first condition or the second condition is met. If the first condition is met: the change in air pressure elevation ≤ 0, then the change in air pressure elevation is updated to 0. If the second condition is met: the absolute value of the difference is greater than or equal to the difference threshold, then the pressure elevation change value is corrected and updated to the corrected pressure elevation change value. If the first and second conditions are not met, the change in air pressure elevation remains unchanged.
[0089] The cumulative climb module is used to add the changes in air pressure elevation to the cumulative climb value.
[0090] The specific working process of the cumulative climbing system has been detailed in the cumulative climbing algorithm above, and will not be repeated here.
[0091] The cumulative climb system in this embodiment calculates the change in barometric elevation based on the current barometric elevation value and the previous barometric elevation value; calculates the change in slope elevation based on the average slope and average speed within the most recent set time period; calculates the absolute value of the difference between the change in barometric elevation and the change in slope elevation; determines whether a first condition or a second condition is met; if the first condition is met (change in barometric elevation ≤ 0), the change in barometric elevation is updated to 0; if the second condition is met (absolute value of difference ≥ difference threshold), the change in barometric elevation is corrected and updated to the corrected change in barometric elevation; if neither the first nor the second condition is met, the change in barometric elevation remains unchanged; and the change in barometric elevation is added to the cumulative climb value. Therefore, in this embodiment, the cumulative climb system updates the air pressure elevation change value to 0 when the air pressure elevation change value is ≤0; and corrects the air pressure elevation change value when the absolute value of the difference between the air pressure elevation change value and the slope elevation change value is ≥ the difference threshold, so as to improve the accuracy of the air pressure elevation change value, reduce the error of the cumulative climb value, and thus improve the accuracy of the cumulative climb value, thereby solving the technical problem of poor accuracy of air pressure elevation change value in the prior art. Example 3
[0092] Based on the cumulative climbing algorithm in Embodiment 1 above, Embodiment 3 proposes an electronic device, including a memory and a processor, etc.
[0093] Memory is used to store instructions executed by the computer; A processor is used to execute computer execution instructions stored in memory to implement the cumulative climbing algorithm described in Embodiment 1. Example 4
[0094] Based on the cumulative climbing algorithm in Embodiment 1 above, this Embodiment 4 proposes a storage medium.
[0095] The storage medium stores computer-executable instructions, which, when executed by the processor, are used to implement the cumulative climbing algorithm described in Embodiment 1.
[0096] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions claimed by the present invention.
Claims
1. A cumulative climbing algorithm, characterized by: include: S1. During cycling, the air pressure, speed, and gradient are obtained in real time. S2. Calculate the change in air pressure elevation at the current moment based on the air pressure value at the previous moment. Calculate the slope elevation change value based on the average slope and average speed within the most recently set time period; Calculate the absolute value of the difference between the change in air pressure elevation and the change in slope elevation; S3. Determine whether the first condition or the second condition is met; If the first condition is met: the change in air pressure elevation ≤ 0, then the change in air pressure elevation is updated to 0. If the second condition is met: the absolute value of the difference is greater than or equal to the difference threshold, then the pressure elevation change value is corrected and updated to the corrected pressure elevation change value. If the first and second conditions are not met, the change in air pressure elevation remains unchanged. S4. Add the changes in air pressure elevation to the cumulative climb value.
2. The cumulative climbing algorithm according to claim 1, characterized in that: Calculate the slope elevation change based on the average slope and average speed over the most recent set time period; specifically including: The slope elevation change value is obtained by multiplying the gain coefficient, the average slope within the most recent set time period, and the average speed within the most recent set time period; where the gain coefficient is any value within (0, 1).
3. The cumulative climbing algorithm according to claim 1, characterized in that: The difference threshold is positively correlated with the product of the current speed and the slope.
4. The cumulative climbing algorithm according to claim 1, characterized in that: Corrections are made to the changes in air pressure elevation, specifically including: Multiply the change in air pressure elevation by a correction factor to obtain the corrected change in air pressure elevation.
5. The cumulative climbing algorithm according to claim 4, characterized in that: The calculation steps for the correction factor include: Calculate the product of the current slope and the current speed, and then calculate the sum of the product and the change in air pressure elevation. The ratio of the product value to the sum value is calculated to obtain the correction coefficient.
6. The cumulative climbing algorithm according to claim 1, characterized in that: The acquired air pressure value is filtered using a filter.
7. The cumulative climb algorithm according to any one of claims 1 to 6, characterized in that: The air pressure value is obtained from a barometer; the speed and gradient are obtained from a GPS navigation chip.
8. A cumulative climb system, characterized in that: include: The acquisition module is used to: acquire air pressure, speed, and gradient in real time during cycling; The calculation module is used to: calculate the change in air pressure elevation at the current moment based on the air pressure value at the current moment and the air pressure value at the previous moment; and calculate the change in slope elevation based on the average slope and average speed within the most recently set time period. Calculate the absolute value of the difference between the change in air pressure elevation and the change in slope elevation; The judgment module is used to determine whether the first condition or the second condition is met. If the first condition is met: the change in air pressure elevation ≤ 0, then the change in air pressure elevation is updated to 0. If the second condition is met: the absolute value of the difference is greater than or equal to the difference threshold, then the pressure elevation change value is corrected and updated to the corrected pressure elevation change value. If the first and second conditions are not met, the change in air pressure elevation remains unchanged. The cumulative climb module is used to add the changes in air pressure elevation to the cumulative climb value.
9. An electronic device, characterized in that: include: Memory is used to store instructions executed by the computer; A processor for executing computer execution instructions stored in the memory to implement the cumulative climb algorithm as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: It stores computer execution instructions, which, when executed by a processor, are used to implement the cumulative climb algorithm as described in any one of claims 1 to 7.