Tutorial FilterBySat

De Opera
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.OperaTleManager;
import fr.cnes.dynvol.opera.configuration.OperaAppConfigurationProperties;
import fr.cnes.dynvol.opera.enums.DecayChoice;
import fr.cnes.dynvol.opera.enums.OperaTLESatSizes;

public class FilterBySat {

    public static void main(String[] args) {

        // Opera properties configuration
        final OperaAppConfigurationProperties operaAppConfigurationProperties = OperaAppConfigurationProperties.getInstance();
        operaAppConfigurationProperties.load("data/operaapp-configuration.properties");

        final String filterNoradId = "*479";
        final String filterCosparId = "*";
        final String filterName = "DEL*";
        final String filterCountry = "US";
        final ArrayList<OperaTLESatSizes> validSizes = new ArrayList<OperaTLESatSizes>();
        validSizes.add(OperaTLESatSizes.MEDIUM);
        validSizes.add(OperaTLESatSizes.SMALL);
         
        final List<ObjTLESearch> list = OperaTleManager.searchObjectsBySat(filterNoradId, filterCosparId, filterName, filterCountry, validSizes, DecayChoice.REENTERED, null);
        
        for ( ObjTLESearch obj : list ) {
            System.out.println(obj.getNoradId());
            System.out.println(obj.getCriteria());
        }
        
    }

}