Disclosure of Invention
The invention aims to overcome the defect of low GPS positioning precision of a logistics unmanned aerial vehicle in the prior art, and provides a multi-GPS positioning method, a multi-GPS positioning system, a multi-GPS positioning device and a multi-GPS positioning storage medium for the logistics unmanned aerial vehicle.
The invention solves the technical problems through the following technical scheme:
a multi-GPS positioning method of a logistics unmanned aerial vehicle, wherein the logistics unmanned aerial vehicle comprises at least two GPS, and the multi-GPS positioning method comprises the following steps:
acquiring positioning data of all the GPS in real time;
obtaining the value of the precision influence factor of each GPS according to the positioning data of each GPS;
calculating the weight of the GPS according to the values of the precision influence factors of all the GPS;
and obtaining the position of the logistics unmanned aerial vehicle according to the positioning data of all the GPS and the weight of each GPS.
Preferably, after the step of acquiring the positioning data of all GPS in real time, the multi-GPS positioning method further includes:
and judging whether the positioning data of each target GPS is three-dimensional data, if so, executing the step of calculating to obtain the weight of the GPS according to the values of the precision influence factors of all the GPS.
Preferably, the step of calculating the weight of the accuracy impact factor of each GPS according to the value of the accuracy impact factor of each GPS specifically includes:
the step of calculating the weight of the GPS according to the values of the accuracy impact factors of all the GPS specifically includes:
calculating the sum of squares of the values of the precision influence factors of all the GPS;
calculating a ratio of the sum of squares to a square of the value of the accuracy impact factor for each GPS;
normalizing the ratio;
taking the normalized ratio as the weight of the precision influence factor of the GPS;
and calculating the weight of each GPS according to the weight of the precision influence factor of the GPS.
Preferably, the number of the accuracy impact factors is 1, and the step of obtaining the weight of each GPS according to the weight of the accuracy impact factor of the GPS specifically includes:
and taking the weight of the precision influence factor of each GPS as the weight of the GPS.
Preferably, the number of the accuracy impact factors is at least two, and the step of obtaining the weight of the GPS according to the weight of the accuracy impact factor of each GPS specifically includes:
calculating an average value of the normalized ratios of all the precision influence factors of each GPS;
and taking the average value as the weight of the GPS.
Preferably, the precision impact factor includes at least one of a horizontal component precision factor, a vertical component precision factor, and a velocity component precision factor.
An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the multi-GPS positioning method for the logistics unmanned aerial vehicle described in any one of the above items when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the multi-GPS positioning method of a logistics drone of any one of the above.
A multi-GPS positioning system of a logistics unmanned aerial vehicle comprises at least two GPS, wherein the multi-GPS positioning system comprises a positioning data acquisition module, an accuracy influence factor acquisition module, a GPS weight calculation module and a position determination module;
the positioning data acquisition module is used for acquiring positioning data of all the GPS in real time;
the precision influence factor acquisition module is used for acquiring the value of the precision influence factor of each GPS according to the positioning data of each GPS;
the GPS weight calculation module is used for calculating the weight of each GPS according to the values of the precision influence factors of all the GPS;
the position determining module is used for obtaining the position of the logistics unmanned aerial vehicle according to the positioning data of all the GPS and the weight of each GPS.
Preferably, the multi-GPS positioning system further includes a judgment module;
the judging module is used for judging whether the positioning data of each target GPS is three-dimensional data, and if so, executing the step of calculating the weight of the target GPS according to the positioning data of all the GPS.
Preferably, the GPS weight calculation module further includes a first calculation unit, a normalization unit, and a precision influence factor weight calculation unit;
the first calculation unit is used for calculating the square sum of the values of the precision influence factors of all the GPS and calculating the ratio of the square sum to the square of the value of the precision influence factor of each GPS;
the normalization unit is used for normalizing the ratio;
the precision influence factor weight calculation unit is used for taking the normalized ratio as the weight of the precision influence factor of the GPS;
and the GPS weight calculation module is used for calculating the weight of the GPS according to the weight of the precision influence factor of each GPS.
Preferably, the number of the accuracy impact factors is 1, and the GPS weight calculation module is configured to use the weight of the accuracy impact factor of each GPS as the weight of the GPS.
Preferably, the number of the accuracy impact factors is at least two, and the GPS weight calculation module further includes a second calculation unit;
the second calculating unit is used for calculating the average value of the normalized ratio of all the precision influence factors of each GPS;
the GPS weight calculation module is used for taking the average value as the weight of the GPS.
Preferably, the precision impact factor includes at least one of a horizontal component precision factor, a vertical component precision factor, and a velocity component precision factor.
The positive progress effects of the invention are as follows: according to the method, the positioning data of all the GPS are acquired in real time through the combination of the plurality of GPS, the weight of each GPS is further acquired according to the value of the precision influence factor acquired from the positioning data, and the positioning data and the weight of each GPS are comprehensively considered to acquire the position of the logistics unmanned aerial vehicle, wherein compared with subjectively giving weights to different GPS and then acquiring the final positioning data, the method has the advantages that the weight of the GPS obtained through value analysis of the precision influence factor is more accurate, and the positioning precision is higher and more objective in the calculation of subsequent positioning data.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
A multi-GPS positioning method for a logistics unmanned aerial vehicle, the logistics unmanned aerial vehicle comprising at least two GPS, as shown in fig. 1, the multi-GPS positioning method comprising:
step 11, acquiring positioning data of all the GPS in real time;
step 12, obtaining the value of the precision influence factor of each GPS according to the positioning data of each GPS;
step 13, calculating the weight of the GPS according to the values of the precision influence factors of all the GPS;
and step 14, obtaining the position of the logistics unmanned aerial vehicle according to the positioning data of all the GPS and the weight of each GPS.
It should be noted that, after the weight of each GPS is obtained, the positioning data of the GPS with the largest weight coefficient can be selected and the position of the unmanned logistics vehicle can be further obtained, or the data of each GPS can be considered comprehensively, that is, the positioning data of each GPS is multiplied by the weight coefficient, and then the positioning data and the weight of each GPS are summed up and further the position of the unmanned logistics vehicle can be obtained, or the positioning data and the weight of each GPS can be considered comprehensively in other possible combination modes to obtain more accurate positioning data, so that the position of the unmanned logistics vehicle can be obtained more accurately.
As shown in fig. 2, step 13 specifically includes:
step 131, calculating the sum of squares of the values of the precision influence factors of all the GPS;
step 132, calculating the ratio of the sum of squares to the square of the value of the accuracy impact factor for each GPS;
step 133, normalizing the ratio;
step 134, taking the normalized ratio as the weight of the precision influence factor of each GPS;
and 135, calculating the weight of the GPS according to the weight of the precision influence factor of each GPS.
Additionally, the precision impact factor includes at least one of a horizontal component precision factor, a vertical component precision factor, and a velocity component precision factor;
if the accuracy impact factor is 1, a specific implementation manner of step 135 is provided:
taking the weight of the accuracy influence factor of each GPS as the weight of each GPS;
the accuracy impact factor is at least 2, providing step 135 another embodiment:
and calculating the average value of the normalized ratio of all the precision influence factors of each GPS, and taking the average value as the weight of each GPS.
The following is a specific example for further explanation: for example, Ublox-M8N (a GPS module).
Firstly, acquiring positioning data of all GPS in real time;
the required original data is obtained from UBX-NAV protocol.
Secondly, calculating the weight of each GPS according to the positioning data
Selecting a precision influence factor, in this embodiment, selecting a horizontal component precision factor, a vertical component precision factor and a speed component precision factor;
1. calculating a weight for each accuracy impact factor for each GPS
(1) Obtaining a value HDOP of a horizontal component precision factor for each GPSiThe value of the vertical component precision factor VDOPiAnd the value of the velocity component precision factor ACCURACYi
From the raw data, the horizontal accuracy factor value, the vertical component accuracy factor value, and the velocity component accuracy factor value of the GPS (1) at the same time are 0.7, 1.2, and 0.1, respectively. The horizontal accuracy factor of the GPS (2) is 0.2, the vertical component accuracy factor is 0.6, and the velocity component accuracy factor is 0.1.
(2) The sum of squares HP, VP, and VV of the values of the horizontal component, vertical component, and velocity component precision factors for all GPS's are calculated respectively
(3) Respectively calculating the weight of each precision influence factor of each GPS
ACCURACY weight of GPS (1)
ACCURACY weight of GPS (2)
Thirdly, calculating the weight of each GPS according to the weight of the precision influence factor of the GPS
Fourthly, obtaining the position of the logistics unmanned aerial vehicle according to the positioning data of all the GPS and the weight of each GPS
After the weight of each GPS is calculated, the position of the drone can be further obtained according to the raw data output by each GPS in real time, taking horizontal position data and speed data as an example, where GPS1_ V, GPS2_ V is the raw speed data output by GPS (1) and GPS (2), GPS1_ X, GPS2_ X is the raw horizontal position data output by GPS (1) and GPS (2), and further obtaining the horizontal position value and speed value of the drone is:
Jx=W1×GPS1_X+W2×GPS2_X
JV=W1×GPS1_V+W2×GPS2_V
it should be noted that the above calculation method for calculating the position of the drone according to the obtained weight is not limited to the above calculation method, and the output value of the GPS with the largest weight coefficient may be selected as the position of the drone, or other possible calculation methods, and the function and the application range of the embodiment of the present invention should not be limited at all.
In this embodiment, through the combination of a plurality of GPS, acquire all GPS's positioning data in real time, according to the value of the precision influence factor who acquires in the positioning data, further obtain every GPS's weight, the positioning data and the weight of considering every GPS again comprehensively obtain commodity circulation unmanned aerial vehicle's position, wherein, with subjective GPS to different reacquires final positioning data to give the weight and compare, the weight that obtains GPS through the value analysis of precision influence factor is more accurate, positioning accuracy is also higher also more objective in the calculation of follow-up positioning data.
Example 2
The multiple GPS positioning method of the logistics unmanned aerial vehicle of the embodiment is further improved on the basis of the embodiment 1, and after step 11, the multiple GPS positioning method further includes:
judging whether the positioning data of each target GPS is three-dimensional data, if not, setting the weight of the target GPS to be 0; and if so, executing the step of calculating the weight of the target GPS according to the positioning data.
It should be noted that the three-dimensional data refers to a positioning state of the GPS, and before obtaining the positioning data of the GPS and performing weight calculation, the positioning state of the GPS is determined, and the positioning state of the GPS is required to be at least three-dimensional data, and a flag indicating whether the positioning is three-dimensional data exists in a GSA protocol of the GPS, and if the positioning is three-dimensional data, 3 is output.
In this embodiment, when selecting the data of GPS, judge in advance whether the data of the GPS of selecting is three-dimensional data, if not, then set the weight of the GPS of selecting at present to 0, this GPS's positioning data does not influence commodity circulation unmanned aerial vehicle's position when final definite commodity circulation unmanned aerial vehicle's positioning data promptly.
Example 3
An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the method for multi-GPS positioning of a logistics drone as described in any one of embodiments 1 or 2.
Fig. 3 is a schematic structural diagram of an electronic device according to embodiment 3 of the present invention. FIG. 3 illustrates a block diagram of an exemplary electronic device 30 suitable for use in implementing embodiments of the present invention. The electronic device 30 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 3, the electronic device 30 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting the various system components, including the memory 32 and the processor 31.
The bus 33 includes a data bus, an address bus, and a control bus.
The memory 32 may include volatile memory, such as Random Access Memory (RAM)321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program tool 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 31 executes various functional applications and data processing by running a computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through input/output (I/O) interfaces 35. Also, the electronic device 30 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 36. Network adapter 36 communicates with the other modules of electronic device 30 via bus 33. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module, according to embodiments of the application. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 4
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the multi-GPS positioning method of a logistics drone described in any one of embodiments 1 or 2.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code for causing a terminal device to execute the steps of implementing the multi-GPS positioning method for the logistics drone described in any one of embodiments 1 or 2 when the program product runs on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
Example 5
A multi-GPS positioning system of a logistics unmanned aerial vehicle comprises at least two GPS, as shown in figure 4, the multi-GPS positioning system comprises a positioning data acquisition module 1, a precision influence factor acquisition module 2, a GPS weight calculation module 3 and a position determination module 4;
the positioning data acquisition module 1 is used for acquiring positioning data of the GPS in real time;
the precision influence factor acquisition module 2 is used for acquiring the value of the precision influence factor of each GPS according to the positioning data of each GPS;
the GPS weight calculation module 3 is used for calculating the weight of each GPS according to the values of the precision influence factors of all the GPS;
and the position determining module 4 is used for obtaining the position of the logistics unmanned aerial vehicle according to the positioning data of all the GPS and the weight of each GPS.
In the present embodiment, the GPS weight calculation module 3 includes a first calculation unit 21, a normalization unit 22, and a precision influence factor weight calculation unit 23;
the first calculating unit 21 is configured to calculate a sum of squares of the values of the accuracy impact factors of all the GPS, and calculate a ratio of the sum of squares to the value of the accuracy impact factor of each GPS;
the normalization unit 22 is configured to perform normalization processing on the ratio;
the precision influence factor weight calculation unit 23 is configured to use the normalized ratio as the weight of the precision influence factor of each GPS;
the GPS weight calculation module 3 is used for calculating the weight of the GPS according to the weight of the precision influence factor of each GPS.
In this embodiment, the precision influence factor includes at least one of a horizontal component precision factor, a vertical component precision factor, and a velocity component precision factor;
if the number of the precision influence factors is 1, the GPS weight calculation module 3 is used for taking the weight of the precision influence factor of each GPS as the weight of each GPS;
if the accuracy impact factors are 2 or more than 2, as shown in fig. 5, fig. 5 provides another multi-GPS positioning system for the logistics unmanned aerial vehicle, and the GPS weight calculation module 3 further includes a second calculation unit 24;
the second calculating unit 24 is configured to calculate an average value of the normalized ratios of all the accuracy impact factors of each GPS;
the GPS weight calculation module 3 is configured to use the average value as a weight of each GPS.
In this embodiment, through the combination of a plurality of GPS, acquire all GPS's positioning data in real time, according to the value of the precision influence factor who acquires in the positioning data, further obtain every GPS's weight, the positioning data and the weight of considering every GPS again comprehensively obtain commodity circulation unmanned aerial vehicle's position, wherein, with subjective GPS to different reacquires final positioning data to give the weight and compare, the weight that obtains GPS through the value analysis of precision influence factor is more accurate, positioning accuracy is also higher also more objective in the calculation of follow-up positioning data.
Example 6
The multi-GPS positioning system of the logistics unmanned aerial vehicle of the embodiment is further improved on the basis of the embodiment 5, as shown in fig. 6, the multi-GPS positioning system further includes a judgment module 5;
the judging module 5 is configured to judge whether the positioning data of each target GPS is three-dimensional data, and if not, set the weight of the target GPS to 0; if yes, the GPS weight calculation module 3 is invoked to perform an operation of calculating the weight of the GPS with the weight not 0 from the positioning data of the GPS with the weight not 0.
In this embodiment, when selecting the data of the GPS, it is judged in advance whether the currently selected data of the GPS is three-dimensional data, and if not, the weight of the currently selected GPS is set to 0, that is, the data of the GPS is not taken into consideration when the positioning data of the logistics unmanned aerial vehicle is finally determined.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.