Calibration method and system of astronomical compass, electronic equipment and storage medium
Through the calibration method of three-axis turntable and multiple sensors, combined with inclinometer, star sensor and accelerometer, and adopting singular vector attitude determination algorithm, the problem of attitude angle drift in astronomical compass system is solved, and high-precision and reliable astronomical navigation is achieved.
Patent Information
- Application Number
- CN202510884068.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-12
AI Technical Summary
The existing astronomical compass system is affected by sensor measurement errors and installation matrix errors, causing the attitude angle to drift over time and cannot meet the requirements of long-term high-precision measurement.
The attitude is precisely controlled by a three-axis turntable. Combined with the target tilt data and compensation method, a dual-axis inclinometer, star sensor, sun sensor and accelerometer are used. The singular vector attitude determination algorithm and gravity direction vector projection are adopted to determine the relative installation matrix of each sensor. The calibration method is adaptively selected according to the environmental conditions to perform overall calibration data solution.
It significantly reduces the drift error of attitude measurement over time, improves the long-term accuracy and reliability of celestial navigation, and ensures high consistency of multi-sensor data under complex conditions.
Smart Images

Figure CN120628049A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of aerospace measurement technology, for example, to a calibration method, system, electronic device and storage medium for an astronomical compass. Background Art
[0002] An astronomical compass sensor determines the relative orientation of a vehicle (such as a ship or spacecraft) by detecting the position of celestial bodies (such as the sun, moon, and stars). Its core function is to provide a heading reference, similar to a magnetic compass, but relying on celestial bodies rather than the Earth's magnetic field. In recent years, the accuracy and reliability of astronomical navigation sensors have continued to improve, while their size and power consumption have gradually decreased. This has made it possible to integrate multiple astronomical navigation sensors while maintaining system miniaturization. Simultaneously, systems such as robots, automobiles, and drones are becoming increasingly automated and intelligent, requiring autonomous navigation capabilities to complete tasks in various environments. While traditional satellite navigation systems can provide highly accurate position information, they struggle to provide stable and reliable high-precision attitude measurement information on tiny vehicles, making them unable to meet the needs of autonomous navigation. Consequently, high-precision attitude measurement for moving vehicles has become a research hotspot.
[0003] In the related art, although the existing astronomical compass system can provide attitude relative to the local northeast celestial coordinate system, due to the influence of sensor measurement error and installation matrix error, the attitude angle output by the astronomical compass gradually drifts over time and cannot meet the requirements of long-term high-precision measurement. Summary of the Invention
[0004] The present application aims to provide a calibration method, system, electronic device and storage medium for an astronomical compass.
[0005] According to one aspect of the present application, a calibration method for an astronomical compass is provided. The astronomical compass includes a dual-axis inclinometer, a star sensor, a sun sensor, and an accelerometer, and the astronomical compass is placed on a three-axis turntable. The method includes: obtaining target tilt data output by the dual-axis inclinometer under a first rotation parameter of the three-axis turntable, and determining a target gravity direction vector of the dual-axis inclinometer relative to a horizontal plane based on the target tilt data and a preset compensation method; determining the relative position of the dual-axis inclinometer to the sun sensor under a second rotation parameter based on a preset projection determination method, a preset singular vector attitude determination algorithm, and the target gravity direction vector; A first relative installation matrix is obtained; a corresponding gravity direction vector measured by the accelerometer is obtained, and a second relative installation matrix of the accelerometer and the sun sensor under a third rotation parameter is determined based on a projection determination method, a singular vector attitude determination algorithm, and the gravity direction vector; a corresponding preset calibration method and calibration parameters corresponding to the calibration method are determined based on the current environmental state, a third relative installation matrix of the star sensor and the sun sensor is determined, and the first relative installation matrix, the second relative installation matrix, and the third relative installation matrix are determined as overall calibration data, so as to perform astronomical compass attitude solution based on the overall calibration data.
[0006] According to one aspect of the present application, a calibration system for an astronomical compass is provided. The astronomical compass includes a dual-axis inclinometer, a star sensor, a sun sensor, and an accelerometer. The astronomical compass is placed on a three-axis turntable. The system includes:
[0007] a vector determination module, configured to obtain target tilt data output by the dual-axis inclinometer under the first rotation parameter of the three-axis turntable, and determine a target gravity direction vector of the dual-axis inclinometer relative to the horizontal plane based on the target tilt data and a preset compensation method;
[0008] a first matrix determination module, configured to determine a first relative installation matrix of the dual-axis inclinometer and the sun sensor under a second rotation parameter according to a preset projection determination method, a preset singular vector attitude determination algorithm, and a target gravity direction vector;
[0009] a second matrix determination module, configured to obtain a corresponding gravity direction vector measured by the accelerometer, and determine a second relative installation matrix between the accelerometer and the sun sensor under a third rotation parameter based on a projection determination method, a singular vector attitude determination algorithm, and the gravity direction vector;
[0010] The third matrix determination module is used to determine a corresponding preset calibration method and calibration parameters corresponding to the calibration method based on the current environmental state, determine a third relative installation matrix of the star sensor and the sun sensor, and determine the first relative installation matrix, the second relative installation matrix, and the third relative installation matrix as overall calibration data to perform astronomical compass attitude calculation based on the overall calibration data.
[0011] According to one aspect of the present application, an electronic device is provided, comprising: a processor; and a memory storing a computer program, wherein when the computer program is executed by the processor, the processor executes the method as described above.
[0012] According to one aspect of the present application, a non-transitory computer-readable medium is provided, on which readable instructions are stored. When the instructions are executed by a processor, the processor is caused to execute the method described above.
[0013] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application.
[0014] Beneficial effects:
[0015] Through the above-described embodiments provided by this application, a three-axis turntable precisely controls attitude. Combined with target tilt data and compensation methods, the gravity direction vector of the dual-axis inclinometer relative to the horizontal plane is accurately calculated, eliminating the inclinometer's systematic errors and improving the accuracy of the initial attitude reference. Based on a singular vector attitude determination algorithm and gravity direction vector projection, the relative installation matrix of the dual-axis inclinometer and sun sensor is determined, ensuring high-precision alignment of their coordinate systems and reducing attitude errors introduced by installation deviations. Using the accelerometer's measured gravity direction vector, combined with a singular vector attitude determination algorithm, the relative installation matrix of the accelerometer and sun sensor is calculated, improving the data fusion accuracy of the optical sensor. A calibration method is adaptively selected based on environmental conditions to accurately calculate the relative installation matrix of the star sensor and sun sensor, ensuring high consistency of multi-sensor data under complex conditions. Using the integrated calibration data to perform astronomical compass attitude calculation effectively compensates for installation errors and systematic deviations between sensors, significantly reducing the drift error accumulated over time in attitude measurements, and improving the long-term accuracy and reliability of celestial navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without exceeding the scope of protection required by this application.
[0017] Figure 1 A schematic diagram of the structure of an astronomical compass provided in an embodiment of the present application;
[0018] Figure 2 A flowchart of a calibration method for an astronomical compass provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of the structure of a three-axis turntable provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of the structure of a dual-axis inclinometer provided in an embodiment of the present application;
[0021] Figure 5 A block diagram of a calibration system for an astronomical compass provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repetitive description thereof will be omitted.
[0024] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner.In the following description, many specific details are provided so as to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps etc. can be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0025] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0026] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0027] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Thus, the first component discussed below could be referred to as the second component without departing from the teachings of the present invention. As used herein, the term "and / or" includes any one and all combinations of one or more of the associated listed items.
[0028] Figure 1 This is a schematic diagram of the structure of the astronomical compass provided in the embodiment of the present application. Figure 1 As shown, the astronomical compass includes a sun sensor, an accelerometer, a star sensor, a dual-axis inclinometer, a satellite navigation receiver, and a main control device equipped with a main control circuit. The main control device can be used to execute the astronomical compass calibration method of the present application.
[0029] For specific implementation methods, please refer to the following embodiments.
[0030] Figure 2 This is a flow chart of the calibration method of the astronomical compass provided in the embodiment of the present application. The method of this embodiment can be applied to the main control device. Figure 2 As shown, the method includes: step S20, step S21, step S22 and step S23.
[0031] In this application, the astronomical compass is placed on a three-axis turntable. The structural diagram of the three-axis turntable can be referred to Figure 3 The top of the three-axis turntable is provided with an inner frame disc for placing the astronomical compass, and the three axes correspond to the inner frame axis, the middle frame axis and the outer frame axis respectively.
[0032] In step S20, target tilt data output by the dual-axis inclinometer under the first rotation parameter of the three-axis turntable is obtained, and a target gravity direction vector of the dual-axis inclinometer relative to the horizontal plane is determined based on the target tilt data and a preset compensation method.
[0033] In this application, the structural diagram of the dual-axis inclinometer can be referred to Figure 4 The turntable itself is precisely adjusted to ensure that when the angles of the outer, middle, and inner frame axes are all at 0 degrees, the angle between the inner frame disc plane and the ground is within 3 arc seconds. The inner frame disc plane can be considered horizontal at this point. The output of the inclination sensor is a value between 0 and 65535, which requires calibration to convert to the corresponding angle. The two inclination sensors may have installation errors, which also require calibration to compensate for the errors.
[0034] After installing the astronomical compass on the turntable's inner frame axis disk, the turntable can be operated according to the first rotation parameter: first, the angles of the turntable's outer frame, middle frame, and inner frame axes can be adjusted to 0 degrees. At this time, the dual-axis inclinometer is in a horizontal position, and the inclinometer's measurement data is read and saved; then the turntable's inner frame axis is rotated to make the dual-axis inclinometer's X-axis point close to the direction of the turntable's middle frame axis (i.e., Figure 3Directional errors are automatically compensated during calibration calculations. Since the dual-axis inclinometer used in astronomical compasses has a ±25-degree range, rotate the turntable's center frame axis to 20 degrees and read the inclinometer's Y-axis measurement data. Rotate the turntable's center frame axis to -20 degrees and read the inclinometer's Y-axis measurement data. Return the turntable's center frame axis to 0 degrees and rotate the inner frame axis -90 degrees. At this point, the dual-axis inclinometer's Y-axis direction is nearly aligned with the turntable's center frame axis. Rotate the turntable's center frame axis to 20 degrees and read the inclinometer's X-axis measurement data. Rotate the turntable's center frame axis to -20 degrees and read the inclinometer's X-axis measurement data. Use the read measurement data as the target tilt data.
[0035] The dual-axis inclinometer is affected by the gravity vector, so it is necessary to compensate for the gravity vector. A compensation method can be pre-established. Substituting the target tilt data into the compensation method, the target gravity direction mass is obtained, that is, the accurate gravity direction vector of the dual-axis inclinometer relative to the horizontal plane.
[0036] In some implementations, the middle frame axis rotates in the positive direction and Figure 3 The direction of the arrows in corresponds to the right-hand rule.
[0037] In step S21, a first relative installation matrix between the dual-axis inclinometer and the sun sensor under a second rotation parameter is determined according to a preset projection determination method, a preset singular vector attitude determination algorithm and a target gravity direction vector.
[0038] In this application, the relative mounting matrix describes the rigid transformation relationship between two sensors (such as a dual-axis inclinometer, a star sensor, a sun sensor, etc.), and is used to convert the measurement value of one sensor into the coordinate system of the other sensor.
[0039] A projection determination direction can be pre-set to calculate the projection of the gravity vector direction at each axis position of the turntable within the sun sensor's body coordinate system. The singular vector attitude determination algorithm can be a traditional multi-vector singular value decomposition attitude determination algorithm. The core concept of this algorithm is to use multiple observation vectors and corresponding reference vectors to solve the optimal rotation matrix through singular value decomposition (SVD) to determine the attitude of the carrier (such as a satellite or drone) (i.e., the rotation relationship from the reference coordinate system to the carrier coordinate system).
[0040] Before performing relative mounting matrix calibration, the solar sensor parameters can be calibrated using traditional methods. This application involves installing a collimator next to the turntable to generate incident light. Adjust the angles of the turntable's three axes so that the parallel light emitted by the collimator aligns with the optical axis of the solar sensor. Rotate the turntable along its three axes to collect the coordinates of the solar sensor's image spot and the corresponding incident light direction vector. Collect multiple sets of data and establish a mapping function between the spot coordinates and the incident light direction vector to achieve solar sensor parameter calibration.
[0041] In some implementations, the sun sensor faces the collimator. The sun sensor's coordinate system is defined as follows: when the imaging plane is perpendicular to the collimator's direction, the turntable's center frame axis is the sun sensor's X-axis, and the direction perpendicular to the turntable's inner frame disk plane and pointing toward the collimator is the sun sensor's Z-axis. The sun sensor's Y-axis is determined using the right-hand rule. In this case, the angles of the outer, middle, and inner frame axes can be used as second rotation parameters, α0, β0, and γ0, respectively.
[0042] The projection determination method and the singular vector attitude determination algorithm are used to process the target gravity direction vector and the second rotation parameter to obtain the projection of the target gravity direction vector in the body coordinate system of the sun sensor, and then obtain the first relative installation matrix.
[0043] In step S22, the corresponding gravity direction vector measured by the accelerometer is obtained, and a second relative installation matrix between the accelerometer and the sun sensor under the second rotation parameter is determined according to the projection determination method, the singular vector attitude determination algorithm and the gravity direction vector.
[0044] In this application, the accelerometer can directly measure the direction of the gravity vector: a three-axis accelerometer is stationary, and its output is the inverse of the gravity acceleration vector. Therefore, by inverting and normalizing the accelerometer output data, the gravity direction vector can be obtained. Calibration of the relative mounting matrix between the accelerometer and the sun sensor can be achieved using a method similar to that used for a dual-axis inclinometer. The position of each axis of the turntable can be adjusted using a second rotation parameter. The second rotation parameter and the corresponding gravity direction vector are then processed using a projection determination method and a singular vector attitude determination algorithm to obtain a second relative mounting matrix.
[0045] In step S23, based on the current environmental conditions, a corresponding preset calibration method and calibration parameters corresponding to the calibration method are determined, a third relative installation matrix of the star sensor and the sun sensor is determined, and the first relative installation matrix, the second relative installation matrix, and the third relative installation matrix are determined as overall calibration data, so as to perform astronomical compass attitude calculation based on the overall calibration data.
[0046] In this application, the star sensor is calibrated differently in indoor and outdoor environments. Therefore, the current environmental state includes both indoor and outdoor conditions. Calibration methods and required calibration parameters corresponding to different environmental conditions can be pre-set. The calibration parameters are then processed using the calibration methods to obtain a third relative installation matrix.
[0047] In some implementations, the first relative installation matrix, the second relative installation matrix, and the third relative installation matrix are used as overall calibration data. The astronomical compass can perform attitude settlement based on the overall calibration data, thereby improving the attitude measurement accuracy of the astronomical compass.
[0048] This application uses a three-axis turntable to precisely control the attitude, and combines target tilt data and compensation methods to accurately calculate the gravity direction vector of the dual-axis inclinometer relative to the horizontal plane, eliminate the systematic error of the inclinometer, and improve the accuracy of the initial attitude reference. Based on the singular vector attitude determination algorithm and the gravity direction vector projection, the relative installation matrix of the dual-axis inclinometer and the sun sensor is determined to ensure high-precision alignment of the coordinate systems of the two and reduce the attitude error introduced by installation deviation. The gravity direction vector measured by the accelerometer is combined with the singular vector attitude determination algorithm to calculate the relative installation matrix of the accelerometer and the sun sensor, thereby improving the data fusion accuracy of the optical sensor. The calibration method is adaptively selected according to the environmental state, and the relative installation matrix of the star sensor and the sun sensor is accurately calculated to ensure high consistency of multi-sensor data under complex conditions. The astronomical compass attitude is solved by using the overall calibration data, effectively compensating for the installation error and systematic deviation between sensors, significantly reducing the drift error accumulated over time in the attitude measurement, and improving the long-term accuracy and reliability of celestial navigation.
[0049] According to some embodiments, the target tilt data includes an axial zero value, X-axis tilt data, and Y-axis tilt data, the first rotation parameter includes an acquisition duration, and the compensation method includes an angle determination method, an initial vector determination method, and a compensation vector determination method. Based on the X-axis tilt data and the Y-axis tilt data within the acquisition duration, an X-axis tilt mean and a Y-axis tilt mean can be determined; based on the angle determination method, the X-axis tilt mean and the Y-axis tilt mean, the corresponding X-axis tilt angle and Y-axis tilt angle can be determined; based on the initial vector determination method, the X-axis tilt angle and the Y-axis tilt angle, the initial gravity direction vectors corresponding to the X-axis tilt mean and the Y-axis tilt mean, respectively, can be determined; and based on the initial gravity direction vector and the compensation vector determination method, the target gravity direction vector can be determined.
[0050] In this application, the measurement data of the inclinometer can be read and saved, and the data for 3 minutes can be collected to calculate the average value to obtain the zero position values x0 and y0 of the two axes of the dual-axis inclinometer. Rotate the turntable middle frame axis to 20 degrees, collect data for 3 minutes, rotate the turntable middle frame axis to -20 degrees, collect data for 3 minutes, and use these data as Y-axis tilt data. Restore the turntable middle frame axis to 0 degrees, rotate the inner frame axis -90 degrees, and after the Y-axis of the dual-axis inclinometer is almost consistent with the direction of the turntable middle frame axis, rotate the turntable middle frame axis to 20 degrees, collect data for 3 minutes, rotate the turntable middle frame axis to -20 degrees, collect data for 3 minutes, and use these data as X-axis tilt data. Among them, 3 minutes is the collection time.
[0051] During the compensation process, the original output of the dual-axis inclinometer can be converted into an angle using the angle determination method, and the initial gravity direction vector v can be determined based on the angle and the initial vector determination method. g , further determine the target gravity direction vector v based on the compensation vector determination method gm .
[0052] In some implementations, the mean of the X-axis tilt data and the Y-axis tilt data within the acquisition time is first calculated to obtain and Determine by angle:
[0053]
[0054] Where x and y are the initial tilt degrees, i.e., the output of the astronomical compass when mounted on a turntable and adjusted differently for each axis; α x and α y They correspond to the converted X-axis tilt angle and Y-axis tilt angle respectively. x and k y The proportional relationship used to characterize the angular difference:
[0055]
[0056] The selection of the value 20 is determined by the degree of rotation of the turntable center frame axis.
[0057] Initial vector determination method:
[0058]
[0059] The initial gravity direction vector is calculated in this way.
[0060] Compensation vector determination method:
[0061] v gm =K*v g
[0062] Where K is the coefficient matrix:
[0063] K=(A T A) -1 A T v true
[0064] in,
[0065]
[0066] In this application, multiple sets of data can be collected for processing, where 1 and 2 represent the first set of data and the second set of data respectively. In the specific implementation process, it can be 3 sets or other numbers. xp 、v xn 、v yp and v yn They are and The corresponding gravity vector direction. and They correspond to different middle frame axis positions. During the adjustment process, the dual-axis inclinometer will change position along with the astronomical compass. Therefore, the x and y values output by the dual-axis inclinometer are different, and the corresponding gravity vector directions calculated based on this are also different.
[0067] v true Used to characterize the true value of the gravity direction vector corresponding to the dual-axis inclinometer at different deflection angles:
[0068]
[0069] According to the above calculation method, the target gravity direction vector can be obtained.
[0070] This application collects axial zero-position values and X / Y-axis tilt data, and calculates the average value based on a preset acquisition time, eliminating the effects of random sensor noise and short-term fluctuations, thereby improving the accuracy of zero-position calibration. Based on the X / Y-axis tilt average value and angle determination method, the X / Y-axis tilt angle is accurately calculated, avoiding single measurement errors and ensuring the long-term reliability of the inclinometer output data. The tilt angle is converted into an initial gravity direction vector through an initial vector determination method, and then combined with a compensation vector determination method, the system error is further corrected to obtain a high-fidelity target gravity direction vector.
[0071] According to some embodiments, a corresponding first rotation matrix can be determined based on the second rotation parameter; a first projection of the target gravity direction vector in the body coordinate system of the sun sensor can be determined based on the second rotation parameter, the rotation matrix and the projection determination method; and a first relative installation matrix can be determined based on the target gravity direction vector, the first projection and the singular vector attitude determination algorithm.
[0072] In this application, the sun sensor's coordinate system is defined as follows: when the imaging plane is perpendicular to the direction of the collimator light, the turntable's center frame axis is the sun sensor's X-axis, the direction perpendicular to the turntable's inner frame disk plane and pointing toward the collimator light is the sun sensor's Z-axis, and the sun sensor's Y-axis is determined using the right-hand rule. In this case, the turntable's inner frame axis angle is γ0.
[0073] When the axis angles of the turntable outer frame, middle frame, and inner frame are α, β, and γ respectively, the projection is determined as follows:
[0074] v g_ss =(rotz(α)rotz(γ0)rotx(β)rotz(γ-γ0)) T g
[0075] Where g = [0 0 -1] T , is the constant gravity reference vector direction, as a reference value in different coordinate systems, this value can be preset. g_ss is the first projection.
[0076]
[0077] For rotz(γ0) and rotz(γ-γ0), replace α in rotz(α) with γ0 / γ-γ0. The above calculation process yields the first projection. Since the turntable's center axis is oriented along the sun sensor's X axis, the Y axis does not need to be calculated during attitude conversion.
[0078] The relative mounting matrix converts the reference vectors in the sun sensor coordinate system to the dual-axis inclinometer coordinate system. However, there is a certain deviation between the measured vectors in the dual-axis inclinometer coordinate system and the reference vectors. Therefore, an optimal relative mounting matrix exists that minimizes this deviation. This classic optimization problem can be solved using the multiple sets of collected vectors using existing singular value decomposition methods to obtain the optimal relative mounting matrix.
[0079] This application uses a preset second rotation parameter to accurately control the turntable movement, combined with the calculation of the first rotation matrix to ensure the accuracy of the geometric relationship in the calibration process. The singular vector attitude determination algorithm is used to solve the optimal installation matrix, and the coordinate transformation relationship calibration with the highest accuracy is achieved in the least squares sense. Through the first projection calculation of the target gravity direction vector in the body coordinate system, the spatial alignment of the dual-axis inclinometer measurement data and the solar sensor observation data is achieved. The problem of coordinate system misalignment caused by mechanical installation deviation is eliminated, and the accuracy of multi-sensor data fusion is improved. The second rotation parameter can be flexibly set according to actual needs to adapt to the calibration requirements under different installation conditions. The projection determination method can be optimized and adjusted according to the sensor characteristics to ensure the calibration reliability under various working conditions. Through the precise first relative installation matrix, the installation error between the dual-axis inclinometer and the solar sensor is effectively compensated.
[0080] According to some embodiments, a corresponding gravity direction vector can be obtained; based on a second rotation parameter, a corresponding second rotation matrix can be determined; the second rotation matrix and the second rotation parameter are substituted into a projection determination method to determine a second projection of the gravity direction vector in the body coordinate system of the sun sensor; the gravity direction vector and the second projection are substituted into a singular vector attitude determination algorithm to determine a second relative installation matrix.
[0081] In this application, the accelerometer itself can detect the gravity direction vector and can be directly obtained.
[0082] The second rotation matrix and the second projection may be calculated in the same manner as the first rotation matrix and the first projection, and the second relative installation matrix may be obtained based on the second rotation matrix and the second projection.
[0083] This application uses a singular vector attitude determination algorithm to solve the optimal installation matrix and achieves high-precision coordinate transformation relationship calibration between the accelerometer and the sun sensor in the least squares sense. The coordinate system deviation between the accelerometer measurement data and the sun sensor observation data is accurately compensated. The third rotation parameter can be flexibly configured according to actual needs to adapt to the calibration requirements under different installation conditions. The reliability of the calibration data under various attitudes is ensured by the precise calculation of the second rotation matrix. The second relative installation matrix provides an accurate coordinate transformation benchmark for the data fusion of the inertial measurement unit and the optical sensor, effectively solving the problem of inconsistent multi-sensor data caused by mechanical installation tolerances. The impact of the installation error between the accelerometer and the sun sensor on the attitude solution is significantly reduced.
[0084] According to some embodiments, the current environmental state includes an indoor environment and an outdoor environment. When the current environmental state is an indoor environment, the calibration method may be determined to be a spot measurement method, and a third relative installation matrix may be determined based on the spot measurement method and calibration parameters. When the current environmental state is an outdoor environment, the calibration method may be determined to be an attitude measurement method, and a third relative installation matrix may be determined based on the attitude measurement method and calibration parameters. The first relative installation matrix, the second relative installation matrix, and the third relative installation matrix may be determined as overall calibration data, and astronomical compass attitude calculation may be performed based on the overall calibration data.
[0085] In this application, if the current environment is indoors, the star sensor cannot observe the attitude of outdoor stars, etc. Therefore, an external collimator can be used for illumination simulation, using spot measurement as a calibration method. The spot measurement method can then be used to process the calibration parameters to obtain the third relative installation matrix.
[0086] If the current environment is outdoors, such as an open area like a rooftop, the star sensor can directly observe the star's attitude, so attitude measurement can be used as a calibration method. The calibration parameters can then be processed using attitude measurement to obtain the third relative installation matrix.
[0087] This application utilizes controllable light sources (such as collimators and LED arrays) to generate high-precision simulated star points. Spot analysis is used to calibrate the internal parameters of the star sensor (such as optical distortion and focal length). This is then combined with a singular vector attitude determination algorithm to calculate the precise mounting relationship with the sun sensor. Based on real-world stellar observations and measured data from the sun sensor, a multi-vector matching and attitude solution algorithm is used to determine the dynamic mounting relationship between the star sensor and the sun sensor. This system verifies performance in a realistic operating environment and compensates for installation deviations caused by temperature fluctuations, mechanical stress, and other factors.
[0088] According to some embodiments, when the current environment state is an indoor environment, an original light spot image including a collimator light source captured by a star sensor and a preliminary light spot direction vector of a sun sensor can be obtained. Based on a light spot measurement method, the original light spot image is normalized and binarized to determine the pixel area where the light spot is located, and the centroid coordinates of the light spot in the pixel area are calculated. The target direction vector of the light spot in the body coordinate system of the star sensor is determined based on the focal length and centroid coordinates of the star sensor lens. The original light spot image and the preliminary light spot direction vector are calibration parameters corresponding to the indoor environment. The third relative installation matrix is determined based on the preliminary light spot direction vector, the target direction vector, and a singular vector pose determination algorithm.
[0089] In this application, if the current environment is indoors, the astronomical compass is mounted on the inner frame axis disk of the turntable, and the collimator is set at a preset position. The star sensor and the sun sensor simultaneously observe the parallel light generated by the collimator for calibration. The mask of the collimator is a circular hole mask with a diameter of 1 mm. To avoid saturation of the star sensor image, the exposure time of the star sensor can be reduced to 0.1 milliseconds, and the corresponding gain can be set to 1; to increase the brightness of the sun sensor image, the exposure time of the sun sensor can be increased to 80 milliseconds, and the corresponding gain can be set to 2. At the same time, the light source voltage of the collimator is adjusted so that the collimator light source passes through the mask and forms a clear and unsaturated image on the star sensor and the sun sensor.
[0090] In some implementations, because the star sensor cannot directly output a direction vector, a spot image of the star sensor's light source, including a collimator, is collected, i.e., a raw spot image. The collimated light emitted by the collimator forms a spot on the image of the sun sensor. Different incident light angles result in different positions of the spot in the image. The sun sensor can measure and output this angle, thus directly obtaining a preliminary spot direction vector. This angle corresponds to the image collected by the star sensor. By adjusting the angles of different axes of the turntable (either a single axis or multiple axes, to any angle), the raw spot images of the star sensor and the preliminary spot vector directions of the sun sensor are collected in multiple states and postures to complete the calibration dataset collection.
[0091] For the calibration dataset, we first process the original spot image of the star sensor and normalize its pixel values. The threshold for image binarization can be set to 0.6 to obtain the pixel region where the spot is located. Based on the spot region determined by image binarization, for each pixel in the region, the horizontal coordinates of all pixels are multiplied by the sum of their normalized pixel values to obtain the horizontal coordinate of the spot's centroid. The vertical coordinates of all pixels are multiplied by the sum of their normalized pixel values to obtain the vertical coordinate of the spot's centroid. The horizontal and vertical coordinates of the spot's centroid are used as the centroid coordinates.
[0092] The lens focal length of the star sensor can be pre-set and stored. The physical coordinates of the spot's centroid are obtained by multiplying the pixel coordinates by the pixel size. This is then added to the lens focal length to form a 3D vector. This is then normalized to obtain the direction vector of the imaging spot in the star sensor's coordinate system, i.e., the target direction vector.
[0093] The relative mounting matrix converts the measured vectors in the sun sensor coordinate system to the star sensor coordinate system. However, there is a certain deviation between the measured vectors in the star sensor coordinate system and the measured vectors. Therefore, an optimal relative mounting matrix exists that minimizes this deviation. This classic optimization problem is solved using the singular value decomposition method to obtain the optimal relative mounting matrix. Therefore, the preliminary spot direction vector and target direction vector can be used as inputs to the singular vector orientation algorithm to calculate the third relative mounting matrix.
[0094] This application accurately extracts the light spot features by normalizing and binarizing the original light spot image. The centroid coordinate calculation method is used to achieve sub-pixel-level light spot center positioning accuracy, effectively suppressing indoor ambient light interference and ensuring the reliability of light spot detection. Combined with the focal length parameters of the star sensor lens, the two-dimensional pixel coordinates are converted into three-dimensional spatial direction vectors, and a complete light spot spatial position mapping relationship is established, providing high-precision input for installation matrix calculation. The singular vector pose determination algorithm is used to process the light spot direction vector data, and the optimal third relative installation matrix is solved in the least squares sense, effectively compensating for mechanical installation errors and optical system deviations.
[0095] According to some embodiments, when the current environmental state is an outdoor environment, the attitude matrix of the body coordinate system of a sun sensor or a star sensor relative to the local northeast celestial coordinate system can be detected; wherein the attitude matrix is a calibration parameter corresponding to the outdoor environment; the installation matrix of the body coordinate system relative to the astronomical compass coordinate system is obtained; based on the attitude matrix and the installation matrix, the real-time attitude of the body coordinate system relative to the body northeast celestial coordinate system is determined; based on the attitude measurement method and the real-time attitude, the attitude mean of the sun sensor is determined, and based on the real-time attitude and the attitude mean, a third relative installation matrix is determined.
[0096] In this application, if the current environment state is an outdoor environment, it involves two sub-situations: daytime and nighttime.
[0097] In some implementations, the astronomical compass is first fixed on a marble plane, with the field of view of the star sensor and the sun sensor pointing toward the zenith. During the day, vector data output by the sun sensor, accelerometer, and dual-axis inclinometer in the astronomical compass is collected, and the real-time attitude can be obtained by combining the attitude measurement algorithm of the astronomical compass. In this application, the main control circuit in the astronomical compass can detect and output the attitude matrix R(t) of the astronomical compass's body coordinate system relative to the local northeast sky coordinate system. The installation matrix R of the sun sensor's coordinate system relative to the astronomical compass's coordinate system can be pre-set and stored. lp_ss , for R(t) and R lp_ss Do multiplication to get the real-time posture R ss (t). According to the attitude matrix theory, R can be directly calculated ss(t) The three corresponding Euler angles. Calculate the mean of the Euler angles and, based on the attitude matrix theory, calculate the corresponding mean attitude of the sun sensor.
[0098] At night, the attitude data output by the star sensor is collected and combined with the astronomical compass attitude measurement algorithm to obtain the real-time attitude R of the star sensor's body coordinate system relative to the local northeast sky coordinate system. st (t). The main control circuit in the astronomical compass can detect and output the attitude matrix R(t) of the astronomical compass's body coordinate system relative to the local northeast sky coordinate system, and can pre-set and store the installation matrix R of the star sensor's coordinate system relative to the astronomical compass's coordinate system. lp_st , for R(t) and R lp_st Do multiplication to get the real-time posture R st (t). Using a method similar to the daytime case above, calculate the average attitude of the star sensor Complete field calibration data collection.
[0099] Since the astronomical compass is fixed during the entire field calibration process, the third relative installation matrix R of the sun sensor relative to the star sensor can be calculated using the following formula: st-ss :
[0100]
[0101] This application establishes an accurate outdoor attitude measurement benchmark by detecting the attitude matrix of the body coordinate system relative to the local northeast celestial coordinate system, leveraging the high precision of the astronomical coordinate system to ensure the accuracy of the attitude reference. By acquiring the installation matrix of the body coordinate system relative to the astronomical compass coordinate system in real time, the installation relationship can be dynamically updated and compensated to adapt to changes in the outdoor environment.
[0102] The following describes an apparatus embodiment of the present application, which can be used to perform the method embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, reference can be made to the method embodiment of the present application.
[0103] Figure 5 This is a block diagram of the calibration system for an astronomical compass provided in an embodiment of the present application. The astronomical compass includes a dual-axis inclinometer, a star sensor, a sun sensor, and an accelerometer. The astronomical compass is placed on a three-axis turntable. Figure 5 As shown, the calibration system 500 of the astronomical compass includes a vector determination module 501 , a first matrix determination module 502 , a second matrix determination module 503 and a third matrix determination module 504 .
[0104] a vector determination module 501 for acquiring target tilt data output by the dual-axis inclinometer under the first rotation parameter of the three-axis turntable, and determining a target gravity direction vector of the dual-axis inclinometer relative to the horizontal plane based on the target tilt data and a preset compensation method;
[0105] a first matrix determination module 502 for determining a first relative installation matrix between the dual-axis inclinometer and the sun sensor under a second rotation parameter based on a preset projection determination method, a preset singular vector attitude determination algorithm, and a target gravity direction vector;
[0106] A second matrix determination module 503 is configured to obtain a corresponding gravity direction vector measured by the accelerometer, and determine a second relative installation matrix between the accelerometer and the sun sensor under a second rotation parameter based on the projection determination method, the singular vector attitude determination algorithm, and the gravity direction vector;
[0107] The third matrix determination module 504 is configured to determine a corresponding preset calibration method and calibration parameters corresponding to the calibration method based on the current environmental conditions, determine a third relative installation matrix between the star sensor and the sun sensor, and determine the first relative installation matrix, the second relative installation matrix, and the third relative installation matrix as overall calibration data for performing astronomical compass attitude calculation based on the overall calibration data.
[0108] Optionally, the target tilt data includes an axial zero value, X-axis tilt data, and Y-axis tilt data; the first rotation parameter includes an acquisition duration; and the compensation method includes an angle determination method, an initial vector determination method, and a compensation vector determination method; wherein the vector determination module 501 is specifically configured to:
[0109] Determine the average X-axis tilt value and the average Y-axis tilt value based on the X-axis tilt data and the Y-axis tilt data within the acquisition time;
[0110] Determine the corresponding X-axis tilt angle and Y-axis tilt angle according to the angle determination method, the X-axis tilt average value, and the Y-axis tilt average value;
[0111] Determine the initial gravity direction vectors corresponding to the average X-axis tilt and the average Y-axis tilt, respectively, according to the initial vector determination method, the X-axis tilt angle, and the Y-axis tilt angle;
[0112] The target gravity direction vector is determined according to the initial gravity direction vector and the compensation vector determination method.
[0113] Optionally, the first matrix determination module 502 is specifically configured to:
[0114] Determining a corresponding first rotation matrix according to the second rotation parameter;
[0115] Determine a first projection of the target gravity direction vector in the body coordinate system of the sun sensor according to the second rotation parameter, the rotation matrix and the projection determination method;
[0116] A first relative installation matrix is determined according to the target gravity direction vector, the first projection, and the singular vector attitude determination algorithm.
[0117] Optionally, the second matrix determination module 503 is specifically configured to:
[0118] Get the corresponding gravity direction vector;
[0119] Determining a corresponding second rotation matrix according to the second rotation parameter;
[0120] Substituting the second rotation matrix and the second rotation parameter into the projection determination method to determine a second projection of the gravity direction vector in the body coordinate system of the sun sensor;
[0121] Substitute the gravity direction vector and the second projection into the singular vector pose determination algorithm to determine the second relative installation matrix.
[0122] Optionally, the current environment state includes an indoor environment and an outdoor environment; wherein the third matrix determination module 504 is specifically configured to:
[0123] When the current environment state is an indoor environment, determining the calibration method to be a light spot measurement method, and determining a third relative installation matrix according to the light spot measurement method and the calibration parameters;
[0124] When the current environment state is an outdoor environment, determining the calibration mode to be an attitude measurement mode, and determining a third relative installation matrix according to the attitude measurement mode and the calibration parameters;
[0125] The first relative installation matrix, the second relative installation matrix, and the third relative installation matrix are determined as overall calibration data, so as to perform astronomical compass attitude calculation based on the overall calibration data.
[0126] Optionally, when the current environment state is an indoor environment, the third matrix determination module 504 determines that the calibration method is a spot measurement method, and determines the third relative installation matrix according to the spot measurement method and the calibration parameters, specifically for:
[0127] When the current environment state is an indoor environment, an original light spot image including a collimator light source captured by a star sensor and a preliminary light spot direction vector of a sun sensor are obtained;
[0128] Based on the spot measurement method, the original spot image is normalized and binarized to determine the pixel area where the spot is located, and the centroid coordinates of the spot in the pixel area are calculated;
[0129] According to the focal length and center of mass coordinates of the star sensor lens, the target direction vector of the light spot in the star sensor's body coordinate system is determined; the original light spot image and the preliminary light spot direction vector are the calibration parameters corresponding to the indoor environment;
[0130] The third relative installation matrix is determined according to the preliminary spot direction vector, target direction vector and singular vector attitude determination algorithm.
[0131] Optionally, when the current environment state is an outdoor environment, the third matrix determination module 504 determines that the calibration method is a posture measurement method, and determines the third relative installation matrix according to the posture measurement method and the calibration parameters, specifically for:
[0132] When the current environment state is an outdoor environment, the attitude matrix of the body coordinate system of the sun sensor or star sensor relative to the local northeast sky coordinate system is detected; wherein the attitude matrix is a calibration parameter corresponding to the outdoor environment;
[0133] Get the installation matrix of the body coordinate system relative to the astronomical compass coordinate system;
[0134] According to the attitude matrix and the installation matrix, the real-time attitude of the body coordinate system relative to the body's northeast celestial coordinate system is determined;
[0135] Based on the attitude measurement mode and the real-time attitude, an attitude mean of the sun sensor is determined, and based on the real-time attitude and the attitude mean, a third relative installation matrix is determined.
[0136] The device performs functions similar to the method provided above. For other functions, please refer to the previous description and will not be repeated here.
[0137] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the electronic device 600 of this embodiment may include: a memory 601 and a processor 602.
[0138] The memory 601 stores a computer program. When the computer program is executed by the processor 602, the processor 602 executes the method in the above embodiment.
[0139] The processor 602 and the memory 601 are connected, for example, via a bus.
[0140] Optionally, the electronic device 600 may further include a transceiver. It should be noted that in actual applications, the number of transceivers is not limited to one, and the structure of the electronic device 600 does not constitute a limitation on the embodiments of the present application.
[0141] Processor 602 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 602 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0142] A bus may include a path that transmits information between the components mentioned above. A bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, for example. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the diagram uses only a single thick line, but this does not imply that there is only one bus or only one type of bus.
[0143] The memory 601 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0144] The memory 601 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 602. The processor 602 is used to execute the application code stored in the memory 601 to implement the content shown in the above method embodiment.
[0145] The electronic devices include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Servers and the like are also possible. Figure 6 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0146] The electronic device of this embodiment can be used to execute the method of any of the above embodiments. Its implementation principles and technical effects are similar and will not be described in detail here.
[0147] The present application also provides a non-transitory computer-readable storage medium having computer-readable instructions stored thereon. When the aforementioned instructions are executed by a processor, the processor executes the method in the above embodiment.
[0148] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a non-transitory computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0149] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. At the same time, changes or modifications made by those skilled in the art based on the ideas of the present application, the specific implementation methods, and the scope of application of the present application, all fall within the scope of protection of the present application. In summary, the contents of this specification should not be construed as limiting the present application.
Claims
1. A method for calibrating an astronomical compass, characterized in that: The astronomical compass includes a dual-axis inclinometer, a star sensor, a sun sensor, and an accelerometer, and the astronomical compass is placed on a three-axis turntable; the method includes: Obtaining target tilt data output by the dual-axis inclinometer under the first rotation parameter of the three-axis turntable, and determining a target gravity direction vector of the dual-axis inclinometer relative to a horizontal plane based on the target tilt data and a preset compensation method; Determining a first relative installation matrix between the dual-axis inclinometer and the sun sensor under a second rotation parameter according to a preset projection determination method, a preset singular vector attitude determination algorithm, and the target gravity direction vector; Obtaining a corresponding gravity direction vector measured by the accelerometer, and determining a second relative installation matrix between the accelerometer and the sun sensor under the second rotation parameter based on the projection determination method, the singular vector attitude determination algorithm, and the gravity direction vector; Based on the current environmental state, a corresponding preset calibration method and calibration parameters corresponding to the calibration method are determined, a third relative installation matrix of the star sensor and the sun sensor is determined, and the first relative installation matrix, the second relative installation matrix, and the third relative installation matrix are determined as overall calibration data, so as to perform astronomical compass attitude calculation based on the overall calibration data.
2. The method according to claim 1, characterized in that The target tilt data includes an axial zero value, X-axis tilt data, and Y-axis tilt data; the first rotation parameter includes an acquisition duration; and the compensation method includes an angle determination method, an initial vector determination method, and a compensation vector determination method. The step of obtaining target tilt data output by the dual-axis inclinometer under the first rotation parameter of the three-axis turntable, and determining a target gravity direction vector of the dual-axis inclinometer relative to a horizontal plane based on the target tilt data and a preset compensation method, includes: Determining an X-axis tilt mean and a Y-axis tilt mean according to the X-axis tilt data and the Y-axis tilt data within the acquisition time period; Determine the corresponding X-axis tilt angle and Y-axis tilt angle according to the angle determination method, the X-axis tilt average value and the Y-axis tilt average value; Determining initial gravity direction vectors corresponding to the X-axis tilt mean and the Y-axis tilt mean, respectively, according to the initial vector determination method, the X-axis tilt angle, and the Y-axis tilt angle; The target gravity direction vector is determined according to the initial gravity direction vector and the compensation vector determination method.
3. The method according to claim 1, characterized in that The determining, based on a preset projection determination method, a preset singular vector attitude determination algorithm, and the target gravity direction vector, of a first relative installation matrix between the dual-axis inclinometer and the sun sensor under a second rotation parameter includes: determining a corresponding first rotation matrix according to the second rotation parameter; determining a first projection of the target gravity direction vector in the body coordinate system of the sun sensor according to the second rotation parameter, the first rotation matrix, and the projection determination method; The first relative installation matrix is determined according to the target gravity direction vector, the first projection, and the singular vector attitude determination algorithm.
4. The method according to claim 1, wherein The step of obtaining the corresponding gravity direction vector measured by the accelerometer and determining a second relative installation matrix between the accelerometer and the sun sensor under the second rotation parameter according to the projection determination method, the singular vector attitude determination algorithm, and the gravity direction vector includes: Obtaining the corresponding gravity direction vector; determining a corresponding second rotation matrix according to the second rotation parameter; Substituting the second rotation matrix and the second rotation parameter into the projection determination method to determine a second projection of the gravity direction vector in the body coordinate system of the sun sensor; Substitute the gravity direction vector and the second projection into the singular vector pose determination algorithm to determine the second relative installation matrix.
5. The method according to claim 1, wherein The current environment state includes indoor environment and outdoor environment; The method further includes determining a corresponding preset calibration method and calibration parameters corresponding to the calibration method based on the current environmental state, determining a third relative installation matrix between the star sensor and the sun sensor, and determining the first relative installation matrix, the second relative installation matrix, and the third relative installation matrix as overall calibration data, and performing astronomical compass attitude calculation based on the overall calibration data. When the current environmental state is an indoor environment, determining that the calibration method is a light spot measurement method, and determining the third relative installation matrix according to the light spot measurement method and the calibration parameters; When the current environmental state is an outdoor environment, determining that the calibration method is a posture measurement method, and determining the third relative installation matrix according to the posture measurement method and the calibration parameters; The first relative installation matrix, the second relative installation matrix, and the third relative installation matrix are determined as overall calibration data, so as to perform astronomical compass attitude calculation based on the overall calibration data.
6. The method according to claim 5, characterized in that When the current environment state is an indoor environment, determining that the calibration method is a light spot measurement method, and determining the third relative installation matrix according to the light spot measurement method and the calibration parameters, includes: When the current environment state is an indoor environment, obtaining an original light spot image including a collimator light source captured by the star sensor and a preliminary light spot direction vector of the sun sensor; Based on the light spot measurement method, normalizing and binarizing the original light spot image, determining the pixel area where the light spot is located, and calculating the centroid coordinates of the light spot in the pixel area; Determining a target direction vector of the light spot in a body coordinate system of the star sensor according to the focal length of the lens of the star sensor and the coordinates of the center of mass; wherein the original light spot image and the preliminary light spot direction vector are the calibration parameters corresponding to the indoor environment; The third relative installation matrix is determined according to the preliminary light spot direction vector, the target direction vector and the singular vector pose determination algorithm.
7. The method according to claim 5, characterized in that When the current environment state is an outdoor environment, determining that the calibration method is a posture measurement method, and determining the third relative installation matrix according to the posture measurement method and the calibration parameters, includes: When the current environment state is an outdoor environment, detecting an attitude matrix of a body coordinate system of the sun sensor or the star sensor relative to a local northeast celestial coordinate system; wherein the attitude matrix is the calibration parameter corresponding to the outdoor environment; Obtaining an installation matrix of the body coordinate system relative to the astronomical compass coordinate system; Determining the real-time attitude of the body coordinate system relative to the body's northeast celestial coordinate system according to the attitude matrix and the installation matrix; Based on the attitude measurement mode and the real-time attitude, an attitude mean of the sun sensor is determined, and based on the real-time attitude and the attitude mean, the third relative installation matrix is determined.
8. A calibration system for an astronomical compass, characterized in that: The astronomical compass includes a dual-axis inclinometer, a star sensor, a sun sensor, and an accelerometer, and the astronomical compass is placed on a three-axis turntable; the system includes: a vector determination module, configured to obtain target tilt data output by the dual-axis inclinometer under the first rotation parameter of the three-axis turntable, and determine a target gravity direction vector of the dual-axis inclinometer relative to a horizontal plane based on the target tilt data and a preset compensation method; a first matrix determination module, configured to determine a first relative installation matrix between the dual-axis inclinometer and the sun sensor under a second rotation parameter according to a preset projection determination method, a preset singular vector attitude determination algorithm, and the target gravity direction vector; a second matrix determination module, configured to obtain a corresponding gravity direction vector measured by the accelerometer, and determine a second relative installation matrix between the accelerometer and the sun sensor under the second rotation parameter based on the projection determination method, the singular vector attitude determination algorithm, and the gravity direction vector; The third matrix determination module is configured to determine, based on the current environmental state, a corresponding preset calibration method and calibration parameters corresponding to the calibration method, determine a third relative installation matrix between the star sensor and the sun sensor, and determine the first relative installation matrix, the second relative installation matrix, and the third relative installation matrix as overall calibration data, so as to perform astronomical compass attitude calculation based on the overall calibration data.
9. An electronic device, characterized in that: include: processor; A memory storing a computer program, which, when executed by the processor, causes the processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that Computer-readable instructions are stored thereon, and when the instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.