CN103884325A - Electronic compass and device with the same - Google Patents

Electronic compass and device with the same Download PDF

Info

Publication number
CN103884325A
CN103884325A CN201210563419.9A CN201210563419A CN103884325A CN 103884325 A CN103884325 A CN 103884325A CN 201210563419 A CN201210563419 A CN 201210563419A CN 103884325 A CN103884325 A CN 103884325A
Authority
CN
China
Prior art keywords
magnetic field
detected value
terrestrial magnetic
electronic compass
field detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201210563419.9A
Other languages
Chinese (zh)
Other versions
CN103884325B (en
Inventor
吴林
罗志勇
薛天培
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING UNISTRONG NAVIGATION TECHNOLOGY Co Ltd
Original Assignee
BEIJING UNISTRONG NAVIGATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING UNISTRONG NAVIGATION TECHNOLOGY Co Ltd filed Critical BEIJING UNISTRONG NAVIGATION TECHNOLOGY Co Ltd
Priority to CN201210563419.9A priority Critical patent/CN103884325B/en
Publication of CN103884325A publication Critical patent/CN103884325A/en
Application granted granted Critical
Publication of CN103884325B publication Critical patent/CN103884325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C17/00Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
    • G01C17/02Magnetic compasses
    • G01C17/28Electromagnetic compasses
    • G01C17/32Electron compasses
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C17/00Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
    • G01C17/38Testing, calibrating, or compensating of compasses

Abstract

The invention relates to an electronic compass and a device with the electronic compass. The electronic compass comprises: a magnetic field sensor; a gain adjusting module used for adjusting the gain of the magnetic field sensor so as to enable all earth magnetic field detection values obtained by the magnetic field sensor to be within the measuring range of the magnetic field sensor; a detection value acquisition module used for allowing the electronic compass to rotate around a first axis in at least one preset coordinate plane where the electronic compass is located or in a first plane parallel to the preset coordinate plane, wherein the first axis is perpendicular to the preset coordinate plane, so as to obtain a group of earth magnetic field detection values corresponding to the coordinate plane; a calibration data acquisition module used for calculating calibration data corresponding to the coordinate plane according to the obtained earth magnetic field detection values, and storing the data, wherein the calibration data comprise earth magnetic field deviants in each coordinate axis direction; and a calibration module used for calibrating the electronic compass according to the calibration data. According to the invention, the calibration accuracy of the electronic compass is improved.

Description

Electronic compass and with the equipment of this electronic compass
Technical field
The present invention relates to electronic compass collimation technique, particularly relate to a kind of electronic compass and the equipment with this electronic compass.
Background technology
Although GPS (Global Positioning System, be called for short GPS) navigating, locate, test the speed, have a wide range of applications aspect directed, because its signal is often blocked by landform, atural object, cause precision greatly to reduce, even can not use.And electronic compass is to come directedly according to terrestrial magnetic field, under some scene, can effectively makes up even and to substitute GPS product and be used widely.
Electronic compass needed to calibrate before using.Existing electronic compass calibration method normally in certain hour restriction by compass at its residing XY or XZ axial plane along magnetic field sensor image data that vertically axle of this plane comprises more than three-sixth turn and by electronic compass, calculate the side-play amount of each coordinate axis according to the data that collect, the side-play amount obtaining is carried out the calibration of electronic compass as calibration data.
Inventor finds in the process of putting into practice prior art, and in different magnetic environments, the setting of the gain of the magnetic field sensor of electronic compass may be different.It is full scale value that the too small meeting that gain arranges causes the data of magnetic field sensor collection, and the data that obtain may be wrong, has reduced thus the accuracy of electronic compass calibration.
Summary of the invention
Provide hereinafter about brief overview of the present invention, to the basic comprehension about some aspect of the present invention is provided.Should be appreciated that this general introduction is not about exhaustive general introduction of the present invention.It is not that intention is determined key of the present invention or pith, and nor is it intended to limit the scope of the present invention.Its object is only that the form of simplifying provides some concept, using this as the preorder in greater detail of discussing after a while.
The invention provides a kind of electronic compass and the equipment with this electronic compass, in order to improve the accuracy of electronic compass calibration.
On the one hand, the invention provides a kind of electronic compass, comprise magnetic field sensor, also comprise:
Gain regulation module, for adjusting the gain of magnetic field sensor, so that the terrestrial magnetic field detected value that described magnetic field sensor obtains all falls in the range of described magnetic field sensor;
Detected value acquisition module, for making described electronic compass at least one preset coordinate plane of its present position or being parallel in the first plane of described preset coordinate plane along the first axle rotation perpendicular to described preset coordinate plane, and obtain one group of terrestrial magnetic field detected value corresponding with described coordinate plane;
Calibration data acquisition module, for calculating the calibration data corresponding with described coordinate plane storage according to the terrestrial magnetic field detected value obtaining, described calibration data comprises the terrestrial magnetic field off-set value along each change in coordinate axis direction;
Calibration module, for calibrating described electronic compass according to described calibration data.
On the other hand, the present invention also provides a kind of equipment with above-mentioned electronic compass.
Technical scheme provided by the invention, the magnetic field sensor that can be electronic compass for current terrestrial magnetic field environment is determined a suitable data acquisition gain, follow-up terrestrial magnetic field detected value all carries out digital quantity demonstration with the detection range ability of this suitable gain correspondence, reduce the error that geomagnetic field intensity gathers, improve the accuracy of calibration data, and then improved the accuracy of electronic compass calibration.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The process flow diagram of the electronic compass calibration method that Fig. 1 provides for the embodiment of the present invention one;
The process flow diagram of the electronic compass calibration method that Fig. 2 provides for the embodiment of the present invention two;
The process flow diagram of the electronic compass calibration method that Fig. 3 provides for the embodiment of the present invention three;
The method flow diagram of the validity of the calibration data that the arbitrary coordinate plane of checking that Fig. 4 a provides for the embodiment of the present invention four is relevant;
The example of the image data locus circle that the terrestrial magnetic field detected value of the collection based on before calibration that Fig. 4 b provides for the embodiment of the present invention four is drawn;
The example of calibration data locus circle of drawing based on the image data after calibration that Fig. 4 c provides for the embodiment of the present invention four;
The structural representation of the electronic compass that Fig. 5 provides for the embodiment of the present invention five;
The structural representation of the electronic compass that Fig. 6 provides for the embodiment of the present invention six;
The structural representation of the electronic compass that Fig. 7 provides for the embodiment of the present invention seven;
The structural representation of the electronic compass that Fig. 8 provides for the embodiment of the present invention eight;
The structural representation of the equipment with electronic compass that Fig. 9 provides for the embodiment of the present invention nine.
Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.The element of describing in an accompanying drawing of the present invention or a kind of embodiment and feature can combine with element and feature shown in one or more other accompanying drawing or embodiment.It should be noted that for purposes of clarity, in accompanying drawing and explanation, omitted expression and the description of unrelated to the invention, parts known to persons of ordinary skill in the art and processing.Based on the embodiment in the present invention, those of ordinary skills, not paying the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In the following each embodiment of the present invention, the sequence number of embodiment is only convenient to describe, and does not represent the quality of embodiment.Description to each embodiment all emphasizes particularly on different fields, and there is no the part of detailed description in certain embodiment, can be referring to the associated description of other embodiment.
The process flow diagram of the electronic compass calibration method that Fig. 1 provides for the embodiment of the present invention one.The present embodiment adopts plane right-angle coordinate or rectangular coordinate system in space to be described, and is exactly in fact to determine that electronic compass is at the terrestrial magnetic field of X-axis, Y-axis and/or Z-direction side-play amount, namely calibration data to the calibration of electronic compass.As shown in Figure 1, the electronic compass calibration method that the present embodiment provides comprises:
Step 11: adjust the gain of magnetic field sensor, so that the terrestrial magnetic field detected value that described magnetic field sensor obtains all falls in the range of described magnetic field sensor.
In the embodiment of the present invention, electronic compass can be but is not limited to: Two-dimensional electron compass or three-dimensional electronic compass.Electronic compass comprises magnetic field sensor, and magnetic field sensor is for detection of the intensity of terrestrial magnetic field, to obtain terrestrial magnetic field detected value; Magnetic field sensor for example can be Hall element, magnetoresistive transducer or other magnetic field sensors etc.
The method of the gain of optional adjustment magnetic field sensor is for example: make described electronic compass in any one preset coordinate plane of its present position or be parallel in the first plane of described preset coordinate plane along a first axle rotation perpendicular to described preset coordinate plane, obtaining one group of terrestrial magnetic field detected value corresponding with at least one coordinate axis of described coordinate plane in rotary course; Whether the terrestrial magnetic field detected value that judgement is obtained comprises the numerical value of the maximum range that equals described magnetic field sensor, if, the gain that increases described magnetic field sensor, repeats this step, until the terrestrial magnetic field detected value obtaining all falls in the range of described magnetic field sensor; If not, whether the maximal value in the terrestrial magnetic field detected value that judgement is obtained exceedes preset reference numerical value, if so, increases the gain of described magnetic field sensor, repeat this step, until the terrestrial magnetic field detected value obtaining is all less than or equal to described preset reference numerical value.Described preset reference numerical value be greater than described magnetic field sensor range half and be less than any number of the maximum range of described magnetic field sensor.This scheme makes image data as far as possible partly detecting range to completely detecting in range ability and show, has reduced thus the error that terrestrial magnetic field detected value gathers.
Optionally, before the gain of described adjustment magnetic field sensor, also comprise that the gain of described magnetic field sensor is set to minimum.In lowest gain when the collection of magnetic field detection value requires contentedly, more progressively increase gain, until obtain a suitable gain.This scheme can improve the efficiency that gain is adjusted.
Step 12: make described electronic compass at least one preset coordinate plane of its present position or be parallel in the first plane of described preset coordinate plane along the first axle rotation perpendicular to described preset coordinate plane, and obtaining one group of terrestrial magnetic field detected value corresponding with described coordinate plane.
For Two-dimensional electron compass, preset coordinate plane is XY plane, and X-axis and Y-axis are respectively coordinate axis corresponding to XY plane.For three-dimensional electronic compass, default coordinate plane is XY plane and XZ(or YZ) plane, X-axis and Y-axis are respectively coordinate axis corresponding to XY plane, and X-axis and Z axis are respectively coordinate axis corresponding to XZ plane, and Y-axis and Z axis are respectively coordinate axis corresponding to YZ plane; Under this situation, need be to XY plane and XZ(or YZ) plane obtains respectively corresponding terrestrial magnetic field detected value.For example: one group of terrestrial magnetic field detected value corresponding with XY plane can be expressed as (X, Y), one group of terrestrial magnetic field detected value corresponding with XZ plane can be expressed as (X, Z), wherein, X represents the terrestrial magnetic field detected value along X-direction, and Y represents the terrestrial magnetic field detected value along Y direction, and Z represents the terrestrial magnetic field detected value along Z-direction.
Step 13: calculate the calibration data corresponding with described coordinate plane storage according to the terrestrial magnetic field detected value obtaining, described calibration data comprises the terrestrial magnetic field off-set value along each change in coordinate axis direction.
For example,, if Two-dimensional electron compass can adopt following formula to calculate the terrestrial magnetic field off-set value along corresponding coordinate axle:
Xoffset=(Xmax+Xmin)/2, wherein, Xmax and Xmin are respectively along maximal value and the minimum value of the terrestrial magnetic field detected value of X-direction, and Xoffset is the terrestrial magnetic field off-set value along X-direction;
Yoffset=(Ymax+Ymin)/2, wherein, Ymax and Ymin are respectively along maximal value and the minimum value of the terrestrial magnetic field detected value of Y direction, and Yoffset is the terrestrial magnetic field off-set value along Y direction;
If three-dimensional electronic compass also can comprise:
Zoffset=(Zmax+Zmin)/2, wherein, Zmax and Zmin are respectively along maximal value and the minimum value of the terrestrial magnetic field detected value of Z-direction, and Zoffset is the terrestrial magnetic field off-set value along Z-direction.
In the above-mentioned storer that can comprise at electronic compass as calibration data along the terrestrial magnetic field off-set value of each coordinate axis, store.
Step 14: calibrate described electronic compass according to described calibration data.
The magnetic field sensor that the present embodiment can be electronic compass for current terrestrial magnetic field environment is determined a suitable data acquisition gain, follow-up terrestrial magnetic field detected value all carries out digital quantity demonstration with the detection range ability of this suitable gain correspondence, reduce the error that geomagnetic field intensity gathers, improve the accuracy of calibration data, and then improved the accuracy of electronic compass calibration.
The process flow diagram of the electronic compass calibration method that Fig. 2 provides for the embodiment of the present invention two.The present embodiment is with the difference of the corresponding embodiment of Fig. 1, and the present embodiment also comprises the step of determining that electronic compass has rotated.Specifically as shown in Figure 2, the electronic compass calibration method that the present embodiment provides comprises:
Step 21: identical with step 11, do not repeat them here.
Step 22: select a reference point in described electronic compass present position, and determine the terrestrial magnetic field detected value of described reference point.
Reference point can preset according to actual needs.Optionally, in the time of the detected value of the terrestrial magnetic field of definite reference point, the mean value of desirable multi collect is as terrestrial magnetic field detected value corresponding to reference point, to improve the accuracy of the terrestrial magnetic field detected value that reference point is corresponding.
Step 23: identical with step 12, do not repeat them here.
Step 24: determine at least one week of rotation of described electronic compass.
Optionally, every collection N group terrestrial magnetic field detected value is carried out once following determining step to the N group terrestrial magnetic field detected value gathering, and N is greater than 0 integer.For example, can 1 group of terrestrial magnetic field detected value of every collection just carry out once following determining step, or, can every collection organize terrestrial magnetic field detected value more and carry out again once following determining step.
Determining step is for example: the first coaxial difference of calculating A group terrestrial magnetic field detected value and the terrestrial magnetic field detected value of described reference point, the the first coaxial difference obtaining and the first predetermined threshold value of setting are compared, if the total degree that this first coaxial difference is less than or equal to described the first predetermined threshold value and collection is less than the default maximum times threshold value that gathers, determine at least one week of rotation of described electronic compass, otherwise make A=A+1, repeat this determining step, until the currency of A carries out the collection of N group terrestrial magnetic field detected value next time while being greater than N; Wherein, A is greater than 0 integer and the initial value of A is 1." coaxial difference " described in the embodiment of the present invention is the difference along the axial terrestrial magnetic field of at least one same coordinate detected value, and " first ", " second " etc. are only convenient to distinguish statement.For example, for XY plane, A group terrestrial magnetic field detected value (Xa, Ya) and the first coaxial difference of the terrestrial magnetic field detected value (X1, Y1) of described reference point comprise (Xa-X1) and (Ya-Y1).
Step 25-26: 13-14 is identical with step, does not repeat them here.
The present embodiment is being realized on the basis of the embodiment of the present invention one similar technique effect, determine the electronic compass step whether rotation completes by increasing, can guarantee that electronic compass is from circling more than (i.e. 360 degree), and improve and judged whether electronic compass completes convenience and the accuracy of rotation in a week by reference point is set, guarantee thus the adequacy of terrestrial magnetic field detected value collection capacity, improve the accuracy of calibration data, and then improved the accuracy of electronic compass calibration.
The process flow diagram of the electronic compass calibration method that Fig. 3 provides for the embodiment of the present invention three.The present embodiment is with the difference of the corresponding embodiment of Fig. 1, and the present embodiment also comprises the step of checking terrestrial magnetic field detected value validity.Specifically as shown in Figure 3, the electronic compass calibration method that the present embodiment provides comprises:
Step 31-32: 11-12 is identical with step, does not repeat them here.
Step 33: the terrestrial magnetic field detected value obtaining is processed, to obtain effective terrestrial magnetic field detected value.
Can after obtaining N to organize terrestrial magnetic field detected value, carry out validation checking to the N group terrestrial magnetic field detected value obtaining, N is greater than 0 integer.For example, after can obtaining 1 group of terrestrial magnetic field detected value, this group terrestrial magnetic field detected value obtaining is carried out to validation checking, or, after can obtaining many groups terrestrial magnetic field detected value, these terrestrial magnetic field detected values that obtain are carried out to validation checking, or, can obtain the validation checking that carries out again terrestrial magnetic field detected value after the detected value of all terrestrial magnetic field.
The method that the terrestrial magnetic field detected value obtaining is processed is for example: the second coaxial difference of calculating A group terrestrial magnetic field detected value and A-1 group terrestrial magnetic field detected value, the the second coaxial difference and the second predetermined threshold value that obtain are compared, if this second coaxial difference is less than or equal to described the second predetermined threshold value, the error that A group terrestrial magnetic field detected value is described is less, can retain described A group terrestrial magnetic field detected value, otherwise, abandon described A group terrestrial magnetic field detected value or this group terrestrial magnetic field detected value is revised, as as described in adopting A-1 group terrestrial magnetic field detected value as described in A group terrestrial magnetic field detected value, A is greater than 1 integer.
Step 34: calculate the calibration data corresponding with described coordinate plane storage according to described effective terrestrial magnetic field detected value.
Step 35: identical with step 14, do not repeat them here.
The present embodiment is being realized on the basis of the embodiment of the present invention one similar technique effect, by increasing the step that the terrestrial magnetic field detected value obtaining is carried out to validity processing, can reject the invalid data causing because of factors such as interference in the detected value gatherer process of terrestrial magnetic field, guarantee thus the validity of the terrestrial magnetic field detected value obtaining, improve the accuracy of calibration data, and then improved the accuracy of electronic compass calibration.
Above-mentioned each technical scheme that the embodiment of the present invention provides, after getting calibration data, all also can comprise the validity of verifying described calibration data.The embodiment of the present invention four provides a kind of method of verifying calibration data validity, and as shown in Figure 4, the method comprises:
Step 41: according to the terrestrial magnetic field detected value of the terrestrial magnetic field off-set value calibration corresponding coordinate axle of the relevant each coordinate axis of coordinate plane, each group of terrestrial magnetic field detected value after being calibrated; Draw calibration data locus circle according to each group of terrestrial magnetic field detected value after calibration at described coordinate plane, determine the center of circle of described calibration data locus circle; Calculate respectively the distance in each coordinate points and the described center of circle, and get the mean value of each distance as the mean radius of described calibration data locus circle, the terrestrial magnetic field detected value after the corresponding one group of calibration of arbitrary coordinate points.
Might as well describe as an example of XY plane example: the example of the image data locus circle that the terrestrial magnetic field detected value of the collection based on before calibration is drawn as shown in Figure 4 b.Calibrate according to the terrestrial magnetic field off-set value of each coordinate axis afterwards: terrestrial magnetic field detected value and the Xoffset of each collection of X-axis are subtracted each other, terrestrial magnetic field detected value and the Yoffset of each collection of Y-axis subtract each other, obtain XY plane with origin (0,0) be the round Cxy in the center of circle, as shown in Fig. 4 c, this circle is calibration data locus circle.
Each coordinate points can be expressed as (X, Y), supposes total n group image data, and image data corresponding to each coordinate points can be designated as respectively: (X1, Y1), (X2, Y2) ... (Xn, Yn), in circle Cxy, ask the center of circle to arrive the distance of each coordinate points:
R1=sqrt(X1*X1+Y1*Y1)
R2=sqrt(X2*X2+Y2*Y2)
.........
Rn=sqrt(Xn*Xn+Yn*Yn)
Rmean=(R1+R2+…..+Rn)/n
Rmean is the mean radius of circle Cxy.
Step 42: the difference of calculating each distance and described mean radius.
The center of circle is designated as respectively to the distance of each coordinate points: Delta_1, and Delta_2 ...., Delta_n, wherein:
Delta_1=R1–Rmean
Delta_2=R2–Rmean
......
Delta_n=Rn–Rmean
Step 43: the root-mean-square deviation of calculating distance corresponding to each coordinate points and described mean radius; The 3rd predetermined threshold value of described root-mean-square deviation and setting is compared, if described root-mean-square deviation is less than described the 3rd predetermined threshold value, determine that the terrestrial magnetic field off-set value of this each coordinate axis of obtaining is effective, calibrate successfully; Otherwise, determine that the terrestrial magnetic field off-set value of this each coordinate axis of obtaining is invalid, calibrate unsuccessfully.
The distance that each coordinate points is corresponding and the root-mean-square deviation of described mean radius (root mean square error is called for short RMS) are:
RMS=sqrt(((Delta_1*Delta_1)+(Delta_2*Delta_2)+…..+(Delta_n*Delta_n))/n))。
Preferably, if the value of RMS approaches 0, represent to calibrate successfully, otherwise calibrate unsuccessfully.In order to improve the whether successful convenience of judgement of calibration, optional, can preset according to actual needs the 3rd predetermined threshold value, RMS and the 3rd predetermined threshold value are compared, determine according to comparative result that this is calibrated successfully and still calibrate unsuccessfully.If determine and calibrate unsuccessfully, can adopt the method for above-described embodiment one or embodiment bis-or embodiment tri-to re-start verification, and can adopt the method that the present embodiment provides to verify the validity of the calibration data obtaining, until obtain the effective calibration data of checking, store this calibration data and according to this calibration data calibrated electronic compass.
To XZ(or YZ) verification method of the validity of the calibration data that plane is relevant, the verification method of the validity of the calibration data relevant to XY plane is similar, does not repeat them here.
The present embodiment is verified the validity of calibration data, store calibration data while calibrating successfully determining, and determining while calibrating unsuccessfully, can again obtain new calibration data, until the calibration data obtaining is effective, improve the accuracy of calibration data, improved thus the accuracy of electronic compass calibration.
The structural representation of the electronic compass that Fig. 5 provides for the embodiment of the present invention five.This electronic compass comprises: magnetic field sensor 51, gain regulation module 52, detected value acquisition module 53, calibration data acquisition module 54 and calibration module 55.
Magnetic field sensor 51 is for detection of the intensity of terrestrial magnetic field to obtain terrestrial magnetic field detected value, and such as magnetic field sensor can be Hall element, magnetoresistive transducer or other magnetic field sensors etc.
Gain regulation module 52 is for adjusting the gain of magnetic field sensor, so that the terrestrial magnetic field detected value that described magnetic field sensor obtains all falls in the range of described magnetic field sensor.
Detected value acquisition module 53 is for making described electronic compass at least one preset coordinate plane of its present position or being parallel in the first plane of described preset coordinate plane along the first axle rotation perpendicular to described preset coordinate plane, and obtains one group of terrestrial magnetic field detected value corresponding with described coordinate plane.
Calibration data acquisition module 54 is for calculating the calibration data corresponding with described coordinate plane storage according to the terrestrial magnetic field detected value obtaining, and described calibration data comprises the terrestrial magnetic field off-set value along each change in coordinate axis direction.
Calibration module 55 is for calibrating described electronic compass according to described calibration data.
The magnetic field sensor that the electronic compass that the present embodiment provides can be electronic compass for current terrestrial magnetic field environment is determined a suitable data acquisition gain, follow-up terrestrial magnetic field detected value all carries out digital quantity demonstration with the detection range ability of this suitable gain correspondence, reduce the error that geomagnetic field intensity gathers, improve the accuracy of calibration data, and then improved the accuracy of electronic compass calibration.
In technique scheme, optional, described gain regulation module 52 can comprise: detected value acquiring unit, judging unit and gain adjusting unit.Detected value acquiring unit, for making described electronic compass in any one preset coordinate plane of its present position or being parallel in the first plane of described preset coordinate plane along the first axle rotation perpendicular to described preset coordinate plane, obtains one group of terrestrial magnetic field detected value corresponding with at least one coordinate axis of described coordinate plane in rotary course.Judging unit is for judging whether the terrestrial magnetic field detected value obtaining comprises the numerical value of the maximum range that equals described magnetic field sensor, if, the gain that increases described magnetic field sensor, repeats this step, until the terrestrial magnetic field detected value obtaining all falls in the range of described magnetic field sensor.Gain adjusting unit is used for if not, whether the maximal value in the terrestrial magnetic field detected value that judgement is obtained exceedes preset reference numerical value, if, increase the gain of described magnetic field sensor, repeat this step, until the terrestrial magnetic field detected value obtaining is all less than or equal to described preset reference numerical value, described preset reference numerical value be greater than described magnetic field sensor range half and be less than any number of the maximum range of described magnetic field sensor.This scheme makes image data as far as possible partly detecting range to completely detecting in range ability and show, has reduced thus the error that terrestrial magnetic field detected value gathers.
Optionally, before described gain regulation module 52 is also used in the gain of adjusting magnetic field sensor, the gain of described magnetic field sensor is set to minimum.In lowest gain when the collection of magnetic field detection value requires contentedly, more progressively increase gain, until obtain a suitable gain.This scheme can improve the efficiency that gain is adjusted.
Optionally, as shown in Figure 6, described electronic compass also can comprise: reference point detected value acquisition module 56 and/or rotation complete determination module 57.Reference point detected value acquisition module 56, for after the gain of described adjustment magnetic field sensor, is selected a reference point in described electronic compass present position, and determines the terrestrial magnetic field detected value of described reference point.Rotation completes before determination module 57 calculates the calibration data corresponding with described coordinate plane for the terrestrial magnetic field detected value obtaining in described basis, determines at least one week of rotation of described electronic compass.For example, rotation completes determination module and specifically can be used for every collection N group terrestrial magnetic field detected value and the N group terrestrial magnetic field detected value gathering is carried out once to judge, N is greater than 0 integer: the first coaxial difference of calculating A group terrestrial magnetic field detected value and the terrestrial magnetic field detected value of described reference point, the the first coaxial difference obtaining and the first predetermined threshold value of setting are compared, if the total degree that this first coaxial difference is less than or equal to described the first predetermined threshold value and collection is less than the default maximum times threshold value that gathers, determine at least one week of rotation of described electronic compass, otherwise make A=A+1, repeat this determining step, until the currency of A carries out the collection of N group terrestrial magnetic field detected value next time while being greater than N, wherein, A is greater than 0 integer and the initial value of A is 1.This scheme can guarantee that electronic compass is from circling more than (i.e. 360 degree), and improve and judged whether electronic compass completes convenience and the accuracy of rotation in a week by reference point is set, guarantee thus the adequacy of terrestrial magnetic field detected value collection capacity, improve the accuracy of calibration data, and then improved the accuracy of electronic compass calibration.
Optionally, as shown in Figure 7, described electronic compass also can comprise: detected value processing module 58.
Detected value processing module 58 is processed the terrestrial magnetic field detected value obtaining, to obtain effective terrestrial magnetic field detected value before calculating the calibration data corresponding with described coordinate plane for the terrestrial magnetic field detected value obtaining in described basis.For example, detected value processing module specifically can be used for calculating the second coaxial difference of A group terrestrial magnetic field detected value and A-1 group terrestrial magnetic field detected value, the the second coaxial difference and the second predetermined threshold value that obtain are compared, if this second coaxial difference is less than or equal to described the second predetermined threshold value, retain described A group terrestrial magnetic field detected value, otherwise, abandon described A group terrestrial magnetic field detected value or adopt described A-1 group terrestrial magnetic field detected value as described A group terrestrial magnetic field detected value, A is greater than 1 integer.Accordingly, described calibration data acquisition module 54 is specifically for calculating the calibration data corresponding with described coordinate plane storage according to described effective terrestrial magnetic field detected value.This scheme is carried out validity processing by increasing to the terrestrial magnetic field detected value obtaining, can reject the invalid data causing because of factors such as interference in the detected value gatherer process of terrestrial magnetic field, guarantee thus the validity of the terrestrial magnetic field detected value obtaining, improve the accuracy of calibration data, and then improved the accuracy of electronic compass calibration.
Optionally, as shown in Figure 8, described electronic compass also can comprise: checking data authentication module 59.After checking data authentication module 59 calculates calibration data storage for the terrestrial magnetic field detected value obtaining in described basis, verify the validity of described calibration data.For example, described checking data authentication module can comprise: mean radius determining unit, difference computational unit and validity determining unit.Mean radius determining unit, for calibrating the terrestrial magnetic field detected value of corresponding coordinate axle, each group of terrestrial magnetic field detected value after being calibrated according to the terrestrial magnetic field off-set value of the relevant each coordinate axis of described coordinate plane; Draw calibration data locus circle according to each group of terrestrial magnetic field detected value after calibration at described coordinate plane, determine the center of circle of described calibration data locus circle; Calculate respectively the distance in each coordinate points and the described center of circle, and get the mean value of each distance as the mean radius of described calibration data locus circle, the terrestrial magnetic field detected value after the corresponding one group of calibration of arbitrary coordinate points.Difference computational unit, for calculating the difference of each distance and described mean radius.Validity determining unit, for calculating the root-mean-square deviation of distance corresponding to each coordinate points and described mean radius; The 3rd predetermined threshold value of described root-mean-square deviation and setting is compared, if described root-mean-square deviation is less than described the 3rd predetermined threshold value, determine that the terrestrial magnetic field off-set value of this each coordinate axis of obtaining is effective, calibrate successfully; Otherwise, determine that the terrestrial magnetic field off-set value of this each coordinate axis of obtaining is invalid, calibrate unsuccessfully.This scheme is verified by the validity to calibration data, store calibration data while calibrating successfully determining, and determining while calibrating unsuccessfully, can again obtain new calibration data, until the calibration data obtaining is effective, improve the accuracy of calibration data, improved thus the accuracy of electronic compass calibration.The principle of work of each electronic compass that the embodiment of the present invention provides and effect can, referring to the record of the inventive method embodiment and respective drawings, not repeat them here.
The embodiment of the present invention also provides a kind of equipment, its structural representation as shown in Figure 9, this equipment 91 is with above-mentioned arbitrary electronic compass 92, about structural representation, principle of work and the accessible technique effect of electronic compass 92, can, referring to the record of the above-mentioned electronic compass embodiment of the present invention and respective drawings, not repeat them here.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can complete by the relevant hardware of programmed instruction, aforesaid program can be stored in a computer read/write memory medium, this program, in the time carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM (read-only memory) (Read-Only Memory is called for short ROM), random access memory (Random Access Memory is called for short RAM), magnetic disc or CDs.
In the embodiment such as apparatus and method of the present invention, obviously, each parts or each step reconfigure after can decomposing, combine and/or decomposing.These decomposition and/or reconfigure and should be considered as equivalents of the present invention.Simultaneously, in the above in the description of the specific embodiment of the invention, describe and/or the feature that illustrates can be used in same or similar mode in one or more other embodiment for a kind of embodiment, combined with the feature in other embodiment, or substitute the feature in other embodiment.
Should emphasize, term " comprises/comprises " existence that refers to feature, key element, step or assembly while use herein, but does not get rid of the existence of one or more further feature, key element, step or assembly or add.
Finally it should be noted that: although described above the present invention and advantage thereof in detail, be to be understood that in the case of not exceeding the spirit and scope of the present invention that limited by appended claim and can carry out various changes, alternative and conversion.And scope of the present invention is not limited only to the specific embodiment of the described process of instructions, equipment, means, method and step.One of ordinary skilled in the art will readily appreciate that from disclosure of the present invention, can use carry out with the essentially identical function of corresponding embodiment described herein or obtain process, equipment, means, method or step result essentially identical with it, that existing and will be developed future according to the present invention.Therefore, appended claim is intended to comprise such process, equipment, means, method or step in their scope.

Claims (11)

1. an electronic compass, comprises magnetic field sensor, it is characterized in that, also comprises:
Gain regulation module, for adjusting the gain of magnetic field sensor, so that the terrestrial magnetic field detected value that described magnetic field sensor obtains all falls in the range of described magnetic field sensor;
Detected value acquisition module, for making described electronic compass at least one preset coordinate plane of its present position or being parallel in the first plane of described preset coordinate plane along the first axle rotation perpendicular to described preset coordinate plane, and obtain one group of terrestrial magnetic field detected value corresponding with described coordinate plane;
Calibration data acquisition module, for calculating the calibration data corresponding with described coordinate plane storage according to the terrestrial magnetic field detected value obtaining, described calibration data comprises the terrestrial magnetic field off-set value along each change in coordinate axis direction;
Calibration module, for calibrating described electronic compass according to described calibration data.
2. electronic compass according to claim 1, is characterized in that, described gain regulation module comprises:
Detected value acquiring unit, for making described electronic compass in any one preset coordinate plane of its present position or being parallel in the first plane of described preset coordinate plane along the first axle rotation perpendicular to described preset coordinate plane, in rotary course, obtain one group of terrestrial magnetic field detected value corresponding with at least one coordinate axis of described coordinate plane;
Judging unit, for judging whether the terrestrial magnetic field detected value obtaining comprises the numerical value of the maximum range that equals described magnetic field sensor, if so, increase the gain of described magnetic field sensor, repeat this step, until the terrestrial magnetic field detected value obtaining all falls in the range of described magnetic field sensor;
Gain adjusting unit, be used for if not, whether the maximal value in the terrestrial magnetic field detected value that judgement is obtained exceedes preset reference numerical value, if, increase the gain of described magnetic field sensor, repeat this step, until the terrestrial magnetic field detected value obtaining is all less than or equal to described preset reference numerical value, described preset reference numerical value be greater than described magnetic field sensor range half and be less than any number of the maximum range of described magnetic field sensor.
3. electronic compass according to claim 1, is characterized in that, described gain regulation module is also for before adjusting the gain of magnetic field sensor, and the gain of described magnetic field sensor is set to minimum.
4. electronic compass according to claim 1, is characterized in that, also comprises:
Reference point detected value acquisition module, for after the gain of described adjustment magnetic field sensor, selects a reference point in described electronic compass present position, and determines the terrestrial magnetic field detected value of described reference point.
5. electronic compass according to claim 4, is characterized in that, also comprises:
Rotation completes determination module, before calculating the calibration data corresponding with described coordinate plane, determines at least one week of rotation of described electronic compass for the terrestrial magnetic field detected value obtaining in described basis.
6. electronic compass according to claim 5, is characterized in that,
Described rotation completes determination module, the N group terrestrial magnetic field detected value gathering is carried out to once following determining step specifically for every collection N group terrestrial magnetic field detected value, N is greater than 0 integer: the first coaxial difference of calculating A group terrestrial magnetic field detected value and the terrestrial magnetic field detected value of described reference point, the the first coaxial difference obtaining and the first predetermined threshold value of setting are compared, if the total degree that this first coaxial difference is less than or equal to described the first predetermined threshold value and collection is less than the default maximum times threshold value that gathers, determine at least one week of rotation of described electronic compass, otherwise make A=A+1, repeat this determining step, until the currency of A carries out the collection of N group terrestrial magnetic field detected value next time while being greater than N, wherein, A is greater than 0 integer and the initial value of A is 1.
7. electronic compass according to claim 1, is characterized in that, also comprises:
Detected value processing module, before calculating the calibration data corresponding with described coordinate plane, processes the terrestrial magnetic field detected value obtaining, to obtain effective terrestrial magnetic field detected value for the terrestrial magnetic field detected value obtaining in described basis;
Described calibration data acquisition module, specifically for calculating the calibration data corresponding with described coordinate plane storage according to described effective terrestrial magnetic field detected value.
8. electronic compass according to claim 7, is characterized in that,
Described detected value processing module, specifically for calculating the second coaxial difference of A group terrestrial magnetic field detected value and A-1 group terrestrial magnetic field detected value, the the second coaxial difference and the second predetermined threshold value that obtain are compared, if this second coaxial difference is less than or equal to described the second predetermined threshold value, retain described A group terrestrial magnetic field detected value, otherwise, abandon described A group terrestrial magnetic field detected value or adopt described A-1 group terrestrial magnetic field detected value as described A group terrestrial magnetic field detected value, A is greater than 1 integer.
9. electronic compass according to claim 1, is characterized in that, also comprises:
Checking data authentication module, after calculating calibration data storage, verifies the validity of described calibration data for the terrestrial magnetic field detected value obtaining in described basis.
10. electronic compass according to claim 9, is characterized in that, described checking data authentication module comprises:
Mean radius determining unit, for calibrating the terrestrial magnetic field detected value of corresponding coordinate axle, each group of terrestrial magnetic field detected value after being calibrated according to the terrestrial magnetic field off-set value of the relevant each coordinate axis of described coordinate plane; Draw calibration data locus circle according to each group of terrestrial magnetic field detected value after calibration at described coordinate plane, determine the center of circle of described calibration data locus circle; Calculate respectively the distance in each coordinate points and the described center of circle, and get the mean value of each distance as the mean radius of described calibration data locus circle, the terrestrial magnetic field detected value after the corresponding one group of calibration of arbitrary coordinate points;
Difference computational unit, for calculating the difference of each distance and described mean radius;
Validity determining unit, for calculating the root-mean-square deviation of distance corresponding to each coordinate points and described mean radius; The 3rd predetermined threshold value of described root-mean-square deviation and setting is compared, if described root-mean-square deviation is less than described the 3rd predetermined threshold value, determine that the terrestrial magnetic field off-set value of this each coordinate axis of obtaining is effective, calibrate successfully; Otherwise, determine that the terrestrial magnetic field off-set value of this each coordinate axis of obtaining is invalid, calibrate unsuccessfully.
11. 1 kinds of equipment, is characterized in that, comprise the electronic compass as described in as arbitrary in claim 1-10.
CN201210563419.9A 2012-12-21 2012-12-21 Electronic compass and the equipment with this electronic compass Active CN103884325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210563419.9A CN103884325B (en) 2012-12-21 2012-12-21 Electronic compass and the equipment with this electronic compass

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210563419.9A CN103884325B (en) 2012-12-21 2012-12-21 Electronic compass and the equipment with this electronic compass

Publications (2)

Publication Number Publication Date
CN103884325A true CN103884325A (en) 2014-06-25
CN103884325B CN103884325B (en) 2016-08-03

Family

ID=50953350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210563419.9A Active CN103884325B (en) 2012-12-21 2012-12-21 Electronic compass and the equipment with this electronic compass

Country Status (1)

Country Link
CN (1) CN103884325B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104316037A (en) * 2014-10-29 2015-01-28 深圳市华信天线技术有限公司 Electronic compass correction method and device
CN104501790A (en) * 2014-12-17 2015-04-08 小米科技有限责任公司 Calibration method and device of electronic compass
CN107063218A (en) * 2017-04-21 2017-08-18 北京京东尚科信息技术有限公司 Data processing method and device
CN107202572A (en) * 2017-07-21 2017-09-26 深圳市泰衡诺科技有限公司上海分公司 Calibration method, electronic compass and the electronic equipment of electronic compass
CN113091720A (en) * 2021-04-13 2021-07-09 杭州启飞智能科技有限公司 Detection method and detection system of electronic compass
WO2023169422A1 (en) * 2022-03-08 2023-09-14 维沃移动通信有限公司 Electronic compass calibration method and apparatus, electronic device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030041466A1 (en) * 2001-09-06 2003-03-06 Kazuo Kato Electronic equipment
CN1624425A (en) * 2003-12-03 2005-06-08 三星电机株式会社 Automatic calibration method for use in electronic compass
CN1639542A (en) * 2002-03-01 2005-07-13 金泰克斯公司 Electronic compass system
CN101487706A (en) * 2009-03-05 2009-07-22 杨红红 Electronic compass based on dynamically extracted valid data computing method
CN201909829U (en) * 2010-11-19 2011-07-27 成都光大灵曦科技发展有限公司 Track circuit failure digital intelligent diagnostic apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030041466A1 (en) * 2001-09-06 2003-03-06 Kazuo Kato Electronic equipment
CN1639542A (en) * 2002-03-01 2005-07-13 金泰克斯公司 Electronic compass system
CN1624425A (en) * 2003-12-03 2005-06-08 三星电机株式会社 Automatic calibration method for use in electronic compass
CN101487706A (en) * 2009-03-05 2009-07-22 杨红红 Electronic compass based on dynamically extracted valid data computing method
CN201909829U (en) * 2010-11-19 2011-07-27 成都光大灵曦科技发展有限公司 Track circuit failure digital intelligent diagnostic apparatus

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104316037A (en) * 2014-10-29 2015-01-28 深圳市华信天线技术有限公司 Electronic compass correction method and device
CN104316037B (en) * 2014-10-29 2017-06-13 深圳市华信天线技术有限公司 A kind of bearing calibration of electronic compass and device
CN104501790A (en) * 2014-12-17 2015-04-08 小米科技有限责任公司 Calibration method and device of electronic compass
CN107063218A (en) * 2017-04-21 2017-08-18 北京京东尚科信息技术有限公司 Data processing method and device
CN107202572A (en) * 2017-07-21 2017-09-26 深圳市泰衡诺科技有限公司上海分公司 Calibration method, electronic compass and the electronic equipment of electronic compass
CN107202572B (en) * 2017-07-21 2023-10-31 深圳市泰衡诺科技有限公司上海分公司 Electronic compass calibration method, electronic compass and electronic equipment
CN113091720A (en) * 2021-04-13 2021-07-09 杭州启飞智能科技有限公司 Detection method and detection system of electronic compass
WO2023169422A1 (en) * 2022-03-08 2023-09-14 维沃移动通信有限公司 Electronic compass calibration method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
CN103884325B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN103884325A (en) Electronic compass and device with the same
CN103884326A (en) Electronic compass electronic compass
AU2020205220B2 (en) IMU calibration
CN103153790B (en) The measurement data of the magnetometer using motion sensor and be attached to device estimates equipment and the method for this device yaw angle in gravitational frame of reference
AU703786B2 (en) Method to determine the direction of the Earth's magnetic field
JP5469670B2 (en) Geomagnetic detector
CN109813336B (en) Calibration method for inertia measurement unit
EP3246670A1 (en) Direct-reading gauge capable of eliminating magnetic interference of adjacent rotary wheel
US20110301897A1 (en) Calibration of a triaxial magnetic field sensor
CN104316037B (en) A kind of bearing calibration of electronic compass and device
CN103808349B (en) The error calibration method of vector sensor and device
CN102798393A (en) Mobile device
Skvortzov et al. Application of electronic compass for mobile robot in an indoor environment
CN102313544B (en) Automatic data collection algorithm for 3d magnetic field calibration with reduced memory requirements
CN104913789A (en) Apparatus and method for background calibration
CN110779514B (en) Hierarchical Kalman fusion method and device for auxiliary attitude determination of bionic polarization navigation
CN108088431B (en) Self-correcting electronic compass and correcting method thereof
US10267649B2 (en) Method and apparatus for calculating azimuth
CN108592902A (en) A kind of positioning device and localization method based on multisensor, system and mechanical arm
CN105758422B (en) A kind of test method of integration type closed-loop fiber optic gyroscope
CN110567486A (en) Mathematical model construction method for calibrating 3D rotation difference, calibration method and device thereof
CN105203096A (en) Rotary magnetic field rapid tracking method and system based on four-point measurement
US9528863B2 (en) Sensor devices utilizing look-up tables for error correction and methods thereof
CN111982155B (en) Calibration method and device of magnetic sensor, electronic equipment and computer storage medium
RU138023U1 (en) DEVICE FOR CALIBRATING A THREE-COMPONENT MAGNETOMETER

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant