« Maneuvers Estimation And Pdf Report » : différence entre les versions
		
		
		
		Aller à la navigation
		Aller à la recherche
		
| Aucun résumé des modifications | Aucun résumé des modifications | ||
| (19 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 1 : | Ligne 1 : | ||
| To get an estimation of the occured maneuvers, it is only necessary to initialize a list of <font color=#FF8C00 title="Two Lines Elements">TLE</font> as shown [[Basic_Principle#Getting_list_of_TLE|here]].  | To get an estimation of the occured maneuvers, it is only necessary to initialize [[https://logiciels.cnes.fr/en/node/64?type=tel PATRIUS dataset]] and a list of <font color=#FF8C00 title="Two Lines Elements">TLE</font> as shown [[Basic_Principle#Getting_list_of_TLE|here]] and below . Anyway, it is also recommended to load a configuration properties file as shown below and [[Basic_Principle#How_to_initialize_Opera|here]], at least to well initialize internal <font color=#556B2F>'''OPERA'''</font> data. | ||
| <syntaxhighlight lang="java"> | |||
| // Patrius Dataset initialization (needed for example to get the UTC time) | |||
| OperaReadUtils.iniPatriusDataset(null); | |||
| // Opera properties configuration | |||
| final OperaConfigurationProperties conf = OperaReadUtils.getConfigurationProperties("data/opera-configuration.properties"); | |||
| // TLEs initialization | |||
| final int noradId = 10479; | |||
| final SortedSet<TLE> tlesSet = OperaTleManager.readTLEs("data/tles", noradId); | |||
| </syntaxhighlight> | |||
| Moreover, these <font color=#FF8C00 title="Two Lines Elements">TLE</font> will be stored in <font color=#4169E1>OperaTLESeries</font> then <font color=#4169E1>OperaTLEManoeuvres</font> objects: | |||
| <syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
| Ligne 6 : | Ligne 20 : | ||
| </syntaxhighlight> | </syntaxhighlight> | ||
| Then, the computation of the estimated maneuvers will be done thanks to calling the <font color=#4169E1>estimateLEOManoeuvers()</font> method of this  | Then, the computation of the estimated maneuvers will be done thanks to calling the <font color=#4169E1>estimateLEOManoeuvers()</font> method of this <font color=#4169E1>OperaTLEManoeuvres</font> object: | ||
| <syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
| // Maneuvers estimation | // Maneuvers estimation | ||
| OperaLEOManoeuvers manInfo = tleForMan.estimateLEOManoeuvers(); | final OperaLEOManoeuvers manInfo = tleForMan.estimateLEOManoeuvers(); | ||
| </syntaxhighlight> | </syntaxhighlight> | ||
| Some getters will be available to obtain results as in the example below ... | |||
| <syntaxhighlight lang="java">  | <syntaxhighlight lang="java"> | ||
| final int manNum = manInfo.getDgaManoeuvers().size(); | final int manNum = manInfo.getDgaManoeuvers().size(); | ||
| System.out.println("Amount of maneuvers: " + manNum); | System.out.println("Amount of maneuvers: " + manNum); | ||
| for (int iMan = 0; iMan < manInfo.getSmaManoeuversDates().size(); iMan++) { | for (int iMan = 0; iMan < manInfo.getSmaManoeuversDates().size(); iMan++) { | ||
|      System.out.println( "Maneuver #"+iMan); |      System.out.println("Maneuver #"+iMan); | ||
|      System.out.println("   maneuver date: " + OperaDateManager.cnesJulianDate2AbsoluteDate(manInfo.getSmaManoeuversDates().get(iMan))); |      System.out.println("   maneuver date: " + OperaDateManager.cnesJulianDate2AbsoluteDate(manInfo.getSmaManoeuversDates().get(iMan))); | ||
|      System.out.println("   maneuver dga:  " + manInfo.getDgaManoeuvers().get(iMan).getSma() + " m"); |      System.out.println("   maneuver dga:  " + manInfo.getDgaManoeuvers().get(iMan).getSma() + " m"); | ||
| } | } | ||
| </syntaxhighlight> | |||
| At last, it will be also possible to generate automatically a <font color=#FF8C00 title="Portable Document Format">PDF</font> report as this: | |||
| <syntaxhighlight lang="java"> | |||
| // Pdf generation | |||
| final String path = tleForMan.buildLEOManReport(noradId, conf); | |||
| System.out.println("Pdf report generated at " + path); | |||
| </syntaxhighlight> | </syntaxhighlight> | ||
Dernière version du 21 janvier 2020 à 08:44
To get an estimation of the occured maneuvers, it is only necessary to initialize [PATRIUS dataset] and a list of TLE as shown here and below . Anyway, it is also recommended to load a configuration properties file as shown below and here, at least to well initialize internal OPERA data.
// Patrius Dataset initialization (needed for example to get the UTC time)
OperaReadUtils.iniPatriusDataset(null);
                
// Opera properties configuration
final OperaConfigurationProperties conf = OperaReadUtils.getConfigurationProperties("data/opera-configuration.properties");
// TLEs initialization
final int noradId = 10479;
final SortedSet<TLE> tlesSet = OperaTleManager.readTLEs("data/tles", noradId);
Moreover, these TLE will be stored in OperaTLESeries then OperaTLEManoeuvres objects:
final OperaTLESeries tleSeries = new OperaTLESeries(tles);
final OperaTLEManoeuvres tleForMan = new OperaTLEManoeuvres(tleSeries);
Then, the computation of the estimated maneuvers will be done thanks to calling the estimateLEOManoeuvers() method of this OperaTLEManoeuvres object:
// Maneuvers estimation
final OperaLEOManoeuvers manInfo = tleForMan.estimateLEOManoeuvers();
Some getters will be available to obtain results as in the example below ...
final int manNum = manInfo.getDgaManoeuvers().size();
System.out.println("Amount of maneuvers: " + manNum);
for (int iMan = 0; iMan < manInfo.getSmaManoeuversDates().size(); iMan++) {
    System.out.println("Maneuver #"+iMan);
    System.out.println("   maneuver date: " + OperaDateManager.cnesJulianDate2AbsoluteDate(manInfo.getSmaManoeuversDates().get(iMan)));
    System.out.println("   maneuver dga:  " + manInfo.getDgaManoeuvers().get(iMan).getSma() + " m");
}
At last, it will be also possible to generate automatically a PDF report as this:
// Pdf generation
final String path = tleForMan.buildLEOManReport(noradId, conf);
System.out.println("Pdf report generated at " + path);