Tutorial FilterBySatAndOrb
Aller à la navigation
Aller à la recherche
import java.util.ArrayList;
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.dynvol.opera.enums.DecayChoice;
import fr.cnes.dynvol.opera.enums.OperaTLESatSizes;
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 FilterBySatAndOrb {
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 = true;
final boolean convertHpToKm = true;
final double filterHpMin = 150.;
final double filterHpMax = 200.;
final boolean filterOnHa = false;
final boolean convertHaToKm = true;
final double filterHaMin = 0.;
final double filterHaMax = 0.;
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 String filterNoradId = "*";
final String filterCosparId = "*";
final String filterName = "*";
final String filterCountry = "FR";
final ArrayList<OperaTLESatSizes> validSizes = new ArrayList<OperaTLESatSizes>();
validSizes.add(OperaTLESatSizes.LARGE);
final List<ObjTLESearch> list = OperaTleManager.searchObjectsbySatAndOrb(
filterNoradId, filterCosparId, filterName, filterCountry, validSizes, DecayChoice.INORBIT,
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.getCriteria());
}
}
}