Compass calibration method of wearable device, wearable device and storage medium
阅读说明:本技术 可穿戴设备的指南针校准方法、可穿戴设备及存储介质 (Compass calibration method of wearable device, wearable device and storage medium ) 是由 冯盼 于 2019-08-21 设计创作,主要内容包括:本发明公开了一种可穿戴设备的指南针校准方法、可穿戴设备及存储介质,该方法通过获取移动终端第一指南针模块当前的第一角度值,再根据预设的校准控制策略,利用第一角度值对可穿戴设备的第二指南针模块当前的第二角度值进行校准,第一指南针模块的性能优于第二指南针模块,解决了用户需经常对可穿戴设备的指南针进行8字校准,用户体验不好的问题,本发明还公开了一种可穿戴设备及计算机可读存储介质,通过实施上述方案,解决了用户需经常对可穿戴设备的指南针进行8字校准,用户体验不好的问题。本发明主要用于指南针进行校准。(The invention discloses a compass calibration method of wearable equipment, the wearable equipment and a storage medium, wherein the method calibrates a current second angle value of a second compass module of the wearable equipment by acquiring a current first angle value of a first compass module of a mobile terminal and utilizing the first angle value according to a preset calibration control strategy, the performance of the first compass module is superior to that of the second compass module, and the problems that a user needs to frequently calibrate a compass of the wearable equipment in a 8-character mode and user experience is poor are solved. The method is mainly used for calibrating the compass.)
1. A compass calibration method of a wearable device is characterized by comprising the following steps:
acquiring a current first angle value of a first compass module of the mobile terminal;
according to a preset calibration control strategy, calibrating a current second angle value of a second compass module of the wearable device by using the first angle value;
the first compass module has better performance than the second compass module.
2. The compass calibration method of a wearable device of claim 1, wherein the calibration control strategy comprises:
when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset first angle difference threshold value, updating the second angle value to the first angle value;
or directly update the second angle to the first angle value.
3. The compass calibration method of a wearable device of claim 1, wherein the calibration control strategy comprises:
when the second compass module is currently in a first precision mode, when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset second angle difference threshold value, updating the second angle value to the first angle value; otherwise, not updating the second angle value;
the first precision mode is as follows: and when the second pointer of the second compass module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second compass module and the first angle value of the first compass module is less than or equal to a first correction angle difference threshold value.
4. The compass calibration method of a wearable device of claim 3, wherein the calibration control strategy comprises:
when the second compass module is currently in a second precision mode, when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset third angle difference threshold value, updating the second angle value to the first angle value; otherwise, not updating the second angle value;
the second precision mode is as follows: and when the second pointer of the second compass module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second compass module and the first angle value of the first compass module is greater than a first correction angle difference threshold value and less than or equal to a second correction angle difference threshold value.
5. The compass calibration method of a wearable device of claim 4, wherein the calibration control strategy comprises:
when the second compass module is currently in a third precision mode, directly updating the second angle value to the first angle value;
the third precision mode is as follows: and when the second pointer of the second compass module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second compass module and the first angle value of the first compass module is greater than a second correction angle difference threshold value and less than or equal to a third correction angle difference threshold value.
6. The compass calibration method of a wearable device of any one of claims 3-5, wherein the calibration control strategy comprises:
when the second compass module is currently in a fourth precision mode, directly updating the second angle value to the first angle value;
the fourth accuracy mode is: the second compass module cannot currently acquire an effective second angle value.
7. The method for calibrating a compass of a wearable device as claimed in any one of claims 1-5, wherein said obtaining a current first angle value of the first compass module of the mobile terminal comprises:
acquiring a current precision mode of the second pointer module;
acquiring a target acquisition frequency corresponding to the current precision mode according to the corresponding relation between the current precision mode and a preset precision mode and the acquisition frequency;
and acquiring a current first angle value of the first compass module of the mobile terminal according to the target acquisition frequency.
8. The compass calibration method of claim 7, wherein the accuracy pattern versus acquisition frequency correspondence comprises:
the first accuracy mode corresponds to a first acquisition frequency;
the second accuracy mode corresponds to a second acquisition frequency;
the third accuracy mode corresponds to a third acquisition frequency;
the fourth accuracy mode corresponds to a fourth acquisition frequency;
the first obtaining frequency is less than the second obtaining frequency, the second obtaining frequency is less than the third obtaining frequency, and the third obtaining frequency is less than or equal to a fourth obtaining frequency;
the first precision mode is as follows: when the second pointer of the second compass module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second compass module and the first angle value of the first compass module is less than or equal to a first correction angle difference threshold;
the second precision mode is as follows: when the second pointer of the second pointer module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than a first correction angle difference threshold value and less than or equal to a second correction angle difference threshold value;
the third precision mode is as follows: the second pointer of the second pointer module and the first pointer of the first compass module point at the same direction, and the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than a second correction angle difference threshold and less than or equal to a third correction angle difference threshold;
the fourth accuracy mode is: the second compass module cannot currently acquire an effective second angle value.
9. A wearable device, wherein the wearable device comprises a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the compass calibration method of the wearable device of any of claims 1-8.
10. A computer storage medium having one or more programs executable by one or more processors to perform the steps of the compass calibration method of a wearable device of any of claims 1-8.
Technical Field
The invention relates to the technical field of compass calibration, in particular to a compass calibration method of wearable equipment, the wearable equipment and a storage medium.
Background
In daily life, people often meet that wearable equipment is in the environment that electromagnetic interference is comparatively strong and changeable, in order to get rid of the interference, often all need the user to carry out 8 word calibration at wearable equipment's compass interface, but often will calibrate many times in the actual operation process, just calibrate successfully, and user experience is not good. In addition, in the related art, the accuracy of the compass of the wearable device becomes high after calibration, but the accuracy is reduced soon, so that a great error exists between the azimuth acquired by the user and the actual azimuth in the process of using the compass, the user needs to calibrate the compass of the wearable device frequently in a 8-character mode, and the user experience is poor.
Disclosure of Invention
The technical problem to be solved by the invention is that a user needs to frequently perform 8-character calibration on a compass of wearable equipment, and the user experience is poor.
In order to solve the technical problem, the invention provides a compass calibration method of a wearable device, which comprises the following steps:
acquiring a current first angle value of a first compass module of the mobile terminal;
according to a preset calibration control strategy, calibrating a current second angle value of a second compass module of the wearable device by using the first angle value;
the first compass module has better performance than the second compass module.
Optionally, the calibration control strategy includes:
when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset first angle difference threshold value, updating the second angle value to the first angle value;
or directly update the second angle to the first angle value.
Optionally, the calibration control strategy includes:
when the second compass module is currently in a first precision mode, when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset second angle difference threshold value, updating the second angle value to the first angle value; otherwise, not updating the second angle value;
the first precision mode is as follows: and when the second pointer of the second compass module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second compass module and the first angle value of the first compass module is less than or equal to a first correction angle difference threshold value.
Optionally, the calibration control strategy includes:
when the second compass module is currently in a second precision mode, when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset third angle difference threshold value, updating the second angle value to the first angle value; otherwise, not updating the second angle value;
the second precision mode is as follows: and when the second pointer of the second compass module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second compass module and the first angle value of the first compass module is greater than a first correction angle difference threshold value and less than or equal to a second correction angle difference threshold value.
Optionally, the calibration control strategy includes:
when the second compass module is currently in a third precision mode, directly updating the second angle value to the first angle value;
the third precision mode is as follows: and when the second pointer of the second compass module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second compass module and the first angle value of the first compass module is greater than a second correction angle difference threshold value and less than or equal to a third correction angle difference threshold value.
Optionally, the calibration control strategy includes:
when the second compass module is currently in a fourth precision mode, directly updating the second angle value to the first angle value;
the fourth accuracy mode is: the second compass module cannot currently acquire an effective second angle value.
Optionally, the acquiring a current first angle value of a first compass module of the mobile terminal includes:
acquiring a current precision mode of the second pointer module;
acquiring a target acquisition frequency corresponding to the current precision mode according to the corresponding relation between the current precision mode and a preset precision mode and the acquisition frequency;
and acquiring a current first angle value of the first compass module of the mobile terminal according to the target acquisition frequency.
Optionally, the corresponding relationship between the precision mode and the acquisition frequency includes:
the first accuracy mode corresponds to a first acquisition frequency;
the second accuracy mode corresponds to a second acquisition frequency;
the third accuracy mode corresponds to a third acquisition frequency;
the fourth accuracy mode corresponds to a fourth acquisition frequency;
the first obtaining frequency is less than the second obtaining frequency, the second obtaining frequency is less than the third obtaining frequency, and the third obtaining frequency is less than or equal to a fourth obtaining frequency;
the first precision mode is as follows: when the second pointer of the second compass module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second compass module and the first angle value of the first compass module is less than or equal to a first correction angle difference threshold;
the second precision mode is as follows: when the second pointer of the second pointer module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than a first correction angle difference threshold value and less than or equal to a second correction angle difference threshold value;
the third precision mode is as follows: the second pointer of the second pointer module and the first pointer of the first compass module point at the same direction, and the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than a second correction angle difference threshold and less than or equal to a third correction angle difference threshold;
the fourth accuracy mode is: the second compass module cannot currently acquire an effective second angle value.
Further, the invention also provides a wearable device, which comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the storage;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the compass calibration method of the wearable device described above.
Further, the present invention also provides a computer readable storage medium having one or more programs, which are executable by one or more processors to implement the steps of the compass calibration method of the wearable device described above.
Advantageous effects
The invention provides a compass calibration method of wearable equipment, the wearable equipment and a storage medium, aiming at the defects that the existing user needs to frequently calibrate a compass of the wearable equipment in a 8-character mode and the user experience is poor, the performance of a first compass module is superior to that of a second compass module by acquiring the current first angle value of the first compass module of a mobile terminal and calibrating the current second angle value of the second compass module of the wearable equipment by using the first angle value according to a preset calibration control strategy. The problem of the user need often carry out 8 word calibrations to wearable equipment's compass, user experience is not good is solved, the compass angle that has realized wearable equipment's the usable mobile terminal of compass angle carries out automatic calibration.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic hardware structure diagram of an implementation manner of a wearable device according to an embodiment of the present invention;
fig. 2 is a hardware schematic diagram of an implementation of a wearable device according to an embodiment of the present invention;
fig. 3 is a hardware schematic diagram of an implementation of a wearable device according to an embodiment of the present invention;
fig. 4 is a hardware schematic diagram of an implementation of the wearable device according to the embodiment of the present invention;
fig. 5 is a hardware schematic diagram of an implementation of a wearable device according to an embodiment of the present invention;
fig. 6 is a basic flowchart of a compass calibration method of a wearable device according to a first embodiment of the present invention;
fig. 7 is a detailed flowchart of a compass calibration method of a wearable device according to a second embodiment of the present invention;
fig. 8 is a detailed flowchart of a compass calibration method of a wearable device according to a third embodiment of the present invention;
fig. 9 is a flowchart illustrating a third embodiment of the present invention for acquiring a current first angle of a first compass module of a mobile terminal;
fig. 10 is a schematic view of a wearable device according to a fourth embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The wearable device provided by the embodiment of the invention comprises a mobile terminal such as an intelligent bracelet, an intelligent watch, an intelligent mobile phone and the like. With the continuous development of screen technologies, screen forms such as flexible screens and folding screens appear, and mobile terminals such as smart phones can also be used as wearable devices. The wearable device provided in the embodiment of the present invention may include: a Radio Frequency (RF) unit, a WiFi module, an audio output unit, an a/V (audio/video) input unit, a sensor, a display unit, a user input unit, an interface unit, a memory, a processor, and a power supply.
In the following description, a wearable device will be taken as an example, please refer to fig. 1, which is a schematic diagram of a hardware structure of a wearable device for implementing various embodiments of the present invention, where the
The following describes the various components of the wearable device in detail with reference to fig. 1:
the rf unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, the rf unit 101 may transmit uplink information to a base station, in addition, the downlink information sent by the base station may be received and then sent to the processor 110 of the wearable device for processing, the downlink information sent by the base station to the radio frequency unit 101 may be generated according to the uplink information sent by the radio frequency unit 101, or may be actively pushed to the radio frequency unit 101 after detecting that the information of the wearable device is updated, for example, after detecting that the geographic location where the wearable device is located changes, the base station may send a message notification of the change in the geographic location to the radio frequency unit 101 of the wearable device, and after receiving the message notification, the message notification may be sent to the processor 110 of the wearable device for processing, and the processor 110 of the wearable device may control the message notification to be displayed on the display panel 1061 of the wearable device; typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the
In one embodiment, the
In another embodiment, the
It is understood that although fig. 1 shows the
WiFi belongs to short-distance wireless transmission technology, and the wearable device can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the
The
The a/
In one embodiment, the
The
In one embodiment, the
In one embodiment, the
In one embodiment, the
The
In one embodiment, the
In one embodiment, the
The
In one embodiment, the side of the
Further, the
The
In one embodiment, the
The
The
The
Although not shown in fig. 1, the
Please refer to fig. 2-4, which are schematic structural diagrams of a wearable device according to an embodiment of the present invention. The wearable device in the embodiment of the invention comprises a flexible screen. When the wearable device is unfolded, the flexible screen is in a strip shape; when the wearable device is in a wearing state, the flexible screen is bent to be annular. Fig. 2 and 3 show the structural schematic diagram of the wearable device screen when the wearable device screen is unfolded, and fig. 4 shows the structural schematic diagram of the wearable device screen when the wearable device screen is bent.
Based on the above embodiments, it can be seen that, if the device is a watch, a bracelet, or a wearable device, the screen of the device may not cover the watchband region of the device, and may also cover the watchband region of the device. Here, the present invention provides an optional embodiment, in which the device may be a watch, a bracelet, or a wearable device, and the device includes a screen and a connection portion. The screen can be a flexible screen, and the connecting part can be a watchband. Optionally, the screen of the device or the display area of the screen may partially or completely cover the wristband of the device. As shown in fig. 5, fig. 5 is a hardware schematic diagram of an implementation manner of a wearable device according to an embodiment of the present invention, where a screen of the device extends to two sides, and a part of the screen is covered on a watchband of the device. In other embodiments, the screen of the device may also be completely covered on the watchband of the device, and the embodiment of the present invention is not limited thereto.
First embodiment
In order to solve the problems that a user needs to frequently calibrate the compass of the wearable device in a shape of 8 and the user experience is poor, the invention provides the compass calibration method of the wearable device, and the compass angle of the wearable device can be automatically calibrated by using the compass angle of a mobile terminal. The compass calibration method of the wearable device proposed by the present invention is described below with reference to the embodiments.
Fig. 6 is a basic flowchart of a compass calibration method of the wearable device provided in this embodiment, where the compass calibration method of the wearable device includes:
s601, acquiring a current first angle value of a first compass module of the mobile terminal.
The compass calibration method for the wearable device provided by the embodiment can be applied to various wearable devices, such as an intelligent bracelet, an intelligent watch, a wrist machine and the like. The mobile terminal in this example may be: mobile phones, tablets, palm computers, etc.
The performance of the first compass module of the mobile terminal in this example is superior to the second compass module of the wearable device, and the performance parameters of the first compass module include at least one of: speed, accuracy, stability of the pointing process.
The method for acquiring the current first angle value of the first compass module of the mobile terminal comprises the following steps: directly obtaining a current first angle value of a first pointer module of the mobile terminal or obtaining a current precision mode of a second pointer module of the wearable device; acquiring a target acquisition frequency corresponding to a current precision mode according to the corresponding relation between the current precision mode and a preset precision mode and acquisition frequency; and acquiring a current first angle value of the first compass module of the mobile terminal according to the target acquisition frequency.
The precision mode comprises a first precision mode, a second precision mode, a third precision mode and a fourth precision mode. The first accuracy mode is: when the second pointer of the second pointer module points at the same direction as the first pointer of the first compass module, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is less than or equal to the first correction angle difference threshold.
The second accuracy mode is: when the second pointer of the second pointer module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than the first correction angle difference threshold and less than or equal to the second correction angle difference threshold.
The third accuracy mode is: when the second pointer of the second pointer module points the same as the first pointer of the first compass module, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than the second correction angle difference threshold and less than or equal to the third correction angle difference threshold.
The fourth accuracy mode is: the second compass module cannot currently acquire an effective second angle value.
The relation between the precision mode and the acquisition frequency is that the first precision mode corresponds to a first acquisition frequency; the second accuracy mode corresponds to a second acquisition frequency, the third accuracy mode corresponds to a third acquisition frequency, and the third acquisition frequency can be; the fourth accuracy mode corresponds to a fourth acquisition frequency; the first acquisition frequency is less than the second acquisition frequency, the second acquisition frequency is less than the third acquisition frequency, and the third acquisition frequency is less than or equal to the fourth acquisition frequency. For example, the first acquisition frequency may be acquired every 1s to 3s, the second acquisition frequency may be acquired every 300ms to 600ms, the third acquisition frequency may be acquired every 50ms to 200ms, and the fourth acquisition frequency may be acquired every 30ms to 100 ms.
The above description of obtaining the current first angle value of the first compass module of the mobile terminal is further described with reference to the embodiments. The method includes the steps of obtaining a current precision mode of a second compass module of the wearable device, obtaining a first obtaining frequency according to a preset first precision mode when the current precision mode of the second compass module of the wearable device is the first precision mode, for example, obtaining the first obtaining frequency once every 1s to 3s, obtaining the first obtaining frequency as a target obtaining frequency of the current first precision mode, and obtaining a current first angle value from the first compass module of the mobile terminal once every 1s to 3 s.
When the current accuracy mode of the second compass module of the wearable device is acquired as the second accuracy mode, acquiring a second acquisition frequency according to the preset second accuracy mode, for example, the second acquisition frequency is acquired every 300ms to 600ms, and the second acquisition frequency is a target acquisition frequency of the current second accuracy mode, and acquiring a current first angle value from the first compass module of the mobile terminal every 300ms to 600 ms.
When the current accuracy mode of the third compass module of the wearable device is acquired as the third accuracy mode, acquiring a third acquisition frequency according to a preset third accuracy mode, for example, the third acquisition frequency is acquired every 50ms to 200ms, and the third acquisition frequency is a target acquisition frequency of the current third accuracy mode, and acquiring a current first angle value from the first compass module of the mobile terminal every 50ms to 200 ms.
When the current accuracy mode of the fourth compass module of the wearable device is acquired as the fourth accuracy mode, acquiring a fourth acquisition frequency according to a preset fourth accuracy mode, for example, the fourth acquisition frequency is acquired every 30ms to 100ms, and the fourth acquisition frequency is a target acquisition frequency of the current fourth accuracy mode, and acquiring a current first angle value from the first compass module of the mobile terminal every 30ms to 100 ms.
S602, according to a preset calibration control strategy, calibrating a current second angle value of a second compass module of the wearable device by using the first angle value.
In this example, the preset calibration control strategy includes: when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset first angle difference threshold value, updating the second angle value into the first angle value;
or directly updating the second angle value to the first angle value;
or when a second compass module of the wearable device is currently in a first precision mode, when an absolute value of a difference between the first angle value and the second angle value is smaller than a preset second angle difference threshold, updating the second angle value to the first angle value; otherwise, the second angle value is not updated;
or when a second compass module of the wearable device is currently in a first precision mode, when an absolute value of a difference between the first angle value and the second angle value is smaller than a preset second angle difference threshold, updating the second angle value to the first angle value; otherwise, the second angle value is not updated; and when the second compass module is currently in a fourth precision mode, directly updating the second angle value to the first angle value.
The first calibration control strategy and the second calibration control strategy are described below with reference to the embodiments. For example, the first angle is 100 °, the second angle is 80 °, and the second calibration control strategy is to directly update the 80 ° of the second angle to 100 ° of the first angle. A first calibration control strategy is to set a preset first angle difference threshold value to 30 deg. in addition to a first angle value of 100 deg., a second angle value of 80 deg.. The absolute value of the difference between the first angle value and the second angle value is now 20 deg., 20 deg. being smaller than 30 deg., and 80 deg. of the second angle is updated to 100 deg. of the first angle. The angles are only used to better illustrate the calibration control strategy, the embodiment is not limited to these degrees, and the preset first angle threshold may be set by the user or factory.
The third calibration control strategy is further described below. When a second compass module of the wearable device is currently in a first precision mode, when the absolute value of the difference between a first angle value and a second angle value is smaller than a preset second angle difference threshold value, updating the second angle value to the first angle value; otherwise, the second angle value is not updated. The first precision mode is as follows: the precision value is detected through a sensor bottom layer driving circuit, the feedback precision mode is a first precision mode or the second pointer of the second pointer module is the same as the first pointer of the first compass module in pointing direction, and the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is smaller than or equal to a first correction angle difference threshold value. The method can also comprise the following steps:
when a second compass module is currently in a second precision mode, when the absolute value of the difference between the first angle value and a second angle value is smaller than a preset third angle difference threshold value, updating the second angle value to the first angle value; otherwise, not updating the second angle value; wherein the second accuracy mode is: the precision value is detected through a sensor bottom layer driving circuit, the feedback precision mode is a second precision mode or the second pointer of the second pointer module is the same as the first pointer of the first compass module in pointing direction, and the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is larger than a first correction angle difference threshold value and smaller than or equal to a second correction angle difference threshold value.
When the second compass module is currently in a third precision mode, directly updating the second angle value into the first angle value; the third accuracy mode is: the precision value is detected through a sensor bottom layer driving circuit, the feedback precision mode is a third precision mode or the second pointer of the second pointer module is the same as the first pointer of the first compass module in pointing direction, and the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is larger than a second correction angle difference threshold value and smaller than or equal to a third correction angle difference threshold value.
When the second compass module is currently in a fourth precision mode, directly updating the second angle value to the first angle value; the fourth accuracy mode is: the second compass module cannot currently acquire an effective second angle value.
For example, the first correction angle threshold is 5 degrees, the second correction angle threshold is 30 degrees, and the third correction angle threshold is 100 degrees. It is understood that the accuracy of the first accuracy mode is higher than that of the second accuracy mode, and the accuracy of the second accuracy mode is higher than that of the third accuracy mode. Taking the example that the second pointer module of the wearable device is in the first precision mode: the preset second angle difference threshold is 8 degrees, the absolute value of the difference between the first angle value and the second angle value is 5 degrees, and the second angle value is updated to be the first angle value when the 5 degrees are smaller than 8 degrees. If the absolute value of the difference between the first angle value and the second angle value is 30 deg., 30 deg. is greater than 8 deg., the second angle value is not updated. If the second compass module of the wearable device is in the second accuracy mode, the preset third angle difference threshold value is 40 degrees, the absolute value of the difference between the first angle value and the second angle value is less than 40 degrees, the first angle value is updated to the second angle value, and otherwise, the first angle value is not updated. The angles are only used to better describe the calibration control strategy, and the present embodiment is not limited to these degrees, and the first calibration angle threshold, the second calibration angle threshold, the third calibration angle threshold, the preset second angle threshold, and the preset third angle difference threshold may be set by the user or factory settings.
The fourth calibration control strategy is further described below. The fourth calibration control strategy may further include at least one of:
when a second compass module is currently in a second precision mode, when the absolute value of the difference between the first angle value and a second angle value is smaller than a preset third angle difference threshold value, updating the second angle value to the first angle value; otherwise, not updating the second angle value; wherein the second accuracy mode is: when the second pointer of the second pointer module points the same as the first pointer of the first compass module, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than the first correction angle difference threshold and less than or equal to the second correction angle difference threshold.
When the second compass module is currently in a third precision mode, directly updating the second angle value into the first angle value; the third accuracy mode is: when the second pointer of the second pointer module points the same as the first pointer of the first compass module, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than the second correction angle difference threshold and less than or equal to the third correction angle difference threshold.
The embodiment provides a compass calibration method for wearable equipment, which includes the steps of obtaining a current first angle value of a first compass module of a mobile terminal, and calibrating a current second angle value of a second compass module of the wearable equipment by using the first angle value according to a preset calibration control strategy, wherein the performance of the first compass module is superior to that of the second compass module. The problem of the user need often carry out 8 word calibrations to wearable equipment's compass, user experience is not good is solved. The method realizes that the compass angle of the wearable equipment can be automatically calibrated by utilizing the compass angle of the mobile terminal.
Second embodiment
The method realizes the automatic calibration of the compass angle of the wearable device by utilizing the compass angle of the mobile terminal, and is described in combination with an application scene for facilitating understanding.
Fig. 7 is a detailed flowchart of a compass calibration method of a wearable device according to a second embodiment of the present invention, where the compass calibration method of the wearable device includes:
s701, directly obtaining a current first angle value of a first compass module of the mobile terminal.
In this example, the wearable device is a smart watch, and the mobile terminal is a mobile phone. The speed and stability of the pointing process of the first compass module of the handset is higher than the speed and stability of the pointing process of the second compass module of the wearable device.
S702, when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset first angle difference threshold value, updating the second angle value into the first angle value, and calibrating the current second angle value of the second compass module of the wearable device by using the first angle value.
In this example, when the absolute value of the difference between the first angle value and the second angle value is smaller than a preset first angle difference threshold, the second angle value is updated to the first angle value, and the first angle value is utilized to calibrate the current second angle value of the second compass module of the wearable device. For example, the following steps are carried out: the acquired current first angle value of the first pointer module of the mobile phone is 100 degrees, the current second angle value of the second pointer module of the smart watch is 120 degrees, the preset first angle threshold value is 30 degrees, the absolute value of the difference between 100 degrees and 120 degrees is 20 degrees, 20 degrees is smaller than 30 degrees, the second angle value of 120 degrees is updated to be 100 degrees of the first angle value, and the current second angle value of the second pointer module of the updated smart watch is 100 degrees. So that the first angle value of 100 ° calibrates the current second angle value of 120 ° of the second pointer module of the smart watch.
The embodiment provides a compass calibration method of wearable equipment, which directly obtains a current first angle value of a first compass module of a mobile phone, the first compass module of the mobile phone has better pointing processing speed and stability than a second compass module of a smart watch, and when an absolute value of a difference between the first angle value and a current second angle value of the second compass module of the smart watch is smaller than a preset first angle difference threshold, the second angle value is updated to the first angle value. This enables the current second angle value of the second compass module of the smart watch to be automatically calibrated according to the first angle value of the first compass module of the handset that has better performance than the second compass module of the smart watch. The problem of the user need often carry out 8 word calibrations to wearable equipment's compass, user experience is not good is solved. The method realizes that the compass angle of the wearable equipment can be automatically calibrated by utilizing the compass angle of the mobile terminal.
Third embodiment
The method realizes the automatic calibration of the compass angle of the wearable device by utilizing the compass angle of the mobile terminal, and is described in combination with an application scene for facilitating understanding.
Fig. 8 is a detailed flowchart of a compass calibration method of a wearable device according to a third embodiment of the present invention, where the compass calibration method of the wearable device includes:
s801, acquiring a current precision mode of a second pointer module of the wearable device.
Wearable equipment in this example is intelligent bracelet, and mobile terminal is the flat board, and wherein the accuracy of the first compass module in the flat board is higher than the second compass module of intelligent bracelet.
The precision mode of the second compass module of the intelligent bracelet has a first precision mode, a second precision mode, a third precision mode and a fourth precision mode.
Wherein the first precision mode is: when the second pointer of the second pointer module points at the same direction as the first pointer of the first compass module, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is less than or equal to the first correction angle difference threshold.
The second accuracy mode is: when the second pointer of the second pointer module and the first pointer of the first compass module point at the same direction, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than the first correction angle difference threshold and less than or equal to the second correction angle difference threshold.
The third accuracy mode is: when the second pointer of the second pointer module points the same as the first pointer of the first compass module, the absolute value of the difference between the second angle value of the second pointer module and the first angle value of the first compass module is greater than the second correction angle difference threshold and less than or equal to the third correction angle difference threshold.
The fourth accuracy mode is: the second compass module cannot currently acquire an effective second angle value.
S802, acquiring a target acquisition frequency corresponding to the current precision mode according to the current precision mode and the corresponding relation between the preset precision mode and the acquisition frequency. And acquiring a current first angle value from a first compass module of the mobile terminal according to the target acquisition frequency.
In this embodiment, the corresponding relationship between the accuracy mode and the acquisition frequency is that the first accuracy mode corresponds to a first acquisition frequency, and the first acquisition frequency in this embodiment is set to be acquired every 1 s; the second accuracy mode corresponds to a second acquisition frequency, which in this example is set to be acquired every 500 ms; the third accuracy mode corresponds to a third acquisition frequency, which in this example is set to be acquired every 100 ms.
In this example, as shown in fig. 9, when the current accuracy mode is the first accuracy mode, the first obtaining frequency corresponding to the first accuracy mode is the target obtaining frequency, and when the current accuracy mode is the first accuracy mode, the current first angle value is obtained from the first compass module of the tablet once every 1S. When the current accuracy mode is acquired as the second accuracy mode, the current first angle value is acquired from the first compass module of the tablet once every 500 ms. The current first angle value is acquired from the first compass module of the tablet every 100ms when the current accuracy mode is acquired as the third accuracy mode. When the current accuracy mode is the fourth accuracy mode, the current first angle value is acquired from the first compass module of the tablet every 30 ms.
And S803, calibrating a current second angle value of a second compass module of the wearable device by using the first angle value according to a preset calibration control strategy.
In this example, the preset calibration control strategy is: when a second compass module of the wearable device is currently in a first precision mode, when an absolute value of a difference between a first angle value and a second angle value is smaller than a preset second angle difference threshold value; when a second compass module of the wearable device is currently in a second precision mode, when an absolute value of a difference between the first angle value and the second angle value is smaller than a preset third angle difference threshold value; when the second pointer module is currently in the third precision mode; and when the second compass module is currently in the fourth precision mode, updating the second angle value into the first angle value, otherwise, not updating the second angle value.
The updating of the second angle value to the first angle value in this example is: the first angle value of the first compass module of the tablet is displayed on the display screen of the intelligent bracelet.
The embodiment provides a compass calibration method for wearable equipment, which includes the steps of obtaining a current precision mode of a second compass module of the wearable equipment, and obtaining a corresponding relation between the current precision mode and a preset precision mode and a frequency. And acquiring the target acquisition frequency corresponding to the current precision mode. And acquiring a current first angle value from a first compass module of the mobile terminal according to the target acquisition frequency. When a second compass module of the wearable device is currently in a first precision mode, when an absolute value of a difference between a first angle value and a second angle value is smaller than a preset second angle difference threshold value; when a second compass module of the wearable device is currently in a second precision mode, when an absolute value of a difference between the first angle value and the second angle value is smaller than a preset third angle difference threshold value; when the second pointer module is currently in the third precision mode; and when the second compass module is currently in the fourth precision mode, updating the second angle value into the first angle value, otherwise, not updating the second angle, and ending. This enables the current second angle value of the second compass module of the smart watch to be automatically calibrated according to the first angle value of the first compass module of the handset that has better performance than the second compass module of the smart watch. The problem of the user need often carry out 8 word calibrations to wearable equipment's compass, user experience is not good is solved. The method realizes that the compass angle of the wearable equipment can be automatically calibrated by utilizing the compass angle of the mobile terminal.
Fourth embodiment
Fig. 10 is a schematic diagram of a wearable device provided in this embodiment, where the wearable device includes a
the
the
Through the implementation of this implementation, acquire the first angle value at present of the first compass module of mobile terminal, according to preset calibration control strategy, utilize first angle value to calibrate the second angle value at present of the wearable equipment's second compass module, the performance of first compass module is superior to second compass module. The problem of the user need often carry out 8 word calibrations to wearable equipment's compass, user experience is not good is solved, the compass angle that has realized wearable equipment's the usable mobile terminal of compass angle carries out automatic calibration.
Fifth embodiment
The present embodiments provide a computer readable storage medium having one or more programs, which are executable by one or more processors to implement the steps of the compass calibration method of the wearable device of the first to third embodiments.
Through the implementation of this implementation, acquire the first angle value at present of the first compass module of mobile terminal, according to preset calibration control strategy, utilize first angle value to calibrate the second angle value at present of the wearable equipment's second compass module, the performance of first compass module is superior to second compass module. The problem of the user need often carry out 8 word calibrations to wearable equipment's compass, user experience is not good is solved, the compass angle that has realized wearable equipment's the usable mobile terminal of compass angle carries out automatic calibration.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:一种单DAC光纤陀螺Y波导半波电压补偿系统