CN116817853A - Method and device for measuring altitude of wearable equipment and electronic equipment - Google Patents
Method and device for measuring altitude of wearable equipment and electronic equipment Download PDFInfo
- Publication number
- CN116817853A CN116817853A CN202310817990.7A CN202310817990A CN116817853A CN 116817853 A CN116817853 A CN 116817853A CN 202310817990 A CN202310817990 A CN 202310817990A CN 116817853 A CN116817853 A CN 116817853A
- Authority
- CN
- China
- Prior art keywords
- air pressure
- pressure data
- unit time
- time period
- altitude
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C5/00—Measuring height; Measuring distances transverse to line of sight; Levelling between separated points; Surveyors' levels
- G01C5/06—Measuring height; Measuring distances transverse to line of sight; Levelling between separated points; Surveyors' levels by using barometric means
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Measuring Fluid Pressure (AREA)
Abstract
The invention provides a method and a device for measuring the altitude of wearable equipment and electronic equipment, and relates to the technical field of altitude measurement, comprising the following steps: under the condition that the updated standard air pressure data is determined, acquiring the standard air pressure data at the current moment from a server side; acquiring real-time air pressure data of the current position in a preset time window according to a preset sampling frequency to obtain a plurality of real-time air pressure data; performing anomaly discrimination on the plurality of real-time air pressure data, and correcting the plurality of real-time air pressure data based on anomaly discrimination results to obtain a plurality of corrected air pressure data; and determining the altitude of the current position based on the high formula, the standard air pressure data and the average value of the corrected air pressure data in the specified unit time period. The method ensures the accuracy of the air pressure data used in calculating the altitude through correction, and alleviates the technical problem of poor accuracy of the altitude measurement result of the wearable equipment in the prior art.
Description
Technical Field
The invention relates to the technical field of altitude measurement, in particular to a method and a device for measuring the altitude of wearable equipment and electronic equipment.
Background
The altitude refers to a vertical altitude difference between the local position altitude and the reference sea level, and generally, the wearable device can realize the function of an altitude gauge according to a built-in air pressure sensor, and the current altitude can be calculated according to a pressure formula according to the negative correlation between air pressure and altitude. But in some special cases (e.g. blockage of the barometric hole, pressure changes around the hole, water inflow, etc.) can cause anomalies in the barometric pressure measured by the barometric pressure sensor, resulting in an unreliable calculated altitude; meanwhile, if sudden changes in weather, temperature and humidity make the air pressure change unusual in a short time, the altitude at this time is also wrong. In summary, the wearable device in the prior art has the technical problem of poor accuracy of the altitude measurement result.
Disclosure of Invention
The invention aims to provide a method and a device for measuring the altitude of a wearable device and electronic equipment, so as to solve the technical problem that the accuracy of the altitude measurement result of the wearable device in the prior art is poor.
In a first aspect, the invention provides a method of measuring altitude of wearable equipment, comprising: under the condition that the updated standard air pressure data is determined, acquiring the standard air pressure data at the current moment from a server side; acquiring real-time air pressure data of the current position in a preset time window according to a preset sampling frequency to obtain a plurality of real-time air pressure data; the preset time window comprises a plurality of unit time periods with appointed duration; performing anomaly discrimination on the plurality of real-time air pressure data, and correcting the plurality of real-time air pressure data based on anomaly discrimination results to obtain a plurality of corrected air pressure data; determining the altitude of the current position based on a high formula, the standard barometric pressure data and the average value of the corrected barometric pressure data in a specified unit time period; wherein the specified unit time period represents the last unit time period in the preset time window.
In an alternative embodiment, performing anomaly discrimination on the plurality of real-time air pressure data, and correcting the plurality of real-time air pressure data based on the anomaly discrimination result, includes: noise detection is carried out on the real-time air pressure data in each unit time period, and a noise detection result is obtained; correcting the real-time air pressure data in each unit time period based on the noise detection result to obtain target air pressure data in each unit time period; performing waveform mutation detection on the target air pressure data in the appointed unit time period based on the target air pressure data in the historical unit time period to obtain a mutation detection result; wherein the historical unit time period represents all unit time periods before the specified unit time period in the preset time window; and correcting the target air pressure data in the appointed unit time period based on the mutation detection result to obtain corrected air pressure data in the appointed unit time period.
In an alternative embodiment, the noise detection is performed on the real-time air pressure data in each unit time period to obtain a noise detection result, which includes: calculating air pressure difference values between adjacent real-time air pressure data in a target unit time period to obtain a plurality of air pressure difference values; wherein the target unit time period represents any unit time period within the preset time window; calculating the difference between the maximum air pressure difference value and the minimum air pressure difference value in the plurality of air pressure difference values to obtain a reference difference value; judging whether the ratio between the accumulated sum of the air pressure differences and the reference difference is larger than a first threshold value or not; if yes, determining that the noise detection result of the real-time air pressure data in the target unit time period is abnormal; if not, determining that the noise detection result of the real-time air pressure data in the target unit time period is normal.
In an alternative embodiment, correcting the real-time air pressure data in each of the unit time periods based on the noise detection result includes: under the condition that the noise detection result is abnormal, replacing the real-time air pressure data in the target unit time period by the real-time air pressure data in the last adjacent unit time period of the target unit time period to obtain target air pressure data in the target unit time period; and under the condition that the noise detection result is normal, taking the real-time air pressure data in the target unit time period as target air pressure data in the target unit time period.
In an alternative embodiment, the detecting the waveform mutation of the target air pressure data in the specified unit time period based on the target air pressure data in the historical unit time period includes: calculating the range of the air pressure average difference of each unit time period based on the target air pressure data of each unit time period in the historical unit time period to obtain a plurality of reference ranges; calculating the range of the air pressure average difference in the appointed unit time period based on the target air pressure data in the appointed unit time period to obtain the target range; judging whether the ratio of the first value to the second value is larger than a second threshold value or not; wherein the first value represents a difference between the target range and an average of the plurality of reference ranges, and the second value represents a result of adding 1 to the average of the plurality of reference ranges; if yes, determining that the mutation detection result of the target air pressure data in the appointed unit time period is abnormal; if not, determining that the mutation detection result of the target air pressure data in the appointed unit time period is normal.
In an alternative embodiment, correcting the target air pressure data within the specified unit time period based on the mutation detection result includes: removing last target air pressure data corresponding to the target range in the appointed unit time period under the condition that the mutation detection result is abnormal, and replacing the last target air pressure data with the average value of the residual target air pressure data in the appointed unit time period to obtain corrected air pressure data in the appointed unit time period; and under the condition that the mutation detection result is normal, taking the target air pressure data in the specified unit time period as corrected air pressure data in the specified unit time period.
In an alternative embodiment, after determining the altitude of the current location, the method further comprises: acquiring a reference altitude of the current position; the reference altitude obtaining mode comprises one of the following steps: manually inputting and positioning by GPS; under the condition that the GPS signal of the current position meets the preset condition, taking the height data in the GPS positioning result as the reference altitude of the current position; acquiring real-time air pressure data of a next position in a preset time window according to a preset sampling frequency, and calculating the altitude of the next position based on the acquired real-time air pressure data; determining an altitude difference between the next location and the current location based on the altitude of the next location and the altitude of the current location; and determining the corrected altitude of the next position based on the reference altitude of the current position and the altitude difference.
In a second aspect, the present invention provides a device for measuring the altitude of a wearable apparatus, comprising: the first acquisition module is used for acquiring standard air pressure data at the current moment from the server side under the condition of determining to update the standard air pressure data; the first acquisition module is used for acquiring real-time air pressure data of the current position in a preset time window according to a preset sampling frequency to obtain a plurality of real-time air pressure data; the preset time window comprises a plurality of unit time periods with appointed duration; the abnormality judging module is used for carrying out abnormality judgment on the plurality of real-time air pressure data and correcting the plurality of real-time air pressure data based on an abnormality judging result to obtain a plurality of corrected air pressure data; the first determining module is used for determining the altitude of the current position based on a high formula, the standard air pressure data and the average value of the corrected air pressure data in a specified unit time period; wherein the specified unit time period represents the last unit time period in the preset time window.
In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, the memory having stored thereon a computer program executable on the processor, when executing the computer program, implementing the steps of the method for measuring the altitude of a wearable device according to any of the previous embodiments.
In a fourth aspect, the present invention provides a computer readable storage medium storing computer instructions that when executed by a processor implement a method of measuring altitude of a wearable device according to any of the preceding embodiments.
According to the method for measuring the altitude of the wearable equipment, when the altitude is calculated, the real-time air pressure data of a single sampling point are not used for direct calculation, but after a plurality of real-time air pressure data in a preset time window are acquired, anomaly judgment and correction processing are executed, and finally the altitude of the current position is calculated by means of the average value of the corrected air pressure data in a specified unit time period, standard air pressure data and a high formula. Therefore, the method can correct the air pressure change caused by the air pressure sensor abnormality, weather abnormality and the like, ensure the accuracy of air pressure data used in calculating the altitude, and further alleviate the technical problem of poor accuracy of altitude measurement results of wearable equipment in the prior art.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for measuring altitude of a wearable device according to an embodiment of the present invention;
FIG. 2 is a flowchart of performing anomaly determination on a plurality of real-time air pressure data and correcting the plurality of real-time air pressure data based on the anomaly determination result according to an embodiment of the present invention;
fig. 3 is a functional block diagram of a measurement device for altitude of a wearable device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Example 1
Fig. 1 is a flowchart of a method for measuring altitude of a wearable device according to an embodiment of the present invention, as shown in fig. 1, the method specifically includes the following steps:
step S102, under the condition that updating of the standard air pressure data is determined, the standard air pressure data at the current moment is obtained from the server side.
Specifically, the embodiment of the present invention uses the high formula p=p n (1-2.25577*10 -5 *h) 5.25588 Calculating altitude, wherein P represents a real-time barometric pressure value measured by the device, P n Representing the local sea level barometric pressure value, h representing the altitude at which the device is located. Therefore, in order to find the altitude of the wearable device, not only the real-time barometric pressure value measured by the wearable device, but also the local sea level barometric pressure value, that is, standard barometric pressure data, needs to be obtained.
Therefore, when the user uses the wearable device to measure the altitude, on one hand, the air pressure sensor is turned on to acquire real-time air pressure data, and on the other hand, standard air pressure data is required to be determined. The embodiment of the invention can acquire standard air pressure data through the following three channels: and acquiring from a server side of the wearable equipment, using standard air pressure data used in the last measurement of the altitude, and using default air pressure data prestored in the equipment. The embodiment of the invention does not limit the acquisition mode of the standard air pressure data specifically, and a user can select according to actual conditions. When the user determines that the standard air pressure data needs to be updated, the standard air pressure data at the current moment is acquired from the server side; otherwise, the last standard air pressure data or default standard air pressure data can be selected.
Step S104, acquiring real-time air pressure data of the current position in a preset time window according to a preset sampling frequency to obtain a plurality of real-time air pressure data.
The preset time window comprises a plurality of unit time periods with specified duration.
Step S106, performing anomaly discrimination on the plurality of real-time air pressure data, and correcting the plurality of real-time air pressure data based on the anomaly discrimination result to obtain a plurality of corrected air pressure data.
If the use environment of the wearable device is suddenly changed, the air pressure data measured by the air pressure sensor of the wearable device is abnormal. Therefore, if the real-time air pressure data obtained by single measurement is substituted into the high formula to solve the altitude, the accuracy of the altitude cannot be guaranteed because the accuracy of the air pressure data is low. Therefore, in the embodiment of the invention, the air pressure sensor in the wearable equipment collects real-time air pressure data of the current position in a preset time window according to the preset sampling frequency, and then performs abnormality judgment on the collected real-time air pressure data so as to correct the air pressure data according to the abnormality judgment result, thereby obtaining corrected air pressure data, and the corrected air pressure data can filter the abnormal air pressure data, so that the accuracy of air pressure data used in subsequent calculation is ensured.
In the embodiment of the invention, the preset time window comprises a plurality of unit time periods with specified duration. For example, assuming that the preset sampling frequency is 8Hz, the preset time window is 4 seconds, and the designated duration of the unit time period is 1 second, a time window of 4 seconds may collect the current position 8*4 =32 real-time barometric pressure data. The embodiment of the invention does not specifically limit the preset frequency, the appointed duration and the value of the preset time window, and a user can set according to actual requirements.
And S108, determining the altitude of the current position based on the high formula, the standard air pressure data and the average value of the corrected air pressure data in the specified unit time period.
Wherein the specified unit time period represents the last unit time period in the preset time window.
After correcting the real-time air pressure data in all unit time periods in the preset time window, the embodiment of the invention uses the average value of the corrected air pressure data in the last unit time period (namely, the designated unit time period) in the preset time window as the real-time atmospheric pressure value measured by the wearable device. That is, assuming that the preset time window is 4 seconds, after the correction of the barometric pressure data is completed, the corrected barometric pressure data belonging to the 4 th second in the window is averaged, and the average result is taken as the real-time barometric pressure value. And then bringing the altitude and the obtained standard air pressure data into a high formula together to solve the altitude of the current position.
That is, when the wearable device performs altitude measurement, a measurement result of the altitude may be obtained by passing a preset time window, if the preset time window is 4 seconds, the designated duration of the unit time period is 1 second, that is, only the 4 th second has the measurement result, and the air pressure data acquired in the first 3 seconds is used for performing anomaly detection on the air pressure data of the 4 th second. By analogy, in the embodiment of the present invention, the sliding step of the preset time window is a unit time period. Anomaly detection along the exemplary 5 th second barometric pressure data above relies on its first 3 seconds (2 nd, 3 rd and 4 th seconds) barometric pressure data.
According to the measuring method for the altitude of the wearable equipment, when the altitude is calculated, the real-time air pressure data of a single sampling point are not used for direct calculation, but after a plurality of real-time air pressure data in a preset time window are acquired, anomaly judgment and correction processing are executed, and finally the altitude of the current position is calculated by means of the average value of the corrected air pressure data in a specified unit time period, standard air pressure data and a high formula. Therefore, the method can correct the air pressure change caused by the air pressure sensor abnormality, weather abnormality and the like, ensure the accuracy of air pressure data used in calculating the altitude, and further alleviate the technical problem of poor accuracy of altitude measurement results of wearable equipment in the prior art.
In an alternative embodiment, as shown in fig. 2, the step S106 performs anomaly determination on the plurality of real-time air pressure data, and corrects the plurality of real-time air pressure data based on the anomaly determination result, and specifically includes the following steps:
in step S1061, noise detection is performed on the real-time air pressure data in each unit time period, so as to obtain a noise detection result.
Step S1062, correcting the real-time air pressure data in each unit time period based on the noise detection result, to obtain the target air pressure data in each unit time period.
After collecting a plurality of real-time air pressure data in a preset time window, the embodiment of the invention uses a unit time period as a detection unit to carry out noise detection on the real-time air pressure data, and logic of normalized difference characteristics is adopted to judge a noise detection result during noise detection, wherein the noise detection result comprises one of the following components: normal, abnormal. Then, the real-time air pressure data in each unit time period is corrected according to the actual noise detection result, so that the target air pressure data in each unit time period is obtained.
Step S1063, performing waveform mutation detection on the target air pressure data in the specified unit time period based on the target air pressure data in the historical unit time period, to obtain a mutation detection result.
Wherein the historical unit time period represents all unit time periods before the designated unit time period in the preset time window.
Step S1064, correcting the target air pressure data in the specified unit time period based on the mutation detection result, to obtain corrected air pressure data in the specified unit time period.
As can be seen from the above description, the processing object of noise detection is real-time air pressure data in each unit time period, and in order to further improve the identification capability of abnormal air pressure data, in the embodiment of the present invention, further performs waveform mutation detection on the target air pressure data in the specified unit time period by using the target air pressure data in the historical unit time period in the preset time window, so as to obtain a mutation detection result (normal/abnormal). As can be seen from the above definition of the historical unit time period, assuming that the duration of the preset time window is 4 seconds and the duration of the unit time period is 1 second, the historical unit time period is the time period consisting of 1 st, 2 nd and 3 rd seconds.
In the embodiment of the invention, the waveform mutation detection adopts average difference logic to judge the mutation detection result, and after the mutation detection result is determined, the target air pressure data in the appointed unit time period is corrected according to the specific result, so that the corrected air pressure data in the appointed unit time period is obtained. According to the above data processing flow, the embodiment of the invention needs to detect the air pressure data within the specified unit time period twice: noise detection and waveform mutation detection, and the air pressure data in the history unit time period only need to be subjected to noise detection once, that is, the target air pressure data in the history unit time period is the air pressure data corrected in the history unit time period.
In an optional embodiment, the step S1061 performs noise detection on the real-time air pressure data in each unit time period to obtain a noise detection result, and specifically includes the following steps:
in step S10611, air pressure differences between adjacent real-time air pressure data in the target unit time period are calculated, so as to obtain a plurality of air pressure differences.
Wherein the target unit time period represents any unit time period within a preset time window.
In step S10612, a difference between the maximum air pressure difference and the minimum air pressure difference among the air pressure differences is calculated to obtain a reference difference.
In step S10613, it is determined whether the ratio between the accumulated sum of the air pressure differences and the reference difference is greater than a first threshold.
If yes, the following step S10614 is executed; if not, the following step S10615 is performed.
In step S10614, it is determined that the noise detection result of the real-time air pressure data within the target unit time period is abnormal.
In step S10615, it is determined that the noise detection result of the real-time air pressure data within the target unit time period is normal.
In the embodiment of the invention, to perform noise detection on real-time air pressure data in a target unit time period, firstly, air pressure differences between adjacent real-time air pressure data in the time period are calculated, so that a plurality of air pressure differences are obtained. Assuming that N real-time air pressure data exist in the target unit time period, it can be known from the above-described method that N-1 air pressure differences corresponding to the target unit time period can be obtained through the process of step S10611.
Next, by comparing the sizes, the maximum air pressure difference value and the minimum air pressure difference value can be determined from the plurality of air pressure difference values, and the difference value between the two air pressure difference values is referred to as a reference difference value. In addition, a plurality of air pressure difference values corresponding to the target unit time period are accumulated to obtain an accumulated sum. And finally judging whether the ratio between the accumulated sum and the reference difference is larger than a first threshold value. If the ratio is larger than the first threshold value, according to the accumulated sum and the meaning of the reference difference value, the larger the ratio is, the larger the fluctuation of the real-time air pressure data in the target unit time period is, and the noise detection result is determined to be abnormal; otherwise, the noise detection result is normal. The embodiment of the invention does not specifically limit the magnitude of the first threshold, and the user can set the first threshold according to actual requirements, for example 0.2,0.3.
In an optional embodiment, step S1062 described above corrects the real-time air pressure data in each unit time period based on the noise detection result, and specifically includes the following:
and under the condition that the noise detection result is abnormal, replacing the real-time air pressure data in the target unit time period by the real-time air pressure data in the last adjacent unit time period of the target unit time period to obtain the target air pressure data in the target unit time period. I.e. the data in the last unit time period is followed. For example, if the noise detection result of the real-time air pressure data in the Z-th unit time period is abnormal, the data in the Z-th unit time period is replaced with the real-time air pressure data in the Z-1 th unit time period.
And when the noise detection result is normal, taking the real-time air pressure data in the target unit time period as target air pressure data in the target unit time period. I.e. maintaining the original real-time barometric pressure data.
In an optional embodiment, the step S1063, performing waveform mutation detection on the target air pressure data in the specified unit time period based on the target air pressure data in the historical unit time period, specifically includes the following steps:
step S10631, calculating the range of the air pressure average difference in each unit time zone based on the target air pressure data in each unit time zone in the history unit time zone, to obtain a plurality of reference ranges.
In the embodiment of the present invention, when detecting the waveform mutation of the target air pressure data in the specified unit time period, it is first necessary to calculate the range of the air pressure average difference in each unit time period in the historical unit time period, that is, if the historical unit time period includes Z unit time periods, then this step will obtain Z ranges, which is referred to as the reference range.
In the following, a detailed description will be given by taking the calculation of the range of a unit time period as an example, if the unit time period includes N sampling points (N target air pressure data), according to the time sequence, the average difference can be calculated once every 4 sampling points, and all the average difference values corresponding to the N target air pressure data are sequentially calculated by taking 1 sampling point as the sliding step. Based on the above calculation method, N-3 average differential values can be calculated for one unit time period. Wherein, the calculation formula of the average differential value is: Wherein x is i Indicating the ith target air pressure data.
Next, by comparing the sizes, the largest average difference value K among the N-3 average difference values is determined max And a minimum tie difference value K min Finally, the difference between the maximum average difference value and the minimum average difference value is taken as the extremely difference of the air pressure average difference in the unit time period, namely, the extremely difference A is calculated as A=K max -K min 。
Step S10632, calculating the range of the air pressure average difference in the specified unit time period based on the target air pressure data in the specified unit time period, to obtain the target range.
Similarly, with reference to the calculation method of the range described above, the range of the air pressure average difference in a specified unit time period is calculated and recorded as the target range.
In step S10633, it is determined whether the ratio of the first value to the second value is greater than the second threshold.
Wherein the first value represents a difference between the target range and an average value of the plurality of reference ranges, and the second value represents a result of adding 1 to the average value of the plurality of reference ranges.
That is, if Z unit time periods are included in the history unit time periods in the preset time window, the target range is A z+1 The average value of Z reference range is expressed asJudging whether the ratio of the first value to the second value is greater than the second threshold value, and indicating that +. >Whether or not y represents the second threshold is satisfied, in which the value of the second threshold is not specifically limited in the embodiment of the present invention, and the user may set according to the actual requirement, for example, y=0.5.
If yes, go to step S10634 described below; if not, the following step S10635 is performed.
In step S10634, it is determined that the mutation detection result of the target air pressure data within the specified unit time period is abnormal.
In step S10635, it is determined that the mutation detection result of the target air pressure data within the specified unit time period is normal.
In an optional embodiment, step S1064 above corrects the target air pressure data within the specified unit time period based on the mutation detection result, and specifically includes the following:
and under the condition that the mutation detection result is abnormal, removing last target air pressure data corresponding to the target range in the appointed unit time period, and replacing the last target air pressure data with the average value of the residual target air pressure data in the appointed unit time period to obtain corrected air pressure data in the appointed unit time period.
Specifically, when determining that the mutation detection result is abnormal, the abnormal air pressure data within the specified unit time period needs to be removed, in the embodiment of the present invention, the last target air pressure data corresponding to the target range is determined to be the abnormal data, and the formula of the range a is known to be a=k max -K min Further, since 4 consecutive target air pressure data are required to be used for calculating the average differential value K, in the embodiment of the present invention, the last target air pressure data corresponding to the target range includes: calculation of K max The latest data of the acquired time among the 4 target air pressure data used in the time is calculated min The latest data is collected from the 4 target air pressure data used at that time. By calculation formulaFor example, the latest data in the 4 target air pressure data is x i+3 . After the abnormal data is removed, the average value of the residual target air pressure data which is not removed in the appointed unit time period is used for replacing the removed air pressure data, so that the correction of waveform mutation detection abnormality is completed.
And when the mutation detection result is normal, taking the target air pressure data in the specified unit time period as corrected air pressure data in the specified unit time period. That is, the original target air pressure data is maintained.
If the air pressure sensor of the wearable device has the problems of blocking of an air pressure hole, pressure change around the hole, water inflow and the like, the measured air pressure data of the air pressure sensor is abnormal, and in order to solve the problem, in the embodiment of the invention, after determining the altitude of the current position, the method further comprises the following steps:
Step S201, a reference altitude of the current position is acquired.
The reference altitude obtaining mode comprises one of the following steps: manually inputting and positioning by GPS; and under the condition that the GPS signal of the current position meets the preset condition, taking the height data in the GPS positioning result as the reference altitude of the current position.
Based on the above description, the reference altitude can be obtained in two ways, one is manual input, and the other is GPS positioning. When a user of the wearable device is located at a position with accurate altitude information, the user can manually input the accurate altitude into the wearable device as a reference altitude; or when the user is positioned at a position where the GPS signal meets the preset condition, the altitude can be obtained from longitude and latitude data provided by the GPS positioning result and used as the reference altitude. The preset conditions comprise: the GPS signal-to-noise ratio is greater than the third threshold, and the number of searched satellites is greater than the fourth threshold. The embodiment of the invention does not limit the acquisition mode of the reference altitude, and the user can set the reference altitude according to actual conditions.
Step S202, acquiring real-time air pressure data of the next position in a preset time window according to a preset sampling frequency, and calculating the altitude of the next position based on the acquired real-time air pressure data.
The method of calculating the altitude of the current location has been disclosed above, and when the user arrives at the next location with the wearable device, the altitude of the next location can be calculated as well with reference to the above-described methods of steps S102-S108. Please refer to the above for specific methods, and the detailed description is omitted here.
Step S203, determining the altitude difference between the next position and the current position based on the altitude of the next position and the altitude of the current position.
Step S204, determining the altitude after correction of the next position based on the reference altitude and the altitude difference of the current position.
Even if the accuracy of the air pressure data measured by the air pressure sensor cannot be guaranteed, the altitude difference corresponding to the air pressure change of different positions is accurate, namely, the altitude difference between the next position and the current position is accurate, and in view of the acquired reference altitude of the current position, the reference altitude and the altitude difference are summed to obtain the altitude after the correction of the next position. For example. The altitude of the current position is 1050m, the altitude of the next position is 1300m, and the reference altitude of the current position is 1000m, which is calculated by the method of steps S102-S108, and then the corrected altitude of the next position is 1250m.
Example two
The embodiment of the invention also provides a device for measuring the altitude of the wearable equipment, which is mainly used for executing the method for measuring the altitude of the wearable equipment provided by the first embodiment, and the device for measuring the altitude of the wearable equipment provided by the embodiment of the invention is specifically introduced below.
Fig. 3 is a functional block diagram of a device for measuring altitude of a wearable device according to an embodiment of the present invention, where, as shown in fig. 3, the device mainly includes: the system comprises a first acquisition module 10, a first acquisition module 20, an abnormality discrimination module 30 and a first determination module 40, wherein:
the first obtaining module 10 is configured to obtain, from the server, standard air pressure data at a current time when it is determined to update the standard air pressure data.
The first acquisition module 20 is configured to acquire real-time air pressure data of a current position in a preset time window according to a preset sampling frequency, so as to obtain a plurality of real-time air pressure data; the preset time window includes a number of unit time periods of specified duration.
The anomaly determination module 30 is configured to perform anomaly determination on the plurality of real-time air pressure data, and correct the plurality of real-time air pressure data based on the anomaly determination result to obtain a plurality of corrected air pressure data.
A first determining module 40 for determining an altitude of the current position based on the high formula, the standard barometric pressure data, and the average of the corrected barometric pressure data within the specified unit time period; wherein the specified unit time period represents the last unit time period in the preset time window.
According to the measuring device for the altitude of the wearable equipment, when the altitude is calculated, the real-time air pressure data of a single sampling point are not used for direct calculation, but after a plurality of real-time air pressure data in a preset time window are acquired, abnormality judgment and correction processing are executed, and finally the altitude of the current position is calculated by means of the average value of the corrected air pressure data in a specified unit time period, standard air pressure data and a high formula. Therefore, the device can correct the air pressure change caused by the air pressure sensor abnormality, weather abnormality and the like, ensure the accuracy of air pressure data used in calculating the altitude, and further alleviate the technical problem of poor accuracy of altitude measurement results of wearable equipment in the prior art.
Optionally, the anomaly discrimination module 30 includes:
and the noise detection unit is used for carrying out noise detection on the real-time air pressure data in each unit time period to obtain a noise detection result.
And the first correction unit is used for correcting the real-time air pressure data in each unit time period based on the noise detection result to obtain target air pressure data in each unit time period.
The mutation detection unit is used for carrying out waveform mutation detection on the target air pressure data in the appointed unit time period based on the target air pressure data in the historical unit time period to obtain a mutation detection result; wherein the historical unit time period represents all unit time periods before the designated unit time period in the preset time window.
And a second correction unit for correcting the target air pressure data in the specified unit time period based on the mutation detection result to obtain corrected air pressure data in the specified unit time period.
Optionally, the noise detection unit is specifically configured to:
calculating air pressure difference values between adjacent real-time air pressure data in a target unit time period to obtain a plurality of air pressure difference values; wherein the target unit time period represents any unit time period within a preset time window.
And calculating the difference between the maximum air pressure difference value and the minimum air pressure difference value in the plurality of air pressure difference values to obtain a reference difference value.
A determination is made as to whether a ratio between the accumulated sum of the plurality of barometric pressure differences and the reference difference is greater than a first threshold.
If yes, determining that the noise detection result of the real-time air pressure data in the target unit time period is abnormal.
If not, determining that the noise detection result of the real-time air pressure data in the target unit time period is normal.
Optionally, the first correction unit is specifically configured to:
and under the condition that the noise detection result is abnormal, replacing the real-time air pressure data in the target unit time period by the real-time air pressure data in the last adjacent unit time period of the target unit time period to obtain the target air pressure data in the target unit time period.
And when the noise detection result is normal, taking the real-time air pressure data in the target unit time period as target air pressure data in the target unit time period.
Alternatively, the mutation detection unit is specifically configured to:
and calculating the range of the air pressure average difference of each unit time period based on the target air pressure data of each unit time period in the historical unit time period, so as to obtain a plurality of reference ranges.
And calculating the range of the air pressure average difference in the specified unit time period based on the target air pressure data in the specified unit time period to obtain the target range.
Judging whether the ratio of the first value to the second value is larger than a second threshold value or not; wherein the first value represents a difference between the target range and an average value of the plurality of reference ranges, and the second value represents a result of adding 1 to the average value of the plurality of reference ranges.
If yes, determining that the mutation detection result of the target air pressure data in the appointed unit time period is abnormal.
If not, determining that the mutation detection result of the target air pressure data in the appointed unit time period is normal.
Optionally, the second correction unit is specifically configured to:
and under the condition that the mutation detection result is abnormal, removing last target air pressure data corresponding to the target range in the appointed unit time period, and replacing the last target air pressure data with the average value of the residual target air pressure data in the appointed unit time period to obtain corrected air pressure data in the appointed unit time period.
And when the mutation detection result is normal, taking the target air pressure data in the specified unit time period as corrected air pressure data in the specified unit time period.
Optionally, the apparatus further comprises:
the second acquisition module is used for acquiring the reference altitude of the current position; the reference altitude obtaining mode comprises one of the following steps: manually inputting and positioning by GPS; and under the condition that the GPS signal of the current position meets the preset condition, taking the height data in the GPS positioning result as the reference altitude of the current position.
The second acquisition module is used for acquiring real-time air pressure data of the next position in a preset time window according to a preset sampling frequency and calculating the altitude of the next position based on the acquired real-time air pressure data.
And the second determining module is used for determining the altitude difference between the next position and the current position based on the altitude of the next position and the altitude of the current position.
A third determination module for determining a reference altitude and an altitude difference based on the current position, the next position corrected altitude is determined.
Example III
Referring to fig. 4, an embodiment of the present invention provides an electronic device, including: a processor 60, a memory 61, a bus 62 and a communication interface 63, the processor 60, the communication interface 63 and the memory 61 being connected by the bus 62; the processor 60 is arranged to execute executable modules, such as computer programs, stored in the memory 61.
The memory 61 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is achieved via at least one communication interface 63 (which may be wired or wireless), and may use the internet, a wide area network, a local network, a metropolitan area network, etc.
Bus 62 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 4, but not only one bus or type of bus.
The memory 61 is configured to store a program, and the processor 60 executes the program after receiving an execution instruction, and the method executed by the apparatus for defining a process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 60 or implemented by the processor 60.
The processor 60 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 60. The processor 60 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 61 and the processor 60 reads the information in the memory 61 and in combination with its hardware performs the steps of the method described above.
The method, the device and the computer program product of the electronic device for measuring the altitude of the wearable device provided by the embodiment of the invention comprise a computer readable storage medium storing non-volatile program codes executable by a processor, wherein the instructions included in the program codes can be used for executing the method described in the method embodiment, and specific implementation can be seen in the method embodiment and will not be repeated here.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
In the description of the present invention, it should be noted that, directions or positional relationships indicated by terms such as "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., are directions or positional relationships based on those shown in the drawings, or are directions or positional relationships conventionally put in use of the inventive product, are merely for convenience of describing the present invention and simplifying the description, and are not indicative or implying that the apparatus or element to be referred to must have a specific direction, be constructed and operated in a specific direction, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Furthermore, the terms "horizontal," "vertical," "overhang," and the like do not denote a requirement that the component be absolutely horizontal or overhang, but rather may be slightly inclined. As "horizontal" merely means that its direction is more horizontal than "vertical", and does not mean that the structure must be perfectly horizontal, but may be slightly inclined.
In the description of the present invention, it should also be noted that, unless explicitly specified and limited otherwise, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (10)
1. A method for measuring the altitude of a wearable device, comprising:
Under the condition that the updated standard air pressure data is determined, acquiring the standard air pressure data at the current moment from a server side;
acquiring real-time air pressure data of the current position in a preset time window according to a preset sampling frequency to obtain a plurality of real-time air pressure data; the preset time window comprises a plurality of unit time periods with appointed duration;
performing anomaly discrimination on the plurality of real-time air pressure data, and correcting the plurality of real-time air pressure data based on anomaly discrimination results to obtain a plurality of corrected air pressure data;
determining the altitude of the current position based on a high formula, the standard barometric pressure data and the average value of the corrected barometric pressure data in a specified unit time period; wherein the specified unit time period represents the last unit time period in the preset time window.
2. The method of measuring altitude of a wearable device according to claim 1, wherein performing anomaly discrimination on the plurality of real-time air pressure data and correcting the plurality of real-time air pressure data based on an anomaly discrimination result, comprises:
noise detection is carried out on the real-time air pressure data in each unit time period, and a noise detection result is obtained;
Correcting the real-time air pressure data in each unit time period based on the noise detection result to obtain target air pressure data in each unit time period;
performing waveform mutation detection on the target air pressure data in the appointed unit time period based on the target air pressure data in the historical unit time period to obtain a mutation detection result; wherein the historical unit time period represents all unit time periods before the specified unit time period in the preset time window;
and correcting the target air pressure data in the appointed unit time period based on the mutation detection result to obtain corrected air pressure data in the appointed unit time period.
3. The method for measuring the altitude of the wearable device according to claim 2, wherein the noise detection is performed on the real-time air pressure data in each unit time period to obtain a noise detection result, and the method comprises the following steps:
calculating air pressure difference values between adjacent real-time air pressure data in a target unit time period to obtain a plurality of air pressure difference values; wherein the target unit time period represents any unit time period within the preset time window;
calculating the difference between the maximum air pressure difference value and the minimum air pressure difference value in the plurality of air pressure difference values to obtain a reference difference value;
Judging whether the ratio between the accumulated sum of the air pressure differences and the reference difference is larger than a first threshold value or not;
if yes, determining that the noise detection result of the real-time air pressure data in the target unit time period is abnormal;
if not, determining that the noise detection result of the real-time air pressure data in the target unit time period is normal.
4. A method of measuring the altitude of a wearable device according to claim 3, wherein correcting the real-time barometric pressure data for each of the unit time periods based on the noise detection result comprises:
under the condition that the noise detection result is abnormal, replacing the real-time air pressure data in the target unit time period by the real-time air pressure data in the last adjacent unit time period of the target unit time period to obtain target air pressure data in the target unit time period;
and under the condition that the noise detection result is normal, taking the real-time air pressure data in the target unit time period as target air pressure data in the target unit time period.
5. The method for measuring the altitude of the wearable device according to claim 2, wherein the waveform mutation detection of the target air pressure data in the specified unit time period based on the target air pressure data in the historical unit time period includes:
Calculating the range of the air pressure average difference of each unit time period based on the target air pressure data of each unit time period in the historical unit time period to obtain a plurality of reference ranges;
calculating the range of the air pressure average difference in the appointed unit time period based on the target air pressure data in the appointed unit time period to obtain the target range;
judging whether the ratio of the first value to the second value is larger than a second threshold value or not; wherein the first value represents a difference between the target range and an average of the plurality of reference ranges, and the second value represents a result of adding 1 to the average of the plurality of reference ranges;
if yes, determining that the mutation detection result of the target air pressure data in the appointed unit time period is abnormal;
if not, determining that the mutation detection result of the target air pressure data in the appointed unit time period is normal.
6. The method of measuring the altitude of a wearable device according to claim 5, wherein correcting the target air pressure data within the specified unit time period based on the mutation detection result comprises:
removing last target air pressure data corresponding to the target range in the appointed unit time period under the condition that the mutation detection result is abnormal, and replacing the last target air pressure data with the average value of the residual target air pressure data in the appointed unit time period to obtain corrected air pressure data in the appointed unit time period;
And under the condition that the mutation detection result is normal, taking the target air pressure data in the specified unit time period as corrected air pressure data in the specified unit time period.
7. The method of measuring the altitude of a wearable device according to claim 1, wherein after determining the altitude of the current location, the method further comprises:
acquiring a reference altitude of the current position; the reference altitude obtaining mode comprises one of the following steps: manually inputting and positioning by GPS; under the condition that the GPS signal of the current position meets the preset condition, taking the height data in the GPS positioning result as the reference altitude of the current position;
acquiring real-time air pressure data of a next position in a preset time window according to a preset sampling frequency, and calculating the altitude of the next position based on the acquired real-time air pressure data;
determining an altitude difference between the next location and the current location based on the altitude of the next location and the altitude of the current location;
and determining the corrected altitude of the next position based on the reference altitude of the current position and the altitude difference.
8. Measurement device for wearable equipment altitude, characterized in that includes:
the first acquisition module is used for acquiring standard air pressure data at the current moment from the server side under the condition of determining to update the standard air pressure data;
the first acquisition module is used for acquiring real-time air pressure data of the current position in a preset time window according to a preset sampling frequency to obtain a plurality of real-time air pressure data; the preset time window comprises a plurality of unit time periods with appointed duration;
the abnormality judging module is used for carrying out abnormality judgment on the plurality of real-time air pressure data and correcting the plurality of real-time air pressure data based on an abnormality judging result to obtain a plurality of corrected air pressure data;
the first determining module is used for determining the altitude of the current position based on a high formula, the standard air pressure data and the average value of the corrected air pressure data in a specified unit time period; wherein the specified unit time period represents the last unit time period in the preset time window.
9. An electronic device comprising a memory, a processor, the memory having stored thereon a computer program executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method of measuring the altitude of a wearable device according to any of claims 1 to 7.
10. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the method of measuring altitude of a wearable device of any of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310817990.7A CN116817853A (en) | 2023-07-05 | 2023-07-05 | Method and device for measuring altitude of wearable equipment and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310817990.7A CN116817853A (en) | 2023-07-05 | 2023-07-05 | Method and device for measuring altitude of wearable equipment and electronic equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116817853A true CN116817853A (en) | 2023-09-29 |
Family
ID=88139017
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310817990.7A Pending CN116817853A (en) | 2023-07-05 | 2023-07-05 | Method and device for measuring altitude of wearable equipment and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116817853A (en) |
-
2023
- 2023-07-05 CN CN202310817990.7A patent/CN116817853A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109952493A (en) | Method and apparatus for sensing and for improving sensor accuracy | |
| US20210372654A1 (en) | Ventilation device, and constant air volume control method therefor | |
| CN111259538B (en) | Vibration alarm method, storage medium and electronic equipment | |
| CN117906580B (en) | A system and method for analyzing underwater terrain changes in a waterway | |
| CN110440893A (en) | Weight calibration method, device and weighing equipment | |
| JP6159594B2 (en) | Observation value processing apparatus, observation value processing method, and observation value processing program | |
| CN110398710A (en) | A kind of electric energy gauging method and system based on error self diagnosis | |
| CN114019182B (en) | Zero speed state detection method, device and electronic equipment | |
| KR102534577B1 (en) | Gas analysis system and gas analysis method | |
| CN116817853A (en) | Method and device for measuring altitude of wearable equipment and electronic equipment | |
| CN114022873B (en) | Instrument status detection method, electronic device and storage medium | |
| CN104169988A (en) | Apparatus and method for detecting a parking space | |
| CN106709251A (en) | Evaluation method and device | |
| JP7024025B2 (en) | System, program | |
| JP5399725B2 (en) | Water quality estimation apparatus and water quality estimation method | |
| CN117906790A (en) | Temperature detection calibration method, device, equipment and medium | |
| CN112731815A (en) | Method for improving analog quantity acquisition precision | |
| JPH05249073A (en) | Carbon dioxide concentration detection apparatus | |
| CN116399996A (en) | Organic element analysis method, device and electronic equipment based on thermal conductivity detection | |
| CN113654715B (en) | Temperature compensation method, device and equipment of water pressure sensor and storage medium | |
| CN114440830A (en) | Altitude measurement method, device, equipment and storage medium | |
| CN111898094B (en) | Method and device for processing foundation pit monitoring data, electronic equipment and storage medium | |
| WO2021031091A1 (en) | Method and apparatus for detecting operating status of device, and computer readable medium | |
| CN116519010B (en) | A method and apparatus for zero-bias calibration of a gyroscope | |
| CN112116014A (en) | Test data outlier detection method for distribution automation equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |