Positioning method and electronic device
Abstract
A positioning method and an electronic device are provided. The method comprises: acquiring azimuth angle data collected by a first sensor and acceleration data collected by a second sensor respectively ( 101 ); judging whether a turning event occurs at a current moment based on the azimuth angle data and the acceleration data ( 102 ); and if a turning event occurs, generating a positioning request to acquire position data of the current moment based on the positioning request for positioning and displaying ( 103 ). In the method, the positional change caused by a turning action is identified and positioned, so that a motion trajectory displayed in a map reflects the actual movement more truly.
Claims
exact text as granted — not AI-modified1 . A positioning method, comprising:
acquiring azimuth angle data collected by a first sensor and acceleration data collected by a second sensor respectively; judging whether a turning event occurs at a current moment based on the azimuth angle data and the acceleration data; and if a turning event occurs, generating a positioning request to acquire position data of the current moment based on the positioning request for positioning and displaying.
2 . The method according to claim 1 , wherein judging whether a turning event occurs at a current moment based on the azimuth angle data and the acceleration data comprises:
determining whether a to-be-identified turning event occurs at the current moment based on the azimuth angle data; and if a to-be-identified turning event occurs, determining whether the to-be-identified turning event is the turning event based on the acceleration data.
3 . The method according to claim 2 , wherein determining whether a to-be-identified turning event occurs at the current moment based on the azimuth angle data comprises:
calculating an angle difference between a first azimuth angle data collected at a start moment in a preset time range and a second azimuth angle data collected at an end moment in the preset time range; determining whether the angle difference is greater than an angle threshold; and if the angle difference is greater than the angle threshold, determining that the to-be-identified turning event occurs at the current moment.
4 . The method according to claim 2 , wherein if a to-be-identified turning event occurs, determining whether the to-be-identified turning event is the turning event based on the acceleration data comprises:
determining a motion state and a motion characteristic value corresponding to the to-be-identified turning event based on the acceleration data; judging whether the motion state is of a motion type or a non-motion type; if the motion state is of a motion type, determining that the to-be-identified turning event is the turning event when the motion characteristic value satisfies a preset motion turning condition; and if the motion state is of a non-motion type, determining that the to-be-identified turning event is the turning event when the motion characteristic value satisfies a preset non-motion turning condition.
5 . The method according to claim 4 , wherein
the motion characteristic value includes one or more of a standard deviation, a kurtosis, a characteristic ratio of the standard deviation to the kurtosis, a kurtosis difference, a fluctuation difference and a standard deviation difference of the acceleration data collected within a current preset time period; wherein the kurtosis difference is a difference between a kurtosis of the acceleration data collected within the current preset time period and a kurtosis mean value of at least one previous preset time period adjacent to the current preset time period; the fluctuation difference is a difference between a fluctuation value of the acceleration data collected within the current preset time period and the fluctuation mean value of at least one previous preset time period adjacent to the current preset time period; and the standard deviation difference is an absolute difference between a standard deviation of the acceleration data collected within the current preset time period and a standard deviation mean value of at least one previous preset time period adjacent to the current preset time period.
6 . The method according to claim 5 , wherein if the motion state is of a motion type, determining that the to-be-identified turning event is the turning event when the motion characteristic value satisfies a preset motion turning condition comprises:
if the motion state is of a motion type, judging whether the standard deviation is less than a first standard deviation threshold and whether the characteristic ratio is less than a first characteristic ratio threshold; if the standard deviation is less than the first standard deviation threshold and the characteristic ratio is less than the first characteristic ratio threshold, and at the same time, the kurtosis difference is less than or equal to a first kurtosis difference threshold, and/or the kurtosis is less than or equal to a first kurtosis threshold, and/or the fluctuation difference is less than or equal to a first fluctuation difference threshold, determining that the motion characteristic value satisfies the preset motion turning condition, and determining that the to-be-identified turning event is the turning event; if the standard deviation is greater than or equal to the first standard deviation threshold, and/or the characteristic ratio is greater than or equal to the first characteristic ratio threshold, further judging whether the fluctuation difference is greater than the first fluctuation threshold; if the fluctuation difference is greater than the first fluctuation threshold, and at the same time, the standard deviation difference is less than or equal to a first standard deviation difference threshold, and/or the kurtosis difference is less than the first kurtosis difference threshold, and the kurtosis is less than or equal to the first kurtosis threshold, determining that the motion characteristic value satisfies the preset motion turning condition; if the fluctuation difference is less than or equal to the first fluctuation threshold, determining that the motion characteristic value satisfies the preset motion turning condition, and determining that the to-be-identified turning event is the turning event.
7 . The method according to claim 5 , wherein if the motion state is of a non-motion type, determining that the to-be-identified turning event is the turning event when the motion characteristic value satisfies a preset non-motion turning condition comprises:
if the motion state is of a non-motion type, determining whether the fluctuation difference is greater than a second fluctuation difference threshold; if the fluctuation difference is greater than the second fluctuation difference threshold, further judging whether the characteristic ratio is less than a second characteristic ratio threshold; if the characteristic ratio is less than the second characteristic ratio threshold, and at the same time, the kurtosis difference is less than or equal to a second kurtosis difference threshold, and/or the kurtosis is less than or equal to a second kurtosis threshold, and/or the standard deviation difference is less than or equal to a second standard deviation difference threshold, determining that the motion characteristic value satisfies the preset non-motion turning condition, and determining that the to-be-identified turning event is the turning event; if the characteristic ratio is greater than or equal to the second characteristic ratio threshold, determining that the motion characteristic value satisfies the preset non-motion turning condition; if the fluctuation difference is less than or equal to the second fluctuation difference threshold, further judging whether the characteristic ratio is less than a third characteristic ratio threshold; if the characteristic ratio is less than the third characteristic ratio threshold, and at the same time, the kurtosis difference is less than or equal to a third kurtosis difference threshold, and/or the kurtosis is less than or equal to a third kurtosis threshold, and/or the standard deviation difference is less than or equal to a third standard deviation difference threshold, determining that the motion characteristic value satisfies the preset non-motion turning condition; if the characteristic ratio is greater than or equal to the third characteristic ratio threshold, determining that the motion characteristic value satisfies the preset non-motion turning condition, and determining that the to-be-identified turning event is the turning event.
8 . The method according to claim 1 , wherein if a turning event occurs,
generating a positioning request to acquire position data of the current moment based on the positioning request for positioning and displaying comprises: if a turning event occurs, generating a positioning request; sending the positioning request to a server end to enable the server end to acquire position data of a current moment based on the positioning request; generating a motion trajectory based on positioning points determined by the position data; and outputting the motion trajectory generated by the server end in a map.
9 . An electronic device comprising a processing module and a storage module; the storage module is for storing one or more computer instructions, wherein the one or more computer instructions are invoked and executed by the processing module;
the processing module is for: acquiring azimuth angle data collected by a first sensor and acceleration data collected by a second sensor respectively; judging whether a turning event occurs at a current moment based on the azimuth angle data and the acceleration data; and if a turning event occurs, generating a positioning request to acquire position data of the current moment based on the positioning request for positioning and displaying.
10 . A computer readable storage medium storing a computer program, wherein the computer program, when executed by a computer, can implement a positioning method, which comprises the steps of:
acquiring azimuth angle data collected by a first sensor and acceleration data collected by a second sensor respectively; judging whether a turning event occurs at a current moment based on the azimuth angle data and the acceleration data; and if a turning event occurs, generating a positioning request to acquire position data of the current moment based on the positioning request for positioning and displaying.
11 . The computer readable storage medium according to claim 10 , wherein
judging whether a turning event occurs at a current moment based on the azimuth angle data and the acceleration data comprises: determining whether a to-be-identified turning event occurs at the current moment based on the azimuth angle data; and if a to-be-identified turning event occurs, determining whether the to-be-identified turning event is the turning event based on the acceleration data.
12 . A computer readable storage medium according to claim 10 , wherein determining whether a to-be-identified turning event occurs at the current moment based on the azimuth angle data comprises:
calculating an angle difference between a first azimuth angle data collected at a start moment in a preset time range and a second azimuth angle data collected at an end moment in the preset time range; determining whether the angle difference is greater than an angle threshold; and if the angle difference is greater than the angle threshold, determining that the to-be-identified turning event occurs at the current moment.
13 . A computer readable storage medium according to claim 10 , wherein if a to-be-identified turning event occurs, determining whether the to-be-identified turning event is the turning event based on the acceleration data comprises:
determining a motion state and a motion characteristic value corresponding to the to-be-identified turning event based on the acceleration data; judging whether the motion state is of a motion type or a non-motion type; if the motion state is of a motion type, determining that the to-be-identified turning event is the turning event when the motion characteristic value satisfies a preset motion turning condition; and if the motion state is of a non-motion type, determining that the to-be-identified turning event is the turning event when the motion characteristic value satisfies a preset non-motion turning condition.
14 . A computer readable storage medium according to claim 10 , wherein
the motion characteristic value includes one or more of a standard deviation, a kurtosis, a characteristic ratio of the standard deviation to the kurtosis, a kurtosis difference, a fluctuation difference and a standard deviation difference of the acceleration data collected within a current preset time period; wherein the kurtosis difference is a difference between a kurtosis of the acceleration data collected within the current preset time period and a kurtosis mean value of at least one previous preset time period adjacent to the current preset time period; the fluctuation difference is a difference between a fluctuation value of the acceleration data collected within the current preset time period and the fluctuation mean value of at least one previous preset time period adjacent to the current preset time period; and the standard deviation difference is an absolute difference between a standard deviation of the acceleration data collected within the current preset time period and a standard deviation mean value of at least one previous preset time period adjacent to the current preset time period.
15 . A computer readable storage medium storing according to claim 10 , wherein if the motion state is of a motion type, determining that the to-be-identified turning event is the turning event when the motion characteristic value satisfies a preset motion turning condition comprises:
if the motion state is of a motion type, judging whether the standard deviation is less than a first standard deviation threshold and whether the characteristic ratio is less than a first characteristic ratio threshold; if the standard deviation is less than the first standard deviation threshold and the characteristic ratio is less than the first characteristic ratio threshold, and at the same time, the kurtosis difference is less than or equal to a first kurtosis difference threshold, and/or the kurtosis is less than or equal to a first kurtosis threshold, and/or the fluctuation difference is less than or equal to a first fluctuation difference threshold, determining that the motion characteristic value satisfies the preset motion turning condition, and determining that the to-be-identified turning event is the turning event; if the standard deviation is greater than or equal to the first standard deviation threshold, and/or the characteristic ratio is greater than or equal to the first characteristic ratio threshold, further judging whether the fluctuation difference is greater than the first fluctuation threshold; if the fluctuation difference is greater than the first fluctuation threshold, and at the same time, the standard deviation difference is less than or equal to a first standard deviation difference threshold, and/or the kurtosis difference is less than the first kurtosis difference threshold, and the kurtosis is less than or equal to the first kurtosis threshold, determining that the motion characteristic value satisfies the preset motion turning condition; if the fluctuation difference is less than or equal to the first fluctuation threshold, determining that the motion characteristic value satisfies the preset motion turning condition, and determining that the to-be-identified turning event is the turning event.
16 . A computer readable storage medium according to claim 10 , wherein if the motion state is of a non-motion type, determining that the to-be-identified turning event is the turning event when the motion characteristic value satisfies a preset non-motion turning condition comprises:
if the motion state is of a non-motion type, determining whether the fluctuation difference is greater than a second fluctuation difference threshold; if the fluctuation difference is greater than the second fluctuation difference threshold, further judging whether the characteristic ratio is less than a second characteristic ratio threshold; if the characteristic ratio is less than the second characteristic ratio threshold, and at the same time, the kurtosis difference is less than or equal to a second kurtosis difference threshold, and/or the kurtosis is less than or equal to a second kurtosis threshold, and/or the standard deviation difference is less than or equal to a second standard deviation difference threshold, determining that the motion characteristic value satisfies the preset non-motion turning condition, and determining that the to-be-identified turning event is the turning event; if the characteristic ratio is greater than or equal to the second characteristic ratio threshold, determining that the motion characteristic value satisfies the preset non-motion turning condition; if the fluctuation difference is less than or equal to the second fluctuation difference threshold, further judging whether the characteristic ratio is less than a third characteristic ratio threshold; if the characteristic ratio is less than the third characteristic ratio threshold, and at the same time, the kurtosis difference is less than or equal to a third kurtosis difference threshold, and/or the kurtosis is less than or equal to a third kurtosis threshold, and/or the standard deviation difference is less than or equal to a third standard deviation difference threshold, determining that the motion characteristic value satisfies the preset non-motion turning condition; if the characteristic ratio is greater than or equal to the third characteristic ratio threshold, determining that the motion characteristic value satisfies the preset non-motion turning condition, and determining that the to-be-identified turning event is the turning event.
17 . A computer readable storage medium according to claim 10 , wherein if a turning event occurs, generating a positioning request to acquire position data of the current moment based on the positioning request for positioning and displaying comprises:
if a turning event occurs, generating a positioning request; sending the positioning request to a server end to enable the server end to acquire position data of a current moment based on the positioning request; generating a motion trajectory based on positioning points determined by the position data; and outputting the motion trajectory generated by the server end in a map.Join the waitlist — get patent alerts
Track US2022163348A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.