Propagation : Différence entre versions

De Wiki
Aller à : navigation, rechercher
(Page créée avec « == Slave mode == The simplest way to propagate is to use the “''slave mode''”. The final result (at the date of the end of the propagation will be stored in a https... »)
 
Ligne 20 : Ligne 20 :
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
final OutputConfig output =
+
final OutputConfig output = new OutputConfig(FramesFactory.getEME2000(), LOFType.LVLH, 60.);
  new OutputConfig(FramesFactory.getEME2000(), LOFType.LVLH, 60.);
+
</syntaxhighlight>
Then, the propagation will be done by calling the propagateInMasterMode method and the list of SpacecraftState (see PATRIUS definition) could be recover using the getListOfSpacecraftStates method. In the following example, we have no additional events (reason why of the null second argument).
+
 
 +
Then, the propagation will be done by calling the propagateInMasterMode method and the list of <font color=#4169E1>SpacecraftState</font> (see [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] definition) could be recover using the <font color=#4169E1>getListOfSpacecraftStates()</font> method. In the following example, we have no additional events (reason why of the null second argument).
 +
 
 +
<syntaxhighlight lang="java">
 
test.propagateInMasterMode(output, null);
 
test.propagateInMasterMode(output, null);
 
List<SpacecraftState> listOfSc = test.getListOfSpacecraftStates();
 
List<SpacecraftState> listOfSc = test.getListOfSpacecraftStates();
The user may now use this list …      
+
</syntaxhighlight>
 +
 
 +
The user may now use this list …
 +
   
 +
 
 +
<syntaxhighlight lang="java">
 
final int nb = listOfSc.size();
 
final int nb = listOfSc.size();
 
System.out.println("Amount of S/C states = "+nb);
 
System.out.println("Amount of S/C states = "+nb);

Version du 7 juillet 2017 à 07:46

Slave mode

The simplest way to propagate is to use the “slave mode”. The final result (at the date of the end of the propagation will be stored in a [PATRIUS] SpacecraftState object.

System.out.println("Initial orbit:");
System.out.println("Date:"+iniOrbit.getDate());
System.out.println("SMA:"+iniOrbit.getA());
 
final SpacecraftState sc = test.propagateInSlaveMode();
 
System.out.println("Final orbit:");
System.out.println("Date:"+sc.getDate());
System.out.println("SMA:"+sc.getA());

Master mode

On the other side, if the user wants to store intermediate data all along the propagation, it is possible to use the “master mode”. To do it, it will have to create an OutputConfig object as below, giving the output frames (inertial and local ones) as well as the output step (here 60s):

final OutputConfig output = new OutputConfig(FramesFactory.getEME2000(), LOFType.LVLH, 60.);

Then, the propagation will be done by calling the propagateInMasterMode method and the list of SpacecraftState (see [PATRIUS] definition) could be recover using the getListOfSpacecraftStates() method. In the following example, we have no additional events (reason why of the null second argument).

test.propagateInMasterMode(output, null);
List<SpacecraftState> listOfSc = test.getListOfSpacecraftStates();

The user may now use this list …


final int nb = listOfSc.size();
System.out.println("Amount of S/C states = "+nb);
System.out.println("Final orbit:");
System.out.println("Date:"+listOfSc.get(nb-1).getDate());
System.out.println("SMA:"+listOfSc.get(nb-1).getA());