Calibration method and system of electronic compass, computer equipment and medium
By using two positioning receivers to calculate the linear angle value and compare it with the angle value of the electronic compass to determine the deviation angle, the problem of low accuracy of electronic compass calibration in the scene without truth points is solved, and high-precision electronic compass calibration is achieved.
Patent Information
- Application Number
- CN202510083344.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-20
AI Technical Summary
In the scene without truth point, it is difficult for electronic compass to perform high-precision calibration, and there is a lack of accurate truth point comparison for calibration.
By calibrating the angle deviation of the electronic compass using two positioning receivers (first positioning receiver and second positioning receiver), calculating the linear angle value between the two, and comparing the angle value of the electronic compass with the linear angle value, the deviation angle that the electronic compass needs to be corrected.
In the absence of truth points, high-precision calibration of the electronic compass can be achieved, with an accuracy of less than 0.1°, and the problem of external magnetic field interference is avoided.
Smart Images

Figure CN119915265A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of orientation and measurement technology, and in particular to a method, system, computer equipment and medium for calibrating an electronic compass by using two positioning receivers. Background Art
[0002] The electronic compass realizes the orientation direction angle based on the natural magnetic field of the earth. During use, the electronic compass is interfered by various external magnetic fields, and the temperature changes affect the electronic compass hardware. Multiple measurement errors are accumulated, and other reasons lead to errors in the electronic compass measurement. In order to obtain a higher precision direction angle when using it again, the electronic compass is usually calibrated to the true value point, and the true value point is usually a fixed point with a fixed direction. However, when the electronic compass is used for a long time and multiple times in a place without a true value point, one of the difficulties in the electronic compass calibration process is to find the true value point. Summary of the invention
[0003] The purpose of the present invention is to provide a method, system, computer equipment and medium for high-precision calibration of an electronic compass in a scenario without a true value point, so as to solve the problem that the electronic compass has no high-precision true value point comparison calibration in a state without a true value point.
[0004] In a first aspect, the present invention provides a calibration method for an electronic compass, which is implemented based on a first positioning receiver and a second positioning receiver, and the method comprises:
[0005] Obtaining the longitude and latitude of a first location of a first positioning receiver and the longitude and latitude of a second location of a second positioning receiver;
[0006] Obtaining a line angle value of a straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position;
[0007] Obtaining an angle value of a straight line formed by the electronic compass pointing to the first positioning receiver and the second positioning receiver;
[0008] The angle value obtained by the electronic compass is compared with the angle value of the line formed by the first positioning receiver and the second positioning receiver to determine the deviation angle that needs to be corrected for the electronic compass.
[0009] In some examples, obtaining the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position includes:
[0010] Calculate the average of the longitude and latitude of the first position and the longitude and latitude of the second position, calculate the difference between the average longitude of the first position and the average longitude of the second position, and the difference between the average latitude of the first position and the average latitude of the second position;
[0011] Based on the difference between the average longitude of the first position and the average longitude of the second position, the difference between the average latitude of the first position and the average latitude of the second position obtains the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver.
[0012] In some instances, Get the line angle value θ of the straight line formed by the first positioning receiver and the second positioning receiver deg , where θ=arctan2((sin(ΔLon)*cos(LatB),cos(LatA)*sin(LatB)-sin(LatA)*cos(LatB)*cos(ΔLon)), ΔLon=LonB-LonA, ΔLat=LatB-LatA, LatA represents the average longitude of the first positioning receiver, LonA represents the average latitude of the first positioning receiver, LatB represents the average longitude of the second positioning receiver, and LonB represents the average latitude of the second positioning receiver.
[0013] In some examples, Δθ=θ deg -α determines the deviation angle Δθ that the electronic compass needs to correct, and α represents the angle value obtained by the electronic compass.
[0014] In a second aspect, the present invention provides an electronic compass calibration system, comprising: a first positioning receiver, a second positioning receiver and a terminal, wherein the terminal is used to perform the following steps:
[0015] Obtaining the longitude and latitude of a first location of a first positioning receiver and the longitude and latitude of a second location of a second positioning receiver;
[0016] Obtaining a line angle value of a straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position;
[0017] Obtaining an angle value of a straight line formed by the electronic compass pointing to the first positioning receiver and the second positioning receiver;
[0018] The angle value obtained by the electronic compass is compared with the angle value of the line formed by the first positioning receiver and the second positioning receiver to determine the deviation angle that needs to be corrected for the electronic compass.
[0019] In some examples, obtaining the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position includes:
[0020] Calculate the average of the longitude and latitude of the first position and the longitude and latitude of the second position, calculate the difference between the average longitude of the first position and the average longitude of the second position, and the difference between the average latitude of the first position and the average latitude of the second position;
[0021] Based on the difference between the average longitude of the first position and the average longitude of the second position, the difference between the average latitude of the first position and the average latitude of the second position obtains the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver.
[0022] In some instances, Get the line angle value θ of the straight line formed by the first positioning receiver and the second positioning receiver deg , where θ=arctan2((sin(ΔLon)*cos(LatB),cos(LatA)*sin(LatB)-sin(LatA)*cos(LatB)*cos(ΔLon)), ΔLon=LonB-LonA, ΔLAt=LatB-LatA, LatA represents the average longitude of the first positioning receiver, LonA represents the average latitude of the first positioning receiver, LatB represents the average longitude of the second positioning receiver, and LonB represents the average latitude of the second positioning receiver.
[0023] In some examples, Δθ=θ deg -α determines the deviation angle Δθ that the electronic compass needs to correct, and α represents the angle value obtained by the electronic compass.
[0024] In a third aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above methods when executing the computer program.
[0025] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0026] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0027] 1. The present invention can calibrate the electronic compass using dual high-precision positioning receivers when there is no true value point;
[0028] 2. When using a high-precision receiver and a multi-band antenna, the accuracy of the marked true value point is less than 0.1°, which is a high accuracy;
[0029] 3. Compared with calibration with a compass, there is no problem of interference from external factors such as magnetic fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 is a schematic diagram of a calibration method for an electronic compass provided in an embodiment of the present invention;
[0032] Figure 2 is a schematic diagram of the calibration state of an electronic compass provided by an embodiment of the present invention;
[0033] Figure 3 It is a schematic diagram of an antenna feeding circuit provided by an embodiment of the present invention. Figure 4 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0035] In the following description, specific embodiments of the present invention will be described with reference to steps and symbols performed by one or more computers, unless otherwise specified. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and computer execution referred to herein includes operations by a computer processing unit of electronic signals representing data in a structured form. This operation converts the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present invention are described in the above text, which does not represent a limitation, and testers in the field will understand that the following various steps and operations can also be implemented in hardware.
[0036] The term "module" or "unit" used herein can be regarded as a software object executed on the computing system. The different components, modules, engines and services in this article can be regarded as implementation objects on the computing system. The apparatus and method in this article are preferably implemented in software, but can also be implemented in hardware, all within the scope of protection of the present invention.
[0037] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "an", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0038] In a first embodiment, the present invention provides a calibration method for an electronic compass, which is implemented based on a first positioning receiver and a second positioning receiver. Figure 1 As shown, the method includes:
[0039] S101: Acquire the longitude and latitude of a first position of a first positioning receiver and the longitude and latitude of a second position of a second positioning receiver;
[0040] Among them, there are two high-precision positioning receivers A and B that can receive four-star full-band signals. Receivers A and B both include receiver antennas and tripods for fixing receivers, devices with electronic compasses and difference compensation, and terminals. The positioning receiver is used to locate two points in an open field and display the latitude and longitude values corresponding to the two points.
[0041] S102: Obtaining a line angle value of a straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position;
[0042] S103: Obtaining an angle value of a direction of a straight line formed by the electronic compass pointing to the first positioning receiver and the second positioning receiver;
[0043] Among them, the position of the first positioning receiver can be used as the main antenna, the position of the second positioning receiver can be used as the slave antenna, and the electronic compass can be aimed from the main antenna to the slave antenna to obtain the angle value.
[0044] S104: Compare the angle value obtained by the electronic compass with the angle value of the line formed by the first positioning receiver and the second positioning receiver to determine the deviation angle that needs to be corrected for the electronic compass.
[0045] In some examples, obtaining the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position includes:
[0046] Calculate the average of the longitude and latitude of the first position and the longitude and latitude of the second position, calculate the difference between the average longitude of the first position and the average longitude of the second position, and the difference between the average latitude of the first position and the average latitude of the second position;
[0047] Based on the difference between the average longitude of the first position and the average longitude of the second position, the difference between the average latitude of the first position and the average latitude of the second position obtains the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver.
[0048] In some instances, Get the line angle value θ of the straight line formed by the first positioning receiver and the second positioning receiver deg , where θ=arctan2((sin(ΔLon)*cos(LatB),cos(LatA)*sin(LatB)-sin(LatA)*cos(LatB)*cos(ΔLon)), ΔLon=LonB-LonA, ΔLat=LatB-LatA, LatA represents the average longitude of the first positioning receiver, LatA represents the average latitude of the first positioning receiver, LatB represents the average longitude of the second positioning receiver, and LonB represents the average latitude of the second positioning receiver.
[0049] In some examples, Δθ=θ deg -α determines the deviation angle Δθ that the electronic compass needs to correct, and α represents the angle value obtained by the electronic compass.
[0050] In a second embodiment, the present invention provides a method for calibrating an electronic compass in an environment without a true value point. Figure 2 The figure shows the block diagram of the device arrangement of the present invention; it includes two high-precision positioning receivers A and B, receiver antennas, a tripod for fixing the receivers, an electronic compass and a device capable of performing difference compensation, and a terminal. The positioning receiver and antenna should be selected to receive the full frequency band of four satellites as much as possible to improve the positioning accuracy, such as Figure 3 The figure shows the schematic diagram of the antenna feeding circuit and an open space. Two positioning receivers are used to receive positioning longitude and latitude information. The terminal is used to record and calculate the angle values of the positioning points of the two receivers. The center point of the electronic compass is aimed at the midpoint of the antenna of receiver A, and this antenna is used as the main antenna. Then, the midpoint of the antenna of receiver B is aimed at the midpoint of the antenna of receiver A, and this antenna is used as the slave antenna. The midpoint of the electronic compass, the midpoint of the antenna of receiver A, and the midpoint of the antenna of receiver B are in a straight line.
[0051] The first step is to place two positioning receivers A and B on tripods in an open space. In order to improve the accuracy of the azimuth angle formed by the two receivers, the distance between the two positioning receivers should be greater than 6m. Turn on the positioning receiver and wait for successful positioning. When the acquired longitude and latitude values change the least, read the longitude and latitude values of point A and point B currently acquired by receivers A and B respectively. Point A (longitude LatA, latitude LonA) and point B (longitude LatB, latitude LonB).
[0052] The second step is to aim the direction of the electronic compass from the midpoint of the receiver antenna at point A to the midpoint of the receiver antenna at point B, and record the angle value α of the electronic compass at this time.
[0053] The third step is to calculate the azimuth angle formed by receiver A and receiver B in radians. First, calculate the difference between the average values of longitude and latitude:
[0054] ΔLon=LonB-LonA
[0055] ΔLat=LatB-LatA
[0056] Calculate the azimuth (in radians) using the following formula:
[0057] θ=arctan2(sin(ΔLon)*cos(LatB),cos(LatA)*sin(LatB)-sin(LatA)*cos(LatB)*cos(ΔLon))
[0058] Finally convert the azimuth from radians to degrees:
[0059]
[0060] The deviation angle of the electronic compass is the difference that the electronic compass needs to calibrate:
[0061] Δθ=θ deg -α
[0062] In the third embodiment, in order to better implement the method provided by the embodiment of the present invention, the embodiment of the present invention also provides a system based on the above method. The meanings of the terms are the same as those in the above method, and the specific implementation details can refer to the description in the method embodiment. The system includes: a first positioning receiver, a second positioning receiver and a terminal, and the terminal is used to perform the following steps:
[0063] Obtaining the longitude and latitude of a first location of a first positioning receiver and the longitude and latitude of a second location of a second positioning receiver;
[0064] Obtaining a line angle value of a straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position;
[0065] Obtaining an angle value of a straight line formed by the electronic compass pointing to the first positioning receiver and the second positioning receiver;
[0066] The angle value obtained by the electronic compass is compared with the angle value of the line formed by the first positioning receiver and the second positioning receiver to determine the deviation angle that needs to be corrected for the electronic compass.
[0067] In a fourth embodiment, the present invention further provides a computer device, such as Figure 4 As shown, it shows a schematic diagram of the structure of a computer device involved in an embodiment of the present invention, specifically:
[0068] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 4 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0069] The processor 401 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operation storage medium, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0070] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating storage medium, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a controller to provide the processor 401 with access to the memory 402.
[0071] The computer device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management storage medium, so as to manage charging, discharging, and power consumption management through the power management storage medium. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharge storage media, power failure detection circuits, power converters or inverters, and power status indicators.
[0072] The computer device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0073] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby implementing the steps in the above method embodiment.
[0074] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0075] To this end, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded by a processor to execute the steps in any method provided by the embodiment of the present invention.
[0076] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0077] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0078] Since the computer program stored in the computer-readable storage medium can execute the steps in any method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0079] The above is a detailed introduction to the calibration method, system, computer device and medium for an electronic compass provided in an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A calibration method for an electronic compass, characterized in that: Based on the first positioning receiver and the second positioning receiver, the method includes: Obtaining the longitude and latitude of a first location of a first positioning receiver and the longitude and latitude of a second location of a second positioning receiver; Obtaining a line angle value of a straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position; Obtaining an angle value of a straight line formed by the electronic compass pointing to the first positioning receiver and the second positioning receiver; The angle value obtained by the electronic compass is compared with the angle value of the line formed by the first positioning receiver and the second positioning receiver to determine the deviation angle that needs to be corrected for the electronic compass.
2. The calibration method according to claim 1, characterized in that: The method of obtaining the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position includes: Calculate the average of the longitude and latitude of the first position and the longitude and latitude of the second position, calculate the difference between the average longitude of the first position and the average longitude of the second position, and the difference between the average latitude of the first position and the average latitude of the second position; Based on the difference between the average longitude of the first position and the average longitude of the second position, the difference between the average latitude of the first position and the average latitude of the second position obtains the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver.
3. The calibration method according to claim 2, characterized in that: Depend on Get the line angle value θ of the straight line formed by the first positioning receiver and the second positioning receiver deg , where θ=arctan2((sin(ΔLon)*cos(LatB),cos(LatA)*sin(LatB)-sin(LatA)*cos(LatB)*cos(ΔLon)), ΔLon=LonB-LonA, ΔLat=LatB-LatA, LatA represents the average longitude of the first positioning receiver, LatA represents the average latitude of the first positioning receiver, LatB represents the average longitude of the second positioning receiver, and LonB represents the average latitude of the second positioning receiver.
4. The calibration method according to claim 3, characterized in that: From Δθ=θ deg -α determines the deviation angle Δθ that the electronic compass needs to correct, and α represents the angle value obtained by the electronic compass.
5. An electronic compass calibration system, characterized in that: include: A first positioning receiver, a second positioning receiver and a terminal, wherein the terminal is used to perform the following steps: Obtaining the longitude and latitude of a first location of a first positioning receiver and the longitude and latitude of a second location of a second positioning receiver; Obtaining a line angle value of a straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position; Obtaining an angle value of a straight line formed by the electronic compass pointing to the first positioning receiver and the second positioning receiver; The angle value obtained by the electronic compass is compared with the angle value of the line formed by the first positioning receiver and the second positioning receiver to determine the deviation angle that needs to be corrected for the electronic compass.
6. The calibration system according to claim 5, characterized in that: The method of obtaining the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver based on the longitude and latitude of the first position and the longitude and latitude of the second position includes: Calculate the average of the longitude and latitude of the first position and the longitude and latitude of the second position, calculate the difference between the average longitude of the first position and the average longitude of the second position, and the difference between the average latitude of the first position and the average latitude of the second position; Based on the difference between the average longitude of the first position and the average longitude of the second position, the difference between the average latitude of the first position and the average latitude of the second position obtains the line angle value of the straight line formed by the first positioning receiver and the second positioning receiver.
7. The calibration system according to claim 6, characterized in that: Depend on Get the line angle value θ of the straight line formed by the first positioning receiver and the second positioning receiver deg , where θ=arctan2((sin(ΔLon)*cos(LatB),cos(LatA)*sin(LatB)-sin(LatA)*cos(LatB)*cos(ΔLon)), ΔLon=LonB-LonA, ΔLat=LatB-LatA, LatA represents the average longitude of the first positioning receiver, LonA represents the average latitude of the first positioning receiver, LatB represents the average longitude of the second positioning receiver, and LonB represents the average latitude of the second positioning receiver.
8. The calibration system according to claim 7, characterized in that: From Δθ=θ deg -α determines the deviation angle Δθ that the electronic compass needs to correct, and α represents the angle value obtained by the electronic compass.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method according to any one of claims 1 to 4 when executed by a processor.
Citation Information
Patent Citations
Electronic compass calibrating method and terminal
CN104884895A
Magnetic declination measuring method based on high-precision electronic compass
CN113670283A
Correction system of electronic azimuth meter, electronic azimuth meter and portable terminal
JP2011122847A