Altitude determination method and device, wearable equipment and storage medium
By obtaining the reference altitude and altitude increments, combined with air pressure data, and using Kalman filters to fuse the altitude data, the problem of low accuracy in altitude determination in wearable devices is solved, and higher altitude measurement accuracy is achieved.
Patent Information
- Application Number
- CN202411553201.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-01
AI Technical Summary
In the prior art, the accuracy of determining altitude through wearable devices is not high, especially under weak GPS signals or environmental factors.
By obtaining the reference altitude of the reference position and the elevation increment between the current position and the reference position, combining sea level atmospheric pressure and current air pressure, a Kalman filter is used to fuse the first and second altitudes to determine the elevation of the current position.
Improves the accuracy of the altitude determined by the wearable device, and reduces errors due to weak GPS signals or environmental factors.
Smart Images

Figure CN119437162A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of altitude measurement, and specifically to an altitude determination method, apparatus, wearable device, and storage medium. Background Art
[0002] With the rapid development of smart wearable devices, more and more users are wearing smart wearable devices to improve the convenience of life. Take smart watches as an example. In outdoor mountaineering, users can use smart watches to measure the altitude of their location to record their movements, or use altitude data for subsequent decisions, such as determining whether to continue climbing based on the altitude. Because the higher the altitude, the thinner the oxygen, and the less suitable it is for mountaineering. However, there is currently a lack of a method for wearable devices that can accurately determine the altitude. Summary of the invention
[0003] In view of the above problems, the embodiments of the present application provide a method, apparatus, wearable device and storage medium for determining altitude, which are used to solve the problem of low accuracy of altitude determined by wearable devices in the prior art.
[0004] According to one aspect of an embodiment of the present application, a method for determining an altitude is provided, which is applied to a wearable device, and the method includes: obtaining a reference altitude of a reference position; determining an altitude increment between a current position of the wearable device at a current moment and the reference position; determining a sum of the reference altitude and the altitude increment as a first altitude of the current position; obtaining the sea level atmospheric pressure at the current moment; determining a current air pressure at the current moment; determining a second altitude of the current position based on the sea level atmospheric pressure and the current air pressure; and determining the altitude of the current position at the current moment based on the first altitude and the second altitude.
[0005] In an optional manner, determining the altitude increment between the current position of the wearable device at the current moment and the reference position includes:
[0006] Obtain multiple first air pressures of multiple historical moments closest to the current moment stored in the first buffer area of the wearable device, wherein the first air pressures of different historical moments and their corresponding locations are stored in the first buffer area; determine a fitting slope K for fitting the multiple first air pressures according to the time sequence of the multiple historical moments; determine the difference diff between the current air pressure and the first air pressure of the previous moment among the multiple first air pressures; if K>SLOP and diff>PREDIFF, or K<-SLOP and diff<-PREDIFF, determine the altitude increment according to the current air pressure and the multiple first air pressures; if K≤SLOP or diff≤PREDIFF or K≥-SLOP or diff≥-PREDIFF, determine the altitude increment of the previous moment as the altitude increment of the current moment, wherein SLOP is a preset slope threshold and PREDIFF is a preset air pressure difference threshold.
[0007] In an optional manner, determining the altitude increment according to the current air pressure and the plurality of first air pressures comprises: using the formula The altitude increment is determined, wherein altd is the altitude increment, P0 is the current air pressure, and P1 is the first air pressure at a previous moment among the multiple first air pressures.
[0008] In an optional manner, determining the current air pressure at the current position at the current moment includes: obtaining multiple second air pressures stored in a second buffer area of the wearable device, wherein the second buffer area stores the second air pressures of the location of the wearable device collected at different historical moments; determining a first average value of the multiple second air pressures; if the first average value satisfies a first preset condition, determining the first average value as the current air pressure; if the first average value does not satisfy the first preset condition, judging whether multiple third air pressures satisfy a second preset condition, wherein the multiple third air pressures include the first average value and the air pressures of the location of the wearable device at multiple historical moments stored in the first buffer area of the wearable device; if the multiple third air pressures do not satisfy the second preset condition, determining the first average value as the current air pressure; if the multiple third air pressures satisfy the second preset condition, determining the standard deviation S of the multiple second air pressures; if S<C, determining the first average value as the current air pressure, wherein C is a preset standard deviation threshold; if S≥C, determining the effective air pressure of the location of the wearable device at the previous moment stored in the first buffer area as the current air pressure.
[0009] In an alternative manner, the first preset condition includes abs(Pressure - mm_pre_press) < MB, where Pressure is the first average value, mm_pre_press is the effective air pressure at the position where the wearable device was located at the previous moment stored in the first buffer, and MB is a preset air pressure difference threshold; among the multiple third air pressures, there are n air pressures that do not satisfy the first preset condition, and the second preset condition includes a < n ≤ b, where a, n, and b are all positive integers, and b > a.
[0010] In an alternative manner, the reference altitude is determined through the following steps: in response to an operation of calibrating the reference altitude, obtain multiple third altitudes collected by GPS when the wearable device is located at the reference position; determine the standard deviation S of the multiple third altitudes ’ ; determine the product c of S ’ and a preset value; remove the third altitudes greater than S ’ +c from the multiple third altitudes; remove the third altitudes less than S ’ -c from the multiple third altitudes; determine the second average value of the remaining third altitudes; determine the second average value as the reference altitude.
[0011] In an alternative manner, determining the altitude of the current position at the current moment according to the first altitude and the second altitude includes: fusing the first altitude and the second altitude through a Kalman filter to obtain the altitude of the current position at the current moment.
[0012] According to another aspect of the embodiments of the present application, there is provided an altitude determination device applied to a wearable device, including: a first acquisition module for acquiring the reference altitude of a reference position; a first determination module for determining the altitude increment between the current position where the wearable device is located at the current moment and the reference position; a second determination module for determining the sum value of the reference altitude and the altitude increment as the first altitude of the current position; a second acquisition module for acquiring the sea - level atmospheric pressure at the current moment; a third determination module for determining the current air pressure at the current position at the current moment; a fourth determination module for determining the second altitude of the current position according to the sea - level atmospheric pressure and the current air pressure; a fifth determination module for determining the altitude of the current position at the current moment according to the first altitude and the second altitude.
[0013] According to another aspect of the embodiments of the present application, there is provided a wearable device, including: a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to implement the altitude determination method as described above.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the altitude determination method as described above is implemented.
[0015] In the embodiment of the present application, the first altitude of the current position is first determined by the reference altitude and the second altitude of the current position is determined by the air pressure. By fusing the first altitude and the second altitude to obtain the altitude of the current position, the accuracy of the altitude of the current position finally determined can be improved compared to the method of directly determining the first altitude or the second altitude as the altitude of the current position.
[0016] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0018] Figure 1 A schematic diagram of the structure of a wearable device provided in an embodiment of the present application is shown;
[0019] Figure 2 A schematic diagram of a flow chart of a method for determining altitude provided in an embodiment of the present application is shown;
[0020] Figure 3 Shows Figure 2 A schematic flow chart of sub-steps of step 150;
[0021] Figure 4 A schematic diagram showing a flow chart of a method for determining altitude provided in another embodiment of the present application is shown;
[0022] Figure 5 A schematic diagram of a process flow of a method for determining a reference altitude provided in an embodiment of the present application is shown;
[0023] Figure 6 A schematic diagram of the structure of an altitude determination device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.
[0025] Altitude refers to the vertical height difference between the local location and the reference sea level. Since there is a certain relationship between altitude and air pressure, a pressure sensor can be built into the wearable device. After using the pressure sensor to collect the air pressure at its location, the altitude of its location is calculated based on the relationship between air pressure and altitude. However, since air pressure is not only affected by altitude, but also by other environmental factors such as temperature, the air pressure at the same location at different times will be different. As a result, when using air pressure to calculate altitude, there will be a large difference between the altitudes of the same location at different times. In general, there is a certain error in the altitude calculated directly by air pressure.
[0026] As for the method of directly using the Global Positioning System (GPS) to determine the altitude, GPS has high requirements for signal strength. In densely forested areas and other places where the GPS signal is weak, the GPS signal is poor and will drift during positioning, resulting in a low accuracy of the acquired altitude.
[0027] Based on this, in order to improve the accuracy of the altitude determined by the wearable device, the present application proposes an altitude determination method, which is applied to the wearable device, by determining the altitude increment between the current position of the wearable device and the reference position, determining the sum of the reference altitude of the reference position and the altitude increment as the first altitude of the current position, and determining the second altitude of the current position by the air pressure of the current position, and finally determining the altitude of the current position according to the first altitude and the second altitude. Since the first altitude and the second altitude are altitudes determined by two different methods, the altitude of the current position is finally determined according to the first altitude and the second altitude, which can improve the accuracy of the altitude of the current position finally determined compared to the method of directly determining the first altitude or the second altitude as the altitude of the current position.
[0028] Figure 1 A schematic diagram of the structure of a wearable device provided in an embodiment of the present application is shown, and the specific embodiment of the present application does not limit the specific implementation of the wearable device.
[0029] like Figure 1 As shown, the wearable device 10 may include: an air pressure sensor 11, a global positioning system (GPS) 12, a first cache area 13, a second cache area 14, a processor 15 and a memory 16.
[0030] The air pressure sensor 11 is used to collect the air pressure at the location of the wearable device 10, and store the collected air pressure data in the second buffer area 14. The GPS is used to measure and collect the altitude of the location of the wearable device 10.
[0031] The memory 16 is used to store a computer program 17. The memory 16 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The computer program 17 may include computer executable instructions.
[0032] The processor 15 is used to execute the computer program 17 to implement the altitude determination method embodiment provided in the present application, and store the effective air pressure at different times and locations determined by executing the computer program 17 in the first buffer area 13 .
[0033] The processor 15 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the wearable device 10 may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0034] Figure 2 The flowchart of the altitude determination method provided in the embodiment of the present application is shown, and the method is executed by a wearable device 10, and the wearable device 10 can be a wearable device including one or more processors 15, such as a smart watch, a smart bracelet, or a smart helmet. Figure 2 As shown, the method comprises the following steps:
[0035] Step 110: Obtain a reference altitude of a reference position.
[0036] Among them, since the accuracy of the altitude of the location measured by GPS is higher in places where the GPS signal is stronger, the reference altitude in the embodiment of the present application can be the altitude pre-measured by the GPS 12 of the wearable device 10 at the reference position, wherein the reference position is a position where the GPS signal is stronger. Or after accurately determining the altitude of a certain location by other means, the location and the altitude of the location are respectively determined as the reference location and the reference altitude.
[0037] Step 120: Determine the altitude increment between the current position of the wearable device and the reference position at the current moment.
[0038] Among them, the altitude increment can be understood as the altitude difference between the current position and the reference position. If the current position is higher than the reference position, the altitude increment is greater than zero. If the current position is lower than the reference position, the altitude increment is less than zero. If the current position and the reference position are the same position, the altitude increment is zero. It should be noted that in this application, the current time and the current position refer to the same time and the same position.
[0039] Step 130: Determine the sum of the reference altitude and the altitude increment as the first altitude of the current position.
[0040] Among them, since the altitude increment is the altitude difference between the current position and the reference position, and the reference altitude is the altitude between the reference position and the reference sea level, the first altitude of the current position is the sum of the reference altitude and the altitude increment.
[0041] Step 140: Obtain the current sea level atmospheric pressure.
[0042] Since other environmental factors such as temperature and humidity can affect the sea level atmospheric pressure, the sea level atmospheric pressure at the current moment is obtained in this step to determine the altitude of the current location.
[0043] Step 150: Determine the current air pressure at the current location at the current time.
[0044] The air pressure at the current time and location can be collected by the air pressure sensor 11 of the wearable device 10 to obtain the current air pressure.
[0045] Step 160: Determine a second altitude of the current location according to the sea level atmospheric pressure and the current air pressure.
[0046] In this step, the formula The second altitude h2 is calculated, where P2 is the current air pressure collected by the air pressure sensor, and P3 is the sea level atmospheric pressure.
[0047] It is worth noting that in the embodiment of the present application, the wearable device can be controlled to execute step 110 and step 140 simultaneously, or the wearable device can be controlled to execute step 110 and step 140 sequentially. The execution order of step 110 and step 140 can be determined as needed and is not limited here.
[0048] Step 170: Determine the altitude of the current position at the current moment according to the first altitude and the second altitude.
[0049] Since the data collected by the hardware in the wearable device 10 has noise and interference caused by the hardware, the first altitude and the second altitude further determined by the collected data have certain errors, so the optimal estimation of the first altitude and the second altitude can also be regarded as a filtering process. Therefore, in the embodiment of the present application, preferably, the first altitude and the second altitude are fused through a Kalman filter to obtain the altitude of the current position. Among them, Kalman filtering is an algorithm that uses the state equation of a linear system, combined with the input and output information of the system and the observation data, to make the best estimate of the state of the system.
[0050] Specifically, the Kalman filter equations are as follows:
[0051] X(t|t-1)=AX(t-1|t-1)+BU(t) (1)
[0052] P(t|t-1)=AP(t-1|t-1)A ′ +Q (2)
[0053] X(t|t)=X(t|t-1)+K(t)(Z(t)-HX(t|t-1)) (3)
[0054] K(t)=P(t|t-1)H ′ / (HP(t|t-1)H ′ +R) (4)
[0055] P(t)=(IK(t)H)P(t|t-1) (5)
[0056] The first altitude is X(t|t-1), and the second altitude is Z(t) and substituted into the above Kalman filter equations. H is the parameter of the measurement system, H ′ is the transposed matrix of H, X(t-1|t-1) is the optimal result of the previous state, U(t) is the control amount of the current state, which is 0 in the embodiment of the present application. P(t|t-1) is the covariance corresponding to X(t|t-1), P(t-1|t-1) is the covariance corresponding to X(t-1|t-1), A ′ represents the transposed matrix of A, which is 1 in the embodiment of the present application, B is the gain of the control input, which is 1 in the embodiment of the present application, R is the covariance of the noise of the pressure sensor 11, Q is the covariance of the system process, K(t) is the Kalman gain at time t, I is the unit matrix, and for a single model and a single measurement, I=1. When the system enters the t+1 state, P(t) is the covariance of X(t|t) at time t. X(t|t) is the optimized estimate of the filter at time t, that is, the altitude of the current position at the current moment.
[0057] In the embodiment of the present application, the first altitude of the current position is determined by the reference altitude and the second altitude of the current position is determined by the air pressure. Since the first altitude and the second altitude both have different degrees of errors, the first altitude and the second altitude are fused to obtain the altitude of the current position. Compared with the method of directly determining the first altitude or the second altitude as the altitude of the current position, the accuracy of the altitude of the current position finally determined can be improved. Specifically, by using the Kalman filter to fuse the first altitude and the second altitude, the error can be reduced or eliminated, and the accuracy of the altitude of the current position finally obtained by fusion can be improved.
[0058] In some embodiments, the average of the first altitude and the second altitude may also be used as the altitude of the current location, thereby improving the accuracy of the determined altitude.
[0059] Figure 3 Shows Figure 2 Schematic diagram of the sub-step flow chart of step 150. Figure 3 As shown, step 150 includes:
[0060] Step 151: Acquire multiple second air pressures stored in a second buffer area of the wearable device, wherein the second buffer area stores the second air pressures of the location of the wearable device collected at different historical moments.
[0061] Among them, the second air pressure is the air pressure collected by the air pressure sensor 11 in the wearable device 10. Specifically, the air pressure sensor 11 can be controlled to collect the air pressure once every fixed preset time (for example, 1 second) and store it in the second cache area 14. In the embodiment of the present application, in order to improve the utilization rate of the storage space of the second cache area 14, the second cache area 14 only stores the air pressure collected in the most recent few times (for example, the most recent 5 times). It should be noted that the multiple second air pressures obtained in this step are the air pressures collected at multiple historical moments closest to the current moment.
[0062] After obtaining multiple second air pressures, the data with large fluctuations can be smoothed by smoothing filtering to reduce abnormal data fluctuations, and the multiple second air pressures can be filtered by an outlier tracking filtering algorithm to remove abnormal second air pressures. The air pressure data collected from the air pressure sensor 11 contains noise, and even the air pressure data collected when the wearable device 10 is in motion will have mutations. Therefore, the air pressure data can be made smooth by smoothing filtering. The air pressure data will become smooth after smoothing filtering, so that the noise is reduced. However, when the user wears the wearable device 10 for strenuous exercise, for example, when the user wears a smart watch for running, the smart watch will swing with the swing of the user's arm. At this time, the air pressure data collected by the air pressure sensor in the smart watch will have a great mutation. Smoothing filtering has little effect on the mutation data, so it needs to be filtered out by an outlier filtering algorithm.
[0063] Step 152: Determine the first average value of multiple second air pressures.
[0064] In this step, by determining the first average value of multiple second air pressures, the current air pressure can be determined based on the first average value in the subsequent process, rather than directly determining the current air pressure based on a single air pressure collected by the air pressure sensor 11 at the current moment. This can avoid the situation where the accuracy of the current air pressure determined subsequently is reduced due to an abnormal air pressure collected at a certain moment caused by an abnormality of the air pressure sensor 11 or the like.
[0065] Step 153: Determine whether the first average value meets the first preset condition. If so, go to step 154; if not, go to step 155.
[0066] Among them, the first preset condition can be set as needed. In some embodiments, the first preset condition includes abs(Pressure - mm_pre_press) < MB, where Pressure is the first average value, mm_pre_press is the effective air pressure at the position where the wearable device was located at the previous moment stored in the first buffer 13, and MB is a preset air pressure difference threshold, which can be set as needed, for example, set to 0.1, 0.2, or 0.3, etc. Among them, the first buffer 13 stores the effective air pressures at each moment and the corresponding moments determined through steps 151 to 158 at historical moments.
[0067] It can be understood that under normal circumstances, within a short period of time, the change range of the air pressures at two adjacent moments is within a certain range, that is, the air pressures at two adjacent moments will not change significantly. Taking the wearable device as a smart watch as an example, when the user is performing strenuous exercise (such as running on flat ground), if the user's arm swings, it may cause a huge mutation in the air pressure collected by the air pressure sensor, that is, the difference between the first average value and the air pressure at the previous moment stored in the first buffer 13 is large, but this is not the air pressure change caused by the altitude change. Then, for the above situation, if the first average value is directly used as the current air pressure and stored in the first buffer 13, the accuracy of the determined current air pressure will be relatively low. Therefore, in the embodiments of the present application, by determining whether the absolute value of the difference between the first average value Pressure and the air pressure mm_pre_press at the previous moment is less than the preset air pressure difference threshold, it is determined whether the change range between the first average value and the air pressure at the previous moment belongs to the normal range.
[0068] Step 154: Determine the first average value as the current air pressure.
[0069] Among them, if the absolute value of the difference between the first average value Pressure and the air pressure mm_pre_press at the previous moment is less than the preset pressure difference threshold, it means that the change range of the first average value and the air pressure at the previous moment is within the normal range, so in this step, the first average value is determined as the current air pressure.
[0070] Step 155: Determine whether the plurality of third air pressures meet the second preset condition, wherein the plurality of third air pressures include the first average value and the air pressures at the locations of the wearable device at multiple historical moments stored in the first buffer area of the wearable device. If yes, go to step 156; if no, go to step 154.
[0071] Among them, the multiple third air pressures include the first average value and the air pressures at multiple historical moments closest to the current moment stored in the first buffer area 13. The second preset condition can be set as needed. In some embodiments, the multiple third air pressures include n air pressures that do not meet the first preset condition, and the second preset condition includes a<n≤b, wherein a, n and b are all positive integers, and b>a. Among them, a and b can be set as needed, for example, a is set to 2, 3 or 4, and b is set to 19, 20 or 21.
[0072] Usually, the wearable device is set to collect air pressure once every 1 second. In some embodiments, by setting a to 3, it can prevent the wearable device from suddenly changing for only 1-2 seconds, and the air pressure collected in the case of sudden change is directly filtered out as an abnormal value.
[0073] Step 156: Determine the standard deviation S of the plurality of second air pressures.
[0074] Step 157: Determine whether S<C is satisfied. If so, go to step 154; if not, go to step 158.
[0075] Step 158: Determine the effective air pressure at the location of the wearable device at the last moment stored in the first buffer area as the current air pressure.
[0076] If S<C is satisfied, it means that the third air pressures are relatively concentrated and do not fluctuate greatly. Therefore, in the embodiment of the present application, if the standard deviation S of the second air pressures satisfies S<C, it means that the current state is normal and the first average value is a valid value, so the first average value is determined as the current air pressure.
[0077] If S≥C, it means that multiple third air pressures are relatively dispersed, that is, multiple third air pressures fluctuate greatly, which is inconsistent with the actual situation. It may be that other situations cause the second air pressure collected by the air pressure sensor to be abnormal, which in turn causes the first average value to be an abnormal value. Under the premise of being consistent with the actual situation, the current position will not change significantly from the position at the previous moment, and the corresponding air pressure will not change significantly. Then the standard deviation S of multiple second air pressures satisfies S<C. Therefore, if S≥C, it means that the current position has not changed significantly from the position at the previous moment. The large fluctuations of multiple third air pressures are caused by a large sudden change in air pressure. Therefore, in the embodiment of the present application, the air pressure of the wearable device at the previous moment stored in the first buffer area 13 is determined as the current air pressure.
[0078] In an embodiment of the present application, multiple second air pressures collected by the air pressure sensor within a certain period of time are obtained, and a first average value of the multiple second air pressures is determined. Then, based on the first average value, it is determined whether the amplitude of the change compared with the effective air pressure at the previous moment is within a normal range. If it is within the normal range, it means that the first average value is a valid value, and therefore the first average value is determined as the current air pressure.
[0079] In the embodiment of the present application, by acquiring multiple second air pressures collected by the air pressure sensor within a certain period of time, and determining the first average value of the multiple second air pressures, it is determined whether the first average value meets the first preset condition. If it meets the first preset condition, it means that the first average value is a valid value, and then the first average value is determined as the current air pressure, thereby improving the accuracy of the determined current air pressure. If the first average value does not meet the first preset condition, it continues to determine whether the multiple third air pressures meet the second preset condition. If the second preset condition is met and S<C is met, it means that the current state of the wearable device is consistent with the actual situation, that is, the first average value is a valid value, and then the first average value is determined as the current air pressure, thereby improving the accuracy of the determined current air pressure. If the second preset condition is met and S<C is not met, it means that the current state of the wearable device is not consistent with the actual situation, then the air pressure at the location at the last moment is determined as the current air pressure, instead of the first average value being determined as the current air pressure, thereby improving the accuracy of the determined current air pressure.
[0080] Figure 4 FIG. 2 is a flow chart of a method for determining altitude provided by another embodiment of the present application. Figure 4 As shown, the method comprises the following steps:
[0081] Step 201: Obtain a reference altitude of a reference position.
[0082] Among them, this step is the same as step 110, so the principle and specific implementation method of this step can refer to step 110 and will not be repeated here.
[0083] Step 202: Acquire multiple first air pressures at multiple historical moments closest to the current moment stored in a first buffer area of the wearable device, wherein the first buffer area stores first air pressures at different historical moments and their corresponding locations.
[0084] In the embodiment of the present application, preferably, the first air pressure stored in the first buffer area 13 is the effective air pressure determined by the above steps 151 to 158, and the air pressure after denoising and smoothing filtering. The length of the filter used for smoothing filtering is LM.
[0085] Step 203: Determine a fitting slope K of fitting a plurality of first air pressures according to the time sequence of a plurality of historical moments.
[0086] Among them, in the embodiment of the present application, the fitting slope K is preferably determined by the least squares method. The least squares method formula is:
[0087]
[0088] Wherein, LM is the number of first air pressure data acquired in step 202, x i The i-th value in the arithmetic progression with a common difference of 1 from 1 to LM, y i is the i-th first air pressure obtained in step 202 according to the time sequence of multiple historical moments.
[0089] Step 204: Determine a difference diff between the current air pressure and a first air pressure at a previous moment among the plurality of first air pressures.
[0090] Wherein, diff is the difference between the current air pressure and the first air pressure at the previous moment closest to the current moment stored in the first buffer area.
[0091] Step 205: Determine whether K>SLOP and diff>PREDIFF, or K<-SLOP and diff<-PREDIFF. If yes, go to step 206; if no, go to step 207.
[0092] Wherein, PREDIFF is a preset pressure difference threshold value, which can be set as needed, for example, to 0.006, 0.007 or 0.008, etc. SLOP is a preset slope threshold value, which can be set as needed, for example, to 0.4, 0.5 or 0.6, etc.
[0093] Among them, the change of air pressure is mainly caused by two reasons, one is the change of air pressure caused by the change of altitude, and the other is the change of air pressure caused by the change of atmospheric environment without changing altitude. Therefore, in the embodiment of the present application, in order to improve the accuracy of the altitude increment determined by the first air pressure obtained in step 202, it is first determined whether the air pressure change caused by the change of altitude is satisfied according to the multiple first air pressures obtained at multiple historical moments.
[0094] If diff satisfies diff>PREDIFF, or diff satisfies diff<-PREDIFF, it means that the change amplitude of the air pressure at two adjacent moments is within the normal range. In the embodiment of the present application, by judging whether K and diff simultaneously satisfy K>SLOP and diff>PREDIFF, or whether K<-SLOP and diff<-PREDIFF, it is possible to accurately judge whether the air pressure change is caused by the change in altitude or the change in the atmospheric environment.
[0095] Step 206: Determine the altitude increment according to the current air pressure and the plurality of first air pressures.
[0096] In a certain altitude range (usually several thousand meters), the air pressure changes with the altitude. When the temperature and humidity remain unchanged, the air pressure decreases with the increase of altitude and increases with the decrease of altitude. The air pressure also changes with the changes of the environment. The air pressure will be different at the same place at different times. Therefore, if K>SLOP and diff>PREDIFF, or K<-SLOP and diff<-PREDIFF, it means that the current change of air pressure is caused by the change of altitude.
[0097] In some embodiments, the formula Determine the altitude increment, where altd is the altitude increment, P0 is the current air pressure, and P1 is the first air pressure at the previous moment among multiple first air pressures, that is, the first air pressure at the historical moment closest to the current moment.
[0098] Step 207: Determine the altitude increment at the previous moment as the altitude increment at the current moment.
[0099] Among them, if K>SLOP and diff>PREDIFF or K<-SLOP and diff<-PREDIFF is not satisfied, it means that the current air pressure change is caused by the change of the atmospheric environment.
[0100] Step 208: Determine the sum of the reference altitude and the altitude increment as the first altitude of the current position.
[0101] Step 209: Obtain the current sea level atmospheric pressure.
[0102] Step 210: Determine the current air pressure at the current time and location.
[0103] Step 211: Determine a second altitude of the current location according to the sea level atmospheric pressure and the current air pressure.
[0104] Step 212: Determine the altitude of the current position at the current moment according to the first altitude and the second altitude.
[0105] Among them, steps 208 to 212 are the same as steps 130 to 170. Therefore, the principles and implementation methods of steps 208 to 212 can refer to steps 130 to 170 and will not be repeated here.
[0106] It is worth noting that in the embodiment of the present application, the wearable device can be controlled to execute step 201 and step 209 simultaneously, or the wearable device can be controlled to execute step 201 and step 209 sequentially. The execution order of step 201 and step 209 can be determined as needed and is not limited here.
[0107] Changes in any of the altitude and atmospheric environment factors will cause changes in altitude. If the cause of the air pressure change is not determined, and the altitude increment is determined directly based on the current air pressure and the first air pressure, then the determined altitude increment may not be the altitude increment caused by the change in location, thus reducing the accuracy of the first altitude determined based on the altitude increment, thereby reducing the accuracy of the altitude of the current location finally determined based on the first altitude.
[0108] In an embodiment of the present application, the fitting slope K and the difference diff are determined based on the current air pressure and multiple first air pressures at multiple historical moments. If K>SLOP and diff>PREDIFF or K<-SLOP and diff<-PREDIFF is satisfied, it means that the air pressure change is caused by the change in altitude, and the altitude increment is calculated based on the current air pressure and the first air pressure. If K>SLOP and diff>PREDIFF or K<-SLOP and diff<-PREDIFF is not satisfied, it means that the air pressure change is caused by the change in the atmospheric environment, and the position at the current moment has not changed from the position at the previous moment, that is, the altitude of the position at the current moment has not changed from the altitude of the position at the previous moment, so the altitude increment at the previous moment is determined as the altitude increment at the current moment. In the above manner, the embodiment of the present application improves the accuracy of the determined altitude increment, thereby further improving the accuracy of the altitude of the current position finally determined.
[0109] Figure 5 FIG. 2 is a flow chart showing a method for determining a reference altitude according to an embodiment of the present application. Figure 5 As shown, the reference altitude determination method includes:
[0110] Step 310: In response to the operation of calibrating the reference altitude, a plurality of third altitudes collected by GPS when the wearable device is located at the reference position are obtained.
[0111] Among them, when the user is in a place with a strong GPS signal, the wearable device can be calibrated to the reference altitude.
[0112] Step 320: Determine the standard deviation S of the plurality of third altitudes ’ .
[0113] Step 330: Determine S ’ The product of this value and the preset value c.
[0114] The preset value may be determined as required, such as 5%, 10% or 15%.
[0115] Step 340: Remove the third altitudes greater than S ’ The third altitude of +c.
[0116] Step 350: Remove the third altitudes that are smaller than S. ’ -c's third altitude.
[0117] It is understandable that the third altitude collected by GPS may have certain errors. Therefore, in steps 340 to 350, by removing the third altitudes with a standard deviation within the first degree from the plurality of third altitudes, abnormal third altitudes can be removed, thereby retaining normal third altitudes.
[0118] Step 360: Determine a second average value of the remaining third altitudes.
[0119] Step 370: Determine the second average value as the reference altitude.
[0120] In the embodiment of the present application, by removing abnormal data from a plurality of third altitudes and then determining the second average value of the remaining normal third altitudes as the reference altitude, the accuracy of the determined reference altitude can be improved compared to a method of directly determining the third altitude collected at a certain moment as the reference altitude.
[0121] When users wear wearable devices for mountaineering, the atmospheric pressure data is collected through the air pressure sensor in the wearable device. According to research, the magnitude of air pressure is negatively correlated with altitude, that is, the air pressure decreases as the altitude rises. Since the atmospheric pressure changes from several hundred to several dozen hpas in a day, the air pressure in winter is higher than that in summer at the same location. Therefore, if the altitude is calculated directly by air pressure, a large error will occur. Since the air pressure changes slowly during the day, a threshold is set to determine whether the air pressure change is caused by changes in the atmospheric environment or changes in altitude. If the air pressure change is caused by changes in altitude, the altitude increment is calculated by the air pressure difference, and the first altitude is calculated based on the base altitude and the altitude increment. However, even when the reference altitude is determined by GPS at a reference position with a good GPS signal, there will be certain errors, and the second altitude calculated by the acquired sea level atmospheric pressure and the air pressure collected by the air pressure sensor will also have certain errors. In particular, when the natural environment of the sea level corresponding to the sea level atmospheric pressure is greatly different from the natural environment of the current position, the error of the second altitude is relatively large. Therefore, in the embodiment of the present application, the first altitude and the second altitude are data-fused by a Kalman filter, so as to obtain the altitude of the current position with higher accuracy.
[0122] Figure 6 FIG. 2 shows a schematic diagram of the structure of the altitude determination device provided in an embodiment of the present application. Figure 6 As shown, the device 400 is applied to a wearable device, including: a first acquisition module 401, a first determination module 402, a second determination module 403, a second acquisition module 404, a third determination module 405, a fourth determination module 406 and a fifth determination module 407. Among them, the first acquisition module 401 is used to obtain the reference altitude of the reference position. The first determination module 402 is used to determine the altitude increment between the current position of the wearable device at the current moment and the reference position. The second determination module 403 is used to determine the sum of the reference altitude and the altitude increment as the first altitude of the current position. The second acquisition module 404 is used to obtain the sea level atmospheric pressure at the current moment. The third determination module 405 is used to determine the current air pressure at the current position at the current moment. The fourth determination module 406 is used to determine the second altitude of the current position according to the sea level atmospheric pressure and the current air pressure. The fifth determination module 407 is used to determine the altitude of the current position at the current moment according to the first altitude and the second altitude.
[0123] The altitude determination device provided in this embodiment is used to execute the technical solution of the altitude determination method in the aforementioned method embodiment. Its implementation principle and technical effect are similar and will not be described in detail here.
[0124] It is worth noting that the altitude determination device provided in this embodiment also includes other modules for executing the steps of the above altitude determination method embodiment, which will not be described one by one here.
[0125] An embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned altitude determination method embodiment is implemented.
[0126] An embodiment of the present application provides a computer program, which can be executed by a processor to implement the above-mentioned altitude determination method embodiment.
[0127] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned altitude determination method embodiment is implemented.
[0128] In several embodiments provided in the present application, if any function is implemented in the form of a software function module / unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server or other electronic device) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (RandomAccess Memory, RAM), disk or optical disk and other media that can store computer program codes.
[0129] The algorithm or display provided here are not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present application described here, and the above description of specific languages is to disclose the best mode of implementation of the present application.
[0130] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the claims that list several devices, several units or modules in these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
[0131] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining altitude, applied to a wearable device, characterized in that: The method comprises: Get the base altitude of the base position; Determine an altitude increment between a current position of the wearable device and the reference position at a current moment; determining a sum of the reference altitude and the altitude increment as a first altitude of the current position; Obtaining the sea level atmospheric pressure at the current moment; Determining a current air pressure at the current location at the current time; determining a second altitude of the current location based on the sea level atmospheric pressure and the current atmospheric pressure; The altitude of the current position at the current moment is determined according to the first altitude and the second altitude.
2. The method according to claim 1, characterized in that The determining the altitude increment between the current position of the wearable device at the current moment and the reference position includes: Acquire multiple first air pressures at multiple historical moments closest to the current moment and stored in a first buffer area of the wearable device, wherein the first buffer area stores first air pressures at different historical moments and their corresponding locations; Determine a fitting slope K of fitting the plurality of first air pressures according to the time sequence of the plurality of historical moments; Determine a difference diff between the current air pressure and a first air pressure at a previous moment among the multiple first air pressures; If K>SLOP and diff>PREDIFF, or K<-SLOP and diff<-PREDIFF, determining the altitude increment according to the current air pressure and the plurality of first air pressures; If K≤SLOP or diff≤PREDIFF or K≥-SLOP or diff≥-PREDIFF, the altitude increment at the previous moment is determined as the altitude increment at the current moment, wherein SLOP is a preset slope threshold and PREDIFF is a preset pressure difference threshold.
3. The method according to claim 2, characterized in that The determining the altitude increment according to the current air pressure and the plurality of first air pressures comprises: By formula The altitude increment is determined, wherein altd is the altitude increment, P0 is the current air pressure, and P1 is the first air pressure at a previous moment among the multiple first air pressures.
4. The method according to claim 1, characterized in that Determining the current air pressure at the current location at the current moment includes: Acquire multiple second air pressures stored in a second buffer area of the wearable device, wherein the second buffer area stores the second air pressures of the location of the wearable device collected at different historical moments; determining a first average of the plurality of second air pressures; If the first average value satisfies a first preset condition, determining the first average value as the current air pressure; If the first average value does not meet the first preset condition, determining whether a plurality of third air pressures meet a second preset condition, wherein the plurality of third air pressures include the first average value and the air pressures at the locations of the wearable device at a plurality of historical moments stored in a first buffer area of the wearable device; If the plurality of third air pressures do not satisfy the second preset condition, determining the first average value as the current air pressure; If the plurality of third air pressures satisfy the second preset condition, determining a standard deviation S of the plurality of second air pressures; If S<C, the first average value is determined as the current air pressure, wherein C is a preset standard deviation threshold; If S≥C, the effective air pressure at the location of the wearable device at the last moment stored in the first buffer area is determined as the current air pressure.
5. The method according to claim 4, characterized in that The first preset condition includes abs(Pressure-mm_pre_press)<MB, wherein Pressure is the first average value, mm_pre_press is the effective air pressure at the location of the wearable device at the last moment stored in the first buffer area, and MB is a preset air pressure difference threshold; The plurality of third air pressures include n air pressures that do not satisfy the first preset condition, and the second preset condition includes a<n≤b, wherein a, n and b are all positive integers, and b>a.
6. The method according to claim 1, characterized in that The reference altitude is determined by the following steps: In response to an operation of calibrating a reference altitude, acquiring a plurality of third altitudes collected by GPS when the wearable device is located at the reference position; Determine the standard deviation S of the plurality of third altitudes ’ ; Determine S ’ The product of the preset value c; Remove the third altitudes greater than S ’ +c third altitude; Remove the third altitudes smaller than S ’ -c's third altitude; determining a second average of the remaining third elevations; The second average value is determined as the reference altitude.
7. The method according to claim 1, characterized in that The determining the altitude of the current position at the current moment according to the first altitude and the second altitude includes: The first altitude and the second altitude are fused through a Kalman filter to obtain the altitude of the current position at the current moment.
8. An altitude determination device, applied to a wearable device, characterized in that: The device comprises: A first acquisition module, used to acquire a reference altitude of a reference position; A first determining module, configured to determine an altitude increment between a current position of the wearable device and the reference position at a current moment; A second determining module, configured to determine a sum of the reference altitude and the altitude increment as a first altitude of the current position; A second acquisition module is used to acquire the sea level atmospheric pressure at the current moment; A third determination module, used to determine the current air pressure at the current location at the current moment; a fourth determining module, configured to determine a second altitude of the current position according to the sea level atmospheric pressure and the current air pressure; A fifth determining module is used to determine the altitude of the current position at the current moment according to the first altitude and the second altitude.
9. A wearable device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the altitude determination method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the altitude determination method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and apparatus for measuring absolute altitude
CN106403891A
Method, system and equipment for collecting and processing bird flight height data
CN117146773A
Device, program, and method for estimating altitude error using multiple altitude values
JP2017020846A
Systems and methods for determining a barometric pressure bias of a mobile device
US20210108918A1