Tutorial FilterByOrb
Aller à la navigation
Aller à la recherche
import java.util.List;
import fr.cnes.dynvol.opera.calc.TLE.ObjTLESearch;
import fr.cnes.dynvol.opera.calc.util.OperaReadUtils;
import fr.cnes.dynvol.opera.calc.util.OperaTleManager;
import fr.cnes.dynvol.opera.configuration.OperaAppConfigurationProperties;
import fr.cnes.sirius.patrius.time.AbsoluteDate;
import fr.cnes.sirius.patrius.time.TimeScale;
import fr.cnes.sirius.patrius.time.TimeScalesFactory;
import fr.cnes.sirius.patrius.utils.exception.PatriusException;
public class FilterByOrb {
public static void main(String[] args) throws PatriusException {
// Opera properties configuration
final OperaAppConfigurationProperties operaAppConfigurationProperties = OperaAppConfigurationProperties.getInstance();
operaAppConfigurationProperties.load("data/operaapp-configuration.properties");
// Adding the PATRIUS_DATASET
OperaReadUtils.iniPatriusDataset(null);
final TimeScale TUC = TimeScalesFactory.getUTC();
final boolean filterOnInc = false;
final boolean convertIToDeg = true;
final double filterIncMin = 0.;
final double filterIncMax = 0.;
final boolean isAEOrbit = false;
final boolean filterOnA = false;
final boolean convertAToKm = true;
final double filterAMin = 0.;
final double filterAMax = 0.;
final boolean filterOnEcc = false;
final double filterEccMin = 0.;
final double filterEccMax = 0.;
final boolean filterOnHp = false;
final boolean convertHpToKm = true;
final double filterHpMin = 0.;
final double filterHpMax = 0.;
final boolean filterOnHa = true;
final boolean convertHaToKm = true;
final double filterHaMin = 250.;
final double filterHaMax = 300.;
final AbsoluteDate filterDateMin = new AbsoluteDate("1950-01-01T00:00:00.000", TUC);
final AbsoluteDate filterDateMax = new AbsoluteDate("2019-09-02T00:00:00.000", TUC);
final List<ObjTLESearch> list = OperaTleManager.searchObjectsByOrb(
filterOnInc, convertIToDeg, filterIncMin, filterIncMax,
isAEOrbit,
filterOnA, convertAToKm, filterAMin, filterAMax,
filterOnEcc, filterEccMin, filterEccMax,
filterOnHa, convertHaToKm, filterHaMin, filterHaMax,
filterOnHp, convertHpToKm, filterHpMin, filterHpMax,
filterDateMin, filterDateMax, null);
for ( ObjTLESearch obj : list ) {
System.out.println(obj.getNoradId());
System.out.println(obj.getCriteria());
}
}
}