Research on Partitioning Algorithm Based on Dynamic Star Simulator Guide Star Catalog

The simulated star map generated by the dynamic star simulator cannot meet the current demand for calibration of the star map recognition rate of the star sensor due to the huge amount of guide star catalog data and the slow retrieval process. This paper proposes the guide star equipartition method, which makes the constant number of each sub-region of the guide star catalog basically the same. This method first divides the declination at equal intervals through the field of view of the dynamic star simulator, and then determines the interval of the right ascension by the average number of stars with magnitude Mv that can be photographed in the field of view of the star sensor. The SAO (Smithsonian Astrophysical Observatory) catalog containing 5103 stars in the whole celestial sphere is divided into 452 sub-areas by the average number of guide stars. After the division, the guide star retrieval time is about 8ms, and the refresh rate of the simulated star map is increased by more than three times. The real-time requirements of the dynamic star simulator have been improved. Based on this, a star map simulation software is designed, which can realize the division of star catalogs with different fields of view and different magnitude thresholds.


I. INTRODUCTION
As a high-precision attitude measurement device, the star sensor is widely used in the aviation and aerospace fields. It uses the starlight vector to determine the instantaneous direction of the visual axis in the celestial coordinate system to determine the attitude of the aircraft [1], [2]. The star map recognition and attitude determination are based on the guide star catalog as the information standard [3]- [5].
The guide star catalog is the description of stars in the celestial coordinate system, mainly including the star's right ascension, declination and brightness. The establishment of the guide star catalog is an important task of starlight guidance technology. The most important step in establishing the guide star catalog is to select the guide star. Indicators such as the brightness and distribution uniformity of the guide star directly affect the distribution density of the guide star in the field of view when the star sensor is working, the minimum number of guide stars that can be detected, and the minimum number of matching star pairs in the star map recognition The associate editor coordinating the review of this manuscript and approving it for publication was Abdullah Iliyasu . process, and identification navigation the probability of stars etc. This affects the efficiency and success rate of star map recognition and star tracking matching algorithm [6]. Due to the high cost of space experiments, it is impossible for the debugging of the star sensor to perform actual starry sky shooting [7]. Therefore, the dynamic star simulator is used to generate simulated star map in real time for detection by the star sensor [8].
The dynamic star simulator generates a simulated star map. First, according to the direction of the optical axis, given the size of the star simulator's field of view and the angle of the field of view around the optical axis, extract the guide star from the guide star catalog, and then perform the coordinates and magnitude respectively Transform, and finally display it in the form of a two-dimensional image on the screen of the star map display device to realize the starry sky simulation.
The star sensor is the ''eye'' of the spacecraft in space. With the vigorous development of space missions, the rapid maneuverability of spacecraft in orbit has become the key to space missions. Significant demand, and put forward higher and higher requirements for the dynamic performance of the autonomous attitude measurement system. The high dynamic VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ star sensor technology is an urgent need for the development of China's spacecraft and technology, which requires its ground test equipment--dynamic star simulator is becoming more and more dynamic. How to quickly extract a guide star that meets the field of view is the key to increasing the speed of the simulated star map and realizing the dynamic simulation of the starry sky environment. In order to speed up the search speed of the guide star catalog, it is necessary to divide the guide star catalog. A reasonable division of the sky area can increase the refresh rate of the simulated star map, thereby greatly increasing the refresh frequency of the star simulator. The division of the guide star catalog is actually the division of the surface of the celestial sphere. The arrangement of the guide stars in the guide star catalog is irregular. If you select a guide star that points to the field of view with a certain visual axis, you must traverse the entire guide star catalog once. Obviously, such search efficiency is very low. How to retrieve the guide star quickly has become a key step in formulating the guide star catalog.
The guide star catalog can be divided into two major categories: one is to divide the whole sky star map based on right ascension and declination. The spatial division of each block is extremely uneven, which is not conducive to the organization and scheduling of the guide star catalog. There is mainly the spherical matrix segmentation method used by Yuanzhi et al. [9] to divide the surface of the celestial sphere into 800 regions. This method gradually increases the surface area of the sub-interval from the north and south poles to the equator, which is not conducive to the rapid retrieval of guide stars. Jeffery [10] also uses the declination belt method, which can directly search for the declination value when searching for guide stars. However, the distribution of stars in each subregion is not uniform, and the right ascension information is useless, which will cause redundant guide stars. Lingyun et al. [11] used the method of equal field of view to divide the surface of the celestial sphere into 254 areas. Although this method makes the retrieval area smaller than the entire celestial sphere, it is still much larger than the projection area of the star sensor's field of view, which will lead to the rate of searching for guide stars is reduced.
The other is the uniform division method of the celestial sphere. This kind of method completely discards the longitude and latitude information of the celestial sphere and obtains the uniform division of the celestial sphere surface. However, this kind of method boundary division is more complicated and the retrieval method is not intuitive. Ju [12] et al. mainly used the cone method to divide the surface of the celestial sphere into 11,000 regions. The cone regions divided by this method will overlap each other, which will cause the same guide star to appear in different cone regions. At the same time, the storage space becomes very large. In addition, Xiao-Liang et al. [13] used the method of inscribed cubes to divide the surface of the celestial sphere into 486 sub-regions. This method divided the regions into uniform and nonoverlapping divisions, which can quickly search for guide stars, but for stars The judgment of the boundary of the subregion is more complicated. Li et al. [14] used a quadrangular pyramid partition method to divide the surface of the celestial sphere into approximately 60,000 sub-regions. This method may make a navigator star appear in multiple sub-regions and require a lot of storage space for data storage.
In 2019, Jun [15] proposed that the average time for the star sensor to recognize a star map is 10.077ms. In order to enable the star sensor to recognize the simulated star map of the dynamic star simulator in real time, the dynamic star simulator refresh time of the star map should be less than 10.077ms. In 2019, Li [14] proposed the quadrangular pyramid partitioning algorithm to search the global SAO catalog data containing 21983 stars. The search time for the guide star is 110HZ, which is about 9ms. As its calibration test equipment, the dynamic star simulator is in urgent need of a new guide star catalog partition algorithm to improve the star map refresh time.
The guide star equipartition method proposed in this paper is based on the declination of equal intervals, and considering the premise that the number of stars in each subregion is equal in the partition, the right ascension is divided. When searching for guide stars, search based on right ascension and declination, so as to achieve the purpose of improving the refresh rate of the star map.

II. PRINCIPLES OF CONSTRUCTING GUIDE STAR CATALOG
In the selection of guide stars, in principle, it is required that under the premise of meeting the identification requirements, there should be as few guide stars as possible. Generally, it is based on the field of view of the star sensor, the star sensor's limit magnitude, recognition accuracy, storage capacity, and recognition. Algorithm requirements to build the guide star library [16]- [19]. Due to the uneven distribution of stars on the celestial sphere, the distribution of stars in the field of view is random in a certain spatial domain. The most important reference index in the construction of the guide star catalog is the magnitude sensitivity limit and star sensitivity of the star sensor. Field of view. The magnitude sensitivity limit of the star sensor is different from the size of the field of view, and the number of stars in the field of view will vary greatly [20]- [22].

A. FILTER GUIDE STAR
In order to screen out effective guide stars, speed up the retrieval of guide stars and reduce the data capacity of guide stars, the specific steps of the method adopted in this paper are as follows: 1)Delete variable stars and double stars in the basic catalogue; 2)The greater the brightness of the guide star, the better; 3)The number of stars in the field of view meets the minimum number of stars required for star chart recognition; 4)Under the condition of meeting (3), the fewer stars in the field of view, the better;

5)
The guide star is distributed as evenly as possible on the celestial sphere; 6)According to the imaging of the dynamic star simulator, select stars within 6.0 apparent magnitudes as guide stars.

B. PROCESSING DOUBLE STARS
Double stars refer to two stars that are close apart on the line of sight (the actual distance may be far away), and the star points on the imaging surface of the dynamic star simulator cannot be distinguished from each other. The traditional approach is to delete it directly. When there are fewer guided stars in the field of view, directly removing double stars means losing part of the available information.
The judgment of binary stars can be determined by the angular distance between stars. The schematic diagram of binary stars is shown in Fig.1. Let the right ascension and declination of stars A and B be respectively (α i , β i ) and (α j , β j ), Then the angular distance θ of stars A and B in the celestial coordinate system is as follows.
In the imaging process of the dynamic star simulator, the defocus of the image plane is 3 × 3 or 5 × 5 pixels.
There are 1024 × 1024 pixels on the imaging surface of the dynamic star simulator, and the field of view is 10 • ×10 • . Then, the angular distance ξ corresponding to each pixel is as follows.
Then, a 5×5 pixels guide star is defocused, the corresponding angle ζ size of the star is as follows.
When the angular distance between A and B stars is θ ≤ 0.05 • , the two stars are regarded as binaries, which will not be distinguished when the navigational star is extracted, so the two stars are removed. In addition, the imaging of binary stars in the phase plane is a large spot connected together, which cannot correctly determine the center of mass. Therefore, binary stars will be removed from the guide star catalog. In this paper, the stellar table of The Smith Astrophysical Observatory (SAO) is taken as the original stellar table. After removing variable stars and binary stars from the stellar table, 5,103 stars whose brightness is higher than (or equal to) 6Mv are left as guide stars. Its distribution of stars in the celestial sphere is shown in Fig.2.
It can be seen from Figure 2 that the distribution of stars in the celestial sphere is not uniform and random, the distribution of stars near the North-South Pole is relatively sparse, and the distribution of stars near the equator is relatively dense. Therefore, rationally expanding and homogenizing the star distribution can reduce the amount of data in the guide star catalog to a certain extent, and improve the refresh rate of the star map.

III. RESEARCH ON PARTITION ALGORITHM OF GUIDE STAR CATALOG A. PARTITION ALGORITHM
The celestial sphere is divided into non-overlapping regions by right ascension and declination, and the separation interval can be close to the radius of the field of view of the dynamic star simulator. For a FOV 10 • × 10 • square field of view, it should be covered with a circular field of view during partitioning to ensure that all guide stars are included in the field of view, then the field of view radius θ r is as follows.
In order to facilitate the partitioning of the star catalog, the celestial declination is divided equally, and the partition interval should not be too large. Because the range of declination changes in the range of 180 • between the South Pole −90 • and the North Pole +90 • . So the partition interval is taken as 7.5 • , the celestial declination interval can be equally divided into 24 parts and labeled with M i (i = 1, 2, 3, . . . , 24).
The common algorithm for homogenizing the distribution of guide stars is orthogonal grid method [23]- [26]. The basic idea is to imagine a sphere as a plane region. If the stars in any field of view show a uniform distribution, the distribution of guide stars in this plane region (i.e., the whole celestial region) is also uniform.
For star map recognition, the number of observed stars in the field of view should not be too small and must meet the minimum requirement of recognition (≥3). In order to ensure the accuracy of attitude calculation, the average number of stars in the field of view should not be too small, usually ≥6.
Within the whole sky area, the total number of stars N with magnitude Mv is as follows.
For a star sensor with a field of view of B (B is the opening angle of the star sensor optical lens), the ratio K of the sky area within the field of view that it can capture to the whole sky area is as follows.
For a star sensor with a lens angle of θ FOV , the average number θ FOV of stars with magnitude Mv that can be photographed in the field of view is as follows.
Bring the magnitude threshold to 6 magnitude stars and the field of view of 10 • × 10 • into formula (7), it can be obtained that the average number of stars of magnitude 6 that can be photographed in the field of view is 10.2 • To ensure the smooth recognition of the star map, the average number θ FOV of stars in the field of view should be taken as 11.
(1) Divide the declination of the entire sky area equally at intervals of 7.5 • ; (2) Screen the number of stars in each declination interval, denoted as N Mi ; (3) Divide the number of stars N Mi in each declination interval and the corresponding right ascension into blocks, and N θ ≥ θ FOV stars in each subregion, and arrange the right ascension in ascending order. The number of stars N θ in the subregion is calculated as follows.
q is the number of right ascension divisions in the declination strip, and r is the number of stars left in the declination zone; 1) If r = 0 , the number of right ascension sub-blocks in each declination subregion is q, and the number of stars N θ in each zone is θ FOV .
2) If r < q < FOV , in block r in the declination subregion, the number of stars N θ in the ascension subregion is θ FOV +1, and the number of stars N θ in the remaining q-r subregions is θ FOV .
3) If q < r < θ FOV , then the calculation is as follows.
a. If N r = 0, then the number of stars N θ in the right ascension subregion of block q in the declination subregion is θ FOV + N q . b. If N r = 0, then the number of stars N q in the right ascension subregion of block in the declination zone is θ FOV +N q + 1, and the number of stars N θ in the right ascension subregion of the remaining q − N q block is θ FOV + N q .
1) When j = q = 1, then calculate the right ascension Dec Mi1 interval of subregion M i1 as follows.
2) When j < q, then calculate the right ascension interval Dec Mij of subregion M ij as follows.
3) When j = q = 1, then calculate the right ascension interval Dec Miq of subregion M iq as follows.
According to the above subregion steps, the guide star catalog is divided into 452 subregions, and its subregion information is shown in I, and Fig.3 is its guide star catalog subregion map.

B. EXTRACT GUIDE STAR
To display the position of the guide star on the plane, the position (α i , β i ) of the guide star in the celestial coordinate system needs to be rotated and transformed into the star sensor coordinate system, and then the position (x i , y i , z i ) of the guide star in the star sensor coordinate system is transformed by projection. Get the position (X i , Y i ) in the plane image coordinate system.
Convert the coordinates of all the guide stars in the SAO catalog in the celestial coordinate system to the direction vector in the rectangular coordinate system in Fig.4. let the right ascension and declination of the guide be (α 0 , β 0 ), and calculate the direction vector of the guide star in the celestial  coordinate system as follows.

1) ROTATION TRANSFORMATION
The optical axis of the star sensor is (α i , β i ), and the rotation angle around the optical axis is γ i . its attitude angle (α i , β i , γ i ) indicates that the guide star S(α i , β i ) rotates around the Z axis γ i , around the Y axis β i , and finally around the X axis α i . T According to Z-Y-X, a 3 × 3 rotation matrix C 1 is obtained, the calculation is as follows.
Get its coordinate (x i , y i , z i ) in the coordinate system of the star sensor, the calculation is as follows.

2) PROJECTION TRANSFORMATION
The imaging process of a guide star on the photosensitive surface can be represented by a perspective projection transformation as shown in Fig.5. Through perspective projection, after perspective projection, the coordinates of the guide star in the plane image coordinate system, the calculation is as follows.
The focal length f of the optical system of the star simulator is calculated as follows.
where: VOLUME 9, 2021 N x and N y are the number of row and column pixels respectively; FOV x and FOV y respectively represent the field of view in the X-axis direction and the Y-axis direction; d h and d v are the width and height of the pixel respectively; The range of coordinates The position coordinates of the guide star on the plane image coordinate system are calculated, and the origin of the image coordinate system is located in the center of the imaging plane. When displaying an analog star map on a computer display, it is also necessary to translate the coordinates so that the simulated star map can be displayed normally on the computer screen. The coordinate origin of the computer display is in the upper left corner of the display, the calculation is as follows.
The range of coordinates The rotation matrix C 2 of quaternions is calculated as follows. (20), as shown at the bottom of the next page.
C 1 = C 2 , quaternion q 1 , q 2 , q 3 , q 4 can be obtained by combining the two formulas. The calculation is as follows.
When a circular field of view is used to search for stars that can be imaged, for stars that can be imaged on a photosensitive plane, the red longitude and declination (α i , β i ) coordinates satisfy the calculation as follows.

IV. EXPERIMENTAL VERIFICATION AND ANALYSIS A. EXPERIMENTAL VERIFICATION
The experimental software simulation platform adopts Mat-lab2016a version, according to the algorithm flow of the guide star number equalization method, and uses MATLAB to program the software to generate the star map simulation software shown in Fig.6. Star map simulation software mainly includes star map selection, simulation parameter setting, attitude setting, star map display, time display, attitude display, star information and data preservation functions. Use the screened guide star catalog with 5103 guide stars as test data. The view angle of the dynamic star simulator (FOV) is 10 • × 10 • , the magnitude threshold is 6Mv, its star map display device resolution is 1024 × 1024, and the pixel size is 16um × 16um. The optical axis of the dynamic star simulator points to (75 • ,63 • ) 0 • rotation about the optical axis, and the change speed of the optical axis is 0 • . Input the above  data into the star map simulation software, and compare and analyze the refresh time of the star table before partition and after partition.

B. RESULTS ANALYSIS
In order to verify the consistency of the simulated star map when the guide star catalog is not partitioned and when it is partitioned, three optical axis directions are randomly selected for testing from the north pole to the south pole. During the test, the rotation angle is 0 • , and the optical axis change speed is 0. The test results are shown in Fig.7 to Fig.9. Table 2 is the time used to retrieve the guide when generating 3 simulated star maps.
From the observation of Fig.7 to Fig.9, it can be concluded that the simulated star map generated when the star catalog is not partitioned is consistent with the simulated star map generated during partition, which verifies the consistency of the partition algorithm of the star catalog.
It can be seen from fig.2 and II that the time difference between the generation of simulated star maps when the guide star catalog is partitioned and not partitioned is relatively large. The retrieval time after partition is about three times    the retrieval time before partitioning. In order to verify the universality of this phenomenon the random selection of the optical axis points to 1000 to test the refresh time of the star map, and the test results are shown in Fig.10 and 11.
It can be seen from Figure 10 that the refresh time of the star map when the star catalog is not partitioned is between 22 and 27ms. After calculation, the average time for star chart refresh is 24.59ms. It can be seen from Figure 11 that the refresh time of the star map after the star catalog is partitioned is between 7 and 9ms. After calculation, the average time for star chart refresh is 7.98ms. After the star catalog is partitioned, there are more stars in some sub-regions. When searching, the refreshing time of the star map is 2∼3 times longer than when the catalog is not partitioned, and the average search time for navigating stars is about 3 times. Compared with the currently commonly used star catalog division algorithm, it has also been greatly improved, and the generality of the algorithm is verified.

V. CONCLUSION
The guide star equipartition method proposed in this paper. Through screening and processing the limit magnitude, the capacity of the guide star catalogue is determined to be 5103. The declination interval is determined according to the field of view, and the right ascension interval is determined according to the number of stars, so that the number of stars in 452 subregions is approximately equal. Software programming and star map simulation system are designed by using the method of average number of guide stars, which can accomplish the partitioning of guide star catalogs with different view fields and magnitude limits and realize the function of star map simulation. Use the star map simulation system to randomly test the star chart refresh time pointed to by 1,000 optical shafts, with an average refresh time of about 8ms. In this paper, the partition algorithm of guide star catalog greatly improves the refresh rate of star map, and also verifies the consistency and universality of the algorithm.