Astronomical positioning methods, astronomical positioning devices, and computer-readable storage media
Patent Information
- Application Number
- CN202610663010.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-14
- Publication Date
- 2026-08-18
AI Technical Summary
但该定位方法需要获取多时刻太阳高度角和太阳方位角,定位不及时的同时,增大计算量
[0009] As can be seen from the above scheme, multiple candidate coordinate values are obtained from calculating a single actual solar azimuth and actual solar altitude angle. Through reverse authentication, the true candidate coordinate value is determined, eliminating ambiguity and addressing the inherent uncertainty of multiple solutions in single-moment observations. Magnetic declination is used for querying and correcting the true azimuth angle, thus iteratively repositioning and ensuring the self-consistency of the magnetic azimuth to true azimuth conversion, resolving some of the systematic errors in astronomical positioning under magnetic azimuth observations. Since only the actual solar azimuth and actual solar altitude angle at a single moment are needed, there is no need to wait 2-3 hours for a second observation to obtain actual solar azimuth and actual solar altitude angles at multiple moments. Instantaneous single-moment positioning can be achieved without requiring extensive data processing for actual solar azimuth and actual solar altitude angles at multiple moments, meeting practical navigation requirements.
Smart Images

Figure CN122590845A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of autonomous navigation, specifically to an astronomical positioning method, an astronomical positioning device, and a computer-readable storage medium. Background Technology
[0002] Current navigation technologies typically obtain latitude and longitude positions through Global Navigation Satellite System (GNSS). However, because satellite signals are susceptible to electromagnetic interference, which can cause them to malfunction, users cannot obtain latitude and longitude positions through GNSS.
[0003] Traditional astronomical navigation methods rely on observing the solar altitude angle and solar azimuth angle at multiple times to eliminate the ambiguity of single-parameter positioning, resulting in insufficient real-time positioning. In addition, observing the solar altitude angle and solar azimuth angle at multiple times increases the computational load. Furthermore, a single observation of the solar altitude angle or solar azimuth angle can only constrain the observer to be located on a certain isopleth line on the Earth's surface, and cannot uniquely determine latitude and longitude.
[0004] An existing autonomous positioning method based on time-series polarized light fields utilizes a polarized light sensor to acquire a time-series polarized light field. This is combined with a sequence of solar position measurements calculated using a magnetic compass, including solar altitude angle measurements and azimuth angle measurements relative to magnetic north. Then, using a certain network density, the method traverses global latitude and longitude, employing a solar calendar and a global geomagnetic model to calculate the solar altitude angle and azimuth angle relative to magnetic north at each latitude and longitude grid point at each data acquisition time, constructing a fitting database. A loss function based on the time-series solar position is established, defining the distance between the measured and calculated solar positions at a given time. Finally, the latitude and longitude corresponding to the minimum loss function are calculated based on the fitting database. However, this positioning method requires acquiring solar altitude and azimuth angles at multiple times, leading to both delayed positioning and increased computational complexity. Summary of the Invention
[0005] The primary objective of this invention is to provide an astronomical positioning method that can provide timely location information while reducing computational load.
[0006] A second objective of the present invention is to provide an astronomical positioning device that uses the above-described astronomical positioning method.
[0007] A second objective of this invention is to provide a computer-readable storage medium that applies the above-described astronomical positioning method.
[0008] To achieve the first objective of this invention, the astronomical positioning method provided by this invention is applied to an astronomical positioning device. The method includes: acquiring the actual solar azimuth and actual solar altitude angle at the current moment, and calculating multiple candidate coordinate values; calculating the theoretical solar azimuth and theoretical solar altitude angle corresponding to the candidate coordinate values based on the multiple candidate coordinate values, comparing the theoretical solar azimuth with the actual solar azimuth, comparing the theoretical solar altitude angle with the actual solar altitude angle, and filtering the initial coordinate values from the candidate coordinate values; inputting the initial coordinate values or a preset magnetic declination into a residual function to calculate a residual value, calculating a corrected coordinate value or a corrected magnetic declination based on the residual value, iteratively calculating the corrected coordinate value or the corrected magnetic declination until the residual value is less than a preset threshold, and outputting the final coordinate value.
[0009] As can be seen from the above scheme, multiple candidate coordinate values are obtained from calculating a single actual solar azimuth and actual solar altitude angle. Through reverse authentication, the true candidate coordinate value is determined, eliminating ambiguity and addressing the inherent uncertainty of multiple solutions in single-moment observations. Magnetic declination is used for querying and correcting the true azimuth angle, thus iteratively repositioning and ensuring the self-consistency of the magnetic azimuth to true azimuth conversion, resolving some of the systematic errors in astronomical positioning under magnetic azimuth observations. Since only the actual solar azimuth and actual solar altitude angle at a single moment are needed, there is no need to wait 2-3 hours for a second observation to obtain actual solar azimuth and actual solar altitude angles at multiple moments. Instantaneous single-moment positioning can be achieved without requiring extensive data processing for actual solar azimuth and actual solar altitude angles at multiple moments, meeting practical navigation requirements.
[0010] In a further scheme, the steps for comparing the theoretical solar azimuth angle with the actual solar azimuth angle include: calculating the first difference between the theoretical solar azimuth angle and the actual solar azimuth angle; the steps for comparing the theoretical solar altitude angle with the actual solar altitude angle include: calculating the second difference between the actual solar altitude angle and the theoretical solar altitude angle.
[0011] In a further proposed solution, the steps for selecting initial coordinate values from candidate coordinate values include: determining whether a first difference is less than a first preset value and whether a second difference is less than a second preset value; if so, then the candidate coordinate values corresponding to the theoretical solar altitude angle and theoretical solar azimuth angle where the first difference is less than the first preset value and the second difference is less than the second preset value are taken as the first initial coordinate values; determining whether the number of first initial coordinate values is greater than one, then obtaining the actual magnetic inclination angle, inputting the first initial coordinate values into the geomagnetic model to calculate the theoretical magnetic inclination angle, calculating the magnetic inclination angle difference between each theoretical magnetic inclination angle and the actual magnetic inclination angle, and selecting the first initial coordinate value corresponding to the smallest magnetic inclination angle difference as the initial coordinate value.
[0012] Therefore, by comparing the theoretical solar azimuth angle with the actual solar azimuth angle, candidate coordinate values can be screened. Then, by comparing the actual magnetic inclination angle with the theoretical magnetic inclination angle, the inherent uncertainty of multiple solutions in observations at a single moment can be resolved.
[0013] In a further embodiment, the residual function includes a first residual function; the first residual function includes a first component and a second component, the first component being the residual value of the solar altitude angle obtained by subtracting the current corrected solar altitude angle from the corrected solar altitude angle, and the second component being the residual value of the solar azimuth angle obtained by subtracting the current corrected solar azimuth angle from the corrected solar azimuth angle and adding the corrected magnetic declination, wherein the corrected solar altitude angle and the corrected solar azimuth angle are calculated from the corrected coordinate values, the residual value of the solar altitude angle and the residual value of the solar azimuth angle are the first residual value, and the corrected magnetic declination is obtained by inputting the corrected solar azimuth angle into the geomagnetic model; the initial coordinate values are input into the residual function for calculation. The steps for obtaining the residual value include: inputting the initial coordinate value as the corrected coordinate value into the first residual function to calculate the first residual value of the initial coordinate value; iteratively calculating the corrected coordinate value until the residual value is less than a preset threshold, including: determining whether the first residual value of the initial coordinate value is less than the first preset threshold; if the first residual value of the initial coordinate value is greater than the first preset threshold, then calculating the numerical Jacobian matrix, calculating the coordinate increment value according to the LM algorithm, calculating the corrected coordinate value according to the coordinate increment value; inputting the corrected coordinate value into the first residual function to calculate the first residual value and determining whether the first residual value is less than the first preset threshold.
[0014] Therefore, by constructing a first residual function, which includes magnetic declination calculation, and using numerical Jacobian matrix calculation to achieve magnetic declination gradient propagation, the global optimal solution search under magnetic orientation input can be realized.
[0015] In a further embodiment, the residual function includes a second residual function; the second residual function is obtained by subtracting the current magnetic declination from the corrected magnetic declination, wherein the corrected magnetic declination is calculated by determining the corrected azimuth angle based on the current magnetic declination, calculating the corrected coordinate value based on the corrected azimuth angle, and inputting the corrected coordinate value into the geomagnetic model to obtain the corrected magnetic declination; the step of inputting the initial coordinate value into the residual function to obtain the residual value includes: setting a first preset magnetic declination and a second preset magnetic declination, and using the first preset magnetic declination as the current azimuth angle as input into the second residual function to calculate the second residual of the first preset magnetic declination. The step of iteratively calculating the corrected magnetic declination until the residual value is less than a preset threshold includes: determining whether the second residual value of the first preset magnetic declination is less than the preset threshold; if it is not less than the preset threshold, calculating the latest corrected magnetic declination using linear interpolation based on the second residual value of the first preset magnetic declination and the second residual value of the second preset magnetic declination; and using the latest corrected magnetic declination as the corrected magnetic declination input to the second residual function to calculate the second residual value of the latest corrected magnetic declination.
[0016] Therefore, reducing two-dimensional position optimization to single-variable magnetic declination root finding and using the secant method for fast convergence is suitable for embedded resource-constrained scenarios, forming a complementary strategy of accuracy and efficiency with the iterative correction method.
[0017] In a further proposed solution, after filtering the initial coordinate values from the candidate coordinate values, the following steps are performed: obtaining the current astronomical positioning device, determining whether the current astronomical positioning device is a navigation platform, and if so, using the first residual function for calculation; if the current astronomical positioning device is not a navigation platform, using the second residual function for calculation.
[0018] Therefore, it can be seen that current astronomical positioning devices may be mobile phones, embedded chips, etc., with relatively poor computing power; while navigation platforms are servers with strong computing power, provided for users. They have strong computing power and select the appropriate calculation method based on the current astronomical positioning device, thereby satisfying the computing needs of multiple devices.
[0019] To achieve the second objective, the astronomical positioning device provided by the present invention includes a processor and a memory. The memory stores a computer program, and when the computer program is executed, it implements the above-described astronomical positioning method.
[0020] To achieve the third objective, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the aforementioned astronomical positioning method. Attached Figure Description
[0021] Figure 1 This is a system structure block diagram of an embodiment of the astronomical positioning device of the present invention.
[0022] Figure 2 This is a flowchart of an embodiment of the astronomical positioning method of the present invention.
[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments. Detailed Implementation
[0024] The astronomical positioning method provided by this invention obtains the solar altitude angle and solar azimuth angle at a single moment, performs reverse verification and magnetic inclination calculation on the multiple solutions obtained, thereby obtaining a unique solution, and then obtains accurate coordinate values through magnetic declination correction.
[0025] Example of an astronomical positioning device: The astronomical positioning device in this embodiment includes a processor 1, a data collection module 3, and a memory 2. The data collection module 3 includes a temperature sensor, a barometric pressure sensor, a local clock, an optical sensor, a magnetometer, a gyroscope, a camera, and an accelerometer. The temperature sensor measures temperature, the barometric pressure sensor measures barometric pressure, and the local clock obtains the local time. The optical sensor and camera obtain the solar altitude angle. The accelerometer, gyroscope, and magnetometer jointly calculate the heading angle, and this heading angle, plus the deviation angle corrected by the camera's optical correction, is the solar azimuth angle. The accelerometer measures the gravity vector, and the magnetometer obtains the magnetic field vector; the angle between the gravity vector and the magnetic field vector is the magnetic inclination angle. The processor 1 acquires the data from the data collection module 3, calculates the current final coordinate value, and thus obtains the current latitude and longitude. The memory 2 stores a computer program, and the processor 1 executes the computer program to implement the method of this astronomical positioning method embodiment.
[0026] Example of astronomical positioning method: First, step S1 is executed to obtain the actual solar azimuth and solar altitude angles at the current moment, and multiple candidate coordinate values are calculated. The solar altitude angle is obtained by image analysis from an optical sensor or camera. The solar azimuth angle is obtained by adding the deviation angle after optical correction from the camera, calculated jointly by an accelerometer, gyroscope, and magnetometer. In calculating the multiple candidate coordinate values, a direct solution method using spherical geometry is used. Let the geographical coordinates of the subsolar point be (…). ,λs), where Let λ be the solar declination, λs be the solar right ascension, and the actual solar azimuth angle be A and the solar altitude angle be h (with true north as the reference, clockwise is positive). In the celestial coordinate system, the observer's position P, the celestial north pole N, and the subsolar point G form a spherical triangle NPG. Based on spherical trigonometry, constraint equations are first established. , where K is an auxiliary discriminant obtained by projecting the spherical trigonometric relationship between the observer, the sun, and the celestial north pole onto a certain great circle plane using the spherical sine theorem. Let z be the zenith distance, and an effective solution exists when |K|≤1. Let the formula... Then we get the formula This yields two longitude solutions: Where Δλ is a candidate longitude solution, Δλ can be... or , For the first longitude solution, This is the second longitude solution. Δλ is the difference between the observer's longitude and the solar reference longitude λs. On the celestial sphere, with the subsolar point G as a reference, the observer may be located on two different longitude circles: one in the east (θ) and one in the west (π). θ) This corresponds to the angular distance between the observer's meridian and the meridian of the point where the sun is directly overhead on the Earth's surface. Due to the symmetry of spherical geometry, given an altitude angle and an azimuth angle, the observer may be located at two different positions, one to the east and one to the west of the sun.
[0027] For each longitude, calculate sequentially. , .in, It is a combination of the sine and cosine of a certain spherical distance, and is always a non-negative value. It is an auxiliary angle, and its range is determined by the arctangent of the four quadrants. [π,π]. Then, solve for the latitude. or Because arcsin( )return[ [90°, 90°], and the latitude range is also [ [90°, 90°], so the two expressions give two possible latitude values (e.g., one in the Northern Hemisphere and one in the Southern Hemisphere), so each Δλ produces 2 Candidates are defined as follows: each longitude candidate solution generates two latitude candidate solutions, and the two Δλ solutions generate a maximum of four latitude candidate solutions. It can include 1. 2. 3. 4. Candidate coordinate values can be ( 1,λs+Δλ1), ( 2,λs+Δλ1), ( 3,λs+Δλ2), ( 4,λs+Δλ2).
[0028] After calculating multiple candidate coordinate values, step S2 is executed to calculate the theoretical solar azimuth and theoretical solar altitude angles corresponding to the candidate coordinate values. The calculation formula is the spherical trigonometry formula, i.e. , .in, For the theoretical solar altitude angle, This represents the theoretical solar azimuth angle. Where δ is the solar declination. Candidate solutions for latitude. Local time.
[0029] The theoretical solar azimuth angle is compared with the actual solar azimuth angle, i.e., the first difference between the theoretical and actual solar azimuth angles is calculated. The theoretical solar altitude angle is compared with the actual solar altitude angle, i.e., the second difference between the actual and theoretical solar altitude angles is calculated.
[0030] The initial coordinate values for filtering candidate coordinate values include: determining whether a first difference is less than a first preset value and whether a second difference is less than a second preset value. If so, the candidate coordinate values corresponding to the theoretical solar altitude angle and theoretical solar azimuth angle, where the first difference is less than the first preset value and the second difference is less than the second preset value, are taken as the first initial coordinate values. The first difference can be 0.1°, and the second difference can be 0.1°.
[0031] However, the initial coordinate value may be greater than one, so further filtering is needed. Therefore, it is determined whether the number of initial coordinate values is greater than one, and the actual magnetic inclination is obtained. The initial coordinate value is input into the geomagnetic model to obtain the theoretical magnetic inclination. The magnetic inclination difference between each theoretical magnetic inclination and the actual magnetic inclination is calculated, and the initial coordinate value corresponding to the smallest magnetic inclination difference is selected as the initial coordinate value.
[0032] After filtering the initial coordinate values from the candidate coordinate values, the following steps are performed: obtain the current astronomical positioning device, determine whether the current astronomical positioning device is a navigation platform, if so, use the first residual function for calculation; if the current astronomical positioning device is not a navigation platform, use the second residual function for calculation.
[0033] After confirming the astronomical positioning platform, the initial coordinate values are input into the residual function to obtain residual values. Based on these residual values, corrected coordinate values or corrected magnetic declination are calculated. The corrected coordinate values or corrected magnetic declination are iteratively calculated until the difference between the corrected coordinate value and the previous corrected coordinate value is less than a first preset threshold, or the difference between the corrected magnetic declination and the previous corrected magnetic declination is less than a second preset threshold. The final coordinate values are then output. This method includes a first method using the LM algorithm and a second method using the secant method.
[0034] The first method using the LM algorithm includes the following steps: before starting to execute the first method of the LM algorithm, four parameters are obtained, including local time, actual solar altitude angle, actual solar azimuth angle and initial coordinate value.
[0035] First, determine the type of actual solar azimuth. The actual solar azimuth can be either magnetic or true. The type of actual solar azimuth is provided by the user and is usually magnetic. The true azimuth is typically provided by a high-precision gyroscope. If the astronomical positioning device stores the true azimuth, the user needs to confirm the type of actual solar azimuth and which one to use.
[0036] If the user selects magnetic azimuth as the type of actual solar azimuth, the first residual function is: , As the first component, For the second component, To correct the solar altitude angle, hobs represents the current corrected solar altitude angle. To correct the current solar azimuth angle, To correct the solar azimuth angle. The first component. The second component is the residual value of the solar altitude angle after correcting the current corrected solar altitude angle. To correct the solar azimuth angle, subtract the current corrected solar azimuth angle and add the corrected solar magnetic declination angle. The residual value of the solar azimuth angle, the corrected solar altitude angle and the corrected solar azimuth angle are obtained by calculating the corrected coordinate values using the spherical trigonometric formula. The residual value of the solar altitude angle and the residual value of the solar azimuth angle are the first residual values. The corrected solar magnetic declination is obtained by inputting the modified coordinate value corresponding to the corrected solar azimuth angle into the geomagnetic model.
[0037] If the actual solar azimuth is the true azimuth, that is, the second component in the first residual function is the solar azimuth residual value of the corrected solar azimuth minus the current corrected solar azimuth, without adding the corrected solar magnetic declination, the first component is the same as the magnetic azimuth.
[0038] The initial coordinate values are used as correction coordinate values and input into the first residual function to calculate the first residual value of the initial coordinate values. When using the initial coordinate values as correction coordinate values, the initial coordinate values are converted from latitude and longitude form to radian form, i.e. , To correct the radian form of the coordinate values. The initial coordinate value obtained when filtering candidate coordinate values is one of the candidate coordinate values.
[0039] Determine if the first residual value of the initial coordinate values is less than a preset threshold. If the first residual value of the initial coordinate values is greater than the preset threshold, then calculate the numerical Jacobian matrix of the first residual value. Then, the coordinate increment values are iteratively calculated using the LM algorithm (Levenberg-Marquardt algorithm), where the Levenberg-Marquardt algorithm is... , It is a numerical Jacobian matrix; is the transpose; I is the identity matrix, which is a square matrix with 1s on the diagonal and 0s on the rest. This is the damping factor, which is set to 1e-3; This represents the coordinate increment value.
[0040] The corrected coordinate value is calculated based on the coordinate increment value, i.e., the corrected coordinate value is... That is, the corrected coordinate values are updated based on the coordinate increment values. The first residual value is calculated based on the corrected coordinate values input to the first residual function, and it is determined whether the first residual value is less than the first preset threshold, thereby completing the iterative calculation of the corrected coordinate values.
[0041] If the first residual value of the initial coordinates is less than the first preset threshold, the initial coordinates are output as the final coordinates, and the final coordinates are converted from radians to latitude and longitude, with the converted longitude being normalized. If the first residual value is less than the preset threshold, the corrected coordinates are output as the preset threshold.
[0042] The second method for solving using linear interpolation involves: first, determining and obtaining four parameters, including local time, actual solar altitude angle, actual solar azimuth angle, and initial coordinate values.
[0043] First, determine the type of actual solar azimuth. The actual solar azimuth can be either magnetic or true. The type of actual solar azimuth is provided by the user and is usually magnetic. The true azimuth is typically provided by a high-precision gyroscope. If the astronomical positioning device stores the true azimuth, the user needs to confirm the type of actual solar azimuth and which one to use.
[0044] If the actual solar azimuth is the magnetic azimuth, a second residual function is constructed, which is: ,in, This is the second residual value. To correct magnetic declination, This is the current magnetic declination.
[0045] The second residual function is obtained by subtracting the current magnetic declination from the corrected magnetic declination. The corrected magnetic declination is obtained by calculating the corrected azimuth angle based on the current magnetic declination, calculating the corrected coordinate value based on the corrected azimuth angle, and inputting the corrected coordinate value into the geomagnetic model.
[0046] A first preset magnetic declination and a second preset magnetic declination are set. The first preset magnetic declination is used as the current azimuth angle and input into a second residual function to calculate the second residual value of the first preset magnetic declination. Similarly, the second preset magnetic declination is used as the current azimuth angle and input into the second residual function to calculate the second residual value of the second preset magnetic declination. Specifically, the first preset magnetic declination and the second preset magnetic declination are set by the user; for example, the first preset magnetic declination is 0 degrees and the second preset magnetic declination is 5 degrees.
[0047] The algorithm determines whether the second residual value of the first preset magnetic declination is less than the second preset threshold. If the second residual value of the first preset magnetic declination is not less than the second preset threshold, the latest corrected magnetic declination is calculated using linear interpolation based on the second residual values of the first and second preset magnetic declinations, i.e., D2 = D1 - f1(D1 - D0) / (f1 - f0). Here, D2 is the latest corrected magnetic declination, D1 is the second preset magnetic declination, D0 is the first preset magnetic declination, f1 is the second residual value of the second preset magnetic declination, and f0 is the second residual value of the first preset magnetic declination. The latest corrected magnetic declination is used as the input to the second residual function to calculate the second residual value of the latest corrected magnetic declination. The algorithm then determines whether the second residual value of the latest corrected magnetic declination is less than the second preset threshold, thus completing the iteration. If the second residual value of the latest corrected magnetic declination is greater than the second preset threshold, the algorithm continues to calculate using the formula of the linear interpolation method with the latest corrected magnetic declination and the second preset threshold as inputs.
[0048] If the second residual value of the first preset magnetic declination is less than the second preset threshold, the solar azimuth angle of the final coordinate value is calculated using the first preset magnetic declination. That is, the solar azimuth angle of the final coordinate value is the first preset magnetic declination plus the actual solar azimuth angle. Then, the solar azimuth angle of the final coordinate value and the actual solar altitude angle are used to calculate the final coordinate value using the spherical geometry direct solution method in step S1. Finally, the method for filtering initial coordinate values described above is used to filter the final coordinate value. If the second residual value of the latest corrected magnetic declination is less than the second preset threshold, the final coordinate value is also calculated in the above manner.
[0049] Multiple candidate coordinate values are calculated from a single actual solar azimuth and actual solar altitude angle. Through reverse verification, the true candidate coordinate value is determined, eliminating ambiguity and addressing the inherent uncertainty of multiple solutions in single-moment observations. Magnetic declination is used for lookup, and true azimuth correction is applied iteratively for repositioning, ensuring the self-consistency of the magnetic azimuth to true azimuth conversion and mitigating some systematic errors in astronomical positioning based on magnetic azimuth observations. Since only a single-moment actual solar azimuth and actual solar altitude angle are needed, there is no need to wait 2-3 hours for a second observation to obtain multiple moments of actual solar azimuth and actual solar altitude angles. Instantaneous single-moment positioning can be achieved without requiring extensive data processing for multiple moments of actual solar azimuth and actual solar altitude angles, meeting practical navigation requirements.
[0050] Examples of computer-readable storage media: The method for generating a chip detection report in a computer device described in the above embodiments can be stored in a computer-readable storage medium in the form of a computer program. When the computer program is executed by a processor, it can complete the steps of the above embodiments of the method for generating a chip detection report in a computer device. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media can be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM). ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0051] The above are merely preferred embodiments of the present invention, but the design concept of the invention is not limited thereto. Without departing from the concept of the present invention, many other equivalent embodiments may be included. Those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the protection scope of the present invention.
Claims
1. An astronomical positioning method, applied to astronomical positioning devices, comprising: Obtain the actual solar azimuth and actual solar altitude at the current moment, and calculate multiple candidate coordinate values; Its features are: Calculate the theoretical solar azimuth and theoretical solar altitude angle corresponding to the candidate coordinate values based on multiple candidate coordinate values, compare the theoretical solar azimuth with the actual solar azimuth, compare the theoretical solar altitude with the actual solar altitude, and filter the initial coordinate values from the candidate coordinate values; The initial coordinate value or preset magnetic declination is input into the residual function to calculate the residual value. The corrected coordinate value or corrected magnetic declination is calculated based on the residual value. The corrected coordinate value or corrected magnetic declination is iteratively calculated until the residual value is less than a preset threshold, and the final coordinate value is output.
2. The astronomical positioning method according to claim 1, characterized in that: The steps for comparing the theoretical solar azimuth angle with the actual solar azimuth angle include: Calculate the first difference between the theoretical solar azimuth and the actual solar azimuth; The steps for comparing the theoretical solar altitude angle with the actual solar altitude angle include: Calculate the second difference between the actual solar altitude angle and the theoretical solar altitude angle.
3. The astronomical positioning method according to claim 2, characterized in that: The steps for filtering the initial coordinate values from the candidate coordinate values include: Determine whether the first difference is less than the first preset value and whether the second difference is less than the second preset value. If so, take the candidate coordinate values corresponding to the theoretical solar altitude angle and theoretical solar azimuth angle where the first difference is less than the first preset value and the second difference is less than the second preset value as the first initial coordinate values. If the number of the first initial coordinate values is greater than one, the actual magnetic inclination is obtained. The first initial coordinate values are input into the geomagnetic model to calculate the theoretical magnetic inclination. The magnetic inclination difference between each theoretical magnetic inclination and the actual magnetic inclination is calculated. The first initial coordinate value corresponding to the smallest magnetic inclination difference is selected as the initial coordinate value.
4. The astronomical positioning method according to any one of claims 1 to 3, characterized in that: The residual function includes a first residual function; The first residual function includes a first component and a second component. The first component is the residual value of the solar altitude angle after subtracting the current corrected solar altitude angle from the corrected solar altitude angle. The second component is the residual value of the solar azimuth angle after subtracting the current corrected solar azimuth angle from the corrected solar azimuth angle and adding the corrected magnetic declination. The corrected solar altitude angle and the corrected solar azimuth angle are calculated from the corrected coordinate values. The residual value of the solar altitude angle and the residual value of the solar azimuth angle are the first residual value. The corrected magnetic declination angle is obtained by inputting the corrected solar azimuth angle into the geomagnetic model. The steps for calculating the residual value by inputting the initial coordinate value into the residual function include: The initial coordinate values are used as correction coordinate values and input into the first residual function to calculate the first residual value of the initial coordinate values; The step of iteratively calculating the corrected coordinate values until the residual value is less than a preset threshold includes: Determine whether the first residual value of the initial coordinate value is less than the first preset threshold. If the first residual value of the initial coordinate value is greater than the first preset threshold, calculate the numerical Jacobian matrix, calculate the coordinate increment value according to the LM algorithm, and calculate the corrected coordinate value according to the coordinate increment value. The first residual value is calculated based on the corrected coordinate value input into the first residual function, and it is determined whether the first residual value is less than the first preset threshold.
5. The astronomical positioning method according to claim 4, characterized in that: The residual function includes the second residual function; The second residual function is obtained by subtracting the current magnetic declination from the corrected magnetic declination. The corrected magnetic declination is obtained by calculating the corrected azimuth angle based on the current magnetic declination, calculating the corrected coordinate value based on the corrected azimuth angle, and inputting the corrected coordinate value into the geomagnetic model. The steps of inputting the initial coordinate values into the residual function to obtain the residual values include: Set a first preset magnetic declination and a second preset magnetic declination. Use the first preset magnetic declination as the current azimuth angle and input it into the second residual function to calculate the second residual value of the first preset magnetic declination. Use the second preset magnetic declination as the current azimuth angle and input it into the second residual function to calculate the second residual value of the second preset magnetic declination. The step of iteratively calculating the corrected magnetic declination until the residual value is less than a preset threshold includes: Determine whether the second residual value of the first preset magnetic declination is less than a preset threshold. If it is not less than the preset threshold, calculate the latest corrected magnetic declination using linear interpolation based on the second residual value of the first preset magnetic declination and the second residual value of the second preset magnetic declination. Use the latest corrected magnetic declination as the input of the second residual function to calculate the second residual value of the latest corrected magnetic declination.
6. The astronomical positioning method according to claim 5, characterized in that: After filtering the initial coordinate values from the candidate coordinate values, the following is also performed: Obtain the current astronomical positioning device, determine whether the current astronomical positioning device is a navigation platform, and if so, use the first residual function for calculation; If the current astronomical positioning device is not a navigation platform, then the second residual function is used for calculation.
7. An astronomical positioning device, comprising a processor and a memory, the memory storing a computer program, which, when executed, implements the astronomical positioning method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, which, when executed, implements the astronomical positioning method according to any one of claims 1 to 6.