« Searching NoradIds » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
|||
Ligne 6 : | Ligne 6 : | ||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
final | // Opera properties configuration | ||
final OperaAppConfigurationProperties operaAppConfigurationProperties = OperaAppConfigurationProperties.getInstance(); | |||
operaAppConfigurationProperties.load("data/operaapp-configuration.properties"); | |||
final String filterNoradId = "*479"; | |||
final String filterCosparId = "*"; | final String filterCosparId = "*"; | ||
final String filterName = "DEL*"; | final String filterName = "DEL*"; | ||
Ligne 16 : | Ligne 20 : | ||
final ArrayList<ObjTLESearch> list = OperaTleManager.searchObjectsBySat(filterNoradId, filterCosparId, filterName, filterCountry, validSizes, DecayChoice.REENTERED); | final ArrayList<ObjTLESearch> list = OperaTleManager.searchObjectsBySat(filterNoradId, filterCosparId, filterName, filterCountry, validSizes, DecayChoice.REENTERED); | ||
for ( ObjTLESearch obj : list ) { | |||
System.out.println(obj.getNoradId() + obj.getCriteria()); | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> |
Version du 3 septembre 2019 à 14:05
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() + obj.getCriteria());
}