Rocker calibration method and device and remote control device

文档序号:1736823 发布日期:2019-12-20 浏览:35次 中文

阅读说明:本技术 一种摇杆校准方法、装置及遥控装置 (Rocker calibration method and device and remote control device ) 是由 牛洪芳 于 2019-10-22 设计创作,主要内容包括:本发明涉及遥控技术领域,尤其涉及一种摇杆校准方法、装置及遥控装置。该方法包括:在所述摇杆为校准模式时,获取目标点的采样参数;获取所述摇杆拨动的最大角度值;根据所述采样参数和所述最大角度值,计算所述目标点的校准参数;根据所述校准参数对所述摇杆进行校准。该实施方式实现了霍尔摇杆的校准功能,整个过程简单,降低了霍尔摇杆校准的复杂度,并且适用于大部分具有霍尔摇杆的遥控装置,具有比较强的通用性。(The invention relates to the technical field of remote control, in particular to a rocker calibration method, a rocker calibration device and a remote control device. The method comprises the following steps: when the rocker is in a calibration mode, acquiring sampling parameters of a target point; acquiring a maximum angle value dialed by the rocker; calculating a calibration parameter of the target point according to the sampling parameter and the maximum angle value; and calibrating the rocker according to the calibration parameters. The embodiment realizes the calibration function of the Hall rocker, has simple whole process, reduces the calibration complexity of the Hall rocker, is suitable for most remote control devices with the Hall rocker, and has stronger universality.)

1. A rocker calibration method is applied to a remote control device, and is characterized by comprising the following steps:

when the rocker is in a calibration mode, acquiring sampling parameters of a target point;

acquiring a maximum angle value dialed by the rocker;

calculating a calibration parameter of the target point according to the sampling parameter and the maximum angle value;

and calibrating the rocker according to the calibration parameters.

2. The method of claim 1, wherein the acquiring sampling parameters of the target point comprises:

controlling the rocker to move to the target point;

calculating a transverse angle value alpha and a longitudinal angle value beta corresponding to the target point, wherein the transverse angle value alpha and the longitudinal angle value beta are sampling parameters of the target point;

wherein, theThe above-mentioned

Wherein, said mx、my、mzMagnetic flux of x, y and z axes output by the chip, ka、kb、ktIs preset adjustable parameters.

3. The method of claim 2, further comprising:

respectively sampling the transverse angle value alpha and the longitudinal angle value beta of the target point for preset times;

and calculating the average value of the transverse angle value alpha of the preset times and the average value of the longitudinal angle value beta of the preset times, wherein the average value of the transverse angle value alpha and the average value of the longitudinal angle value beta are sampling parameters of the target point.

4. The method of claim 3, wherein the target points comprise median points, diagonal points, and edge points.

5. The method of claim 4, wherein when the target point is a diagonal point,

the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value comprises:

performing difference operation on the transverse angle value of the diagonal point and the transverse angle value of the median point to obtain a first difference value;

performing difference operation on the longitudinal angle value of the diagonal point and the longitudinal angle value of the median point to obtain a second difference value;

and carrying out quotient calculation on the maximum angle value, the first difference value and the second difference value respectively to obtain a first quotient value and a second quotient value, wherein the first quotient value is a calibration parameter of the diagonal point in the transverse direction, and the second quotient value is a calibration parameter of the diagonal point in the longitudinal direction.

6. The method of claim 4, wherein the edge points comprise a horizontal axis edge point and a vertical axis edge point,

when the target point is a horizontal axis edge point, the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value includes:

performing difference calculation on the transverse angle value of the sideline point of the transverse shaft and the transverse angle value of the median point to obtain a third difference value;

carrying out quotient calculation on the maximum angle value and the third difference value to generate a calibration parameter of the sideline point of the transverse axis in the transverse direction;

when the target point is a longitudinal axis edge point, the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value includes:

performing difference operation on the longitudinal angle value of the longitudinal axis sideline point and the longitudinal angle value of the median point to obtain a fourth difference value;

and carrying out quotient calculation on the maximum angle value and the fourth difference value to generate a calibration parameter of the longitudinal axis edge point in the longitudinal direction.

7. The method of claim 6,

the calibration parameter of the median point in the transverse direction and the calibration parameter in the longitudinal direction are 1;

the calibration parameter of the sideline point of the transverse shaft in the longitudinal direction is 1;

the calibration parameter of the longitudinal axis edge point in the transverse direction is 1.

8. The method according to any one of claims 1 to 7, further comprising:

dividing the target point into sectors according to the position of the target point;

calculating calibration parameters of the sectors according to the divided sectors and the calibration parameters of the target points;

and calibrating the rocker according to the calibration parameters of the sector.

9. The method of claim 8, wherein the calculating calibration parameters for the sectors according to the divided sectors and the calibration parameters for the target points comprises:

determining a target point corresponding to the sector;

and carrying out averaging operation on the calibration parameters of the target points corresponding to the sectors to generate the calibration parameters of the sectors.

10. A rocker alignment device for use with a remote control device, the device comprising:

the first acquisition module is used for acquiring sampling parameters of a target point when the rocker is in a calibration mode;

the second acquisition module is used for acquiring the maximum angle value dialed by the rocker;

the first calculation module is used for calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value;

and the first calibration module is used for calibrating the rocker according to the calibration parameters.

11. The apparatus of claim 10, wherein the first obtaining module is specifically configured to:

when the rocker is in a calibration mode, controlling the rocker to move to the target point;

calculating a transverse angle value alpha and a longitudinal angle value beta corresponding to the target point, wherein the transverse angle value alpha and the longitudinal angle value beta are sampling parameters of the target point;

wherein, theThe above-mentioned

Wherein, said mx、my、mzMagnetic flux of x, y and z axes output by the chip, ka、kb、ktIs preset adjustable parameters.

12. The apparatus of claim 11, wherein the first obtaining module is further specifically configured to:

respectively sampling the transverse angle value alpha and the longitudinal angle value beta of the target point for preset times;

and calculating the average value of the transverse angle value alpha of the preset times and the average value of the longitudinal angle value beta of the preset times, wherein the average value of the transverse angle value alpha and the average value of the longitudinal angle value beta are sampling parameters of the target point.

13. The apparatus of claim 12, wherein the target points comprise median points, diagonal points, and edge points.

14. The apparatus of claim 13, wherein when the target point is a diagonal point,

the first calculation module is specifically configured to:

performing difference operation on the transverse angle value of the diagonal point and the transverse angle value of the median point to obtain a first difference value;

performing difference operation on the longitudinal angle value of the diagonal point and the longitudinal angle value of the median point to obtain a second difference value;

and carrying out quotient calculation on the maximum angle value, the first difference value and the second difference value respectively to obtain a first quotient value and a second quotient value, wherein the first quotient value is a calibration parameter of the diagonal point in the transverse direction, and the second quotient value is a calibration parameter of the diagonal point in the longitudinal direction.

15. The apparatus of claim 13, wherein the edge points comprise a horizontal axis edge point and a vertical axis edge point,

when the target point is a horizontal axis edge point, the first calculating module is specifically configured to:

performing difference calculation on the transverse angle value of the sideline point of the transverse shaft and the transverse angle value of the median point to obtain a third difference value;

carrying out quotient calculation on the maximum angle value and the third difference value to generate a calibration parameter of the sideline point of the transverse axis in the transverse direction;

when the target point is a longitudinal axis edge point, the first calculation module is specifically configured to:

performing difference operation on the longitudinal angle value of the longitudinal axis sideline point and the longitudinal angle value of the median point to obtain a fourth difference value;

and carrying out quotient calculation on the maximum angle value and the fourth difference value to generate a calibration parameter of the longitudinal axis edge point in the longitudinal direction.

16. The apparatus of claim 15,

the calibration parameter of the median point in the transverse direction and the calibration parameter in the longitudinal direction are 1;

the calibration parameter of the sideline point of the transverse shaft in the longitudinal direction is 1;

the calibration parameter of the longitudinal axis edge point in the transverse direction is 1.

17. The apparatus of any one of claims 10 to 16, further comprising:

the processing module is used for dividing the target point into sectors according to the position of the target point;

the second calculation module is used for calculating calibration parameters of the sectors according to the divided sectors and the calibration parameters of the target points;

and the second calibration module is used for calibrating the rocker according to the calibration parameters of the sector.

18. The apparatus of claim 17, wherein the second computing module is specifically configured to:

determining a target point corresponding to the sector;

and carrying out averaging operation on the calibration parameters of the target points corresponding to the sectors to generate the calibration parameters of the sectors.

19. A remote control device, comprising:

a remote control body;

the Hall rocker is fixed on the remote control body;

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 9.

[ technical field ] A method for producing a semiconductor device

The invention relates to the technical field of remote control, in particular to a rocker calibration method, a rocker calibration device and a remote control device.

[ background of the invention ]

Traditional unmanned aerial vehicle remote control unit's rocker adopts the potentiometre rocker mostly, and its principle of potentiometre rocker is realized simply, the low price, the easy design of structure, but in long-term use, constantly rubs between potentiometre and the rocker and causes remote control unit's control data can be inaccurate gradually, can not guarantee by the safety control of accuse device. The Hall chip of the Hall rocker is not in contact with the rocker, and the appearance of the Hall rocker just avoids the defect of the potentiometer rocker. No matter using potentiometer rocker or hall rocker, parameter calibration is needed, and compared with the potentiometer rocker, the traditional hall rocker calibration method is more complicated.

[ summary of the invention ]

The invention aims to provide a rocker calibration method, a rocker calibration device and a remote control device, and solves the technical problem of high complexity in rocker calibration.

In one aspect of the embodiments of the present invention, a method for calibrating a joystick is provided, which is applied to a remote control device, and the method includes:

when the rocker is in a calibration mode, acquiring sampling parameters of a target point;

acquiring a maximum angle value dialed by the rocker;

calculating a calibration parameter of the target point according to the sampling parameter and the maximum angle value;

and calibrating the rocker according to the calibration parameters.

Optionally, the acquiring sampling parameters of the target point includes:

controlling the rocker to move to the target point;

calculating a transverse angle value alpha and a longitudinal angle value beta corresponding to the target point, wherein the transverse angle value alpha and the longitudinal angle value beta are sampling parameters of the target point;

wherein, theThe above-mentioned

Wherein, said mx、my、mzMagnetic flux of x, y and z axes output by the chip, ka、kb、ktIs preset adjustable parameters.

Optionally, the method further comprises:

respectively sampling the transverse angle value alpha and the longitudinal angle value beta of the target point for preset times;

and calculating the average value of the transverse angle value alpha of the preset times and the average value of the longitudinal angle value beta of the preset times, wherein the average value of the transverse angle value alpha and the average value of the longitudinal angle value beta are sampling parameters of the target point.

Optionally, the target point includes a median point, a diagonal point, and an edge point.

Optionally, when the target point is a diagonal point,

the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value comprises:

performing difference operation on the transverse angle value of the diagonal point and the transverse angle value of the median point to obtain a first difference value;

performing difference operation on the longitudinal angle value of the diagonal point and the longitudinal angle value of the median point to obtain a second difference value;

and carrying out quotient calculation on the maximum angle value, the first difference value and the second difference value respectively to obtain a first quotient value and a second quotient value, wherein the first quotient value is a calibration parameter of the diagonal point in the transverse direction, and the second quotient value is a calibration parameter of the diagonal point in the longitudinal direction.

Optionally, the edge points comprise a horizontal axis edge point and a vertical axis edge point,

when the target point is a horizontal axis edge point, the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value includes:

performing difference calculation on the transverse angle value of the sideline point of the transverse shaft and the transverse angle value of the median point to obtain a third difference value;

carrying out quotient calculation on the maximum angle value and the third difference value to generate a calibration parameter of the sideline point of the transverse axis in the transverse direction;

when the target point is a longitudinal axis edge point, the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value includes:

performing difference operation on the longitudinal angle value of the longitudinal axis sideline point and the longitudinal angle value of the median point to obtain a fourth difference value;

and carrying out quotient calculation on the maximum angle value and the fourth difference value to generate a calibration parameter of the longitudinal axis edge point in the longitudinal direction.

Optionally, the calibration parameter of the median point in the transverse direction and the calibration parameter in the longitudinal direction are 1; the calibration parameter of the sideline point of the transverse shaft in the longitudinal direction is 1; the calibration parameter of the longitudinal axis edge point in the transverse direction is 1.

Optionally, the method further comprises:

dividing the target point into sectors according to the position of the target point;

calculating calibration parameters of the sectors according to the divided sectors and the calibration parameters of the target points;

and calibrating the rocker according to the calibration parameters of the sector.

Optionally, the calculating the calibration parameters of the sector according to the divided calibration parameters of the sector and the target point includes:

determining a target point corresponding to the sector;

and carrying out averaging operation on the calibration parameters of the target points corresponding to the sectors to generate the calibration parameters of the sectors.

In another aspect of the embodiments of the present invention, there is provided a joystick calibration device for use in a remote control device, the device including:

the first acquisition module is used for acquiring sampling parameters of a target point when the rocker is in a calibration mode;

the second acquisition module is used for acquiring the maximum angle value dialed by the rocker;

the first calculation module is used for calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value;

and the first calibration module is used for calibrating the rocker according to the calibration parameters.

Optionally, the first obtaining module is specifically configured to:

when the rocker is in a calibration mode, controlling the rocker to move to the target point;

calculating a transverse angle value alpha and a longitudinal angle value beta corresponding to the target point, wherein the transverse angle value alpha and the longitudinal angle value beta are sampling parameters of the target point;

wherein, theThe above-mentioned

Wherein, said mx、my、mzMagnetic flux of x, y and z axes output by the chip, ka、kb、ktIs preset adjustable parameters.

Optionally, the first obtaining module is further specifically configured to:

respectively sampling the transverse angle value alpha and the longitudinal angle value beta of the target point for preset times;

and calculating the average value of the transverse angle value alpha of the preset times and the average value of the longitudinal angle value beta of the preset times, wherein the average value of the transverse angle value alpha and the average value of the longitudinal angle value beta are sampling parameters of the target point.

Optionally, the target point includes a median point, a diagonal point, and an edge point.

Optionally, when the target point is a diagonal point,

the first calculation module is specifically configured to:

performing difference operation on the transverse angle value of the diagonal point and the transverse angle value of the median point to obtain a first difference value;

performing difference operation on the longitudinal angle value of the diagonal point and the longitudinal angle value of the median point to obtain a second difference value;

and carrying out quotient calculation on the maximum angle value, the first difference value and the second difference value respectively to obtain a first quotient value and a second quotient value, wherein the first quotient value is a calibration parameter of the diagonal point in the transverse direction, and the second quotient value is a calibration parameter of the diagonal point in the longitudinal direction.

Optionally, the edge points comprise a horizontal axis edge point and a vertical axis edge point,

when the target point is a horizontal axis edge point, the first calculating module is specifically configured to:

performing difference calculation on the transverse angle value of the sideline point of the transverse shaft and the transverse angle value of the median point to obtain a third difference value;

carrying out quotient calculation on the maximum angle value and the third difference value to generate a calibration parameter of the sideline point of the transverse axis in the transverse direction;

when the target point is a longitudinal axis edge point, the first calculation module is specifically configured to:

performing difference operation on the longitudinal angle value of the longitudinal axis sideline point and the longitudinal angle value of the median point to obtain a fourth difference value;

and carrying out quotient calculation on the maximum angle value and the fourth difference value to generate a calibration parameter of the longitudinal axis edge point in the longitudinal direction.

Optionally, the calibration parameter of the median point in the transverse direction and the calibration parameter in the longitudinal direction are 1; the calibration parameter of the sideline point of the transverse shaft in the longitudinal direction is 1; the calibration parameter of the longitudinal axis edge point in the transverse direction is 1.

Optionally, the apparatus further comprises:

the processing module is used for dividing the target point into sectors according to the position of the target point;

the second calculation module is used for calculating calibration parameters of the sectors according to the divided sectors and the calibration parameters of the target points;

and the second calibration module is used for calibrating the rocker according to the calibration parameters of the sector.

Optionally, the second calculating module is specifically configured to:

determining a target point corresponding to the sector;

and carrying out averaging operation on the calibration parameters of the target points corresponding to the sectors to generate the calibration parameters of the sectors.

In another aspect of the embodiments of the present invention, there is provided a remote control device including: a remote control body; the Hall rocker is fixed on the remote control body; at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.

In the embodiment of the invention, when the rocker is in the calibration mode, the sampling parameters of the target point and the maximum angle value shifted by the rocker are obtained, and then the calibration parameters of the target point are calculated according to the sampling parameters and the maximum angle value, so that the rocker is calibrated according to the calibration parameters. The embodiment realizes the calibration function of the Hall rocker, has simple whole process, reduces the calibration complexity of the Hall rocker, is suitable for most remote control devices with the Hall rocker, and has stronger universality.

[ description of the drawings ]

One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.

FIG. 1 is a schematic structural diagram of a Hall rocker according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a motion state of a Hall rocker according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of the working range of a Hall rocker according to an embodiment of the present invention;

FIG. 4 is a flowchart of a method for calibrating a joystick according to an embodiment of the present invention;

FIG. 5 is a schematic diagram of the target points of the Hall rocker provided by the embodiment of the invention;

fig. 6 is a flowchart of a method for obtaining a sampling parameter of a target point according to an embodiment of the present invention;

FIG. 7 is a flowchart of another method for obtaining sampling parameters of a target point according to an embodiment of the present invention;

FIG. 8 is a flowchart of a method for calculating a calibration parameter for the target point based on the sampling parameter and the maximum angle value according to an embodiment of the present invention;

FIG. 9 is a flowchart of another method for calculating a calibration parameter for the target point based on the sampling parameter and the maximum angle value according to an embodiment of the present invention;

FIG. 10 is a flowchart of a further method for calculating a calibration parameter for the target point based on the sampling parameter and the maximum angle value according to an embodiment of the present invention;

FIG. 11 is a flowchart of a method for calibrating a joystick in accordance with another embodiment of the present invention;

FIG. 12 is a schematic structural diagram of sector division of the Hall rocker according to the embodiment of the present invention;

FIG. 13 is a schematic structural diagram of another sector division of the Hall rocker according to the embodiment of the present invention;

FIG. 14 is a schematic structural diagram of another sector division of the Hall rocker according to the embodiment of the present invention;

FIG. 15 is a schematic structural diagram of a rocker alignment device according to an embodiment of the present invention;

fig. 16 is a schematic structural diagram of a remote control device according to an embodiment of the present invention.

[ detailed description ] embodiments

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

It should be noted that, if not conflicted, the various features of the embodiments of the invention may be combined with each other within the scope of protection of the invention. Additionally, while functional block divisions are performed in the device diagrams, with logical sequences shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than the block divisions in the device diagrams, or the flowcharts.

The remote control device in the embodiment of the invention comprises a remote control body and a Hall rocker. The Hall rocker is fixed on the remote control body and is used for a user to operate so as to input a remote control command to the remote control device. The number of the Hall rockers can be set according to the requirement, such as one, two or more. In this embodiment, the remote control device includes two hall rockers. The two Hall rockers are respectively a left Hall rocker and a right Hall rocker, so that the left hand and the right hand of a user can operate respectively or simultaneously conveniently.

Wherein, as shown in fig. 1, each hall rocker includes: hall chip 100, magnet 200, and rocker 300. The hall chip 100 is fixed to the remote control device, and the magnet 200 is fixed to the rocker 300, as shown in fig. 2, when the rocker 300 is toggled, the magnet is driven to change according to a limited angle, and the angle range is limited according to the structure of the rocker.

In this embodiment, as shown in FIG. 3, when the Hall rocker is stationary, the Hall rocker is in a neutral position, maintaining a median value. The left area and the right area of the Hall rocker are filled with a maximum angle value and a minimum angle value which can respectively reach the transverse direction; the upper area and the lower area of the Hall rocker are filled with the liquid, and the maximum angle value and the minimum angle value in the longitudinal direction can be respectively reached. The maximum angle value or the minimum angle value corresponding to full left or full right, and the maximum angle value or the minimum angle value corresponding to full up or full down are not limited herein. For example, the maximum angle value corresponding to the transverse direction is set to be full to the right, and the minimum angle value corresponding to the transverse direction is set to be full to the left; and setting the maximum angle value which is fully filled upwards and corresponds to the longitudinal direction, and fully filling the minimum angle value which corresponds to the longitudinal direction downwards.

In this embodiment, the remote control device may be used to control devices such as drones, unmanned vehicles, and the like. A rocker calibration method is given below based on a hall rocker of the remote control. As shown in fig. 4, the method includes:

and step S11, acquiring the sampling parameters of the target point when the rocker is in the calibration mode.

The calibration mode refers to a mode of operation for determining the hall rocker indication error. The calibration mode may be triggered by the user actively turning on the calibration mode, for example, the user inputs a calibration mode command by voice, or inputs a calibration mode command on a touch screen of the remote control device by a finger, a stylus pen, or the like, or inputs a calibration mode command by pressing a button on the remote control device, or the like, thereby turning on the calibration mode. The calibration mode may be triggered by automatically entering the calibration mode according to a preset condition. For example, when the remote control device is used for the first time, the remote control device is in the calibration mode because the calibration parameters are not stored in the memory of the remote control device. Or, when the remote control device is powered on, whether the calibration parameters stored in the memory can be used or not can be detected, and if the calibration parameters cannot be used, the calibration mode is automatically entered. Or, when the remote control device is turned on, judging whether the hall rocker is at a preset position (such as a middle position), and when detecting that the hall rocker is not at the preset position within n seconds, automatically performing a calibration mode, wherein n can be any numerical value.

The target points refer to points for determining calibration parameters of the hall rocker, which are in particular points of a specific position determined according to the structure of the hall rocker.

For example, according to the working range of the hall rocker shown in fig. 3, it can be determined that the target points include 9 singular points as shown in fig. 5, where 0 point is a median point, 2, 4, 6, and 8 points are diagonal points, and 1, 3, 5, and 7 points are edge points. The median point is a point corresponding to the middle position of the Hall rocker. In this embodiment, these 9 singularities need to be sampled.

Acquiring the sampling parameters of the target point, namely, performing parameter sampling on the target point. Specifically, as shown in fig. 6, acquiring the sampling parameters of the target point includes:

step S111, controlling the rocker to move to the target point;

specifically, the user can control the rocker to move to the target point, and the remote control device detects whether the rocker is at the target point.

Step S112, calculating a transverse angle value alpha and a longitudinal angle value beta corresponding to the target point, wherein the transverse angle value alpha and the longitudinal angle value beta are sampling parameters of the target point;

wherein, theThe above-mentioned

Wherein, said mx、my、mzMagnetic flux of x, y and z axes output by the chip, ka、kb、ktIs preset adjustable parameters.

In this embodiment, each target point includes sampling parameters in both the transverse direction and the longitudinal direction, and obtaining the sampling parameters in both the transverse direction and the longitudinal direction is to obtain an angle value, i.e., a transverse angle value and a longitudinal angle value, of the hall rocker poking in both the transverse direction and the longitudinal direction. The transverse angle value alpha and the longitudinal angle value beta may be calculated according to the above formula. The prior art can be referred to the principle of calculating the alpha and the beta according to the formula.

Wherein, the transverse angle value alpha and the longitudinal angle value beta corresponding to the target point include: the horizontal angle value alpha (0) and the longitudinal angle value beta (0) corresponding to the median point 0, the horizontal angle value alpha (2/4/6/8) and the longitudinal angle value beta (2/4/6/8) corresponding to the diagonal point 2/4/6/8, and the horizontal angle value alpha (1/3/5/7) and the longitudinal angle value beta (1/3/5/7) corresponding to the sideline point 1/3/5/7.

In order to have a more accurate sampling of the target point, in some embodiments, as shown in fig. 7, the method further comprises:

step S113, respectively sampling the transverse angle value alpha and the longitudinal angle value beta of the target point for preset times; the preset times can be customized by a user.

Step S114, calculating the average value of the transverse angle value alpha of the preset times and the average value of the longitudinal angle value beta of the preset times, wherein the average value of the transverse angle value alpha and the average value of the longitudinal angle value beta are sampling parameters of the target point.

In this embodiment, the finally obtained transverse angle value alpha and longitudinal angle value beta of the target point are average values of sampling values, so that the sampling precision of the target point is improved, and the accuracy of subsequently obtained calibration parameters is also improved.

And step S12, acquiring the maximum poking angle value of the rocker.

The maximum angle value refers to the maximum angle to which the rocker is shifted, the shifting position of the rocker is not limited, and the rocker can be in any direction of four directions, namely up, down, left and right. Since the structure of the hall rocker is fixed, there is no need to distinguish the direction in which the rocker is toggled, since the maximum angle to which the rocker is toggled in each direction is the same.

In this embodiment, an operation prompt message prompting the user to dial the rocker may be sent to the user, for example, the operation prompt message is broadcast by the remote control device in a voice broadcast manner, or the operation prompt message is sent by the remote control device on a display screen. And after the user finishes the operation of poking the rocker to the maximum angle, the remote control device acquires the maximum angle value.

In some embodiments, a maximum angle value of the rocker toggle, such as the last detected maximum angle value, may be pre-saved in the remote control device. So that the maximum angle value can be retrieved directly from memory. The pre-saved maximum angle value may be stored in the remote control device, or may be stored in a cloud server.

And step S13, calculating the calibration parameters of the target point according to the sampling parameters and the maximum angle value.

In this embodiment, the target points include a median point, a diagonal point, and an edge point. The specific steps of calculating the calibration parameters of the target points according to the sampling parameters and the maximum angle values are specifically described with reference to the horizontal left axis and the vertical left axis according to the position distribution of the target points in fig. 5.

Wherein, the calibration parameter of the median point in the transverse direction and the calibration parameter in the longitudinal direction are both fixed to be 1. Of course, in practical applications, the calibration parameter of the middle point may also be set to other values.

When the target point is a diagonal point, as shown in fig. 8, the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value includes:

step S210, carrying out difference calculation on the transverse angle value of the diagonal point and the transverse angle value of the median point to obtain a first difference value;

step S220, carrying out difference calculation on the longitudinal angle value of the diagonal point and the longitudinal angle value of the median point to obtain a second difference value;

step S230, performing a quotient calculation on the maximum angle value, the first difference value and the second difference value respectively to obtain a first quotient value and a second quotient value, where the first quotient value is a calibration parameter of the diagonal point in the transverse direction, and the second quotient value is a calibration parameter of the diagonal point in the longitudinal direction.

The four diagonal points 2, 4, 6, 8 in fig. 5 may all be used to obtain their respective calibration parameters in the transverse direction and the longitudinal direction.

Wherein the edge points include horizontal axis edge points (such as point 1 and point 5) and vertical axis edge points (such as point 3 and point 7). When the target point is a horizontal axis edge point, as shown in fig. 9, the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value includes:

step S310, carrying out difference calculation on the transverse angle value of the sideline point of the transverse axis and the transverse angle value of the median point to obtain a third difference value;

step S320, performing a quotient operation on the maximum angle value and the third difference value, and generating a calibration parameter of the horizontal axis sideline point in the horizontal direction.

And the calibration parameter of the horizontal axis sideline point in the longitudinal direction is 1. In practical applications, the calibration parameter of the horizontal axis edge point in the longitudinal direction may also be set to other values.

When the target point is a longitudinal axis edge point, as shown in fig. 10, the calculating the calibration parameter of the target point according to the sampling parameter and the maximum angle value includes:

step S410, carrying out difference calculation on the longitudinal angle value of the longitudinal axis sideline point and the longitudinal angle value of the median point to obtain a fourth difference value;

step S420, performing a quotient operation on the maximum angle value and the fourth difference value, and generating a calibration parameter of the longitudinal axis edge point in the longitudinal direction.

Wherein the calibration parameter of the longitudinal axis edge point in the transverse direction is 1. In practical applications, the calibration parameter of the longitudinal axis edge point in the transverse direction may also be set to other values.

And step S14, calibrating the rocker according to the calibration parameters.

Calibrating the rocker according to the calibration parameters comprises: acquiring new parameters of the rocker according to the calibration parameters and the original parameters of the rocker; and converting the new parameters of the rocker into a rocker instruction, namely converting the data of the original data after the calibration parameter calculation into the rocker instruction of the remote control device for controlling other equipment, such as the rocker instruction for controlling the unmanned aerial vehicle.

In some embodiments, during the calibration of the joystick, an alarm message may be sent to prompt the user to pay attention to the current calibration mode.

In some embodiments, during the calibration of the joystick, the whole calibration process can be displayed on the remote control device, and a prompt message is sent after the calibration is completed.

The rocker calibration method described above is described in detail below as an example. For example, referring to fig. 5, the hall rocker is calibrated, i.e., the calibration parameters of 9 singularities in fig. 5 are obtained. Firstly, acquiring sampling parameters of the 9 singularities, namely (alpha _ bias (0), beta _ bias (0)), (alpha _ bias (1), beta _ bias (1)), (alpha _ bias (2), beta _ bias (2)), (alpha _ bias (3), beta _ bias (3)), (alpha _ bias (4), beta _ bias (4)), (alpha _ bias (5), beta _ bias (5)), (alpha _ bias (6), beta _ bias (6)), (alpha _ bias (7), beta _ bias (7)), (alpha _ bias (8) and beta _ bias (8)); then determining the maximum angle value as scope _ value;

the calibration parameters for calculating the diagonal points 2, 4, 6, and 8 are:

alpha_scale[2]=scope_value/(alpha_bias(2)-alpha_bias(0));beta_scale[2]=scope_value/(beta_bias(2)-beta_bias(0))

alpha_scale[4]=scope_value/(alpha_bias(4)-alpha_bias(0));beta_scale[4]=scope_value/(beta_bias(4)-beta_bias(0))

alpha_scale[6]=scope_value/(alpha_bias(6)-alpha_bias(0));beta_scale[6]=scope_value/(beta_bias(6)-beta_bias(0))

alpha_scale[8]=scope_value/(alpha_bias(8)-alpha_bias(0));beta_scale[8]=scope_value/(beta_bias(8)-beta_bias(0))

the calibration parameters for calculating the edge points 1, 3, 5, and 7 are:

alpha_scale[1]=scope_value/(alpha_bias(1)-alpha_bias(0));beta_scale[1]=1

alpha_scale[3]=1;beta_scale[3]=scope_value/(alpha_bias(3)-alpha_bias(0))

alpha_scale[5]=scope_value/(alpha_bias(5)-alpha_bias(0));beta_scale[5]=1

alpha_scale[7]=1;beta_scale[7]=scope_value/(alpha_bias(7)-alpha_bias(0))

the calibration parameters for the median point 0 are: alpha _ scale [0] ═ 1; beta _ scale [0] is 1.

In some embodiments, as shown in fig. 11, fig. 11 differs from fig. 4 primarily in that the method further comprises:

and step S15, dividing the target point into sectors according to the position of the target point.

The dividing the target point into sectors according to the position of the target point specifically is to divide a total area where the target point is located into a plurality of sub-areas, the areas of the sub-areas may be the same, and each sub-area includes the same number of target points. For example, as shown in fig. 12, 13, and 14, the sectors may be divided as shown in fig. 12, 13, and 14, but the present invention is not limited to fig. 12, 13, and 14.

And step S16, calculating calibration parameters of the sector according to the divided sector and the calibration parameters of the target point.

Wherein, the calculating the calibration parameters of the sector according to the divided calibration parameters of the sector and the target point comprises: determining a target point corresponding to the sector; and carrying out averaging operation on the calibration parameters of the target points corresponding to the sectors to generate the calibration parameters of the sectors.

For example, as shown in fig. 12, four sectors are divided, and in the horizontal direction, the calibration parameter of the first sector is sector _ alpha _ scale [1] (alpha _ scale [1] + alpha _ scale [2] + alpha _ scale [8 ])/3; the calibration parameter of the second sector is sector _ alpha _ scale [2] (alpha _ scale [2] + alpha _ scale [3] + alpha _ scale [4 ])/3; the calibration parameter of the third sector is sector _ alpha _ scale [3] (alpha _ scale [4] + alpha _ scale [5] + alpha _ scale [6 ])/3; the calibration parameter for the fourth sector is sector _ alpha _ scale [4] (alpha _ scale [6] + alpha _ scale [7] + alpha _ scale [8 ])/3. In the longitudinal direction, the calibration parameter of the first sector is sector _ beta _ scale [1] - (beta _ scale [1] + beta _ scale [2] + beta _ scale [8 ])/3; the calibration parameter for the second sector is sector _ beta _ scale [2] (beta _ scale [2] + beta _ scale [3] + beta _ scale [4 ])/3; the calibration parameter for the third sector is sector _ beta _ scale [3] (beta _ scale [4] + beta _ scale [5] + beta _ scale [6 ])/3; the calibration parameter for the fourth sector is sector _ beta _ scale [4] (beta _ scale [6] + beta _ scale [7] + beta _ scale [8 ])/3.

For example, as shown in fig. 13, eight sectors are divided, and in the horizontal direction, the calibration parameter of the first sector is sector _ alpha _ scale [1] (alpha _ scale [1] + alpha _ scale [2 ])/2; the calibration parameter for the second sector is sector _ alpha _ scale [2] (alpha _ scale [2] + alpha _ scale [3 ])/2; the calibration parameter of the third sector is sector _ alpha _ scale [3] (alpha _ scale [3] + alpha _ scale [4 ])/2; the calibration parameter for the fourth sector is sector _ alpha _ scale [4] (alpha _ scale [4] + alpha _ scale [5 ])/2; the calibration parameter for the fifth sector is sector _ alpha _ scale [5] (alpha _ scale [5] + alpha _ scale [6 ])/2; the calibration parameter for the sixth sector is sector _ alpha _ scale [6] (alpha _ scale [6] + alpha _ scale [7 ])/2; the calibration parameter for the seventh sector is sector _ alpha _ scale [7] - (alpha _ scale [7] + alpha _ scale [8 ])/2; the calibration parameter for the eighth sector is sector _ alpha _ scale [8] (alpha _ scale [8] + alpha _ scale [1 ])/2. In the longitudinal direction, the calibration parameter of the first sector is sector _ beta _ scale [1] (beta _ scale [1] + beta _ scale [2 ])/2; the calibration parameter for the second sector is sector _ beta _ scale [2] (beta _ scale [2] + beta _ scale [3 ])/2; the calibration parameter for the third sector is sector _ beta _ scale [3] (beta _ scale [3] + beta _ scale [4 ])/2; the calibration parameter for the fourth sector is sector _ beta _ scale [4] (beta _ scale [4] + beta _ scale [5 ])/2; the calibration parameter for the fifth sector is sector _ beta _ scale [5] (beta _ scale [5] + beta _ scale [6 ])/2; the calibration parameter for the sixth sector is sector _ beta _ scale [6] (beta _ scale [6] + beta _ scale [7 ])/2; the calibration parameter for the seventh sector is sector _ beta _ scale [7] - (beta _ scale [7] + beta _ scale [8 ])/2; the calibration parameter for the eighth sector is sector _ beta _ scale [8] (beta _ scale [8] + beta _ scale [1 ])/2.

For example, as shown in fig. 14, eight sectors are divided, and each sector corresponds to one singular point, i.e. several singular points 1 to 8, so when the sectors are divided in this way, the calibration parameter of the sector is the calibration parameter of each singular point, and reference can be specifically made to the above-mentioned embodiment.

And step S17, calibrating the rocker according to the calibration parameters of the sector.

According to the embodiment, the moving range of the rocker is divided into different sectors, and then the calibration parameters are obtained based on the sectors, so that the finally obtained calibration data is more accurate and stable due to the finer sector distribution.

The calibration parameters obtained in the above embodiment can be stored in the remote control device, and the calibration parameters can be directly used each time the remote control device is turned on. When the remote control device is used, the obtained three-axis magnetic flux data of the sensor Hall chip are calculated through the calibration parameters, integrated into a control instruction and then sent to a controlled device, such as an unmanned aerial vehicle, so that the controlled device is safely controlled.

The embodiment of the invention provides a rocker calibrating method, which is characterized in that when a rocker is in a calibrating mode, sampling parameters of a target point and a maximum angle value shifted by the rocker are obtained, and then the calibrating parameters of the target point are calculated according to the sampling parameters and the maximum angle value, so that the rocker is calibrated according to the calibrating parameters. The embodiment realizes the calibration function of the Hall rocker, has simple whole process, reduces the calibration complexity of the Hall rocker, is suitable for most remote control devices with the Hall rocker, and has stronger universality.

As shown in fig. 15, an embodiment of the present invention provides a rocker calibrating device 1000 applied to the remote control device, where the rocker calibrating device 1000 includes: a first acquisition module 1001, a second acquisition module 1002, a first calculation module 1003 and a first calibration module 1004.

The first obtaining module 1001 is configured to obtain a sampling parameter of a target point when the joystick is in the calibration mode; a second obtaining module 1002, configured to obtain a maximum angle value dialed by the rocker; a first calculating module 1003, configured to calculate a calibration parameter of the target point according to the sampling parameter and the maximum angle value; a first calibration module 1004 for calibrating the joystick according to the calibration parameters.

The first obtaining module 1001 is specifically configured to: when the rocker is in a calibration mode, controlling the rocker to move to the target point; calculating a transverse angle value alpha and a longitudinal angle value beta corresponding to the target point, wherein the transverse angle value alpha and the longitudinal angle value beta areThe value alpha and the longitudinal angle value beta are sampling parameters of the target point; wherein, theThe above-mentionedWherein, said mx、my、mzMagnetic flux of x, y and z axes output by the chip, ka、kb、ktIs preset adjustable parameters.

The first obtaining module 1001 is further specifically configured to: respectively sampling the transverse angle value alpha and the longitudinal angle value beta of the target point for preset times; and calculating the average value of the transverse angle value alpha of the preset times and the average value of the longitudinal angle value beta of the preset times, wherein the average value of the transverse angle value alpha and the average value of the longitudinal angle value beta are sampling parameters of the target point.

The target points comprise a median point, a diagonal point and an edge point.

Wherein, when the target point is a diagonal point, the first calculating module 1003 is specifically configured to:

performing difference operation on the transverse angle value of the diagonal point and the transverse angle value of the median point to obtain a first difference value;

performing difference operation on the longitudinal angle value of the diagonal point and the longitudinal angle value of the median point to obtain a second difference value;

and carrying out quotient calculation on the maximum angle value, the first difference value and the second difference value respectively to obtain a first quotient value and a second quotient value, wherein the first quotient value is a calibration parameter of the diagonal point in the transverse direction, and the second quotient value is a calibration parameter of the diagonal point in the longitudinal direction.

The edge points include a horizontal axis edge point and a vertical axis edge point, and when the target point is the horizontal axis edge point, the first calculation module 1003 is specifically configured to:

performing difference calculation on the transverse angle value of the sideline point of the transverse shaft and the transverse angle value of the median point to obtain a third difference value;

carrying out quotient calculation on the maximum angle value and the third difference value to generate a calibration parameter of the sideline point of the transverse axis in the transverse direction;

when the target point is a longitudinal axis edge point, the first calculation module is specifically configured to:

performing difference operation on the longitudinal angle value of the longitudinal axis sideline point and the longitudinal angle value of the median point to obtain a fourth difference value;

and carrying out quotient calculation on the maximum angle value and the fourth difference value to generate a calibration parameter of the longitudinal axis edge point in the longitudinal direction.

Wherein the calibration parameter of the median point in the transverse direction and the calibration parameter in the longitudinal direction are 1; the calibration parameter of the sideline point of the transverse shaft in the longitudinal direction is 1; the calibration parameter of the longitudinal axis edge point in the transverse direction is 1.

In some embodiments, referring also to fig. 15, the apparatus 1000 further includes a processing module 1005, a second calculation module 1006, and a second calibration module 1007. The processing module 1005 is configured to divide a sector for the target point according to the position of the target point; the second calculating module 1006 is configured to calculate calibration parameters of the sectors according to the divided sectors and the calibration parameters of the target points; the second calibration module 1007 is configured to calibrate the joystick according to the calibration parameters of the sector.

Wherein the second calculating module 1006 is specifically configured to: determining a target point corresponding to the sector; and carrying out averaging operation on the calibration parameters of the target points corresponding to the sectors to generate the calibration parameters of the sectors.

It should be noted that, for the information interaction, execution process, and other contents between the modules in the apparatus, since the same concept is used as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.

The embodiment of the invention provides a rocker calibrating device, which is used for acquiring a sampling parameter of a target point and a maximum angle value shifted by a rocker when the rocker is in a calibrating mode, and then calculating a calibrating parameter of the target point according to the sampling parameter and the maximum angle value, so that the rocker is calibrated according to the calibrating parameter. The embodiment realizes the calibration function of the Hall rocker, has simple whole process, reduces the calibration complexity of the Hall rocker, is suitable for most remote control devices with the Hall rocker, and has stronger universality.

As shown in fig. 16, an embodiment of the present invention provides a remote control device 2000, where the remote control device 2000 includes:

the remote control device comprises a remote control body (not shown) and Hall rockers (not shown), wherein the Hall rockers are fixed on the remote control body, and the number of the Hall rockers is not particularly limited.

One or more processors 2001 and a memory 2002 are provided in the remote control device 2000, and one processor 2001 is illustrated in fig. 16. The hall rocker and the memory 2002 are respectively connected with the processor 2001 in a communication manner.

The processor 2001 and the memory 2002 may be connected by a bus or the like, and fig. 16 illustrates the bus connection.

The memory 2002, which may be a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules (e.g., the various modules shown in FIG. 15) corresponding to the rocker calibration method in embodiments of the present invention. The processor 2001 executes various functional applications and data processing of the server by running nonvolatile software programs, instructions and modules stored in the memory 2002, that is, the joystick calibration method of the above-described method embodiment is implemented.

The memory 2002 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the stored data area may store data created from use of the rocker calibration device, and the like. Further, the memory 2002 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 2002 optionally includes memory remotely located from the processor 2001, which may be connected to the rocker calibration device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The one or more modules are stored in the memory 2002 and, when executed by the one or more processors 2001, perform the rocker calibration method in any of the method embodiments described above, e.g., the methods implemented in fig. 4, 6-11 described above, implementing the functionality of the modules in fig. 15.

The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.

The remote control device 2000 of the embodiment of the present invention may be in various forms, including but not limited to a remote controller, and other electronic devices with data interaction functions. The remote control device 2000 may be used to control an unmanned aerial vehicle, an unmanned automobile, and the like.

Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions for an electronic device to perform the method for calibrating a joystick in any of the above method embodiments, for example, the methods implemented in fig. 4 and 6 to 11 described above, so as to implement the functions of the modules in fig. 15.

Embodiments of the present invention provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform a rocker calibration method in any of the above method embodiments, for example, the method implemented in fig. 4, 6 to 11 described above, implementing the functionality of the modules in fig. 15.

The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.

Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种结构简洁的双识别磁旋钮

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类