Tutorial ReentryEstimation
Aller à la navigation
Aller à la recherche
import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.SortedSet;
import fr.cnes.dynvol.opera.calc.model.OperaReentryResult;
import fr.cnes.dynvol.opera.calc.model.OperaSolarActivityRow;
import fr.cnes.dynvol.opera.calc.model.OperaTLE;
import fr.cnes.dynvol.opera.calc.simulation.OperaReentrySimulation;
import fr.cnes.dynvol.opera.calc.util.OperaReadUtils;
import fr.cnes.dynvol.opera.calc.util.OperaSolarActivity;
import fr.cnes.dynvol.opera.calc.util.OperaTleManager;
import fr.cnes.dynvol.opera.configuration.OperaConfigurationProperties;
import fr.cnes.dynvol.opera.exceptions.OperaDurationException;
import fr.cnes.dynvol.opera.exceptions.OperaException;
import fr.cnes.dynvol.opera.exceptions.OperaInitialProcessException;
import fr.cnes.dynvol.opera.exceptions.OperaInterpolationException;
import fr.cnes.dynvol.opera.exceptions.OperaMaxIterationException;
import fr.cnes.dynvol.opera.exceptions.OperaOrbitDeterminationException;
import fr.cnes.dynvol.opera.exceptions.OperaOutOfStudyRegionException;
import fr.cnes.dynvol.opera.exceptions.OperaStelaPropagationException;
import fr.cnes.sirius.patrius.propagation.analytical.tle.TLE;
import fr.cnes.sirius.patrius.utils.exception.PatriusException;
/**
* Tutorial for estimating a reentry date with OPERA.
* @author goesterjf
*
*/
public class ReentryEstimation {
public static void main(String[] args) throws IOException, PatriusException, OperaException,
ParseException, OperaOrbitDeterminationException, OperaDurationException, OperaInterpolationException,
OperaMaxIterationException, OperaStelaPropagationException, OperaOutOfStudyRegionException, OperaInitialProcessException {
// 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");
final OperaConfigurationProperties conf = new OperaConfigurationProperties();
// 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);
// TLEs initialization
final int noradId = 10479;
final SortedSet<TLE> tlesSet = OperaTleManager.readTLEs("data/tles", noradId, false, "txt");
// TLEs selection
final double historyDuration = 80.;
final double endOfHistoryCJD = 22605.0;
final List<OperaTLE> tles = OperaTleManager.selectTLEs(tlesSet, endOfHistoryCJD, historyDuration);
// Reentry estimation computation
final OperaReentrySimulation simulation = new OperaReentrySimulation(conf, solarActivity);
final OperaReentryResult result = simulation.estimateReentry(tles);
System.out.println("Reentry date with " + historyDuration +" days interval: "+result.getReentryDate());
System.out.println("Error estimation: " + result.getErrorEstimationDays() + "days");
System.out.println("Estimated S/M: " + result.getSmDragRefined() + "m2/kg");
}
}