An Automated Test Method for Relay Visibility Prediction Based on STK
By developing SpringCloud microservice software, using JAVA to call the STK interface and the software to be tested, the automated test of the visible computing function of the software to be tested is realized, solving the problems of low verification efficiency and high development cost in the existing technology, and achieving efficient and economical automated testing is achieved.
Patent Information
- Application Number
- CN202211354497.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-11-01
AI Technical Summary
The verification efficiency of existing software to be tested is low in relaying visible calculation results, requires a lot of manual time, and has high development costs, making it difficult to achieve automated testing.
By developing SpringCloud microservice software, using JAVA to call the STK interface to set scene parameters and generate reports, combined with the software interface to be tested to obtain relay visible calculation results, and realize automated testing.
It realizes efficient and comprehensive automated testing of the visible computing function of the software to be tested, reduces development costs and facilitates function expansion and upgrading.
Smart Images

Figure CN115687121B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of satellite remote sensing and software, and relates to an automated test method for relay visibility prediction based on STK for the software to be tested. Background Art
[0002] Calculating the relay visible time window by a satellite is a basic function existing in the software to be tested, which involves various complex calculation models such as spatial calculations and satellite orbit calculations. In practical applications, how to comprehensively and efficiently verify the correctness and rationality of the calculation results of the relay visible time window of the software is a basic problem faced by the functional development of the software to be tested.
[0003] Currently, for verifying the results of the relay visible calculation of the software to be tested, an STK scenario is manually established, a result report is generated in the STK software, and then the relay visible results are obtained in the software to be tested under the same input conditions. After manual analysis and comparison, the correctness of the results of the software to be tested is verified. If hundreds or thousands of groups of functional tests with different input conditions are to be carried out, this method is not only inefficient but also requires a large amount of time. Currently, most software to be tested is developed using a B / S microservice architecture, which makes it easy for external software to interact. However, if only JAVA is used to develop the microservice of the test software, since it does not have the ability of satellite spatial calculation by itself, complex mathematical problems such as research on relay visible calculation algorithms and model establishment need to be completed, and the development cost is extremely high. Therefore, combining the advantages of STK and JAVA, making up for each other's deficiencies, and realizing the automated test of the relay visible calculation function of the software to be tested has certain practical value.
[0004] STK not only provides an external JAVA interface, enabling direct communication with STK using the JAVA language, but also provides hundreds of JAVA interaction commands, which provides convenient conditions for the automated test of the software. The microservice system software is easy to expand and upgrade, laying a foundation for the further development of new functions in the future. Summary of the Invention
[0005] The present invention provides an automated test method for relay visibility prediction based on STK for the software to be tested, which can use JAVA to call the STK interface to set scenario parameters, satellite orbit parameters, generate and obtain custom reports, conduct data analysis, and can also directly call the interface of the software to be tested to obtain the relay visible calculation results, realizing highly efficient automated functional testing.
[0006] The technical solution of the present invention is as follows:
[0007] An automated test method for relay visibility prediction based on STK includes the following steps:
[0008] Step 1: Develop a SpringCloud microservice software using the JAVA language, and establish connections with STK and the microservice software to be tested respectively;
[0009] Step 2: Create a new scenario in STK, including an observing satellite, a relay satellite, and an observing satellite sensor, set the scenario parameters, create new spatial vectors and spatial angles, and create a custom report;
[0010] Step 3: The SpringCloud microservice software randomly generates an observing time period, the pitch and yaw capabilities of the observing satellite, orbital parameters, and the orbital parameters of the relay satellite using the JAVA language, and sets them into the STK scenario through commands;
[0011] Step 4: The SpringCloud microservice software uses JAVA language commands to control STK to generate and obtain custom report data, processes and analyzes the report data with the pitch and yaw capabilities of the observing satellite, and obtains the STK relay visible time window;
[0012] Step 5: The SpringCloud microservice software calls the relay visibility function interface of the microservice software to be tested, obtains the relay visible time window for a specified time period, compares it with the result of STK, and conducts a correctness verification; return to Step 3. After reaching the set number of test groups, generate a text file for all verification results, the content of which includes the test name, the number of test groups, the number of failed groups, the passing rate, and the record of failed content. The record of failed content includes the test conditions for each group and the results of the microservice software to be tested and STK.
[0013] Furthermore, in Step 1, the SpringCloud microservice software establishes a connection with STK through the IP and port of STK running, and establishes a connection with the microservice software to be tested through the service registry.
[0014] Furthermore, the newly created spatial vectors in Step 2 include: the vector Vector from the observing satellite to the relay satellite S-T , the vector Vector from the observing satellite to the earth's center S-E and the projection Vector of Vector S-T on the YOZ plane in the body coordinate system Vector projYOZ ; the newly created spatial angles include: the included angle Angle S-T between Vector projYOZ and Vector pitch , the included angle Angle projYOZ between Vector roller and the plane XOZ, and the included angle Angle S-T between Vector S-E and Vector VST-VSE ; the custom report content includes: time, Angleroller 、 Angle pitch and Angle VST-VSE 。
[0015] Furthermore, the pitch and roll capabilities of the observing satellite in step 3 include the maximum pitch angle Pitch max 、 the minimum pitch angle Pitch min 、 the maximum roll angle Roller max and the minimum roll angle Roller min , and the orbital parameters include the semi-major axis, orbital inclination, right ascension of the ascending node, and argument of perigee.
[0016] Furthermore, the method of processing and analyzing in step 4 is as follows: When Angle roller and Angle pitch in the report satisfy formula (1), the observing satellite can access the relay satellite. By traversing the report content, the time window set TimeList stk visible to the relay within the specified time period can be obtained;
[0017] Roller min ≤ Angle roller ≤ Roller max , Pitch min ≤ Angle pitch ≤ Pitch max (1).
[0018] Furthermore, when there is an earth occlusion during the operation of the observing satellite, it is invisible to the relay. It is screened by formula (2). When formula (2) is satisfied, there is an earth occlusion for the observing satellite, and the time window set TimeList stk is updated;
[0019] R S-E · sin(Angle VST-VSE ) ≤ R earth (2)
[0020] where R S-E is the distance between the observing satellite and the earth's center, and R earth is the earth's radius.
[0021] Furthermore, the process of correctness verification in step 5 is as follows: Traverse the time window set TimeList soft obtained from the microservice software to be tested and the time window set TimeList stk obtained by analyzing the STK report. When the set sizes satisfy formula (3) and each element in the set satisfies formula (4), the microservice software to be tested calculates the relay visible time window correctly;
[0022] ListSize soft = ListSize stk (3)
[0023] Tstart stk = Tstart soft , Tend stk = Tend soft (4)
[0024] Among them, ListSize soft is the capacity of TimeList soft ListSoft stk is the capacity of TimeList stk Tstart stk , Tend stk respectively represent the start time and end time of the relay visibility obtained by analyzing STK. Tstart soft , Tend soft represent the start time and end time of the relay visibility of the microservice software to be tested.
[0025] The beneficial effects of the present invention are as follows:
[0026] Based on STK, the present invention conducts automated testing on the relay visibility calculation function of the software to be tested. The method provided by the present invention can achieve efficient and comprehensive automated testing of the relay visibility calculation function of the software to be tested, and is also convenient for function expansion and upgrade. Description of the Drawings
[0027] Figure 1 is the automated testing process of the relay visibility function of the software to be tested based on STK of the present invention.
[0028] Figure 2 is the schematic diagram of the vector and angle established by the present invention.
[0029] Figure 3 is the schematic diagram of the relay satellite being blocked by the earth of the present invention. Detailed Embodiments
[0030] The method provided by the present invention will be elaborated in detail below through examples.
[0031] The present invention provides an automated testing method for relay visibility prediction based on STK, including the following steps:
[0032] Step 1: Develop SpringCloud microservice software using the JAVA language, and establish connections with STK and the microservice software to be tested respectively;
[0033] (101) Create a new Spring Boot project, use the StkCon interface class provided by STK as a bean in the Spring container, and establish a connection with STK through the connect method of the StkCon object, passing in the IP and port number.
[0034] (102) Register the newly created Spring Boot microservice software to the registration center of the microservice software to be tested, and establish a connection with the microservice software to be tested through the registration center.
[0035] Step 2: Create a new scenario in STK and set scenario parameters, create spatial vectors, spatial angles, and create a custom report;
[0036] (201) Create a new scenario named "SoftTestSenario", create a new observing satellite SatVisit, a relay satellite TRDSS, and an observing star sensor Sensor;
[0037] Set the field of view of the observing star sensor to a rectangular field of view, and set the two half-angles to 45 degrees and 60 degrees respectively (these are just initial values, and the specific values are randomly generated by the test software and passed in).
[0038] (202) Create new spatial vectors (as Figure 2 shown), spatial angles, and custom reports
[0039] Newly created spatial vectors: The vector Vector from the observing star to the relay star S-T , the vector Vector from the observing star to the earth's center S-E , the projection Vector of Vector S-T on the YOZ plane in the satellite body coordinate system projYOZ .
[0040] Newly created spatial angles: The angle Angle between Vector S-T and Vector projYOZ , the angle Angle between Vector pitch and the XOZ plane projYOZ , and the angle Angle between Vector roller and Vector S-T and Vector S-E VST-VSE .
[0041] The content of the newly created report includes: time, Angle roller , Angle pitch , and Angle VST-VSE .
[0042] Step 3: The SpringCloud microservice software randomly generates the observation time period, the pitch, roll, and yaw capabilities of the observing satellite, and the orbital parameters, as well as the orbital parameters of the relay satellite using the JAVA language, and sets them into the STK scenario through commands;
[0043] Set the microservice interface parameter "TestNum" to 2000, indicating that 2000 groups of tests under different conditions are to be carried out.
[0044] Set the initial analysis time period, including the start time and the end time.
[0045] Use the "SetSate* / Satellite / SatName" command to set the initial orbital parameters of the observing satellite and the relay satellite. The initial orbital parameters include the epoch time, semi-major axis, eccentricity, inclination, right ascension of the ascending node, argument of perigee, and mean anomaly.
[0046] In each group of tests, randomly vary the analysis time period and the orbital parameters, including the semi-major axis, orbital inclination, right ascension of the ascending node, and argument of perigee; randomly vary the pitch, roll, and yaw capabilities of the observing satellite, that is, the maximum pitch angle Pitch max 、the minimum pitch angle Pitch min 、the maximum roll angle Roller max 、the minimum roll angle Roller min , with the variation range being (0, 90], in degrees.
[0047] Step 4: The SpringCloud microservice software uses JAVA language commands to control STK to generate and obtain a custom report, and processes and analyzes the report data to obtain the STK relay visibility time window
[0048] (401) Use the "RM_Report* / Satellite / SatName Style “RelayReport” TimePeriod*" command to control STK to generate a custom report and read it into the JAVA program, and the angle Angle of the satellite per second can be obtained roller 、Angle pitch and Angle VST-VSE .
[0049] (402) Analyze the report content. When the Angle roller 、Angle pitch in the report satisfy formula (1), it is considered that the observing satellite can access the relay satellite. By traversing the report content, the time window set TimeList of relay visibility within the specified time period can be obtained stk .
[0050] Roller min≤Angle roller ≤Roller max , Pitch min ≤Angle pitch ≤Pitch max (1)
[0051] (403) Screen for time periods with Earth occlusion. When the formula (2) is satisfied, the observed star is occluded by the Earth, and the relay visible period should not include the Earth occlusion time period. As Figure 3 shown in the schematic diagram of the relay satellite being occluded by the Earth in the present invention.
[0052] R S-E ·sin(Angle VST-VSE ) ≤ R earth (2)
[0053] Wherein, R S-E is the distance between the observed star and the Earth's center, calculated by reading the J2000 coordinate report of the satellite, and R earth is the Earth radius, and the Earth radius is taken as 6378.140 kilometers.
[0054] Step Five: The SpringCloud microservice software calls the relay visibility function interface of the microservice software under test to obtain the relay visibility time window for a specified time period, and compares it with the result of STK for correctness verification;
[0055] (501) Call the relay visibility calculation interface of the software under test through the microservice declarative interface, and input the same random conditions (including the analysis time period, randomly varying orbital parameters, including semi-major axis, orbital inclination, right ascension of the ascending node, argument of perigee, and the pitching and yawing capabilities of the observed star) generated in Step Three as parameters to obtain the relay visibility calculation result calculated by the microservice software under test.
[0056] (502) Traverse the set of visible time windows TimeList obtained by the microservice software under test soft and the set of time windows TimeList obtained by analyzing the STK report stk . When the size of the set satisfies the formula (3) and each element in the set satisfies the formula (4), it is considered that the relay visibility time window calculated by the software under test is correct.
[0057] ListSize soft = ListSize stk (3)
[0058] Tstart stk = Tstart soft , Tend stk = Tend soft (4)
[0059] Among them, ListSize soft is the capacity of TimeList soft ListSoft stk is the capacity of TimeList stk Tstart stk , Tend stk respectively represent the start time and end time of relay visibility obtained by analyzing STK. Tstart soft , Tend soft represent the start time and end time of relay visibility of the software under test.
[0060] (503) Return to step three. After reaching the set number of test groups TestNum, generate a text file for all verification results, including the test name, the number of test groups, the number of failed groups, the pass rate, and the record of failed content. The record of failed content includes the test conditions for each group and the results of the microservice software under test and STK.
Claims
1. An automated test method for relay visibility prediction based on STK, characterized in that It includes the following steps: Step 1: Develop a SpringCloud microservice software using the JAVA language, and establish connections with STK and the microservice software to be tested respectively; Step 2: Create a new scenario in STK, including an observing satellite, a relay satellite, and an observing satellite sensor, set the scenario parameters, create a spatial vector and a spatial angle, and create a custom report; Step 3: The SpringCloud microservice software randomly generates an observing time period, the pitch and yaw capabilities of the observing satellite, orbital parameters, and the orbital parameters of the relay satellite using the JAVA language, and sets them into the STK scenario through commands; Step 4: The SpringCloud microservice software uses JAVA language commands to control STK to generate and obtain custom report data, processes and analyzes the report data with the pitch and yaw capabilities of the observing satellite, and obtains the relay visible time window of STK; Step 5: The SpringCloud microservice software calls the relay visibility function interface of the microservice software to be tested, obtains the relay visible time window for a specified time period, compares it with the result of STK, and conducts a correctness verification; Return to Step 3. After reaching the set number of test groups, generate a text file with all the verification results. The content includes the test name, the number of test groups, the number of failed groups, the passing rate, and the record of failed content. The record of failed content includes the test conditions for each group and the results of the microservice software to be tested and STK; 2. The automated test method for relay visibility prediction based on STK according to claim 1, characterized in that, In Step 1, the SpringCloud microservice software establishes a connection with STK through the IP and port where STK runs, and establishes a connection with the microservice software to be tested through the service registry.
3. The automated test method for relay visibility prediction based on STK according to claim 1, wherein, The newly created spatial vectors in step two include: the vector Vector from the observing satellite to the relay satellite S-T , the vector Vector from the observing satellite to the geocenter S-E and Vector S-T the projection Vector of the YOZ plane in the body coordinate system projYOZ ; the newly created spatial angles include: the angle Angle between Vector S-T and Vector projYOZ , the angle Angle between Vector pitch and the plane XOZ projYOZ and the angle Angle between Vector roller and Vector S-T and Vector S-E ; the custom report content includes: time, Angle VST-VSE , Angle roller , Angle pitch and Angle VST-VSE .
4. The automated test method for relay visibility prediction based on STK according to claim 3, characterized in that, The pitch and roll capabilities of the observation satellite in step three include the maximum pitch angle Pitch max 、the minimum pitch angle Pitch min 、the maximum roll angle Roller max and the minimum roll angle Roller min . The orbital parameters include the semi-major axis, the orbital inclination, the right ascension of the ascending node, and the argument of perigee.
5. The automated test method for relay visibility prediction based on STK according to claim 4, wherein The method of processing and analysis in Step 4 is as follows: When Angle roller and Angle pitch satisfy Formula (1), the observing satellite can access the relay satellite. By traversing the report content, the time window set TimeList stk visible to the relay within the specified time period is obtained; Roller min ≤Angle roller ≤Roller max ,Pitch min ≤Angle pitch ≤Pitch max (1).
6. The automated test method for relay visibility prediction based on STK according to claim 5, characterized in that, When the observed star is blocked by the Earth during its operation, it is invisible to the relay. It is screened by formula (2). When formula (2) is satisfied, the observed star is blocked by the Earth, and the time window set TimeList is updated. stk ; R S-E ·sin(Angle VST-VSE )≤R earth (2) Among them, R S-E is the distance between the observed star and the center of the earth, and R earth is the radius of the earth.
7. The automated test method for relay visibility prediction based on STK according to claim 1, characterized in that, The process of correctness verification in step five is as follows: traverse the set of visible time windows TimeList obtained by the microservice software to be tested soft and the set of time windows TimeList obtained by analyzing the STK report stk When the size of the set meets formula (3) and each element in the set meets formula (4), the microservice software to be tested calculates the relay visible time window correctly; ListSize soft = ListSize stk (3) Tstart stk = Tstart soft , Tend stk = Tend soft (4) Among them, ListSize soft is the capacity of TimeList soft , ListSoft stk is the capacity of TimeList stk , Tstart stk , Tend stk respectively represent the start time and end time of relay visibility obtained by analyzing STK. Tstart soft , Tend soft represent the start time and end time of relay visibility of the microservice software to be tested.
Citation Information
Patent Citations
Satellite universal automatic testing platform and data interaction method thereof
CN107769836A
Method and system for automated software accessibility testing
WO2022054101A1