Basic Principle : Différence entre versions

De Wiki
Aller à : navigation, rechercher
(How to initialize Opera Properties)
(Getting list of TLE)
 
(20 révisions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
 
<font color=#556B2F>'''OPERA'''</font> proposed a <font color=#FF8C00>Java</font> interface. To use this <font color=#FF8C00>Java</font> interface, the developer will have to:
 
<font color=#556B2F>'''OPERA'''</font> proposed a <font color=#FF8C00>Java</font> interface. To use this <font color=#FF8C00>Java</font> interface, the developer will have to:
  
* Create the <font color=#556B2F>'''OPERA'''</font> [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/simulation/ReentrySimulation.html ReentrySimulation] object with ...
+
* create the <font color=#556B2F>'''OPERA'''</font> [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/simulation/ReentrySimulation.html ReentrySimulation] object with ...
 
** an [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/configuration/OperaConfigurationProperties.html OperaConfigurationProperties] object created from an existing file
 
** an [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/configuration/OperaConfigurationProperties.html OperaConfigurationProperties] object created from an existing file
 
** a <font color=#4169E1>List<[{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/model/SolarActivityRow.html SolarActivityRow]>]</font> object including actual and predicted solar activities
 
** a <font color=#4169E1>List<[{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/model/SolarActivityRow.html SolarActivityRow]>]</font> object including actual and predicted solar activities
Ligne 8 : Ligne 8 :
 
To obtain the results, some "getter" methods will be available depending on the type of computation.
 
To obtain the results, some "getter" methods will be available depending on the type of computation.
  
== Do not forget to initilaize PATRIUS DATA SET !!! ==
+
== Do not forget to initialize PATRIUS dataset ... ==
  
As every computation using [[http://patrius.cnes.fr PATRIUS]], it is mandatory to well intialize a data set including main information to propagate trajectories (atmospheric models, third bodies ephemeris, <font color=#FF8C00 title="Coordinated universal time>UTC</font>/<font color=#FF8C00 title="Temps Atomique International>TAI</font> shifts, ...). Thanks to tha additional jar available here, it is really easy to do it calling the <font color=#4169E1>addResourcesFromPatriusDataset()</font> static method.
+
As every computation using [[http://patrius.cnes.fr PATRIUS]], it is mandatory to well intialize a data set including main information to propagate trajectories (atmospheric models, third bodies ephemeris, <font color=#FF8C00 title="Coordinated universal time>UTC</font>/<font color=#FF8C00 title="Temps Atomique International>TAI</font> shifts, ...). Thanks to the additional jar available [[https://logiciels.cnes.fr/en/node/64?type=tel here]] and directly included in the opera-NN.n-jar-with-dependencies.jar file, it is really easy to do it by calling the <font color=#4169E1>OperaReadUtils.iniPatriusDataset()</font> method.
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
 
// Patrius Dataset initialization (needed for example to get the UTC time)
 
// Patrius Dataset initialization (needed for example to get the UTC time)
PatriusDataset.addResourcesFromPatriusDataset() ;
+
OperaReadUtils.iniPatriusDataset(null);
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
Rather than to put '''null''' as input parameter of the <font color=#4169E1>OperaReadUtils.iniPatriusDataset()</font> method, it is possible to give the name of a directory where additional data could be read.
  
 
== How to initialize Opera Properties ==
 
== How to initialize Opera Properties ==
Ligne 21 : Ligne 23 :
 
A properties file is mandatory to initialize all the parameters needed to tune an <font color=#556B2F>'''OPERA'''</font> computation. For more explanation about this kind of file, see [[Parameters|here]].
 
A properties file is mandatory to initialize all the parameters needed to tune an <font color=#556B2F>'''OPERA'''</font> computation. For more explanation about this kind of file, see [[Parameters|here]].
  
Thanks to the static method <font color=#4169E1>getConfigurationProperties()</font> from [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/configuration/OperaConfigurationProperties.html OperaConfigurationProperties] class, we have just to precise the file path:
+
Thanks to the static method <font color=#4169E1>getConfigurationProperties()</font> from <font color=#4169E1>OperaReadUtils</font> class, we have just to precise the file path:
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
 
// Opera properties configuration
 
// Opera properties configuration
final OperaConfigurationProperties conf = OperaConfigurationProperties.getConfigurationProperties("data/opera-configuration.properties");
+
final OperaConfigurationProperties conf = OperaReadUtils.getConfigurationProperties("data/opera-configuration.properties");
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== How to initialize solar activity ==
 
== How to initialize solar activity ==
  
Similarly, we can use another static method from the [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/util/OperaSolarActivity.html OperaSolarActivity] class. This method (<font color=#4169E1>getSolarActivityFromFile()</font>) needs as input parameters:
+
Similarly, we can use another static method from the <font color=#4169E1>OperaSolarActivity</font> class. This method (<font color=#4169E1>getSolarActivityFromFile()</font>) needs as input parameters:
  
 
* the path for the file where actual activity is stored
 
* the path for the file where actual activity is stored
Ligne 46 : Ligne 48 :
 
== Reentry simulation object ==
 
== Reentry simulation object ==
  
To create such an object only consists in calling the dedicated constructor with both previous [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/configuration/OperaConfigurationProperties.html OperaConfigurationProperties] and <font color=#4169E1>List<[{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/model/OperaSolarActivityRow.html OperaSolarActivityRow]>]</font> objects:
+
To create such an object only consists in calling the dedicated constructor with both previous <font color=#4169E1>OperaConfigurationProperties</font> and <font color=#4169E1>List<OperaSolarActivityRow></font> objects:
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
Ligne 57 : Ligne 59 :
 
Getting the list of <font color=#FF8C00 title="Two Lines Elements">TLE</font> is done in two steps:
 
Getting the list of <font color=#FF8C00 title="Two Lines Elements">TLE</font> is done in two steps:
  
# Getting all the available <font color=#FF8C00 title="Two Lines Elements">TLE</font> for a given Norad Id calling the static [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/util/OperaTleManager.html OperaTleManager]<font color=#4169E1>.readTLEs()</font> method
+
# Getting all the available <font color=#FF8C00 title="Two Lines Elements">TLE</font> for a given Norad Id calling the static <font color=#4169E1>OperaTleManager.readTLEs()</font> method
# Extract from this previous list the needed sublist corresponding to a given duration and an "End Of History" date calling the static [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/opera/util/OperaTleManager.html OperaTleManager]<font color=#4169E1>.selectTLEs()</font> method
+
# Extract from this previous list the needed sublist corresponding to a given duration and an "End Of History" date calling the static <font color=#4169E1>OperaTleManager.selectTLEs()</font> method
 
+
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
 
// TLEs initialization
 
// TLEs initialization
 
final int noradId = 10479;
 
final int noradId = 10479;
final SortedSet<TLE> tlesSet = OperaTleManager.readTLEs("data/tles", noradId);
+
final SortedSet<TLE> tlesSet = OperaTleManager.readTLEs("data/tles", noradId, true, "txt");
       
+
 
 
// TLEs selection
 
// TLEs selection
 
final double historyDuration = 80.;
 
final double historyDuration = 80.;

Version actuelle en date du 21 janvier 2020 à 08:38

OPERA proposed a Java interface. To use this Java interface, the developer will have to:

To obtain the results, some "getter" methods will be available depending on the type of computation.

Do not forget to initialize PATRIUS dataset ...

As every computation using [PATRIUS], it is mandatory to well intialize a data set including main information to propagate trajectories (atmospheric models, third bodies ephemeris, UTC/TAI shifts, ...). Thanks to the additional jar available [here] and directly included in the opera-NN.n-jar-with-dependencies.jar file, it is really easy to do it by calling the OperaReadUtils.iniPatriusDataset() method.

// Patrius Dataset initialization (needed for example to get the UTC time)
OperaReadUtils.iniPatriusDataset(null);

Rather than to put null as input parameter of the OperaReadUtils.iniPatriusDataset() method, it is possible to give the name of a directory where additional data could be read.

How to initialize Opera Properties

A properties file is mandatory to initialize all the parameters needed to tune an OPERA computation. For more explanation about this kind of file, see here.

Thanks to the static method getConfigurationProperties() from OperaReadUtils class, we have just to precise the file path:

// Opera properties configuration
final OperaConfigurationProperties conf = OperaReadUtils.getConfigurationProperties("data/opera-configuration.properties");

How to initialize solar activity

Similarly, we can use another static method from the OperaSolarActivity class. This method (getSolarActivityFromFile()) needs as input parameters:

  • the path for the file where actual activity is stored
  • the path for the file where predicted activity is stored
  • the CNES Julian date corresponding to the switch between actual and predicted activity
// Solar activity initialization
final String realPath = "data/solar/ACSOL_REAL.act";
final String predPath = "data/solar/ACSOL_PREDICTED.act";
final double switchCJD = 22700.0;                
final List<OperaSolarActivityRow> solarActivity = OperaSolarActivity.getSolarActivityFromFile(realPath, predPath, switchCJD);

Reentry simulation object

To create such an object only consists in calling the dedicated constructor with both previous OperaConfigurationProperties and List<OperaSolarActivityRow> objects:

// Reentry simulation creation
final OperaReentrySimulation simulation = new OperaReentrySimulation(conf, solarActivity);

Getting list of TLE

Getting the list of TLE is done in two steps:

  1. Getting all the available TLE for a given Norad Id calling the static OperaTleManager.readTLEs() method
  2. Extract from this previous list the needed sublist corresponding to a given duration and an "End Of History" date calling the static OperaTleManager.selectTLEs() method
// TLEs initialization
final int noradId = 10479;
final SortedSet<TLE> tlesSet = OperaTleManager.readTLEs("data/tles", noradId, true, "txt");
 
// TLEs selection
final double historyDuration = 80.;
final double endOfHistoryCJD = 22605.0;                
final List<OperaTLE> tles = OperaTleManager.selectTLEs(tlesSet, endOfHistoryCJD, historyDuration);