« Searching NoradIds » : différence entre les versions
Aller à la navigation
Aller à la recherche
Ligne 21 : | Ligne 21 : | ||
for ( ObjTLESearch obj : list ) { | for ( ObjTLESearch obj : list ) { | ||
System.out.println(obj.getNoradId() | System.out.println(obj.getNoradId()); | ||
System.out.println(obj.getCriteria()); | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Version du 3 septembre 2019 à 14:06
Since the 3rd September 2019 version, it is now possible to call some methods in order to filter Norad Ids. As with the GUI or the Batch mode (see here or here) two solution are available:
Search by Sat
This is done using the OperaTleManager.searchObjectsBySat() method:
// 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 ArrayList<ObjTLESearch> list = OperaTleManager.searchObjectsBySat(filterNoradId, filterCosparId, filterName, filterCountry, validSizes, DecayChoice.REENTERED);
for ( ObjTLESearch obj : list ) {
System.out.println(obj.getNoradId());
System.out.println(obj.getCriteria());
}