CN112484710B - Target positioning method, device and equipment and storage medium - Google Patents

Target positioning method, device and equipment and storage medium Download PDF

Info

Publication number
CN112484710B
CN112484710B CN201910859099.3A CN201910859099A CN112484710B CN 112484710 B CN112484710 B CN 112484710B CN 201910859099 A CN201910859099 A CN 201910859099A CN 112484710 B CN112484710 B CN 112484710B
Authority
CN
China
Prior art keywords
target
direction data
pitch angle
data
angle
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.)
Active
Application number
CN201910859099.3A
Other languages
Chinese (zh)
Other versions
CN112484710A (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.)
Hangzhou Hikmicro Sensing Technology Co Ltd
Original Assignee
Hangzhou Hikmicro Sensing 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 Hangzhou Hikmicro Sensing Technology Co Ltd filed Critical Hangzhou Hikmicro Sensing Technology Co Ltd
Priority to CN201910859099.3A priority Critical patent/CN112484710B/en
Publication of CN112484710A publication Critical patent/CN112484710A/en
Application granted granted Critical
Publication of CN112484710B publication Critical patent/CN112484710B/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
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/42Determining position
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/30Assessment of water resources

Abstract

The invention provides a target positioning method, a device, equipment and a storage medium, wherein the method comprises the following steps: determining correction data for correcting the acquired direction data; acquiring collected first direction data, wherein the first direction data is used for representing the direction of a target object relative to an observation position, and correcting the first direction data according to the correction data to obtain target direction data; and positioning target position information of the target object according to the target direction data, the distance and the position information of the observation position, wherein the distance represents the distance between the observation position and the target object. The invention has higher positioning precision to the target object.

Description

Target positioning method, device and equipment and storage medium
Technical Field
The present invention relates to the field of positioning technologies, and in particular, to a method, an apparatus, a device, and a storage medium for positioning a target.
Background
In some situations, it is often desirable to locate a target object to meet requirements such as tracking the target object, avoiding the target object, aiming the target object, and the like. Taking the hunting scenario as an example, in the hunting scenario, once the target object is located, the target object may be further aimed or pursued.
However, in the conventional positioning method, although the target object can be simply positioned, positioning accuracy is often affected by factors such as the installation method and the position difference of the positioning device.
Disclosure of Invention
In view of the above, the present invention provides a target positioning method, apparatus, device, and storage medium, which have high positioning accuracy for a target object.
The first aspect of the present invention provides a target positioning method, which includes:
determining correction data for correcting the acquired direction data;
acquiring collected first direction data, wherein the first direction data is used for representing the direction of a target object relative to an observation position, and correcting the first direction data according to the correction data to obtain target direction data;
and positioning target position information of the target object according to the target direction data, the distance and the position information of the observation position, wherein the distance represents the distance between the observation position and the target object.
According to one embodiment of the invention, determining correction data for correcting acquired direction data comprises:
acquiring second direction data acquired when the electronic compass faces to a second preset position at a first preset position, wherein the distance between the first preset position and the observation position and the distance between the second preset position and the observation position are smaller than the set distance;
Acquiring locally configured third direction data, wherein the third direction data is used for representing the direction of a second preset position relative to a first preset position;
and determining correction data according to the second direction data and the third direction data.
According to an embodiment of the present invention, determining correction data from the second direction data and third direction data includes:
calculating a difference value between a second azimuth angle in the second direction data and a third azimuth angle in the third direction data to obtain a corrected azimuth angle;
calculating a difference value between a second pitch angle in the second direction data and a third pitch angle in the third direction data to obtain a corrected pitch angle;
and taking the corrected azimuth angle and the corrected pitch angle as the correction data.
According to one embodiment of the present invention, correcting the first direction data according to the correction data to obtain target direction data includes:
calculating the sum of the correction azimuth angle in the correction data and the first azimuth angle in the first direction data to obtain a reference azimuth angle, and determining a target azimuth angle according to the reference azimuth angle;
calculating the sum of the calibration pitch angle in the correction data and the first pitch angle in the first direction data to obtain a reference pitch angle, and determining a target pitch angle according to the reference pitch angle;
And determining the target azimuth angle and the target pitch angle as the target direction data.
According to one embodiment of the invention, determining the target azimuth from the reference azimuth comprises:
checking whether the reference azimuth angle is in a set azimuth angle value interval;
if yes, determining the reference azimuth as the target azimuth;
if not, carrying out first setting operation on the reference azimuth angle and a first set value to obtain the target azimuth angle, wherein the first set value is the maximum value of the set azimuth angle value interval.
According to one embodiment of the invention, determining the target pitch angle from the reference pitch angle comprises:
checking whether the reference pitch angle is in a set pitch angle value interval or not;
if yes, determining the reference pitch angle as the target pitch angle;
if not, when the reference pitch angle is smaller than a second set value, performing second setting operation on the reference pitch angle and the second set value to obtain the target azimuth angle; when the reference pitch angle is larger than a third set value, performing third setting operation on the reference pitch angle and the third set value to obtain the target azimuth angle;
The second set value is the minimum value of the set pitch angle value interval, and the third set value is the maximum value of the set pitch angle value interval.
According to one embodiment of the present invention, locating the target position information of the target object according to the target direction data, the distance, and the position information of the observation position includes:
converting the position information from the earth geodetic coordinate system to an earth rectangular coordinate system to obtain reference position information;
calculating candidate position information of the target object in the rectangular coordinate system of the earth according to the target direction data, the distance and the reference position information;
and converting the candidate position information from the rectangular earth coordinate system to the geodetic earth coordinate system to obtain the target position information.
A second aspect of the present invention provides a target positioning device, the device comprising:
a correction data determining module for determining correction data for correcting the collected direction data;
the direction data correction module is used for acquiring collected first direction data, wherein the first direction data are used for representing the direction of a target object relative to an observation position, and correcting the first direction data according to the correction data to obtain target direction data;
And the target position information positioning module is used for positioning the target position information of the target object according to the target direction data, the distance and the position information of the observation position, wherein the distance represents the distance between the observation position and the target object.
According to one embodiment of the present invention, when the correction data determining module determines correction data for correcting the collected direction data, the correction data determining module is specifically configured to:
acquiring second direction data acquired when the electronic compass faces to a second preset position at a first preset position, wherein the distance between the first preset position and the observation position and the distance between the second preset position and the observation position are smaller than the set distance;
acquiring locally configured third direction data, wherein the third direction data is used for representing the direction of a second preset position relative to a first preset position;
and determining correction data according to the second direction data and the third direction data.
According to one embodiment of the present invention, when the correction data determining module determines correction data according to the second direction data and the third direction data, the correction data determining module is specifically configured to:
calculating a difference value between a second azimuth angle in the second direction data and a third azimuth angle in the third direction data to obtain a corrected azimuth angle;
Calculating a difference value between a second pitch angle in the second direction data and a third pitch angle in the third direction data to obtain a corrected pitch angle;
and taking the corrected azimuth angle and the corrected pitch angle as the correction data.
According to an embodiment of the present invention, when the direction data correction module corrects the first direction data according to the correction data to obtain target direction data, the direction data correction module is specifically configured to:
calculating the sum of the correction azimuth angle in the correction data and the first azimuth angle in the first direction data to obtain a reference azimuth angle, and determining a target azimuth angle according to the reference azimuth angle;
calculating the sum of the calibration pitch angle in the correction data and the first pitch angle in the first direction data to obtain a reference pitch angle, and determining a target pitch angle according to the reference pitch angle;
and determining the target azimuth angle and the target pitch angle as the target direction data.
According to an embodiment of the present invention, when the direction data correction module determines the target azimuth according to the reference azimuth, the direction data correction module is specifically configured to:
checking whether the reference azimuth angle is in a set azimuth angle value interval;
If yes, determining the reference azimuth as the target azimuth;
if not, carrying out first setting operation on the reference azimuth angle and a first set value to obtain the target azimuth angle, wherein the first set value is the maximum value of the set azimuth angle value interval.
According to one embodiment of the present invention, the direction data correction module is specifically configured to, when determining the target pitch angle according to the reference pitch angle:
checking whether the reference pitch angle is in a set pitch angle value interval or not;
if yes, determining the reference pitch angle as the target pitch angle;
if not, when the reference pitch angle is smaller than a second set value, performing second setting operation on the reference pitch angle and the second set value to obtain the target azimuth angle; when the reference pitch angle is larger than a third set value, performing third setting operation on the reference pitch angle and the third set value to obtain the target azimuth angle;
the second set value is the minimum value of the set pitch angle value interval, and the third set value is the maximum value of the set pitch angle value interval.
According to an embodiment of the present invention, when the target location information locating module locates the target location information of the target object according to the target direction data, the distance and the location information of the observation location, the target location information locating module is specifically configured to:
Converting the position information from the earth geodetic coordinate system to an earth rectangular coordinate system to obtain reference position information;
calculating candidate position information of the target object in the rectangular coordinate system of the earth according to the target direction data, the distance and the reference position information;
and converting the candidate position information from the rectangular earth coordinate system to the geodetic earth coordinate system to obtain the target position information.
A third aspect of the invention provides an electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the target positioning method as described in the foregoing embodiment.
A fourth aspect of the invention provides a machine-readable storage medium having stored thereon a program which, when executed by a processor, implements an object localization method as described in the previous embodiments.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the correction data used for correcting the collected direction data can be determined first, after the collected first direction data is obtained, the first direction data can be corrected according to the determined correction data, so that the influence of the electronic compass on the collected direction data due to the installation error is reduced or removed, the target direction data which can more accurately represent the direction of the target object relative to the observation position is obtained, and the problem of positioning error caused by inaccurate collected direction data can be avoided; and then, according to the target direction data, the distance between the observation position and the target object and the position information of the observation position, the target position information of the target object is positioned, so that the positioning accuracy of the target object is higher, and the positioning mode is simpler.
Drawings
FIG. 1 is a flow chart of a target positioning method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of the connection between devices involved in an embodiment of the present invention;
FIG. 3 is a block diagram of an object positioning device according to an embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various devices, these information should not be limited by these terms. These terms are only used to distinguish one device from another of the same type. For example, a first device could also be termed a second device, and, similarly, a second device could also be termed a first device, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In order to make the description of the present invention clearer and more concise, some technical terms of the present invention are explained below:
pitch angle (Elevation angle): the angle of the target direction line "pitch" with respect to the XOY plane of the inertial coordinate system (which is the reference system where newton's law of motion holds, called the inertial reference system).
Magnetic declination (decrystallization): the magnetic noon at any point on the earth's surface is at an angle to the geographical noon.
Azimuth angle (Azimuth angle): the horizontal included angle between the clockwise direction from the north-pointing direction line of a certain point and the target direction line.
Roll angle (Bank angle): the angle between the horizontal axis of the object and the horizontal plane.
An electronic compass: and equipment capable of measuring and outputting pitch angle, azimuth angle and roll angle, wherein the measurement is influenced by geomagnetism.
GPS: global positioning system, a positioning device.
Laser ranging apparatus: distance measuring equipment for measuring distance by using a laser as a light source.
Longitude: the included angle of the meridian plane with the point on the ground is the same as the initial meridian plane.
Latitude: the angle between the normal of the ground surface and the equatorial plane is set by the point on the ground.
Elevation: the distance of a point from the absolute base in the direction of the plumb line.
The following describes the target positioning method according to the embodiments of the present invention in more detail, but the method is not limited thereto.
In one embodiment, referring to FIG. 1, a target positioning method comprises the steps of:
s100: determining correction data for correcting the acquired direction data;
s200: acquiring collected first direction data, wherein the first direction data is used for representing the direction of a target object relative to an observation position, and correcting the first direction data according to the correction data to obtain target direction data;
s300: and positioning target position information of the target object according to the target direction data, the distance and the position information of the observation position, wherein the distance represents the distance between the observation position and the target object.
The target positioning method of the embodiment of the invention can be applied to electronic equipment, and the electronic equipment can be imaging equipment. The imaging device may have a thermal imaging function and/or a visible light imaging function, and may observe the target object. For example, the imaging device may be a handheld thermal observer. When a target object is present in the field of view of the imaging device, the target object needs to be positioned.
The target object includes, for example, a person, a vehicle, a prey, and the like, and the specific type is not limited. For example, the target object is a prey, which is positioned to be aimed precisely when it enters the field of view of the electronic device.
Of course, the electronic device may also be other devices, as long as they have data processing capabilities.
Referring to fig. 2, the electronic device may be connected with an electronic compass, a ranging device, and a positioning device. The electronic compass, the distance measuring device and the positioning device can be assembled on the electronic device through the connecting structure, so that when the electronic device is at a certain position (observation position), the electronic compass, the distance measuring device and the positioning device are correspondingly at the position. Communication, such as transmission of instructions or data, can be performed between the electronic device and the electronic compass, the ranging device and the positioning device. Of course, the electronic device may also be provided with an electronic compass, a distance measuring device and a positioning device.
The electronic device, the electronic compass, the distance measuring device and the positioning device can be located at the same observation position. The observation position, i.e. the position at which the electronic device is used to discover the target object and locate the target object upon discovery. The observation position may be any position in the scene where target observation and localization are required.
In step S100, correction data for correcting the acquired direction data is determined.
The collected direction data may come from an electronic compass. Since there may be an installation error when the electronic compass is installed to the electronic device, there may be a certain error in the direction data collected by the electronic compass accordingly. Therefore, in the embodiment of the invention, correction data is introduced and can be used for correcting the direction data collected by the electronic compass, and the influence of the installation error on the accuracy of the direction data can be reduced or removed through the correction data.
In addition, the magnetic field changes due to the difference of the ground surface positions, and the installation errors are different in the collected direction data when the electronic compass is positioned at different positions. Thus, a correction for correcting the direction data collected by the electronic compass in the area where the corresponding observation position is located can be determined each time the area where the observation position is located is changed. That is, when the area where the observation position is located changes, the corresponding correction data can be newly determined.
The correction data can be recorded in the database after the correction data is determined, the correction data can be read from the database when the electronic equipment is started, then the correction data is recorded in a variable cache arranged on the electronic equipment, and then the correction data can be read from the variable cache. Of course, the correction data may also be generated during observation, and the correction data generated each time may be recorded in a variable buffer set by the electronic device, and then the correction data recorded in the variable buffer is recorded in the database.
The direction data collected by the electronic compass may include at least one of: pitch angle, azimuth angle, roll angle. Accordingly, the correction data may be used to correct one or more of pitch, azimuth, roll angle.
Because the electronic compass is interfered by the geomagnetic field, before the correction data for correcting the collected direction data is determined, the electronic compass can be calibrated according to the magnetic declination of the area where the observation position is located so as to weaken the influence of the magnetic interference on the direction data collected by the electronic compass. After the electronic compass completes calibration, correction data for correcting the direction data collected by the electronic compass is determined.
The magnetic declination of the area where the observation position is located can be inquired and obtained according to the geographical position of the appointed position in the area where the observation position is located, and the appointed position is not far away from any position including the observation position in the area where the observation position is located, so that the magnetic declination is basically consistent. For example, the position may be determined based on the longitude and latitude of the specified position in the area where the observed position is located. Specifically, the magnetic declination corresponding to the longitude and latitude of the appointed position in the area can be searched for in the appointed geographic website, and each longitude and latitude in the appointed geographic website has the corresponding magnetic declination. Of course, the declination can also be obtained by measurement, and the specific obtaining mode is not limited.
The geographical position of the area where the observation position is located can be obtained from the positioning device, and of course, the geographical position can also be obtained through other ways, and the specific way is not limited.
Calibration of an electronic compass is a magnetic disturbance compensation operation for an electronic compass. The azimuth angle is calculated according to the magnetic declination inside the electronic compass, so the magnetic declination can influence the acquisition of the azimuth angle of the electronic compass. The declination is different for different geographic locations, the farther apart the geographic locations are, the greater the declination phase difference and the greater the impact on azimuth angle. Therefore, the electronic compass is calibrated by utilizing the magnetic declination of the area where the observation position is located, the influence of the magnetic declination on the azimuth angle acquired by the electronic compass at the observation position can be reduced, and the accuracy of acquiring the azimuth angle by the electronic compass is improved.
Specifically, the procedure of calibrating the electronic compass according to the magnetic declination of the area where the observation position is located may be as follows:
firstly, the set magnetic declination in the electronic compass can be obtained first, when the set magnetic declination is different from the magnetic declination of the area where the observing position is located, the magnetic declination of the area where the observing position is located is written into the electronic compass, or the magnetic declination of the area where the observing position is located is adjusted to the magnetic declination of the area where the observing position is located by increasing or decreasing the set magnetic declination in the electronic compass.
Then, in order to avoid the influence of the previous calibration on the current calibration of the electronic compass, the electronic compass needs to be reset to restore the electronic compass to an uncalibrated state.
Next, the calibration mode of the electronic compass is selected, and may be a 12-point calibration mode (soft magnetic compensation and hard magnetic compensation may be implemented) or a 4-point calibration mode (hard magnetic compensation may be implemented). Taking a 12-point calibration mode as an example, in the 12-point calibration mode, twelve preset orientations are provided, each preset orientation has corresponding direction data (pitch angle, azimuth angle and roll angle), and when the electronic compass faces the twelve orientations respectively, calibration can be realized according to the corresponding direction data. The same applies to the 4-point calibration mode, except that the number of orientations and the corresponding number of direction data are different.
Then, controlling the electronic compass to enter a calibration mode; after the electronic compass enters the calibration mode, the following operations are performed:
judging whether the current cycle times are smaller than the selected calibration mode required times (12-point calibration mode required times are 12 times and 4-point calibration mode required times are 4 times);
if the current circulation times are smaller than the required times of the selected calibration mode, displaying direction data corresponding to the preset azimuth which the electronic compass faces, simultaneously displaying direction data collected by the electronic compass in real time, controlling the electronic compass to rotate so that the direction data collected by the electronic compass in real time reach the direction data corresponding to the preset azimuth, informing the electronic compass to record the current calibration quantity when the current circulation times are reached, entering the next circulation when the electronic compass successfully records the current calibration quantity, returning to the operation of judging whether the current circulation times are smaller than the required times of the selected calibration mode, and otherwise, exiting the control compass calibration mode;
and if the current cycle number is not less than the required number of the selected calibration mode, controlling the sum of all calibration amounts recorded by the statistics of the electronic compass, and returning a calibration result to the electronic equipment when the statistics of the electronic compass is completed, wherein the result comprises information indicating whether the calibration is successful or not and the sum of all calibration amounts.
The electronic device can analyze the calibration result returned by the electronic compass, judge whether the calibration is successful according to the information in the calibration result, prompt the sum of all calibration amounts if the calibration is successful, and send a command to control the electronic compass to exit the calibration mode.
Before the electronic compass is calibrated, the compass needs to be started, and the electronic equipment can control the starting of the electronic compass. When the electronic compass is turned on, the electronic device may check whether the electronic compass is turned on for the first time.
If the electronic compass is started for the first time, initializing the electronic compass, and then checking whether the acquisition function of the electronic compass is started by default; if the acquisition function of the electronic compass is not started by default, the electronic compass enters a dormant state after being started, and at the moment, identification information which indicates that data cannot be read from the electronic compass can be set in the electronic equipment; if the acquisition function of the electronic compass is started by default, the electronic compass enters an awake state after the electronic compass is started, and identification information representing that data can be read from the electronic compass can be set in the electronic equipment.
If the electronic compass is not first turned on, the electronic compass may not need to be initialized, but rather the data saved at the last power-off may be maintained. Therefore, the initialization times of the electronic compass can be reduced and the service life of the electronic compass can be prolonged under the condition that the electronic compass can be normally used.
After the electronic compass is started, the electronic equipment can determine whether data can be read from the electronic compass according to the set identification information; if so, the direction data (including pitch angle, azimuth angle and roll angle) collected by the electronic compass can be read from the electronic compass, and after waiting for a period of time, for example, 0.2s, the operation of determining whether the data can be read from the electronic compass according to the set identification information is returned; if not, the operation of directly waiting for a period of time, such as 0.2s, and then returning to the operation of determining whether the data can be read from the electronic compass according to the set identification information.
In step S200, acquired first direction data is acquired, where the first direction data is used to characterize a direction of a target object relative to an observation position, and the first direction data is corrected according to the correction data to obtain target direction data.
The first direction data may be direction data collected by the electronic compass at the observation position towards the target object, and may characterize the direction of the target object relative to the observation position. The specific information may be direction data collected by the electronic compass when the electronic compass observes a position and the identification part of the electronic compass faces the target object, and the identification part is a part of the electronic compass for identifying the north direction.
Alternatively, when the electronic compass is assembled to the electronic device, the identification portion of the electronic compass may be assembled to face the lens of the electronic device in the same direction. Thus, when the target is required to be positioned, for example, when the target object enters the field of view of the lens of the electronic device, the electronic compass can be directly controlled to acquire the first direction data.
When the first direction data is acquired, the electronic equipment can determine whether the data can be read from the electronic compass according to the set identification information, and if so, the first direction data currently acquired by the electronic compass can be read from the electronic compass. The first direction data may be cached in a direction data cache in the electronic device.
And correcting the first direction data according to the correction data after the first direction data are acquired to obtain target direction data. The target direction data is corrected data and is therefore more accurate than the first direction data.
However, the first direction data has a deviation due to a compass mounting error. In this embodiment, after the correction data is used to correct the first direction data, the deviation can be reduced, and the obtained target direction data can more accurately represent the direction of the target object relative to the observation position.
The correction of the first direction data in accordance with the correction data may include: and performing certain mathematical operation on the correction data and the first direction data to obtain target direction data. The mathematical operation process may include one of addition, subtraction, multiplication, division, or a combination of several.
In step S300, target position information of the target object is located according to the target direction data, the distance, and the position information of the observation position, where the distance represents a distance between the observation position and the target object.
When the target positioning is required, the distance between the observation position measured by the distance measuring equipment and the target object can be obtained.
The distance measuring device may measure a distance between the object and the distance measuring device. The distance measuring device may specifically be configured to measure a distance between the observation position and the target object when the detection portion of the distance measuring device is oriented towards the target object when the distance measuring device is located at the observation position.
The distance measuring device may be a laser distance measuring device that calculates a distance between an observation position and a target object by transmitting a laser signal and receiving a reflected laser signal, although the specific type is not limited thereto.
When the distance measuring device is assembled to the electronic device, the detection part of the distance measuring device and the lens of the electronic device can be assembled to face in the same direction. Thus, when the target object enters the field of view of the lens of the electronic device, the distance measuring device can be directly controlled to measure the distance, and the distance between the observation position and the target object is obtained.
The ranging device may remain dormant when not measuring and only wake up when a measurement is needed. Therefore, when ranging is needed, the electronic device needs to send a command to wake up the ranging device, wait for a period of time, for example, 0.25s, then send the ranging command again when the ranging device reaches a stable state, wait for a period of time, for example, 0.475s, then receive ranging information returned by the ranging device, and then control the ranging device to reenter the sleep state.
After the ranging device receives the ranging command, ranging is performed and ranging information of the measurement is returned. At the moment, the electronic equipment is in a state of constantly and circularly monitoring the ranging equipment, and when the ranging equipment returns ranging information, the electronic equipment receives ranging and analyzes the ranging information to obtain the distance. The distance may be stored in a distance cache in the electronic device for recall.
When the target positioning is required, the position information of the observation position positioned by the positioning equipment can be acquired.
The positioning device can be used to position the position information of the position where the positioning device is located, and the positioning device is located at the observation position, so that the position information of the observation position can be located.
The positioning device may be a GPS device, and may locate the longitude, latitude, altitude, etc. of the observed location. The positioning data collected by the GPS equipment has a certain data format, and the required information can be extracted from the positioning data to serve as position information, such as longitude, latitude and elevation, and can also include other data, and can represent the geographic position of the observed position. The location information may be recorded in the electronic device for recall. Of course, the specific apparatus is not limited to the above type either.
Optionally, before the electronic device obtains the position information of the observation position located by the locating device from the locating device, it may determine whether the on-off key state of the GPS device is an on state (i.e. whether the GPS device has been started). If the switch key state of the GPS equipment is in the on state, judging whether the GPS equipment is completely started; if not, an opening command can be sent to the GPS equipment to open the GPS equipment, then the current GPS data of the GPS equipment is read, and the position information is extracted from the GPS data; if so, the current GPS data of the GPS equipment can be directly read, and the position information can be extracted from the GPS data.
Of course, if the switch key state of the GPS device is the off state, it may be determined whether the GPS device is completely turned off, if not, a turn-off command may be sent to the GPS device to turn off the GPS device, and then wait to be turned on, and if so, wait to be turned on.
After the target direction data, the distance and the position information are obtained, the target position information of the target object can be positioned according to the target direction data, the distance and the position information.
The target direction data can accurately represent the direction relative to the target object, the distance is the distance between the observation position and the target object, and the position information can represent the observation position, so that the target position information of the target object can be positioned. In other words, knowing the distance between two points, the direction, and the position of one of the points, the position of the other point can be uniquely determined from these known information.
The target location information may include longitude, latitude, altitude, etc. where the target object is located, and the specific information type is not limited as long as the location where the target object is located can be characterized.
In the embodiment of the invention, the correction data used for correcting the collected direction data can be determined first, after the collected first direction data is obtained, the first direction data can be corrected according to the determined correction data, so that the influence of the electronic compass on the collected direction data due to the installation error is reduced or removed, the target direction data which can more accurately represent the direction of the target object relative to the observation position is obtained, and the problem of positioning error caused by inaccurate collected direction data can be avoided; and then, according to the target direction data, the distance between the observation position and the target object and the position information of the observation position, the target position information of the target object is positioned, so that the positioning accuracy of the target object is higher, and the positioning mode is simpler.
In one embodiment, the above method flow may be performed by the target positioning device, and as shown in fig. 3, the target positioning device 100 may include 3 modules: a correction data determination module 101, a direction data correction module 102, and a target position information positioning module 103. The correction data determining module 101 is configured to perform the above step S100, the direction data correcting module 102 is configured to perform the above step S200, and the target position information locating module 103 is configured to perform the above step S300.
In one embodiment, in step S100, determining correction data for correcting the acquired direction data includes:
s101: acquiring second direction data acquired when the electronic compass faces to a second preset position at a first preset position, wherein the distance between the first preset position and the observation position and the distance between the second preset position and the observation position are smaller than the set distance;
s102: acquiring locally configured third direction data, wherein the third direction data is used for representing the direction of a second preset position relative to a first preset position;
s103: and determining correction data according to the second direction data and the third direction data.
In step S101, second direction data acquired by the electronic compass when the first preset position faces the second preset position is acquired.
Because the distance between the first preset position and the observation position and the distance between the second preset position and the observation position are smaller than the set distance, the three geographies of the first preset position, the second preset position and the observation position can be considered to be relatively close, so that magnetic fields at three positions are almost similar, and correspondingly, the installation errors have almost similar influence on the direction data acquired by the electronic compass at the three positions.
The second direction data is the direction data collected by the electronic compass and represents the direction of the second preset position relative to the first preset position, but, in the same way as the first direction data, deviation caused by installation errors may exist. The deviation of the first direction data and the second direction data is the same or similar.
The electronic compass may be in a first preset position and oriented towards a second preset position (e.g. the identification part of the electronic compass is oriented towards the second preset position), in which case the collected direction data is used as second direction data.
In step S102, locally configured third direction data is acquired.
The third direction data is the direction data which is determined in advance and configured in the electronic equipment, and is not the direction data collected by the electronic compass. The third direction data may accurately characterize the direction of the second preset position relative to the first preset position with respect to the acquired second direction data.
The third direction data may be determined by, for example, acquiring first positioning data of a first preset position and second positioning data of a second preset position, where the first positioning data and the second positioning data may include longitude, latitude, and altitude, the first positioning data may uniquely determine the position of the first preset position, and the second positioning data may uniquely determine the position of the second preset position, so that the direction of the second preset position relative to the first preset position may be uniquely determined according to the first positioning data and the second positioning data, that is, third direction data may be calculated according to the first positioning data and the second positioning data. Since the third direction data is calculated, the third direction data does not have installation errors and is accurate.
Of course, the determination manner of the third direction data is not limited to the above manner, and may be determined by a manual measurement manner, for example.
In step S103, correction data is determined according to the second direction data and the third direction data.
The second direction data is direction data with errors, and the third direction data is direction data with higher accuracy, so that correction data can be determined according to the second direction data and the third direction data, for example, difference data between the second direction data and the third direction data can be calculated, and the calculated difference data is used as correction data.
In one embodiment, in step S103, determining correction data according to the second direction data and the third direction data may include the following steps:
calculating a difference value between a second azimuth angle in the second direction data and a third azimuth angle in the third direction data to obtain a corrected azimuth angle;
calculating a difference value between a second pitch angle in the second direction data and a third pitch angle in the third direction data to obtain a corrected pitch angle;
and determining the corrected azimuth angle and the corrected pitch angle as the correction data.
The second direction data at least comprises a second azimuth angle and a second pitch angle; the third direction data at least comprises a third azimuth angle and a third pitch angle. Correspondingly, the determined correction data comprise a correction azimuth angle and the correction pitch angle. Of course, the direction data may also include other data, such as roll angles, and thus, the three data may also include corresponding roll angles.
And calculating the difference between the second azimuth angle and the third azimuth angle to obtain a corrected azimuth angle as one data in the corrected data. And calculating the difference between the second pitch angle and the third pitch angle to obtain a corrected pitch angle, wherein the corrected pitch angle is used as another data in the corrected data. In this way, correction data including the corrected azimuth angle and the corrected pitch angle can be determined.
Of course, other manners may be used to determine the correction data according to the second direction data and the third direction data, for example, the calculated correction azimuth angle and the calculated correction pitch angle are multiplied by a scaling factor respectively and then used as the correction data, and the specific manner is not limited.
In one embodiment, in step S200, correcting the first direction data according to the correction data to obtain the target direction data may include the following steps:
s201: calculating the sum of the correction azimuth angle in the correction data and the first azimuth angle in the first direction data to obtain a reference azimuth angle, and determining a target azimuth angle according to the reference azimuth angle;
s202: calculating the sum of the calibration pitch angle in the correction data and the first pitch angle in the first direction data to obtain a reference pitch angle, and determining a target pitch angle according to the reference pitch angle;
s203: and determining the target azimuth angle and the target pitch angle as the target direction data.
The correction data includes at least: correcting azimuth angle and pitch angle. In this embodiment, since the installation error mainly affects the acquisition of azimuth angle and pitch angle of the electronic compass, only the azimuth angle and the pitch angle need to be corrected, and of course, the installation error can be actually determined according to the needs.
In step S201, a reference azimuth angle is obtained by calculating the sum of the correction azimuth angle in the correction data and the first azimuth angle in the first direction data, and a target azimuth angle is determined according to the reference azimuth angle.
The correction azimuth angle can embody the azimuth deviation of the electronic compass installation error on the first azimuth angle, so that the sum of the first azimuth angle and the correction azimuth angle is used for obtaining the reference azimuth angle, and the azimuth deviation caused by the installation error is overcome.
The azimuth angle generally corresponds to a range, such as not exceeding 360 degrees, but simply summing the first azimuth angle and the corrected azimuth angle, the resulting reference azimuth angle may be beyond this range, such as 20 degrees and 380 degrees, actually representing an azimuth, but 380 degrees are 360 degrees more than 20 degrees, so the target azimuth angle needs to be determined according to the reference azimuth angle, such as 380-360 degrees=20 degrees as the target azimuth angle.
In step S202, a reference pitch angle is obtained by calculating the sum of the calibration pitch angle in the correction data and the first pitch angle in the first direction data, and a target pitch angle is determined according to the reference pitch angle.
The correction pitch angle can embody the azimuth deviation of the electronic compass installation error on the first pitch angle, so that the sum of the first pitch angle and the correction pitch angle is used for obtaining the reference pitch angle, and the pitch deviation caused by the installation error is overcome.
The pitch angle generally corresponds to a range, for example, cannot be greater than 90 degrees, but simply summing the first pitch angle and the corrected pitch angle may result in a reference pitch angle that is outside of the range, for example, 20 degrees and 160 degrees, and actually represents the same pitch relationship, so that the target pitch angle needs to be determined according to the reference pitch angle, for example, 180-160 degrees=20 degrees is taken as the target pitch angle.
In step S203, the target azimuth angle and the target pitch angle are determined as the target direction data.
That is, the target direction data includes a target azimuth angle and a target pitch angle. Of course, the target direction data may also include other data, such as uncorrected roll angles, and the like.
In one embodiment, in step S201, determining the target azimuth according to the reference azimuth includes:
checking whether the reference azimuth angle is in a set azimuth angle value interval;
if yes, determining the reference azimuth as the target azimuth;
if not, carrying out first setting operation on the reference azimuth angle and a first set value to obtain the target azimuth angle, wherein the first set value is the maximum value of the set azimuth angle value interval.
The set azimuth interval may be custom or may be industry standard defined, specifically, the set azimuth interval is, for example, [0,360 ], including 0 but not including 360.
The maximum value and the minimum value of the set azimuth angle value interval can be set in the electronic device in advance. In this embodiment, the maximum value of the azimuth angle setting interval is set as the first setting value, and the minimum value of the azimuth angle setting interval is set as the fourth setting value.
When checking whether the reference azimuth is within the set azimuth value interval, it can be checked whether the reference azimuth satisfies the following condition: is greater than or equal to the fourth set value and less than the first set value. Of course, the actual conditions may be determined by the opening and closing of the section.
If the condition is satisfied, the reference azimuth angle can be determined to be in a set azimuth angle value interval, otherwise, the reference azimuth angle is determined not to be in the set azimuth angle value interval.
If the reference azimuth is in the set azimuth value interval, the reference azimuth can be directly determined as a target azimuth; if the reference azimuth is not in the set azimuth value interval, the first setting operation can be carried out on the reference azimuth and the first setting value to obtain the target azimuth.
The first setting operation may include, for example: and calculating the sum of the reference azimuth and the first set value to obtain a first sum value, performing remainder operation on the first sum and the first set value, and determining the absolute value of the remainder obtained by remainder as a target azimuth.
Taking the setting of the azimuth angle value interval as [0, 360) as an example, summing the corrected azimuth angle with the first azimuth angle in the first direction data to obtain a reference azimuth angle A; if the reference azimuth a is less than 360 degrees and equal to or greater than 0 degrees, the target azimuth=reference azimuth a; if a is 360 degrees or less, the target azimuth= | (reference azimuth a+360) is the remainder 360|.
In one embodiment, in step S202, determining the target pitch angle according to the reference pitch angle includes:
checking whether the reference pitch angle is in a set pitch angle value interval or not;
if yes, determining the reference pitch angle as the target pitch angle;
if not, when the reference pitch angle is smaller than a second set value, performing second setting operation on the reference pitch angle and the second set value to obtain the target azimuth angle; when the reference pitch angle is larger than a third set value, performing third setting operation on the reference pitch angle and the third set value to obtain the target azimuth angle;
The second set value is the minimum value of the set pitch angle value interval, and the third set value is the maximum value of the set pitch angle value interval.
The pitch angle setting interval can be custom or can be industry standard defined, specifically, the pitch angle setting interval is [ -90,90], including-90 degrees and 90 degrees.
The maximum value and the minimum value of the set pitch angle value interval may be set in the electronic device in advance. In this embodiment, the minimum value of the set pitch angle interval is set as the second set value, and the maximum value of the set pitch angle interval is set as the third set value.
When checking whether the reference pitch angle is in the set pitch angle value interval, it may be checked whether the reference pitch angle satisfies the following condition: the second set value is more than or equal to the third set value. Of course, the actual conditions may be determined by the opening and closing of the section.
If the condition is met, the reference pitch angle can be determined to be in the set pitch angle value interval, otherwise, the reference pitch angle is determined not to be in the set pitch angle value interval.
If the reference pitch angle is in the set pitch angle value interval, the reference pitch angle can be directly determined as the target pitch angle. If the reference pitch angle is not in the set pitch angle value interval, when the reference pitch angle is smaller than a second set value, performing second setting operation on the reference pitch angle and the second set value to obtain the target azimuth angle; and when the reference pitch angle is larger than a third set value, performing third setting operation on the reference pitch angle and the third set value to obtain the target azimuth angle.
The second setting operation may include, for example: and calculating the product of the second set value and the specified positive integer to obtain a first product value, and performing difference between the first product value and the reference pitch angle to obtain a target pitch angle.
The third setting operation may include, for example: and calculating the product of the third set value and the specified positive integer to obtain a second product value, and performing difference between the second product value and the reference pitch angle to obtain a target pitch angle.
Taking the setting pitch angle value interval as [ -90,90] as an example, summing the corrected pitch angle with the first pitch angle in the first direction data to obtain a reference pitch angle P; if the reference pitch angle P is 90 degrees or less and-90 degrees or more, the target pitch angle=the reference pitch angle P; if P is less than-90 degrees, the target pitch angle= -90 x 2-reference pitch angle P; if the reference pitch angle P is greater than 90 degrees, the target pitch angle=90×2—the reference pitch angle P.
In one embodiment, in step S500, locating the target position information of the target object according to the target direction data, the distance and the position information includes the following steps:
s501: converting the position information from the earth geodetic coordinate system to an earth rectangular coordinate system to obtain reference position information;
S502: calculating candidate position information of the target object in the rectangular coordinate system of the earth according to the target direction data, the distance and the reference position information;
s503: and converting the candidate position information from the rectangular earth coordinate system to the geodetic earth coordinate system to obtain the target position information.
In step S501, the position information is converted from the earth geodetic coordinate system to the earth rectangular coordinate system, so as to obtain reference position information.
The position information in the earth coordinate system can be converted into the reference position information in the earth coordinate system according to the conversion relation from the earth coordinate system to the earth coordinate system, and of course, the position information and the reference position information are only different in expression form, and the two represent the same geographic position.
The location information includes latitude B1, longitude L1, and altitude H1 of the observation location. The specific conversion manner of converting the position information from the earth geodetic system to the earth rectangular system may be as follows:
the length of the earth long half shaft is known as a= 6378137m, and the length of the short half shaft is known as b= 6356752m;
eccentricity calculation formula:
Figure BDA0002199180630000201
calculating a unitary mortise circle curvature radius N1 according to the latitude B1 in the position information:
Figure BDA0002199180630000202
The following three formulas are used as the conversion relation from the earth coordinate system to the earth rectangular coordinate system, and the latitude B1, the longitude L1 and the elevation H1 in the position information are converted into the earth rectangular coordinate system according to the three formulas to obtain the reference position information (Xs, ys, zs):
Xs=(N1+H1)*cos B1*cos L1;
Ys=(N1+H1)*cos B1*sin L1;
Zs=(N1(1-e 2 )+H1)*sin B1。
in step S502, candidate position information of the target object in the rectangular coordinate system of the earth is calculated according to the target direction data, the distance and the reference position information.
Candidate position information (Xt, yt, zt) is calculated according to the target direction data, the distance and the reference position information, and specifically, the candidate position information can be calculated by adopting the following three formulas:
Xt=Xs+D*(-sinB1*cosL1*cosA1-sinL1*cosP1*sinA1+cosB1*cosL1*sinP1);
Yt=Ys+D*(-sinB1*cosP1*cosA1+cosL1*cosP1*sinA1+cosB1*sinL1*sinP1);
Zt=Zs+distance*(cosP1*cosA1*cosB1+sinP1*sinB1)。
wherein D is distance, A1 is target azimuth angle in target direction data, P1 is target pitch angle in target direction data, and Xs, ys, zs are data of three coordinate axes of observation position along the rectangular coordinate system of the earth in reference position information respectively. Xt, yt, zt are data of the target object in the candidate position information along three coordinate axes in the rectangular coordinate system of the earth.
Since the positioning of the target object is generally represented by the position information in the geodetic coordinate system, step S503 is also performed. Of course, if only the position information in the geodetic system needs to be used for representation, the candidate position information may be directly used as the target position information.
In step S503, the candidate position information is converted from the rectangular earth coordinate system to the geodetic earth coordinate system, so as to obtain the target position information.
The candidate position information in the earth rectangular coordinate system can be converted into the target position information in the earth rectangular coordinate system according to the conversion relation from the earth rectangular coordinate system to the earth rectangular coordinate system, and of course, the candidate position information and the target position information are only different in expression form, and the two expression geographic positions are the same.
The following three formulas can be used as the conversion relation from the rectangular coordinate system of the earth to the geodetic coordinate system of the earth, and the candidate position information (Xt, yt, zt) is converted according to the three formulas to obtain the target position information:
Figure BDA0002199180630000211
Figure BDA0002199180630000221
Figure BDA0002199180630000222
here, the radius of curvature of the circle of mortise and tenon
Figure BDA0002199180630000223
The longitude L2, latitude B2, and altitude H2 of the target object are obtained as target position information of the target object. The target location information may be displayed on a display screen of the electronic device and/or applied on a mobile phone application or a computer application.
The present invention also provides an object positioning apparatus, referring to fig. 3, the object positioning apparatus 100 includes:
a correction data determination module 101 for determining correction data for correcting the collected direction data;
The direction data correction module 102 is configured to obtain collected first direction data, where the first direction data is used to characterize a direction of a target object relative to an observation position, and correct the first direction data according to the correction data to obtain target direction data;
and a target position information positioning module 103, configured to position target position information of the target object according to the target direction data, a distance, and position information of the observation position, where the distance represents a distance between the observation position and the target object.
In one embodiment, when the correction data determining module determines correction data for correcting the collected direction data, the correction data determining module is specifically configured to:
acquiring second direction data acquired when the electronic compass faces to a second preset position at a first preset position, wherein the distance between the first preset position and the observation position and the distance between the second preset position and the observation position are smaller than the set distance;
acquiring locally configured third direction data, wherein the third direction data is used for representing the direction of a second preset position relative to a first preset position;
and determining correction data according to the second direction data and the third direction data.
In one embodiment, the correction data determining module is specifically configured to, when determining the correction data according to the second direction data and the third direction data:
calculating a difference value between a second azimuth angle in the second direction data and a third azimuth angle in the third direction data to obtain a corrected azimuth angle;
calculating a difference value between a second pitch angle in the second direction data and a third pitch angle in the third direction data to obtain a corrected pitch angle;
and taking the corrected azimuth angle and the corrected pitch angle as the correction data.
In one embodiment, the direction data correction module is specifically configured to, when correcting the first direction data according to the correction data to obtain target direction data:
calculating the sum of the correction azimuth angle in the correction data and the first azimuth angle in the first direction data to obtain a reference azimuth angle, and determining a target azimuth angle according to the reference azimuth angle;
calculating the sum of the calibration pitch angle in the correction data and the first pitch angle in the first direction data to obtain a reference pitch angle, and determining a target pitch angle according to the reference pitch angle;
and determining the target azimuth angle and the target pitch angle as the target direction data.
In one embodiment, the direction data correction module is specifically configured to, when determining the target azimuth according to the reference azimuth:
checking whether the reference azimuth angle is in a set azimuth angle value interval;
if yes, determining the reference azimuth as the target azimuth;
if not, carrying out first setting operation on the reference azimuth angle and a first set value to obtain the target azimuth angle, wherein the first set value is the maximum value of the set azimuth angle value interval.
In one embodiment, the direction data correction module is specifically configured to, when determining the target pitch angle according to the reference pitch angle:
checking whether the reference pitch angle is in a set pitch angle value interval or not;
if yes, determining the reference pitch angle as the target pitch angle;
if not, when the reference pitch angle is smaller than a second set value, performing second setting operation on the reference pitch angle and the second set value to obtain the target azimuth angle; when the reference pitch angle is larger than a third set value, performing third setting operation on the reference pitch angle and the third set value to obtain the target azimuth angle;
The second set value is the minimum value of the set pitch angle value interval, and the third set value is the maximum value of the set pitch angle value interval.
In one embodiment, the target location information positioning module is specifically configured to, when positioning the target location information of the target object according to the target direction data, the distance, and the location information of the observation location:
converting the position information from the earth geodetic coordinate system to an earth rectangular coordinate system to obtain reference position information;
calculating candidate position information of the target object in the rectangular coordinate system of the earth according to the target direction data, the distance and the reference position information;
and converting the candidate position information from the rectangular earth coordinate system to the geodetic earth coordinate system to obtain the target position information.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements.
The invention also provides an electronic device, which comprises a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the target positioning method as described in the foregoing embodiment.
The embodiment of the object positioning device can be applied to electronic equipment. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions in a nonvolatile memory into a memory by a processor of an electronic device where the device is located for operation. In terms of hardware, as shown in fig. 4, fig. 4 is a hardware structure diagram of an electronic device where the target positioning apparatus 100 according to an exemplary embodiment of the present invention is located, and in addition to the processor 510, the memory 530, the interface 520, and the nonvolatile storage 540 shown in fig. 4, the electronic device where the apparatus 100 is located in the embodiment may further include other hardware according to the actual functions of the electronic device, which will not be described herein.
The present invention also provides a machine-readable storage medium having stored thereon a program which, when executed by a processor, implements the object localization method according to any of the preceding embodiments.
The present invention may take the form of a computer program product embodied on one or more storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Machine-readable storage media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of machine-readable storage media include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by the computing device.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the invention.

Claims (9)

1. A method of locating a target, the method comprising:
determining correction data for correcting the acquired direction data;
acquiring collected first direction data, wherein the first direction data is used for representing the direction of a target object relative to an observation position, and correcting the first direction data according to the correction data to obtain target direction data;
positioning target position information of the target object according to the target direction data, the distance and the position information of the observation position, wherein the distance represents the distance between the observation position and the target object;
wherein determining correction data for correcting the acquired direction data comprises:
acquiring second direction data acquired when the electronic compass faces to a second preset position at a first preset position, wherein the distance between the first preset position and the observation position and the distance between the second preset position and the observation position are smaller than the set distance;
acquiring locally configured third direction data, wherein the third direction data is used for representing the direction of a second preset position relative to a first preset position;
and determining correction data according to the second direction data and the third direction data.
2. The target positioning method of claim 1, wherein determining correction data based on the second direction data and third direction data comprises:
calculating a difference value between a second azimuth angle in the second direction data and a third azimuth angle in the third direction data to obtain a corrected azimuth angle;
calculating a difference value between a second pitch angle in the second direction data and a third pitch angle in the third direction data to obtain a corrected pitch angle;
and taking the corrected azimuth angle and the corrected pitch angle as the correction data.
3. The target positioning method according to claim 1, wherein correcting the first direction data according to the correction data to obtain target direction data comprises:
calculating the sum of the correction azimuth angle in the correction data and the first azimuth angle in the first direction data to obtain a reference azimuth angle, and determining a target azimuth angle according to the reference azimuth angle;
calculating the sum of the calibration pitch angle in the correction data and the first pitch angle in the first direction data to obtain a reference pitch angle, and determining a target pitch angle according to the reference pitch angle;
and determining the target azimuth angle and the target pitch angle as the target direction data.
4. A method of locating a target as claimed in claim 3, wherein determining the target azimuth from the reference azimuth comprises:
checking whether the reference azimuth angle is in a set azimuth angle value interval;
if yes, determining the reference azimuth as the target azimuth;
if not, carrying out first setting operation on the reference azimuth angle and a first set value to obtain the target azimuth angle, wherein the first set value is the maximum value of the set azimuth angle value interval.
5. A method of targeting as claimed in claim 3 wherein determining a target pitch angle from the reference pitch angle comprises:
checking whether the reference pitch angle is in a set pitch angle value interval or not;
if yes, determining the reference pitch angle as the target pitch angle;
if not, when the reference pitch angle is smaller than a second set value, performing second setting operation on the reference pitch angle and the second set value to obtain the target azimuth angle; when the reference pitch angle is larger than a third set value, performing third setting operation on the reference pitch angle and the third set value to obtain the target azimuth angle;
The second set value is the minimum value of the set pitch angle value interval, and the third set value is the maximum value of the set pitch angle value interval.
6. The target positioning method according to claim 1, wherein positioning target position information of the target object based on the target direction data, the distance, and the position information of the observation position, comprises:
converting the position information from an earth geodetic coordinate system to an earth rectangular coordinate system to obtain reference position information;
calculating candidate position information of the target object in the rectangular coordinate system of the earth according to the target direction data, the distance and the reference position information;
and converting the candidate position information from the rectangular earth coordinate system to the geodetic earth coordinate system to obtain the target position information.
7. A target positioning device, the device comprising:
a correction data determining module for determining correction data for correcting the collected direction data;
the direction data correction module is used for acquiring collected first direction data, wherein the first direction data are used for representing the direction of a target object relative to an observation position, and correcting the first direction data according to the correction data to obtain target direction data;
The target position information positioning module is used for positioning target position information of the target object according to the target direction data, the distance and the position information of the observation position, wherein the distance represents the distance between the observation position and the target object;
wherein determining correction data for correcting the acquired direction data comprises:
acquiring second direction data acquired when the electronic compass faces to a second preset position at a first preset position, wherein the distance between the first preset position and the observation position and the distance between the second preset position and the observation position are smaller than the set distance;
acquiring locally configured third direction data, wherein the third direction data is used for representing the direction of a second preset position relative to a first preset position;
and determining correction data according to the second direction data and the third direction data.
8. An electronic device, comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the object localization method as claimed in any one of claims 1-6.
9. A machine readable storage medium having stored thereon a program which, when executed by a processor, implements the object localization method of any one of claims 1-6.
CN201910859099.3A 2019-09-11 2019-09-11 Target positioning method, device and equipment and storage medium Active CN112484710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910859099.3A CN112484710B (en) 2019-09-11 2019-09-11 Target positioning method, device and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910859099.3A CN112484710B (en) 2019-09-11 2019-09-11 Target positioning method, device and equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112484710A CN112484710A (en) 2021-03-12
CN112484710B true CN112484710B (en) 2023-05-26

Family

ID=74920274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910859099.3A Active CN112484710B (en) 2019-09-11 2019-09-11 Target positioning method, device and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112484710B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501615B (en) * 2021-12-21 2024-04-12 网络通信与安全紫金山实验室 Terminal positioning method, terminal positioning device, computer equipment, storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103134489A (en) * 2013-01-29 2013-06-05 北京凯华信业科贸有限责任公司 Method of conducting target location based on mobile terminal
CN103197279A (en) * 2013-03-12 2013-07-10 中国矿业大学 Cooperative location system and location method for moving target
CN105452806A (en) * 2013-07-16 2016-03-30 莱卡地球系统公开股份有限公司 Laser tracker having target-seeking functionality
CN108981676A (en) * 2017-05-31 2018-12-11 莱卡地球系统公开股份有限公司 Geodesic survey
CN109313253A (en) * 2017-05-26 2019-02-05 苏州宝时得电动工具有限公司 Mobile object and its localization method, automatic working system, storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103134489A (en) * 2013-01-29 2013-06-05 北京凯华信业科贸有限责任公司 Method of conducting target location based on mobile terminal
CN103197279A (en) * 2013-03-12 2013-07-10 中国矿业大学 Cooperative location system and location method for moving target
CN105452806A (en) * 2013-07-16 2016-03-30 莱卡地球系统公开股份有限公司 Laser tracker having target-seeking functionality
CN109313253A (en) * 2017-05-26 2019-02-05 苏州宝时得电动工具有限公司 Mobile object and its localization method, automatic working system, storage medium
CN108981676A (en) * 2017-05-31 2018-12-11 莱卡地球系统公开股份有限公司 Geodesic survey

Also Published As

Publication number Publication date
CN112484710A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US7633610B2 (en) Method and device for image processing in a geodetic measuring instrument
JP5285299B2 (en) Correlation position determination
EP2312330B1 (en) Graphics-aided remote position measurement with handheld geodesic device
US9752863B2 (en) Calibration method for a device having a scan function
US6408251B1 (en) Calibrating a magnetic compass with an angular rate gyroscope and a global positioning system receiver
US8767072B1 (en) Geoposition determination by starlight refraction measurement
US8818722B2 (en) Rapid lidar image correlation for ground navigation
Ellum et al. The development of a backpack mobile mapping system
US7359038B1 (en) Passive determination of ground target location
US8049780B2 (en) Correction of calibration errors in an optical instrument
KR100587405B1 (en) Method of updating gis numerical map of surveying information structural facilities along road by using vehicle with gps receiver, laser measuring instrument and camera
CN104730802A (en) Optical axis included angle calibrating and focusing method and system and double-camera equipment
Hoff et al. Autocalibration of an electronic compass in an outdoor augmented reality system
JPH064023A (en) Track display device for navigation system
WO2020146102A1 (en) Robust lane association by projecting 2-d image into 3-d world using map information
US7842911B2 (en) Method for determination of the direction to an object to be surveyed by selecting only a portion of image information depicting the object for such direction determination
CN104011502A (en) Robotic leveling
CN112484710B (en) Target positioning method, device and equipment and storage medium
CN111426304B (en) Accurate attitude positioning method based on vision, satellite positioning and GIS algorithm
CN111678536A (en) Calibration method for calibrating magnetic declination of ground observation whistle and angle measurement system error of observation and aiming equipment
CN114019954B (en) Course installation angle calibration method, device, computer equipment and storage medium
CN112485767B (en) Radar calibration method and device
US20240069211A1 (en) Method for determining, using an optronic system, positions in a scene, and associated optronic system
CN102667401B (en) Electronic level
JP6428824B2 (en) Electronic azimuth meter, electronic timepiece, correction timing detection method for electronic azimuth meter, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant