Ship magnetic compass autodyne correction method based on augmented reality and compressed sensing

By using augmented reality and compressed sensing technologies, an improved spherical harmonic function expansion and magnetic feature matrix are constructed. The contribution ratio of the magnetic field is analyzed, and intelligent compensation and correction instructions are generated. This solves the problems of low efficiency and poor accuracy of traditional magnetic compass self-error correction, and achieves efficient and accurate magnetic compass self-error correction.

CN121521082APending Publication Date: 2026-02-13FUJIAN CHUANZHENG COMM COLLEGE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511629545.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Traditional magnetic compass self-error correction methods are inefficient and inaccurate, making it difficult to accurately distinguish the effects of hard iron and soft iron magnetic fields, and full rotation correction is difficult to implement in narrow waterways or busy waters.

Method used

By employing an augmented reality and compressed sensing approach, an improved spherical harmonic function expansion and magnetic feature matrix are constructed. Combined with compressed sensing algorithms, the contribution ratios of hard iron, soft iron, and external interference magnetic fields to the self-error are analyzed, intelligent compensation and correction instructions are generated, and the corrector layout is rendered in real time using an AR device.

Benefits of technology

It significantly improves correction efficiency, enhances adaptability to different navigation environments, ensures the comprehensiveness and accuracy of correction, reduces unnecessary heading sampling, and improves the accuracy of deviation calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121521082A_ABST
    Figure CN121521082A_ABST
Patent Text Reader

Abstract

The invention discloses a ship magnetic compass autodyne correction method based on augmented reality and compressed sensing. The ship magnetic compass autodyne correction method comprises the following steps: calculating a magnetic characteristic matrix; an improved spherical harmonic function expansion is constructed and simplified to obtain a magnetic compass autodyne fitting formula, and an underdetermined equation set is constructed by using compressed sensing to solve the magnetic compass autodyne fitting formula to calculate autodyne in combination with the collected magnetic compass observation vector and the magnetic characteristic matrix; by analyzing the contribution proportion of the hard iron / soft iron / external interference magnetic field to the autodyne, an intelligent compensation correction instruction is generated and output by using an intelligent compensation algorithm according to the requirement of a correction target quantized value and based on the constructed corrector adjustment rule base; and according to the obtained autodyne and intelligent compensation correction instruction, the AR equipment renders an autodyne curve graph and virtual corrector layout guidance in real time. According to the invention, the problems of low efficiency, poor precision, high cost and difficulty in distinguishing hard iron and soft iron magnetic field influences for accurate correction in the existing ship magnetic compass autodyne correction process are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of ship navigation, and particularly relates to a ship magnetic compass deviation correction method based on augmented reality and compressed sensing. BACKGROUND

[0002] As an important navigation instrument of a ship, a ship magnetic compass has the advantages of simple structure, reliable performance and independence from external power supply. However, the magnetic field interference generated by the hard iron and soft iron materials of the ship under the action of the earth's magnetic field will cause the ship magnetic compass to have a deviation phenomenon, resulting in a deviation between the indicated heading and the actual magnetic heading. If the deviation is not effectively corrected, the ship magnetic compass cannot accurately indicate the heading, and even loses the pointing function, cannot provide effective navigation, and threatens the safety of navigation.

[0003] The traditional ship magnetic compass deviation correction method has many deficiencies. On the one hand, the traditional ship magnetic compass correction needs to be performed through two 360° full rotation operations, which is difficult to implement in narrow channels or busy water areas. It is usually necessary to drive the ship, especially large ships, to a specific open sea area for rotation, which consumes a large amount of fuel and time during the rotation. On the other hand, the theoretical model on which the traditional correction method is based is relatively simple, and the complex structure of the ship and the magnetic field environment are not fully considered. When analyzing the influence of the hard iron and soft iron magnetic fields, the ship is often regarded as a homogeneous magnetic body, and the magnetic property differences of different parts and the mutual coupling effect between the hard iron and soft iron magnetic fields are ignored. In addition, the traditional correction method is mainly based on the deviation measurement and adjustment at a specific heading, and lacks in-depth analysis of the characteristics of the hard iron and soft iron magnetic fields, and cannot accurately determine the specific contribution proportion of the two to the deviation of the magnetic compass. Therefore, in the traditional correction process, the correction personnel mainly rely on experience and simple tools to roughly adjust the position and number of correctors, and cannot finely adjust them according to the actual distribution of the hard iron and soft iron magnetic fields, thereby affecting the accuracy of the correction.

[0004] Chinese Patent Publication No. CN119984216A discloses a novel magnetic compass deviation correction auxiliary device and method, comprising: an electronic compass, a triaxial magnetometer, and a data terminal; the output terminals of the electronic compass and the triaxial magnetometer are connected to the data terminal, the triaxial magnetometer being used to quantify and measure environmental magnetic field distortion data; the electronic compass being used to acquire magnetic heading information; the output terminal being connected to the magnetic compass deviation correction device, used to receive information from the electronic compass and the triaxial magnetometer, and after referring to the magnetic compass deviation correction equation, calculate the compass north-pointing force and deviation force through magnetic compass deviation correction software, deduce the correction amount of the magnetic compass deviation correction device, output the deviation correction result through the magnetic compass residual deviation table or residual deviation curve, and output the deviation correction result to the magnetic compass deviation correction device. The method of this invention explicitly requires two independent 360° full rotation operations of the ship: the first rotation is used for environmental magnetic field detection and correction amount calculation, and the second rotation is used to verify the correction result. This is essentially the same as the two full rotations required by the traditional method, and does not reduce the number of rotations, thus failing to avoid the inherent defects of the rotation operation itself. Summary of the Invention

[0005] The purpose of this invention is to provide a ship magnetic compass self-error correction method based on augmented reality and compressed sensing, so as to solve the problems of low efficiency, poor accuracy, high cost and difficulty in distinguishing the influence of hard iron and soft iron magnetic fields in the existing ship magnetic compass self-error correction process.

[0006] The technical solution of the present invention is as follows: On the one hand, this invention provides a method for correcting the self-error of a ship's magnetic compass based on augmented reality and compressed sensing, comprising the following steps: Calculate the magnetic characteristic matrix based on ship size parameters and material permeability; An improved spherical harmonic function expansion was constructed and simplified to obtain the magnetic compass self-difference fitting formula. Combining the collected magnetic compass observation vector and magnetic feature matrix, the underdetermined equation system was constructed using compressed sensing to solve the harmonic coefficients in the magnetic compass self-difference fitting formula to calculate the self-difference. By analyzing the contribution ratio of hard iron / soft iron / external interference magnetic field to the self-error, the intelligent compensation algorithm is used to adjust the rule base based on the constructed corrector according to the correction target quantization value requirements, and generate and output intelligent compensation correction instructions. Based on the obtained self-difference and intelligent compensation correction instructions, the AR device renders the self-difference curve and virtual corrector layout guide in real time.

[0007] Preferably, the constructed magnetic feature matrix is ​​represented as follows:

[0008] In the formula, These are the structural segment indexes for the ship's length, width, and depth directions, respectively. This represents the local magnetic influence coefficient. The principal dimensional characteristic values ​​are determined for the actual ship to ensure consistency with the actual ship structure; The relative permeability of the material; For the magnetic compass installation position to Spatial distance of the indexed ship structure area; This is the structural irregularity correction coefficient.

[0009] Preferably, the improved spherical harmonic function expansion is expressed as:

[0010] In the formula, The magnetic field strength; Spatial coordinates; for The spherical harmonic coefficient of the hard iron magnetic field; For the magnetic compass installation position to Spatial distance of the indexed ship structure area; The coupling angle is observed using a magnetic compass. For ship magnetic heading; For the constant component of the magnetic field of hard iron; spherical harmonic function term The heading-related component of the soft iron magnetic field (the induced magnetic field component associated with the ship's attitude) is used to describe the soft iron magnetic field through different... The combination of values ​​reflects the periodicity of the magnetic field; and The spherical harmonic coefficients correspond to the magnetic field parameters of soft iron / hard iron. For reference distance; For the related Legendre polynomial; The constant properties of the magnetic field of hard iron are determined by The term directly describes the heading correlation of the soft ferromagnetic field through... Expanding the higher-order terms and utilizing the orthogonality of trigonometric functions, the soft iron magnetic field components are transformed into Fourier series form, yielding the magnetic compass self-difference fitting formula:

[0011] In the formula, This refers to the magnetic compass deviation. , The harmonic coefficients are derived from the spherical harmonic coefficients. , It is obtained by linear combination transformation.

[0012] Preferably, by combining the acquired magnetic compass observation vectors and magnetic feature matrices, the harmonic coefficients in the improved spherical harmonic function expansion are solved using compressed sensing to construct an underdetermined system of equations: Set the collected magnetic compass observation vector as ,in For the first One magnetic compass observation coupling angle sampling point The number of sampling points. ; The improved spherical harmonic function expansion is constructed into an underdetermined system of equations: ,in, This is the magnetic field observation vector; The observation matrix is ​​formed by taking the magnetic compass observation vectors. and Calculations show that Let be the vector of harmonic coefficients to be solved; The harmonic coefficients are solved using a weighted L1 norm minimization algorithm. The objective function of the algorithm is expressed as:

[0013] In the formula, It is a weighted matrix, generated by diagonalizing the magnetic characteristic matrix.

[0014] Preferably, by analyzing the contribution ratio of hard iron / soft iron / external interference magnetic field to the self-error, and using an intelligent compensation algorithm according to the correction target quantization value requirements, based on the constructed corrector adjustment rule base, intelligent compensation correction instructions are generated and output as follows: Calculated hard iron magnetic field vector Soft iron magnetic field vector and external interference magnetic field vector The magnitude and direction of the magnetic field are determined, and the contributions of the three types of magnetic fields to the magnetic compass error are compared to set the priority of the adjustment scheme: the magnitude of each magnetic field vector is calculated separately. , and ,like If the maximum value is reached, then the adjustment schemes for the horizontal and vertical hard iron magnets have the highest priority; if... If the maximum value is reached, then the adjustment scheme for the vortex soft iron rod and soft iron sheet has the highest priority; if... If the interference is at its maximum, it is necessary to analyze the nature and location of the external interference source and take corresponding shielding or elimination measures. The specific requirement for the calibration target quantization value is that the difference between the calculated self-error and the remaining self-error after executing the intelligent compensation calibration command must be controlled within the preset target self-error range. The intelligent compensation algorithm searches for the optimal adjustment combination based on the calibration adjustment rule library, which includes adjustment rules for longitudinal and transverse hard iron magnetic rods, adjustment rules for freund's soft iron rods, adjustment rules for vertical hard iron magnetic rods, and adjustment rules for soft iron sheets, according to the calibration target quantization value requirement. This generates an intelligent compensation calibration command with three-dimensional coordinates and calibration steps.

[0015] Preferably, the hard ferromagnetic field is generated by the ship's permanent magnetic material, with corresponding components Exhibiting time invariance under steady-state conditions, the constant component of the hard iron magnetic field was obtained by collecting magnetic field data of the ship in multiple directions in waters free from external magnetic interference and fitting the data using the least squares method. ; The specific calculation of the soft iron magnetic field vector is as follows:

[0016] In the formula, The magnetic susceptibility of soft iron materials; Earth's magnetic field; It is a spatial distribution function; Coordinates; The spatial volume domain for the distribution of soft iron materials in ships; The external interference magnetic field was calculated based on the total magnetic field subtraction method:

[0017] In the formula, This is the vector of the total magnetic field around the magnetic compass.

[0018] Preferably, the virtual corrector layout guide includes the installation distance and number of soft iron sheets, the length and arrangement of the freund's soft iron rods, the insertion positions and magnetic moment directions of the horizontal and vertical hard iron rods, and displays the expected changes in the adjusted magnetic field components in real time through the AR interface.

[0019] On the other hand, the present invention provides a ship magnetic compass deviation correction system based on augmented reality and compressed sensing, including a magnetic feature matrix modeling module, a deviation calculation module, an intelligent compensation module, and an augmented reality-assisted correction module; The magnetic characteristic matrix modeling module is used to calculate the magnetic characteristic matrix based on ship size parameters and material permeability. The self-difference calculation module is used to construct an improved spherical harmonic function expansion and simplify it to obtain the magnetic compass self-difference fitting formula. Combining the acquired magnetic compass observation vector and magnetic feature matrix, it uses compressed sensing to construct an underdetermined system of equations to solve the harmonic coefficients in the magnetic compass self-difference fitting formula and calculate the self-difference. The intelligent compensation module is used to analyze the contribution ratio of hard iron / soft iron / external interference magnetic field to the self-error, and generate and output intelligent compensation correction instructions based on the constructed corrector adjustment rule base according to the correction target quantization value requirements by using intelligent compensation algorithm. The augmented reality-assisted correction module is used to render the self-difference curve and virtual corrector layout guide in real time based on the obtained self-difference and intelligent compensation correction instructions.

[0020] In another aspect, the present invention also provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the ship magnetic compass self-difference correction method based on augmented reality and compressed sensing as described in any embodiment of the present invention.

[0021] In another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the ship magnetic compass self-difference correction method based on augmented reality and compressed sensing as described in any embodiment of the present invention.

[0022] Compared with the prior art, the present invention has the following technical effects: 1. The method described in this invention is based on compressed sensing theory, which allows for flexible selection of sampling heading points according to the actual conditions of the ship, reducing unnecessary heading sampling times and significantly shortening the calibration time. Compared with traditional omnidirectional circumduction calibration, it greatly improves calibration efficiency.

[0023] 2. This invention employs an improved spherical harmonic function expansion combined with magnetic characteristic matrix modeling, fully considering the ship's magnetic field characteristics. By rationally selecting sampling heading points and optimizing the compressed sensing algorithm, the accuracy of differential calculation is improved. From The formula provides an accurate model of the ship's magnetic field, to The calculation and application of the formula are closely integrated with the actual magnetic field conditions of the ship, ensuring high accuracy in the self-difference calculation.

[0024] 3. This invention can accurately analyze the influence of hard iron and soft iron magnetic fields on the self-error of a magnetic compass, and provides detailed virtual layout guidance for hard iron magnetic rods and soft iron correctors respectively, so as to achieve targeted correction of hard iron and soft iron magnetic fields and ensure the comprehensiveness and accuracy of the correction effect.

[0025] 4. This invention is not limited to traditional sampling at specific course points. Under ship-restricted conditions, by reasonably adjusting the sampling course points and utilizing the ship's magnetic field distribution patterns and compressed sensing algorithms, self-error correction can still be achieved, enhancing the system's adaptability to different navigation environments. Attached Figure Description

[0026] Figure 1 This is an overall flowchart of the ship magnetic compass self-error correction method based on augmented reality and compressed sensing described in this invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present application and with reference to the accompanying drawings.

[0028] Example 1 This embodiment provides a method for correcting the self-error of a ship's magnetic compass based on augmented reality and compressed sensing. (See reference...) Figure 1 As shown, it includes the following steps: The magnetic characteristic matrix is ​​calculated based on ship dimensional parameters and material permeability. Specifically, the ship's principal dimensional parameters, including length, beam, and depth, are measured. These parameters are crucial for constructing the three-dimensional constrained / magnetic characteristic matrix, directly affecting the quantitative description of the ship's magnetic field characteristics. Simultaneously, material permeability is also indispensable data. Different shipbuilding materials have different permeability values, which significantly influence the distribution of the ship's magnetic field. In practice, the permeability of shipbuilding materials can be determined through magnetic testing. For common shipbuilding materials, relevant standards and reference data can also be consulted. However, when using reference data, appropriate adjustments must be made based on the ship's actual conditions, such as age and the material's usage environment.

[0029] As a preferred embodiment of this practice, to accurately quantify the influence of the complex structure of a ship on the magnetic field of a magnetic compass, a three-dimensional index is used. Discretize the main dimensions of the ship and construct the magnetic feature matrix. The mapping relationship between a ship's "geometry, material properties, spatial distance" and its magnetic field:

[0030] In the formula, These are structural segment indexes for the ship's length, width, and depth, used to distinguish the magnetic field characteristics of different regions, such as the bow / midship / stern and upper / middle / lower sections. It is the local magnetic influence coefficient, which is directly related to the spatial distribution of the hard iron / soft iron magnetic field of the ship. The principal dimensional characteristic values ​​are determined for the actual ship to ensure consistency with the actual ship structure; The relative magnetic permeability of materials varies; different shipbuilding materials have different... The value can be determined through magnetic testing of shipbuilding materials. For common shipbuilding materials, relevant standards and reference data are available. In practical applications, multiple measurements and calibrations, combined with the actual self-tolerance, can be used to determine the value. The values ​​should be optimized and adjusted. For the magnetic compass installation position to The spatial distance of the indexed ship structure area reflects the attenuation characteristics of the magnetic field with distance; This is a structural irregularity correction factor. In practical applications, it can be adjusted based on the type and structural characteristics of the ship, referring to existing research results and experimental data. After reasonable estimation and adjustment, this embodiment is preferred. The value range is 0.5-2.0.

[0031] After being decoupled by the compressed sensing algorithm, the magnetic feature matrix can be directly mapped to the harmonic coefficients of the magnetic compass self-difference formula, upgrading the self-difference calculation from "empirical fitting" to "structure-driven" physical modeling, supporting the accurate compensation of the intelligent correction system.

[0032] Considering the symmetry of the ship structure, the original 27-term tensor was reduced to 9 terms through a symmetry simplification algorithm. This effectively compressed the dimension of the harmonic coefficients and enabled a quantitative description of the ship's magnetic field characteristics, providing a foundation for subsequent calculations.

[0033] An improved spherical harmonic function expansion was constructed and simplified to obtain the magnetic compass self-difference fitting formula. Combining the acquired magnetic compass observation vector and magnetic feature matrix, the self-difference was calculated by using compressed sensing to construct an underdetermined system of equations and solving the harmonic coefficients in the magnetic compass self-difference fitting formula.

[0034] Specifically, collecting magnetic field data from different parts of the ship is essential, as the magnetic field characteristics vary across different parts of the ship due to its complex structure. Obtaining this data allows for a more comprehensive understanding of the spatial distribution of the ship's magnetic field, providing richer information for accurate analysis.

[0035] Furthermore, depending on the complexity of the ship's magnetic field, the number of sampling points is typically between 3 and 8. The number of sampling points should ensure that the collected data effectively reflects the changing characteristics under the combined effects of the ship's hard and soft ferrous magnetic fields, meeting the accuracy requirements for constructing an underdetermined equation system to solve for harmonic coefficients. An adaptive sampling point determination algorithm is adopted, which ensures both the accuracy requirements for constructing an underdetermined equation system to solve for harmonic coefficients and avoids unnecessary excessive sampling. Stable navigation is maintained for 3-5 minutes at each sampling heading point, during which time the stability and accuracy of data acquisition are ensured.

[0036] In ship magnetic field analysis, the spatial distribution of the Earth's magnetic field can be accurately described by spherical harmonic functions. However, the ship's magnetic compass deviation mainly originates from the interfering magnetic fields generated by the ship itself, including hard ferromagnetic fields (generated by permanent magnetic materials and not changing with the course) and soft ferromagnetic fields (generated by induced magnetic materials and changing with the course and geomagnetism). The improved spherical harmonic function expansion, starting from the fundamental magnetic field modeling perspective, introduces a three-dimensional constraint matrix and compressed sensing theory, enabling more accurate separation of these two magnetic field components. As a preferred embodiment, to accurately characterize the spatial distribution characteristics of the ship's magnetic field, the improved spherical harmonic function expansion is expressed as follows:

[0037] In the formula, The magnetic field strength; Spatial coordinates; For the magnetic compass installation position to The spatial distance of the indexed ship structure area reflects the attenuation characteristics of the magnetic field with distance; For magnetic compass observation coupling angle, satisfying ,in The installation deviation angle of the magnetic compass is associated with the installation attitude of the magnetic compass; The ship's magnetic heading is provided by the gyrocompass; For the constant component of the magnetic field of hard iron; spherical harmonic function term The heading-related component of the soft iron magnetic field (the induced magnetic field component associated with the ship's attitude) is used to describe the soft iron magnetic field through different... The combination of values ​​reflects the periodicity of the magnetic field. and The range of values ​​is determined based on the study of the main characteristics of the ship's magnetic field. In this embodiment, Values ​​from arrive , Values ​​from arrive This combination can cover the main components of a ship's magnetic field; and The spherical harmonic coefficients, corresponding to the magnetic field parameters of soft / hard iron, are parameters closely related to the magnetic field characteristics of ships. and Combination and This determines the characteristics of the magnetic field components in different modes; As a reference distance, it can be set according to the actual situation of the ship in ship magnetic field modeling, such as being related to the characteristic dimensions of the ship; This reflects the variation of magnetic field strength with distance, ensuring that the model can accurately reflect the changes in magnetic field strength at different distances; To relate Legendre polynomials, it is about The function is used to describe the distribution characteristics of the magnetic field along the polar angle direction. Different and The corresponding Legendre polynomials have different forms and properties, further refining the description of the distribution of the magnetic field in space.

[0038] when At this point, only the expression related to the spherical harmonic function remains in the improved spherical harmonic function expansion. Related items (because) The range of values ​​for is arrive In this case, the corresponding spherical harmonic coefficients (mainly...) , exist The component that is not always present (and may not appear at times) mainly reflects the constant component of the hard ferromagnetic magnetic field. The hard ferromagnetic magnetic field is generated by permanently magnetic materials fixed on the ship; its magnitude and direction are relatively stable over a certain period of time and do not change with the course (in a simplified model). The spherical harmonic coefficients at that time can accurately represent this constant magnetic field component.

[0039] when When, the spherical harmonic coefficients of higher-order terms and It begins to function, describing the induced components of the soft ferromagnetic field as a function of heading and geomagnetic field. The soft ferromagnetic field is generated by the magnetization of soft ferromagnetic materials on the ship under the influence of the Earth's magnetic field; its magnitude and direction are related to the Earth's magnetic field and the ship's heading. With... and Changes, , as well as Items will be based on , and geomagnetism (influence) , The changes in the soft ferromagnetic field are matched with the characteristics of the soft ferromagnetic field as it changes with the course and geomagnetism, thus enabling an accurate description of the induced components of the soft ferromagnetic field.

[0040] Furthermore, this formula, by incorporating a magnetic characteristic matrix and compressed sensing theory, can more accurately separate the magnetic field components of hard and soft iron. The magnetic characteristic matrix is ​​constructed based on the ship's principal dimensions (length, beam, and depth) and the material's magnetic permeability. It integrates the ship's physical characteristics into the magnetic field model, enabling the model to more realistically reflect the actual state of the ship's magnetic field. Compressed sensing theory plays a role in data acquisition and processing. By collecting data at fewer sampling points and using its unique algorithm to solve underdetermined equations, it obtains accurate spherical harmonic coefficients, thereby achieving precise separation of the magnetic field components of hard and soft iron. This accurate separation of magnetic field components provides a solid theoretical basis for subsequent differential calculations, making the differential results calculated based on this model more accurate and reliable.

[0041] The improved spherical harmonic function expansion is used to comprehensively describe the distribution characteristics of the ship's magnetic field in space. Starting from the perspective of basic magnetic field modeling, through precise mathematical expression and theoretical support, it provides a foundation for a deep understanding of the characteristics of the ship's magnetic field for the ship's magnetic compass deviation correction system. It is an important theoretical cornerstone for subsequent deviation calculation and correction operations.

[0042] In practical applications of magnetic compass deviation correction for ships, although the improved spherical harmonic function expansion can accurately describe the spatial distribution characteristics of the ship's magnetic field, directly using this formula is too complex for calculating magnetic compass deviation. Therefore, it is necessary to transform it into a simpler and more practical deviation fitting formula through a series of reasonable simplification steps.

[0043] First, it is necessary to identify the main influencing factors and simplify the spatial variables. In the correction of magnetic compass deviation on ships, the deviation of the magnetic compass is mainly related to the magnetic compass observation coupling angle on the ship. The magnetic compass is related to the ship's position in the surrounding space, but not so much to its specific location. It is usually considered to be located at a specific observation point. It can be approximated as a fixed value (because the magnetic compass is in a relatively fixed position on the ship), let it be denoted as . Therefore, when studying the relationship between deviation and heading, the magnetic compass observation coupling angle is mainly considered. The changes.

[0044] Secondly, simplify the coefficients by combining the magnetic field characteristics of hard iron and soft iron. As mentioned above, when When the spherical harmonic coefficients primarily reflect the constant component of the hard iron magnetic field; when In this context, the spherical harmonic coefficients of higher-order terms are used to describe the induced components of the soft ferromagnetic field as it varies with heading and geomagnetism. In practical applications, the hard ferromagnetic field of a ship is relatively stable, and its resulting deviation can be considered a fixed value; however, the soft ferromagnetic field varies with heading, and its resulting deviation is related to the coupling angle observed by the magnetic compass. A functional relationship exists. However, the constant component of the hard iron magnetic field can be considered separately in the self-difference calculation through other methods (such as the preliminary estimation of the hard iron magnetic field vector in intelligent compensation algorithms). Therefore, when deriving the self-difference formula, the focus should be on the influence of the soft iron magnetic field variation with the heading. The part.

[0045] Analysis and research of a large amount of ship magnetic field data revealed that the ship's magnetic compass deviation can be approximately expressed as... The Fourier series form of the spherical harmonic coefficients. Therefore, the spherical harmonic coefficients can be... , With harmonic coefficient , Establish a connection to achieve the transformation from complex spherical harmonic functions to simple Fourier series.

[0046] Furthermore, the relationship and conversion formula between the spherical harmonic coefficient and the harmonic coefficient in the two types of formulas are as follows: Harmonic coefficient , It can be expressed as spherical harmonic coefficients. , The linear combination of these harmonics is based on the physical characteristics of the ship's magnetic field and the mathematical principles of Fourier analysis. During actual navigation, the change in the soft iron magnetic field with the course can be decomposed into harmonic components of different frequencies, and the amplitude and phase of each harmonic component are determined by the spherical harmonic coefficients. By appropriately weighting and combining the spherical harmonic coefficients, the corresponding harmonic coefficients can be obtained.

[0047] In practical calculations, by collecting and analyzing magnetic field data of the ship in multiple different headings, mathematical methods such as the least squares method can be used to determine the specific conversion relationship from spherical harmonic coefficients to harmonic coefficients. This conversion relationship not only considers the characteristics of the magnetic fields of hard and soft iron on the ship, but also incorporates factors such as the ship's principal dimensional parameters and material permeability, making the conversion results more accurate and reliable.

[0048] Furthermore, for At that time, the improved spherical harmonic function expansion becomes Related Legendre polynomials Substituting, we can get , unfold and organize Using trigonometric function formulas Further simplification yields .

[0049] To simplify the form, a new harmonic coefficient is defined. , (here Based on The simplified result at that time, in a more general case, , There will be corresponding non-zero values. (Etc., but the derivation logic is the same). .

[0050] Similarly, for and Perform the same simplification and coefficient definition (process omitted), and finally all The results are summed to obtain The magnetic compass deviation Related to the change in magnetic field strength, after neglecting some minor factors (such as minor magnetic field interference) and considering the actual measurement and correction requirements, it can be considered that... .

[0051] In summary, the constant characteristics of a hard iron magnetic field are determined by... The term directly describes the heading correlation of the soft ferromagnetic field through... Expanding the higher-order terms and utilizing the orthogonality of trigonometric functions, the soft iron magnetic field components are transformed into Fourier series form, yielding the magnetic compass self-difference fitting formula:

[0052] In the formula, The magnetic compass deviation is defined as the difference between the magnetic compass-indicated heading and the ship's magnetic heading. The angle between the magnetic compass and the magnetic compass reflects the degree of interference of the ship's magnetic field on the magnetic compass. , The harmonic coefficients are expressed as spherical harmonic coefficients. , The linear combination transformation yields (transformation coefficients) (through experimental fitting), description The influence of first harmonic components on the amplitude and phase of the self-difference.

[0053] Through the above process, a system was established to describe the spatial distribution of a ship's magnetic field. Formulas that can be directly used to calculate the magnetic compass deviation The connection between the formulas clarifies the derivation logic between the two, enabling both a deep understanding of the magnetic field characteristics of ships based on complex magnetic field modeling and efficient calculation of deviation using a concise deviation formula in practical applications.

[0054] As a preferred embodiment of this practice, combining the acquired magnetic compass observation vector and magnetic feature matrix, the harmonic coefficients in the improved spherical harmonic function expansion are specifically solved by constructing an underdetermined system of equations using compressed sensing: Set the collected magnetic compass observation vector as ,in For the first One magnetic compass observation coupling angle sampling point The number of sampling points. This reflects the comprehensive result of the magnetic compass being affected by the total magnetic field (hard iron + soft iron + external interference).

[0055] Due to the number of sampling points Typically smaller than the number of parameters to be solved (preferably set to [number] in this embodiment). This system of equations is an underdetermined system of equations, therefore the improved spherical harmonic function expansion is constructed in the form of an underdetermined system of equations: ,in, Let be the harmonic coefficient vector to be solved. This is the magnetic field observation vector; The observation matrix is ​​a mapping matrix between the heading angle and harmonic components. The matrix elements of the observation matrix... middle, It is the sampling point index; It is the harmonic component index; observation matrix for matrix, The number of sampling points is given by the matrix elements, which are derived from the magnetic compass observation vector. and Specifically, the matrix elements were calculated. satisfy:

[0056] in correspond The cosine harmonic component, correspond sinusoidal harmonic components, For the first One magnetic compass observation coupling angle sampling point.

[0057] The high-dimensional raw signal (ship's magnetic field) is projected into a low-dimensional observation space to map the correspondence between the heading angle and the frequency of the harmonic components.

[0058] Furthermore, in order to ensure the observation matrix To satisfy the Finite Isometry Property (RIP), in practice, the observation matrix can be constructed using random projection or structured design methods. For example, by randomly selecting different sampling heading points, the column vectors of the observation matrix can be made more independent. Simultaneously, during the solution process, iterative algorithms (such as basis pursuit algorithms and orthogonal matching pursuit algorithms) are used to continuously approach the optimal solution, and convergence conditions (such as an upper limit on the number of iterations, or the rate of change of the objective function being less than a certain threshold) are set to ensure the convergence of the algorithm.

[0059] In the scenario of magnetic compass deviation correction for ships, the ship's magnetic field signal exhibits sparsity, which is a prerequisite for applying compressed sensing theory. The ship's hard iron magnetic field is relatively stable over a certain period, and its deviation can be considered a fixed value. While the variation of the soft iron magnetic field with the heading is complex, it can be decomposed into a superposition of a finite number of harmonic components. Therefore, the ship's magnetic field signal is sparse in the harmonic coefficient space.

[0060] To solve the underdetermined system of equations, this embodiment employs a weighted L1 norm minimization algorithm to solve for the harmonic coefficients. Traditional L1 norm minimization methods are effective in handling sparse signal recovery problems, but in ship magnetic compass self-error correction, different harmonic components have varying degrees of influence on the self-error. Therefore, to improve the accuracy of the solution, this embodiment assigns different weights to different harmonic components, forming a weighted L1 norm minimization problem.

[0061] The application of this weighted L1 norm minimization method fully considers the physical characteristics of the ship's magnetic field and the importance of different harmonic components, making the solution results more consistent with reality. Meanwhile, these calculation processes are consistent with... The formula reflects the ship's magnetic field characteristics. (Through...) The formula allows for a deeper understanding of the spatial distribution characteristics and variation patterns of a ship's magnetic field. When solving for harmonic coefficients, the compressed sensing theory and the weighted L1 norm minimization method are based on these characteristics and patterns, transforming the complex magnetic field model into a simple and practical formula for calculating the self-error, thereby enabling rapid and accurate correction of the ship's magnetic compass self-error.

[0062] The objective function of the weighted L1 norm minimization algorithm is expressed as:

[0063] In the formula, The weighted matrix, generated by diagonalizing the magnetic characteristic matrix, is used to strengthen the weights of the dominant components of hard iron / soft iron and suppress the noise effects of external interfering magnetic fields (such as time-varying interference from electrical equipment, seabed magnetic minerals, etc.). Through sparse signal reconstruction technology, accurate coefficient calculation with 95% confidence can be achieved with only 3-8 sampling heading points, effectively solving the efficiency bottleneck of traditional methods that rely on full-heading sampling. The simplified harmonic coefficient vector directly related to the self-difference is the one to be solved (corresponding to the self-difference fitting formula in the formula). ).

[0064] By from arrive Through the derivation and simplification of the formula, the conversion of coefficients in the two formulas, and the application of compressed sensing theory, this embodiment successfully transforms the complex magnetic field characteristics of ships into a magnetic compass deviation calculation formula that is easy to calculate and apply, providing solid theoretical and technical support for the rapid correction of ship magnetic compass deviation.

[0065] It should be further explained that the improved spherical harmonic function expansion, as the theoretical basis for ship magnetic field modeling, plays a core role in "magnetic field component decomposition and physical mechanism description": the constant offset characteristic of the hard iron magnetic field (the magnetic field component independent of the heading) is explained through the expansion... Item (e.g.) Direct description; the directional correlation of the soft ferromagnetic field (periodic variation of the induced magnetic field), through... Higher-order terms (such as) This enables the decomposition and precise characterization of the soft ferromagnetic field as the ship's magnetic heading changes. The law of sensing change.

[0066] In the core process of self-difference correction, the actual calculation focuses on the simplified harmonic coefficients (i.e., the self-difference fitting formula). In Its technical logic is as follows: Theoretical support: In the early stage, the theoretical decomposition of the magnetic field components of hard iron / soft iron in ships was completed by improving the spherical harmonic function expansion, clarifying the correlation between magnetic field characteristics and heading and ship structure, and providing a mapping basis of "physical mechanism-mathematical model" for the calculation of deviation.

[0067] Engineering adaptation: Based on the results of magnetic field component decomposition, extract periodic features directly related to the self-difference. (First harmonic), construct a simplified harmonic coefficient solution model, which avoids the full calculation of complex spherical harmonic functions and adapts to the engineering scenarios' requirements for "efficiency and practicality".

[0068] Algorithm Connection: When using the weighted L1 norm minimization algorithm to solve for simplified harmonic coefficients, the weighting matrix... The generation of magnetic feature matrix by "diagonalization" essentially transforms the magnetic field characteristics (such as the strength distribution of magnetic fields in hard iron / soft iron) in the spherical harmonic function modeling stage into weight constraints in the algorithm, thereby achieving deep coupling between "theoretical model and engineering algorithm".

[0069] Through the above process, the division of labor between the stages of "theoretical model construction (improved spherical harmonic function expansion)" and "actual correction parameter solution (weighted L1 norm minimization to obtain simplified harmonic coefficients)" is clearly distinguished: the former focuses on "full description of physical mechanisms", while the latter focuses on "efficient solution for engineering applications". Finally, through the closed loop of "magnetic field characteristic extraction - simplified model construction - algorithm weight constraint", the theoretical logic and practical application of the self-error correction system form a complete technical link, ensuring that every step from ship magnetic field modeling to magnetic compass self-error correction has clear physical meaning and engineering operability.

[0070] By analyzing the contribution ratios of hard iron, soft iron, and external interference magnetic fields to the self-error, an intelligent compensation algorithm is used to generate and output intelligent compensation correction instructions based on the constructed corrector adjustment rule base according to the correction target quantization value requirements.

[0071] In a preferred embodiment of this invention, by analyzing the contribution ratio of hard iron / soft iron / external interference magnetic field to the self-error, and using an intelligent compensation algorithm according to the correction target quantization value requirements, based on the constructed corrector adjustment rule base, intelligent compensation correction instructions are generated and output as follows: The magnetic field environment of a ship can be systematically decomposed into three core components: the ship's inherent magnetic field (including hard iron and soft iron magnetic fields) and external interference magnetic fields.

[0072] Calculated hard iron magnetic field vector Soft iron magnetic field vector and external interference magnetic field vector The magnitude and direction of the magnetic field are determined, and the contributions of the three types of magnetic fields to the magnetic compass error are compared to set the priority of the adjustment scheme: the magnitude of each magnetic field vector is calculated separately. , and ,like If the maximum value is reached, then the adjustment scheme for the horizontal and vertical hard iron magnets has the highest priority, and the adjustment of the horizontal and vertical hard iron magnets should be the primary consideration; if... If the magnetic field of the soft iron is at its maximum, the influence of the soft iron magnetic field is prominent, and the adjustment scheme for the Floch soft iron rod and the soft iron sheet has the highest priority, mainly considering the adjustment of the Floch soft iron rod and the soft iron sheet; if If the interference is at its maximum, it is necessary to analyze the nature and location of the external interference source and take corresponding shielding or elimination measures.

[0073] In a preferred embodiment of this invention, the hard ferromagnetic field is generated by the ship's permanent magnetic material (such as a steel structure), with corresponding components... Exhibiting time invariance under steady-state conditions, the constant component of the hard iron magnetic field was obtained by collecting magnetic field data of the ship in multiple directions in waters free from external magnetic interference and fitting the data using the least squares method. Establish a benchmark model for the magnetic field of hard iron.

[0074] In order to induce a magnetic field, it relies on the Earth's magnetic field. Distribution of soft iron materials in ships. Definition of magnetic susceptibility of soft iron materials. (Characterizing the ease with which a material can be magnetized) and spatial distribution function (Describe the position and shape of the soft iron component), then the specific calculation of the soft iron magnetic field vector is as follows:

[0075] In the formula, The magnetic susceptibility of soft iron materials; Earth's magnetic field; It is a spatial distribution function; Coordinates; This refers to the spatial volume domain where the soft iron material of a ship is distributed.

[0076] By measuring the magnetic field response of soft iron components (such as magnetic field fluctuations during course changes) under different geomagnetic environments (e.g., high-latitude and low-latitude sea areas) and ship attitudes, a database of the mapping relationship between "course-magnetic susceptibility-magnetic field strength" was established. This database covers the magnetic response characteristics of typical soft iron components (e.g., hull plates and mechanical parts), providing prior knowledge for subsequent intelligent compensation.

[0077] External magnetic field interference originates from complex sources, including eddy currents in ship electrical equipment, magnetic components of nearby ships, and time-varying interference from seabed magnetic minerals. Its estimation is based on the total magnetic field subtraction method.

[0078] In the formula, This is the vector of the total magnetic field around the magnetic compass.

[0079] By monitoring magnetic field fluctuations during navigation in real time and combining hard iron / soft iron baseline models, interference components are dynamically separated. For periodic interference (such as the power frequency magnetic field of an electric motor), characteristic frequency components can be extracted through Fourier transform; for sporadic interference (such as the magnetic field of a passing ship), a sliding window filtering algorithm is used to remove outliers in real time, ensuring the reliability of the estimated interference magnetic field.

[0080] Of the three types of magnetic field components mentioned above, the constant component of the hard iron magnetic field provides a reference offset for the self-error calculation; the induced component of the soft iron magnetic field characterizes the heading correlation through higher-order harmonic terms; and the external interference magnetic field dynamically corrects the observation data through the total magnetic field subtraction method. These three components are coupled through an improved spherical harmonic function model, decoupled by a compressed sensing algorithm, and finally... The formula forms a closed-loop logic of "benchmark-response-correction", which not only preserves the physical nature of the ship's magnetic field, but also achieves efficient solution under complex interference environment, providing core data support for the accurate generation of intelligent compensation and correction commands.

[0081] The above process organically combines the rigor of theoretical modeling with the efficiency of engineering applications. Through deep decoupling of magnetic field components and sparse signal processing technology, it ensures the robustness and accuracy of self-difference calculation under different navigation scenarios, becoming a key technical link connecting magnetic field measurement and correction execution.

[0082] The specific requirement for the correction target quantization value is the calculated self-difference. The difference between the remaining error after executing the intelligent compensation correction command and the error itself must be controlled within the preset target error range. The internal, i.e., the self-difference that needs to be corrected, is Using an intelligent compensation algorithm, based on the required quantized value of the calibration target, the optimal adjustment combination is searched from a calibration rule library that includes adjustment rules for longitudinal and transverse hard iron rods, freund's soft iron rods, vertical hard iron rods, and soft iron sheets. This generates an intelligent compensation calibration instruction with three-dimensional coordinates and calibration steps.

[0083] Furthermore, the adjustment rules for the longitudinal and transverse hard iron magnetic rods specifically include: 1. The longitudinal hard iron magnetic rod is used to correct the magnetic field component generated longitudinally by the ship's hard iron magnetic field; the supports for storing the longitudinal hard iron magnetic rods are arranged in two rows, symmetrically placed to the left and right of the center of the compass bowl inside the magnetic compass cabinet, with each row having... The locations of the sockets are marked as follows: and A magnetic rod is placed at each position; the magnetic field vector generated by the longitudinal hard iron magnetic rod is... Magnetic moment of the magnetic rod Depending on the location, according to the magnetic dipole model, the magnetic field vector generated by the magnetic rod at a certain point in space is: ,in The permeability of free space, The position vector is from the center of the magnetic rod to the center of the magnetic compass. The magnetic moment of the magnetic rod; through orthogonal experimental design (e.g., covering 3 magnetic moments, (One position, two directions), record the correction amount under different combinations of socket position and magnetic moment magnitude and direction. Constructing a magnetic moment containing a magnetic rod 1. A three-dimensional rule library for position coordinate (different socket positions) correction, supporting dynamic compensation for magnetic moment attenuation (e.g., automatically increasing the quantity when aging causes a decrease in magnetic moment); 2. A transverse hard iron magnetic rod is used to correct the magnetic field component generated by the ship's hard iron magnetic field in the transverse direction. The transverse support has only one row and is equipped with... The location of each socket is marked as follows: Only one magnetic rod can be placed at each location, and the magnetic moment of the magnetic rod is... Similarly, a transverse correction rule base is established, focusing on the magnetic field vector generated by the transverse hard ferromagnetic rod. For the total magnetic field vector The influence of this is used to obtain the correction amount for the magnetic compass deviation. It supports joint optimization of increasing or decreasing the number of magnetic rods, moving their positions, and changing their orientation.

[0084] The adjustment rules for the Floch-Hollow iron rod are used to correct part of the magnetic field of a soft iron rod: Assume the Floch-Hollow iron rod has a fixed support with... The location of each socket is marked as follows: Each socket contains only one magnetic rod. The freund's soft iron rod is magnetized under the influence of the Earth's magnetic field, generating an additional magnetic field vector. Its magnetization intensity is related to the material (magnetic susceptibility) of the freund's soft iron rod. ), shape (length) ,radius This is related to the strength of the Earth's magnetic field. Through experiments or simulations, the additional magnetic field vector generated when a Floch soft iron rod is placed at each socket location is determined. For the total magnetic field vector The effect of the error on the soft semicircle was observed, and the correction effect was obtained. Combined with the soft iron coefficient model A mapping table of "position-soft iron coefficient-correction amount" is constructed to support intelligent recommendations for soft iron rod insertion, removal and position movement.

[0085] The soft iron plate adjustment rule is used to correct quadrant deviation: Typically, two soft iron boxes are placed on the left and right sides of the magnetic compass basin, taking into account the magnetic permeability of the soft iron plates. ,thickness ,area Establish the relationship between the magnetic field vector and the quadrant self-difference correction; after placing a soft iron sheet in each soft iron box, the generated magnetic field vector The permeability of soft iron sheets ,thickness ,area It depends on the quantity, arrangement, and relative position of the flexible iron box and the magnetic compass; let the distance between the left flexible iron box and the magnet pointing to the magnetic compass system be... The distance between the soft iron box on the right and the magnet of the magnetic compass pointing system is... Each soft iron box can hold a number of soft iron sheets. and Through experiments or simulations, determine the different , Combinations and different , The magnetic field vector generated by the combined soft iron sheet For the total magnetic field vector The effect of the object limit error was observed, and the correction effect was obtained. and Build a soft iron sheet correction rule library.

[0086] The vertical hard iron magnetic rod adjustment rules are used to correct the roll and pitch errors caused by ship tilting: the vertical magnetic rods are adjusted by the height and number of baskets to correct the roll / pitch errors. The magnetic field influence of different height and number combinations is calculated based on the magnetic dipole model, and a rule library of roll error correction amount and pitch error correction amount is constructed. It supports the joint optimization of continuously adjustable height (stepless adjustment via copper chain) and integer constraint of number.

[0087] Furthermore, this embodiment provides two types of adjustment schemes: an adjustment scheme dominated by a hard ferromagnetic field and an adjustment scheme dominated by a soft ferromagnetic field.

[0088] Adjustment scheme dominated by hard ferromagnetic field: When hard ferromagnetic field dominates, further analyze the influence of the components of hard ferromagnetic field in the longitudinal, transverse and vertical directions on the error; Longitudinal component correction: Based on the current magnetic compass deviation data and the longitudinal hard iron magnetic rod correction rule library, search for the combination of magnetic rod moment magnitude, direction, and socket position that minimizes the longitudinal deviation. For example, if the rule library shows the socket position... A magnetic rod is placed with a certain magnetic moment magnitude and direction at a certain position. When the magnetic rod is placed in a direction corresponding to the magnitude of a certain magnetic moment, the correction amount If the longitudinal self-difference best matches (minimum difference), then the instruction "at the left socket position of the longitudinal bracket" is generated. A vertical hard iron magnet with a specified magnetic moment and direction is placed at the insertion hole on the right side of the vertical support. "Place a longitudinal hard iron magnet with a specified magnetic moment magnitude and direction." The calibration personnel adjust the longitudinal hard iron magnet accordingly and monitor the change in deviation in real time. If the calibration target is not met, the rule base is searched again for adjustment until the requirements are met. Lateral component correction: Based on the lateral deviation magnitude and the lateral hard ferromagnetic rod correction rule library, the optimal correction combination is found. Assuming at the socket position... A magnetic rod is placed with a certain magnetic moment magnitude and direction at a certain position. The best correction effect is achieved when the magnetic rod is placed with a different magnetic moment magnitude and direction. The system generates the command "at the horizontal bracket socket position". A horizontal hard iron magnet is placed with a specified magnetic moment magnitude and direction, at the position "Place a horizontal hard iron magnet with a specified magnetic moment magnitude and direction." After calibration, the personnel monitor the deviation and adjust it again if the calibration target is not met. Tilt / Roll Correction: Based on the current tilt angle Tilting angle (Mainly considering the tilt angle) Select the "height position + quantity" combination from the vertical magnetic rod rule library.

[0089] The adjustment scheme dominated by the soft ferromagnetic field: Soft semicircle self-difference correction (Follower soft iron rod adjustment): For soft semicircle self-difference, based on the current magnetic compass soft semicircle self-difference data and the Follower soft iron rod correction rule library, search for the socket position combination that can minimize the soft semicircle self-difference. For example, if the rule library shows the socket position... , Calibration amount when placing the freund's soft iron rod If the self-difference best matches the soft semicircle (minimum difference), then the instruction "fix the insertion position of the bracket in the Flourish soft iron rod" is generated. Place a soft iron rod at the socket position. Place a Floch soft iron bar. The calibration personnel adjust the Floch soft iron bar accordingly. The system monitors the change in the self-error of the soft semicircle in real time. If the calibration target is not met, the system searches the rule base again and adjusts until the requirements are met.

[0090] Quadrant self-error correction (soft iron sheet adjustment): Based on the soft iron sheet rule base, an adjustment scheme of "soft iron box distance + quantity" is generated. The combination of soft iron box position and soft iron sheet quantity that minimizes quadrant self-error is searched and dynamically updated in conjunction with the soft iron coefficient. For example, if the rule base shows the soft iron box position on the left, with a distance of [missing information] from the magnet... , put A sheet of soft iron; located on the right side of the soft iron box, at a distance from the magnet. , put When using soft iron sheets, the calibration amount If the quadrant self-difference best matches (minimum difference), then the command "Move the left soft iron box to a distance of [distance] from the magnet" is generated. Place A piece of soft iron; move the soft iron box on the right to a distance of [distance missing] from the magnet. Place "A soft iron sheet." Calibration personnel adjust the soft iron sheet accordingly and monitor the quadrant deviation changes in real time. If the calibration target is not met, the rule base is searched again for adjustments until the requirements are met.

[0091] Furthermore, generating intelligent compensation and correction instructions with three-dimensional coordinates and correction steps specifically involves: based on the optimal combination found (jack position, number of correctors, magnetic moment direction, soft iron box position, etc.), generating specific instructions with three-dimensional coordinates and operation steps, for example: Adjustment of the hard iron magnet: The third socket on the left side of the vertical bracket (coordinate: =10cm, =-5cm, =0cm) Place a magnetic rod with the red end facing forward, and the second socket on the right (coordinate: =10cm, =5cm, Place one magnetic rod with the red end facing forward (=0cm); place magnetic rods with the red ends facing right in the 10th, 11th, and 12th sockets of the horizontal bracket; Vertical magnetic rod adjustment: Place three magnetic rods with the red end facing upwards at a vertical distance of 54cm from the magnetic compass pointing to the magnet; Adjusting the soft iron plates: Move the left soft iron box to a distance of 24cm from the magnet and place one soft iron plate inside; move the right soft iron box to a distance of 24cm from the magnet and place one soft iron plate inside. Adjusting the Floch soft iron rod: Place a 50cm long Floch soft iron rod in the 2nd, 3rd, and 4th holes inside the Floch soft iron box.

[0092] During the calibration process, the change in deviation is continuously monitored. If the calibration target is not met, the above steps are repeated for further adjustment until the preset calibration target is met.

[0093] Based on the received deviation and intelligent compensation correction instructions, the AR device renders a deviation curve and a virtual corrector layout guide in real time. Calibration personnel install and adjust the soft iron correctors (soft iron sheets, freund's soft iron rods) and hard iron magnetic rods (horizontal and vertical hard iron magnetic rods) according to the virtual layout guide. During the calibration process, the magnetic compass deviation change is monitored in real time and fed back to the calibration personnel through the AR interface. Based on the feedback information, the calibration personnel can further fine-tune the position and number of correctors until the magnetic compass deviation reaches an acceptable range.

[0094] As a preferred embodiment of this example, the virtual corrector layout guide includes the installation distance and number of soft iron sheets, the length and arrangement of the freund's soft iron rods, the insertion positions and magnetic moment directions of the horizontal and vertical hard iron magnetic rods, and displays the expected changes in the adjusted magnetic field components in real time through the AR interface.

[0095] During actual calibration, calibrators wear MAR-HMD, which renders a 360° deviation curve and a virtual calibrator layout guide in real time. The deviation curve visually reflects the magnitude and direction of the ship's deviation in each compass direction, providing calibrators with comprehensive deviation information. The virtual calibrator layout guide includes layout guidelines for virtual soft iron plates, Floursch soft iron bars, and longitudinal and transverse hard iron magnetic bars, as well as vertical hard iron magnetic bars. For soft iron plates, the AR interface clearly displays their specific installation positions in the soft iron boxes on both sides, including the horizontal distance parameter from the center point of the compass, and provides the required number of soft iron plates based on the calculation results. Floursch soft iron bars are displayed as long, thin rods, indicating their length, quantity, and arrangement within the Floursch soft iron box directly in front of the compass cabinet. Longitudinal and transverse hard iron magnetic bars are displayed as long strips, showing their installation direction and position on the longitudinal and transverse supports inside the compass cabinet, such as the insertion position and orientation of the longitudinal hard iron magnetic bars along the left and right sides of the longitudinal support, and the insertion position and orientation of the transverse hard iron magnetic bars on the transverse support. The vertical hard iron magnetic rods are displayed in the AR image inside the vertical circular tube in the center of the compass cabinet, providing information on their vertical distance from the magnetic rods inside the compass bowl, the number of magnetic rods, and the orientation of their red ends. These guidelines are based on... The self-difference result is generated from the formula calculation. (Through...) The formula can calculate the magnitude and direction of the ship's deviation in each compass direction, and then visually present it on the deviation curve graph, allowing calibration personnel to clearly understand the ship's current deviation status. The virtual calibration device layout guide is based on... Calculation results and based on The formula analyzes the magnetic field to determine the adjustment schemes for soft iron correctors (soft iron sheets, freund's soft iron rods) and hard iron magnetic rods (horizontal and vertical hard iron magnetic rods). Calibration personnel install and adjust the correctors according to these guidelines. The system monitors the magnetic compass deviation in real time and provides feedback to the calibration personnel via an AR interface. Based on the feedback, the calibration personnel can further fine-tune the position and number of correctors until the magnetic compass deviation reaches an acceptable range. Throughout this process, adjustments are continuously made based on… The formula calculates the self-difference, evaluates the correction effect, and the root of the adjustment plan lies in... The formula's analysis of the ship's magnetic field allows for a close integration of theory and practice in the correction process.

[0096] In a preferred embodiment of this practice, after the correction operation is completed, the remaining deviation assessment and recording stage begins. During this stage, the calculation of the remaining deviation for each heading is mainly based on... Formula. Based on the ship's actual navigation status and magnetic field environment, a data acquisition strategy is determined, a suitable course point is selected, and multi-sensor fusion is used to collect magnetic field vector, attitude, and position information. Through the ship's magnetic field model and algorithms, combined with the collected data, magnetic field data for different course directions is calculated, and then... The harmonic coefficients are solved using formulas and compressed sensing theory, thereby calculating the residual self-error for each heading.

[0097] and Formula and The inherent connections within the formulas are equally crucial in residual variance assessment. The formula reflects the magnetic field characteristics of the ship. The basis for calculating the self-difference in the formula is through A comprehensive analysis of the ship's magnetic field provides... The solution of the harmonic coefficients in the formula provides a theoretical basis, thereby ensuring the accuracy of the residual error calculation.

[0098] A curve is plotted with the heading as the x-axis and the residual deviation as the y-axis. Calibration process parameters (calibrator type, location, quantity, etc.) and residual deviation data are stored in a standard format, and an indexing and backup mechanism is established. The residual deviation curve is evaluated according to industry standards. If the residual deviation exceeds the allowable range, the reasons are analyzed (e.g., sensor error, improper calibrator adjustment, etc.). During the analysis, it is necessary to review the data based on... The formula's analysis results on the ship's magnetic field and the basis for the correction process. The formula calculates the residual error to determine if an inaccurate understanding of the ship's magnetic field led to improper adjustment of the corrector. After taking appropriate measures (recalibrating the sensor, adjusting the corrector, etc.), a reassessment is conducted to ensure the magnetic compass correction achieves the expected effect and guarantees ship navigation safety. The entire residual error assessment and recording phase, from data acquisition and calculation to result evaluation and processing, is based on... Formulas, and closely related The formula reflects the magnetic field characteristics of the ship, which makes the entire calibration process a complete closed loop, achieving a unity of systematicness and integrity from theoretical analysis to actual calibration operation and effect evaluation.

[0099] The following provides an example operation flow of the method described in this embodiment in a practical application: Initialization Phase: High-precision triaxial magnetometer arrays (one set per drone, three magnetometers per set) are mounted on industrial-grade drones known for their long endurance, good wind resistance, and high positioning accuracy. Detailed drone flight path planning and control strategies are pre-defined to ensure precise positioning, hovering, and movement during the measurement process. Drone flight parameters are adjusted in real-time based on the ship's speed and direction to guarantee the accuracy and consistency of the measurement data. The BeiDou / GNSS positioning system is activated, and the drones are hovered at a distance of more than three times the ship's length from the bow, stern, and port and starboard sides, carrying the high-precision triaxial magnetometer arrays to measure the geomagnetic field. The drones transmit real-time measurement data to the ship's data receiving terminal via wireless communication to obtain accurate geomagnetic field data. The drones are gradually moved closer to the ship, and total magnetic field data is measured at different distances in stages. As the drones approach the ship, the influence of the ship's magnetic field on the total magnetic field data gradually increases. By comparing the differences between the measurement data at different stages and the baseline data, the ship's magnetic field information can be separated. Loading the ship's principal dimensional parameters, such as L=243.5m, B=42.4m, and D=21.8m for a given ship, provides the foundational data for subsequent calculations of the magnetic characteristic matrix. Based on the ship's type and structural characteristics, and referencing existing research and experimental data, [the following is done / conducted / implemented]. Make reasonable estimates and adjustments; consult the steel plate materials used in ship construction, find the corresponding relative magnetic permeability reference data for those materials, and then determine a reasonable relative magnetic permeability for the materials based on the ship's age. Simultaneously, perform self-checks and calibrations on all equipment in the system to ensure it is in normal working order.

[0100] Dynamic Correction Phase: Based on the actual conditions of the waters, the vessel initially uses three sampling points as starting data collection points. At each heading point, magnetic field data, vessel position, heading, and attitude information are collected and transmitted to the data processing center via a reliable data transmission method using a dedicated wireless link (latency <50ms). Based on this collected data, an underdetermined system of equations is constructed, and the harmonic coefficients are solved using specific mathematical methods. Next, the mean square error (MSE) is introduced as a key error evaluation indicator to measure the accuracy of the current solution. The MSE, calculated by the mean of the sum of squares of the errors between the observed and true values, directly reflects the dispersion of the data and the accuracy of the solution.

[0101] If the calculated MSE is greater than the preset accuracy threshold This indicates that the data obtained from the current number of sampling points is not accurate enough to solve for the harmonic coefficients. At this point, the algorithm will automatically trigger an operation to add sampling points, i.e., after adding a new sampling point, data is collected again, and the equation system is reconstructed and solved. This process is repeated in cycles, with each round based on the MSE and accuracy threshold. Based on the comparison results, a dynamic decision is made on whether to increase the number of sampling points until the MSE is less than or equal to the precision threshold. Only after the number of sampling points is increased is the system deemed sufficient to meet the accuracy requirements and can be used for subsequent tasks such as calculating the magnetic feature matrix, solving the magnetic compass deviation, and generating correction commands based on the intelligent compensation algorithm. Then, the correction commands generated based on the intelligent compensation algorithm are sent to the AR headset. During data acquisition, if abnormal data is encountered, the system should automatically perform data filtering and processing to ensure data reliability.

[0102] Output phase: The system generates NMEA 0183 format deviation coefficient messages to facilitate data interaction with ship navigation equipment. The AR interface displays the magnetic compass deviation curve and the magnetic compass corrector adjustment and installation plan, and provides virtual corrector layout guidance. After completing the correction operation according to the displayed guidance, the correction personnel can review the correction results through the deviation curve rendered in real time on the AR interface to ensure that the magnetic compass deviation correction achieves the expected effect. If the correction result does not meet expectations, the system should prompt the correction personnel to recalibrate and provide corresponding guidance information.

[0103] Residual error assessment and recording phase: After completing the calibration operation, the data acquisition strategy is determined based on the ship's actual navigation status and magnetic field environment. If the ship is in open water, multiple typical heading points (such as 0°, 45°, 90°, etc.) are selected; if in restricted water, heading points that reflect the characteristics of magnetic field changes are selected, and the number of heading points is flexibly adjusted according to the complexity of the magnetic field and the accuracy of the sensors. Magnetic field vector, attitude, and position information are collected using multi-sensor fusion. Through the ship's magnetic field model and algorithms, combined with the collected data, the magnetic field data for different headings is calculated. Harmonic coefficients are solved based on the improved spherical harmonic function expansion and compressed sensing theory to calculate the residual error for each heading. A curve is plotted with the heading as the abscissa and the residual error as the ordinate. The calibration process parameters (calibrator type, location, number, etc.) and residual error data are stored in a standard format, and an indexing and backup mechanism is established.

[0104] To verify the effectiveness and superiority of the method provided in this embodiment, some specific examples are provided below: System Setup: The ship magnetic compass self-difference rapid correction system of this invention was installed on a 5-year-old large container ship with a deadweight tonnage of 8000 TEUs. A high-precision triaxial magnetometer array was installed in an appropriate position to ensure accurate acquisition of the surrounding geomagnetic field vector. The BeiDou differential positioning module and MEMS inertial navigation module were connected to the ship's navigation system to acquire position and attitude information in real time. The MAR-HMD was provided to the calibration personnel for receiving augmented reality calibration guidance.

[0105] Data Acquisition: During ship navigation, a drone is hovered at a distance of approximately 900 meters (3 times the ship's length) or more in the airspace directly in front of the bow, aft of the stern, and on the port and starboard sides of the ship, carrying a high-precision triaxial magnetometer array to measure the geomagnetic field. The drone transmits real-time measurement data to a data receiving terminal on the ship via wireless communication technology to obtain accurate geomagnetic field data. The drone is gradually moved closer to the ship, and total magnetic field data is measured at different distances in stages. As the drone approaches the ship, the influence of the ship's magnetic field on the total magnetic field data gradually increases. By comparing the differences between the measurement data at different stages and the baseline data, the ship's magnetic field information can be separated. Ship data indicates that the ship primarily uses Q235 steel plate (unannealed). Considering the ship's 5-year age, the aging or corrosion of the material needs to be taken into account. The relative magnetic permeability of the material is input. The value is input based on the ship's type and structural characteristics, referencing existing research findings and experimental data. During navigation at sea, the ship's course is adjusted sequentially to 030°, 045°, and 060° according to the calibration procedure. The ship remains stable at each course point for 3-5 minutes, during which time the data acquisition module automatically collects and records the geomagnetic field vector, ship position, and attitude data.

[0106] Data Processing and Modeling: A magnetic characteristic matrix was constructed based on the ship's main dimensions (length 300 meters, beam 40 meters, depth 20 meters) and material permeability. Harmonic coefficients were calculated using the collected data and the magnetic characteristic matrix to determine the magnetic compass deviation, and the contributions of hard and soft iron magnetic fields to the deviation were analyzed. Calculations showed that the deviation caused by the hard iron magnetic field reached 3°-5° in some headings, while the deviation caused by the soft iron magnetic field was 2°-3° in some headings.

[0107] Augmented Reality-Assisted Calibration: Calibrators wearing MAR-HMDs first adjust the soft iron calibrators based on the 360° self-difference curve and virtual calibrator layout guidelines displayed on the AR interface. On the left side of the compass cabinet, install one soft iron plate, 0.26 meters horizontally from the center point of the compass; install one soft iron plate on the right side of the compass cabinet, with the position parameters corresponding to the left side. For the freund's soft iron rods, insert three 0.4-meter-long rods into the freund's soft iron box directly in front of the compass cabinet. Then, adjust the hard iron magnetic rods according to the guidelines. On the longitudinal support of the compass cabinet, place one longitudinal hard iron magnetic rod on each side, symmetrically positioned 0.6 meters vertically from the directional magnetic rod inside the compass bowl, with the red end facing backward; on the transverse support, install three transverse hard iron magnetic rods 0.48 meters vertically from the directional magnetic rod inside the compass bowl, with the red end facing right. Three vertical hard iron magnetic rods, with their red ends pointing upwards, are inserted into the basket inside the vertical circular tube in the center of the compass cabinet, at a vertical distance of 0.72 meters from the pointing magnetic rod inside the compass basin. During the calibration process, the system monitors the self-error changes in real time and provides feedback to the calibration personnel through an AR interface, allowing them to make fine adjustments based on the feedback.

[0108] Residual error assessment and recording: After completing the correction operation, select several typical heading points (such as 090°, 120°, 135°, etc.); use multi-sensor fusion to collect magnetic field vector, attitude, and position information; use the ship's magnetic field model and algorithms, combined with the collected data, to calculate the magnetic field data for different headings; solve the harmonic coefficients based on the improved spherical harmonic function expansion and compressed sensing theory; and calculate the residual error for each heading. Store the relevant parameters and residual error curves from the correction process in a database to provide a reference for subsequent ship maintenance and navigation.

[0109] Example 2 Accordingly, this embodiment provides a ship magnetic compass deviation correction system based on augmented reality and compressed sensing, used to implement the ship magnetic compass deviation correction method based on augmented reality and compressed sensing as described in Embodiment 1 of the present invention, including a magnetic feature matrix modeling module, a deviation calculation module, an intelligent compensation module, and an augmented reality-assisted correction module.

[0110] The magnetic characteristic matrix modeling module is used to calculate the magnetic characteristic matrix based on ship size parameters and material permeability.

[0111] The self-difference calculation module is used to construct an improved spherical harmonic function expansion and simplify it to obtain the magnetic compass self-difference fitting formula. Combining the acquired magnetic compass observation vector and magnetic feature matrix, it uses compressed sensing to construct an underdetermined system of equations to solve the harmonic coefficients in the magnetic compass self-difference fitting formula and calculate the self-difference.

[0112] The intelligent compensation module is used to analyze the contribution ratio of hard iron / soft iron / external interference magnetic field to the self-error, and generate and output intelligent compensation correction instructions based on the constructed corrector adjustment rule base according to the correction target quantization value requirements and the intelligent compensation algorithm.

[0113] The augmented reality-assisted correction module is used to render the self-difference curve and virtual corrector layout guide in real time based on the obtained self-difference and intelligent compensation correction instructions.

[0114] Specifically, in practical applications, a high-precision triaxial magnetometer array carried by a drone is used to collect real-time magnetic field vector information around the ship's magnetic compass at different distances, positions, and headings. It possesses high sensitivity and accuracy, enabling precise measurement of magnetic field strength and direction changes. A BeiDou differential positioning module provides high-precision ship position information, ensuring accurate correspondence between the collected data and the ship's actual position. A MEMS inertial navigation module monitors the ship's attitude information in real time, including heading, roll, and pitch, providing crucial reference for subsequent data processing and differential calculations. This embodiment preferably uses a high-precision triaxial magnetometer carried by an industrial-grade drone, such as the Bartington Mag-13 triaxial magnetometer, which boasts high performance specifications including triaxial accuracy of ±0.1nT and bandwidth of DC-1kHz, ensuring comprehensive and accurate collection of magnetic field data around the ship. During installation, attention must be paid to the magnetometer's installation direction and position to avoid interference from other magnetic materials and ensure the accuracy of the measurement data. The drone swarm configuration can be set as follows: Quantity: 4 industrial-grade drones (such as DJI Matrice 4D / 4TD), with a flight time of 32 minutes and a wind resistance of 12 m / s; Payload: Each drone group is equipped with a 3-axis magnetometer array (accuracy ±0.1nT), a Beidou differential positioning module (accuracy ±2cm), and a MEMS inertial navigation module (angular velocity accuracy ±0.01° / s); Communication: 5G + dedicated wireless link (latency <50ms), supporting dynamic frequency hopping anti-interference.

[0115] Ensuring data accuracy and consistency is crucial during data acquisition. Rigorous calibration is essential for measuring instruments. Taking a high-precision triaxial magnetometer array as an example, calibration should be performed before each use according to the instrument's calibration specifications in a standard magnetic field environment to ensure that its measurement accuracy meets requirements. Simultaneously, regular maintenance and testing of the instrument are necessary to promptly identify and repair any potential faults, guaranteeing the reliability of the measurement data.

[0116] Meanwhile, the control of the measurement environment is also crucial. Measurements should be conducted in environments free from strong external magnetic fields, and away from large steel structures, electrical equipment, and other objects that may cause interference. During ship navigation, if other vessels or sources of magnetic interference are nearby, measurements should be paused or the measurement position adjusted to avoid collecting interfering data. Regarding weather conditions, measurements should be conducted during periods of stable weather without drastic electromagnetic changes to minimize the impact of environmental factors on the measurement results.

[0117] In practical applications, this embodiment preferably uses the NVIDIA Jetson AGX Orin data processor, which has a powerful computing power of 275 TOPS and a low power consumption of 30W. It can efficiently process a large amount of sensor data, ensure the real-time performance and accuracy of differential calculation and correction instruction generation, and establish a stable data connection with devices such as magnetometer arrays and AR helmet displays to ensure rapid data transmission and processing.

[0118] Specifically, the augmented reality-assisted calibration module, centered on the MAR-HMD (Augmented Reality Head-Mounted Display), plays a crucial role in intuitively guiding the calibration personnel during the magnetic compass deviation calibration process. In practical applications, this embodiment preferably uses a customized version of Microsoft HoloLens 3 or a similar high-performance AR device, which boasts a 60° field of view (FOV) and a high resolution of 2048×1080, providing calibration personnel with a clear and wide field of vision. Simultaneously, it meets the standard of ≥800 nits of brightness, ensuring normal operation under various lighting conditions. Before use, the AR headset must be calibrated and adjusted to ensure its compatibility and accuracy.

[0119] Furthermore, in the correction of ship magnetic compass deviation, in order to better meet the operating habits of the correction personnel and improve the correction efficiency, the adaptation of operating habits and virtual guidance are deeply integrated into the augmented reality-assisted correction module, including the physical operation parameter mapping, virtual guidance system design and interaction with the correction rule base.

[0120] Physical operation parameterization mapping includes: 1. Position Movement: The positions of the calibrator sockets are encoded as three-dimensional coordinates, constructing an accurate virtual space model that perfectly corresponds to the actual compass cabinet and calibrator layout. In the virtual scene, arrows guide the calibrator operator. For example, "Move the longitudinal magnetic rod to the 3rd hole on the right (coordinates: ...)". =20cm, =-10cm, =5cm). After the calibrator completes the operation, the system displays the changes in the magnetic field components in real time, such as " "Reducing by 0.05 μT" allows calibration personnel to intuitively understand the impact of the operation on the magnetic field.

[0121] 2. Quantity Adjustment: Supports dynamic adjustment of the number of magnetic rods and soft iron sheets. The rule base pre-stores correction information for a single magnetic rod or soft iron sheet. For example, "each additional soft iron sheet reduces quadrant deviation by 0.3°; each additional longitudinal magnetic rod reduces longitudinal deviation by 0.5°." When the number of correctors needs adjustment, the system automatically calculates the optimal number based on the current deviation and provides explicit instructions, such as "add one magnetic rod to the second hole from the left on the longitudinal support." Simultaneously, the simulated changes in the magnetic field and deviation after increasing or decreasing the number of correctors are displayed in real-time in the virtual scene.

[0122] 3. Reversing the Orientation of Horizontal and Vertical Magnetic Rods: For reversing the orientation of horizontal and vertical magnetic rods, the rule base stores correction effect data for different magnetic rods at different positions after reversal. When the system determines that the magnetic rod orientation needs to be reversed, it will issue a specific instruction, such as "Reverse the orientation of the magnetic rod in the 4th socket of the horizontal support (currently the N pole is facing left, after reversal the N pole will be facing right)". In the virtual scene, the process of reversing the magnetic rod orientation is displayed through animation, while simultaneously showing the expected changes in the magnetic field components after reversal, such as " The expected increase is 0.08 μT.

[0123] Virtual Guidance System Design: The system generates detailed step-by-step operation instructions based on the calculated calibration scheme. The instructions include a detailed description of each operation step in sequence, including the movement of the calibrator, the addition or reduction of its quantity, and the reversal of the magnetic rod's orientation. For example: Step 1: Move the left side of the longitudinal magnetic rod from socket 1 to socket 3 on the left. Step 2: Add one magnetic rod to socket 2 on the transverse support. Step 3: Reverse the orientation of the magnetic rod in socket 5 on the longitudinal support. Expected Effects: After each operation step, explain the expected impact on the magnetic field and deviation, such as "This operation is expected to reduce the longitudinal deviation by 0.7° and the transverse deviation by 0.2°."

[0124] Interaction with the calibration rule base: The virtual guidance system is closely linked to the calibration rule base, generating operation instructions and simulated effects in real time based on the data in the rule base. When the calibration operator performs the operation, the system updates the magnetic field and self-error information in the virtual model according to the calibration effect data in the rule base. Simultaneously, if a deviation is found between the actual effect and the expected effect in the rule base during the operation, the system automatically triggers the rule base update mechanism to optimize and adjust the calibration rules, thereby improving the accuracy of subsequent calibration operations.

[0125] Example 3 This embodiment provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the ship magnetic compass self-difference correction method based on augmented reality and compressed sensing as described in Embodiment 1 of this invention.

[0126] Example 4 This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the ship magnetic compass self-difference correction method based on augmented reality and compressed sensing as described in Embodiment 1 of the present invention.

[0127] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0128] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0129] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0130] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0131] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for correcting the self-error of a ship's magnetic compass based on augmented reality and compressed sensing, characterized in that, Includes the following steps: Calculate the magnetic characteristic matrix based on ship size parameters and material permeability; An improved spherical harmonic function expansion was constructed and simplified to obtain the magnetic compass self-difference fitting formula. Combining the collected magnetic compass observation vector and magnetic feature matrix, the underdetermined equation system was constructed using compressed sensing to solve the harmonic coefficients in the magnetic compass self-difference fitting formula to calculate the self-difference. By analyzing the contribution ratio of hard iron / soft iron / external interference magnetic field to the self-error, the intelligent compensation algorithm is used to adjust the rule base based on the constructed corrector according to the correction target quantization value requirements, and generate and output intelligent compensation correction instructions. Based on the obtained self-difference and intelligent compensation correction instructions, the AR device renders the self-difference curve and virtual corrector layout guide in real time.

2. The ship magnetic compass deviation correction method based on augmented reality and compressed sensing according to claim 1, characterized in that, The constructed magnetic feature matrix is ​​represented as follows: In the formula, These are the structural segment indexes for the ship's length, width, and depth directions, respectively. This represents the local magnetic influence coefficient. The principal dimensional characteristic values ​​are determined for the actual ship to ensure consistency with the actual ship structure; The relative permeability of the material; For the magnetic compass installation position to Spatial distance of the indexed ship structure area; This is the structural irregularity correction coefficient.

3. The ship magnetic compass deviation correction method based on augmented reality and compressed sensing according to claim 1, characterized in that, The improved spherical harmonic function expansion is expressed as: In the formula, The magnetic field strength; Spatial coordinates; for The spherical harmonic coefficient of the hard iron magnetic field; For the magnetic compass installation position to Spatial distance of the indexed ship structure area; The coupling angle is observed using a magnetic compass. For ship magnetic heading; For the constant component of the magnetic field of hard iron; spherical harmonic function term The heading-related component of the soft iron magnetic field (the induced magnetic field component associated with the ship's attitude) is used to describe the soft iron magnetic field through different... The combination of values ​​reflects the periodicity of the magnetic field; 、 The spherical harmonic coefficients correspond to the magnetic field parameters of soft iron / hard iron. For reference distance; For the related Legendre polynomial; The constant properties of the magnetic field of hard iron are determined by The term directly describes the heading correlation of the soft ferromagnetic field through... Expanding the higher-order terms and utilizing the orthogonality of trigonometric functions, the soft iron magnetic field components are transformed into Fourier series form, yielding the magnetic compass self-difference fitting formula: In the formula, This refers to the magnetic compass deviation. , The harmonic coefficients are derived from the spherical harmonic coefficients. , It is obtained by linear combination transformation.

4. The ship magnetic compass deviation correction method based on augmented reality and compressed sensing according to claim 1, characterized in that, Combining the collected magnetic compass observation vectors and magnetic feature matrices, the harmonic coefficients in the improved spherical harmonic function expansion are specifically solved by constructing an underdetermined system of equations using compressed sensing: Set the collected magnetic compass observation vector as ,in For the first One magnetic compass observation coupling angle sampling point The number of sampling points. ; The improved spherical harmonic function expansion is constructed into an underdetermined system of equations: ,in, This is the magnetic field observation vector; The observation matrix is ​​formed by taking the magnetic compass observation vectors. and Calculations show that Let be the vector of harmonic coefficients to be solved; The harmonic coefficients are solved using a weighted L1 norm minimization algorithm, the objective function of which is expressed as: In the formula, It is a weighted matrix, generated by diagonalizing the magnetic characteristic matrix.

5. The ship magnetic compass deviation correction method based on augmented reality and compressed sensing according to claim 1, characterized in that, By analyzing the contribution ratios of hard iron, soft iron, and external interference magnetic fields to the self-error, and using an intelligent compensation algorithm to adjust the rule base based on the constructed corrector according to the required quantization value of the correction target, intelligent compensation correction instructions are generated and output as follows: Calculated hard iron magnetic field vector Soft iron magnetic field vector and external interference magnetic field vector The magnitude and direction of the magnetic field are determined, and the contributions of the three types of magnetic fields to the magnetic compass error are compared to set the priority of the adjustment scheme: the magnitude of each magnetic field vector is calculated separately. , and ,like If the maximum value is reached, then the adjustment schemes for the horizontal and vertical hard iron magnets have the highest priority; if... If the maximum value is reached, then the adjustment scheme for the vortex soft iron rod and soft iron sheet has the highest priority; if... If the interference is at its maximum, it is necessary to analyze the nature and location of the external interference source and take corresponding shielding or elimination measures. The specific requirement for the calibration target quantization value is that the difference between the calculated self-error and the remaining self-error after executing the intelligent compensation calibration command must be controlled within the preset target self-error range. The intelligent compensation algorithm searches for the optimal adjustment combination based on the calibration adjustment rule library, which includes adjustment rules for longitudinal and transverse hard iron magnetic rods, adjustment rules for freund's soft iron rods, adjustment rules for vertical hard iron magnetic rods, and adjustment rules for soft iron sheets, according to the calibration target quantization value requirement. This generates an intelligent compensation calibration command with three-dimensional coordinates and calibration steps.

6. The ship magnetic compass deviation correction method based on augmented reality and compressed sensing according to claim 5, characterized in that, The hard iron magnetic field is generated by the ship's permanent magnetic materials, and the corresponding components are... Exhibiting time invariance under steady-state conditions, the constant component of the hard iron magnetic field was obtained by collecting magnetic field data of the ship in multiple directions in waters free from external magnetic interference and fitting the data using the least squares method. ; The specific calculation of the soft iron magnetic field vector is as follows: In the formula, The magnetic susceptibility of soft iron materials; Earth's magnetic field; It is a spatial distribution function; Coordinates; The spatial volume domain for the distribution of soft iron materials in ships; The external interference magnetic field was calculated based on the total magnetic field subtraction method: In the formula, This is the vector of the total magnetic field around the magnetic compass.

7. The ship magnetic compass deviation correction method based on augmented reality and compressed sensing according to claim 5, characterized in that, The virtual corrector layout guide includes the installation distance and number of soft iron sheets, the length and arrangement of the freund's soft iron rods, the insertion positions and magnetic moment directions of the horizontal and vertical hard iron rods, and displays the expected changes in the adjusted magnetic field components in real time through the AR interface.

8. A ship magnetic compass deviation correction system based on augmented reality and compressed sensing, characterized in that, The system is used to implement the ship magnetic compass differential correction method based on augmented reality and compressed sensing as described in any one of claims 1 to 7, including a magnetic feature matrix modeling module, a differential calculation module, an intelligent compensation module, and an augmented reality-assisted correction module; The magnetic characteristic matrix modeling module is used to calculate the magnetic characteristic matrix based on ship size parameters and material permeability. The self-difference calculation module is used to construct an improved spherical harmonic function expansion and simplify it to obtain the magnetic compass self-difference fitting formula. Combining the acquired magnetic compass observation vector and magnetic feature matrix, it uses compressed sensing to construct an underdetermined system of equations to solve the harmonic coefficients in the magnetic compass self-difference fitting formula and calculate the self-difference. The intelligent compensation module is used to analyze the contribution ratio of hard iron / soft iron / external interference magnetic field to the self-error, and generate and output intelligent compensation correction instructions based on the constructed corrector adjustment rule base according to the correction target quantization value requirements by using intelligent compensation algorithm. The augmented reality-assisted correction module is used to render the self-difference curve and virtual corrector layout guide in real time based on the obtained self-difference and intelligent compensation correction instructions.

9. An electronic device, the electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the ship magnetic compass deviation correction method based on augmented reality and compressed sensing as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the ship magnetic compass self-error correction method based on augmented reality and compressed sensing as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Novel magnetic compass autodyne correction auxiliary device and method

    CN119984216A