Tutorial LEOManeuversPdfReport
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.TLE.OperaTLEManoeuvres;
import fr.cnes.dynvol.opera.calc.TLE.OperaTLESeries;
import fr.cnes.dynvol.opera.calc.model.OperaTLE;
import fr.cnes.dynvol.opera.calc.util.OperaReadUtils;
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.addons.patriusdataset.PatriusDataset;
import fr.cnes.sirius.patrius.propagation.analytical.tle.TLE;
import fr.cnes.sirius.patrius.utils.exception.PatriusException;
/**
* Tutorial for building a LEO Pdf report with OPERA.
class
* @author goesterjf
*
*/
public class LEOManeuversPdfReport {
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)
PatriusDataset.addResourcesFromPatriusDataset() ;
// 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, true, "txt");
// TLEs selection
final double historyDuration = 80.;
final double endOfHistoryCJD = 22605.0;
final List<OperaTLE> tles = OperaTleManager.selectTLEs(tlesSet, endOfHistoryCJD, historyDuration);
// TLE series for maneuvers estimation
final OperaTLESeries tleSeries = new OperaTLESeries(tles);
final OperaTLEManoeuvres tleForMan = new OperaTLEManoeuvres(tleSeries);
// Pdf generation
final String path = tleForMan.buildLEOManReport(noradId, conf);
System.out.println("Pdf report generated at " + path);
}
}