public class PointingScheduler extends XMLScheduler implements StatusProviding, Preserving
| Modifier and Type | Class and Description |
|---|---|
private class |
PointingScheduler.HeightConstraint
A height constraint.
|
private class |
PointingScheduler.SolarConstraint
A solar height constraint.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static Object |
ACQUIRE |
private static String |
DEFALTITUDENAME
The default name of the azimuth parameter.
|
private static String |
DEFAZIMUTHNAME
The default name of the azimuth parameter.
|
private static double |
DEFCOMPLETIONLIMIT
The default completion limit.
|
private static double |
DEFHEIGHT
The default minimum height for pointing points.
|
private static int |
DEFMAXTILEFAILURE
The default maximum allowed failures per tile.
|
private static int |
DEFMAXTILEOBSERVE
The default maximum required observations per tile.
|
private static double |
DEFOVERRULEMERIT
The default merit when we do not pointing.
|
private static int |
DEFPOINTS
The default number of pointing points.
|
private static double |
DEFSOLHEIGHT
The default maximum solar height height for pointing points.
|
private List<ErrorListener> |
errlist
This error handlers are notified on pointing model completion.
|
static String |
KEY_ALTITUDENAME
The name of the altitude parameter.
|
static String |
KEY_AZIMUTHNAME
The name of the azimuth parameter.
|
static String |
KEY_COMPLETIONLIMIT
The fraction of successes needed.
|
static String |
KEY_HEIGHT
The minimum height where pointing should start.
|
static String |
KEY_MAXTILEFAILURE
The maximum allowed failures per tile.
|
static String |
KEY_MAXTILEOBSERVE
The maximum required successful observations per tile.
|
static String |
KEY_OVERRULEMERIT
Targets with a merit higher than this are always returned.
|
static String |
KEY_POINTS
The number of pointings in the sky.
|
static String |
KEY_PRESERVE
My preserve file.
|
static String |
KEY_SOLHEIGHT
The maximum solar height where pointing should start.
|
private Appointable |
lasttarget
The last target that was selected.
|
private Integer |
lasttile
The last tile index that was selected.
|
private static Object |
POINTING
Pointing targets must have a type equal to this.
|
private SphereTiles |
skynet
The helper class that tiles the available sky into equal-sized tiles.
|
private Map<Integer,Integer> |
success
A mapping of tile numbers to successful acquires.
|
KEY_ALLOWNULL, KEY_GLOBALCONSTRAINT, KEY_GLOBALMERIT, KEY_GLOBALWATCH, KEY_MAXDEPTHKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
PointingScheduler(Map<String,String> prop)
Constructs a new pointing scheduler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorListener(ErrorListener ear)
Registers an error event listener to this property container.
|
String |
conciseStatus() |
private boolean |
errorOnComplete()
We check if we have enough observations for the pointing model as
requested.
|
void |
exit()
On exit, we try to preserve our look-up table of tile numbers to
successes.
|
Object |
extendedStatus()
Returns a string describing the progress of the pointing model.
|
Appointable |
getHighestTarget(GlobalGrouping set,
Collection<Appointable> targets)
The highest target is constructed in the following way:
The azimuth and altitude of the target is extracted.
The tile number it corresponds to is evaluated.
If this tile has been observed more often then the currently most
prominent tile, the target is discarded.
If this tile has been observed less then the currently most prominent
tile, this tile gets the most prominent one, the target's distance to the
center gets the encounter distance and the target is kept as the possible
promise.
If this tile has been observed the same number of times then the
currently most prominent tile, this target is kept if it is closer to
it's tile center.
|
void |
init()
During init, we construct a global constraint from the target height.
|
private boolean |
isComplete()
We check if we have enough observations for the pointing model as
requested.
|
boolean |
preserve()
If a preserve file is given via the
KEY_PRESERVE key, we
serialize the surrent lookup table of sky tile numbers to successes into
this file and return true. |
void |
removeErrorListener(ErrorListener ear)
Deregisters an error event listener from this property container.
|
boolean |
restore()
Tries to restore the success lookup table from the
KEY_PRESERVE
file. |
addMeritTrace, highestFromAll, removeMeritTraceaddGlobalConstraint, checkGlobalConstraints, createScheduler, getGlobalConstraints, getObservableTargets, registerMonitor, removeAllGlobalConstraints, removeGlobalConstraint, wakeUpclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_PRESERVE
public static final String KEY_OVERRULEMERIT
public static final String KEY_POINTS
public static final String KEY_HEIGHT
public static final String KEY_COMPLETIONLIMIT
public static final String KEY_SOLHEIGHT
public static final String KEY_MAXTILEOBSERVE
public static final String KEY_MAXTILEFAILURE
public static final String KEY_AZIMUTHNAME
public static final String KEY_ALTITUDENAME
private static final double DEFOVERRULEMERIT
private static final int DEFPOINTS
private static final double DEFCOMPLETIONLIMIT
private static final double DEFHEIGHT
private static final double DEFSOLHEIGHT
private static final int DEFMAXTILEOBSERVE
private static final int DEFMAXTILEFAILURE
private static final String DEFAZIMUTHNAME
private static final String DEFALTITUDENAME
private static final Object POINTING
private static final Object ACQUIRE
private SphereTiles skynet
private Appointable lasttarget
private Integer lasttile
private List<ErrorListener> errlist
public void init()
init in interface Initializableinit in class XMLSchedulerpublic void exit()
exit in interface ExitCleaningpublic boolean preserve()
KEY_PRESERVE key, we
serialize the surrent lookup table of sky tile numbers to successes into
this file and return true.preserve in interface Preservingpublic boolean restore()
KEY_PRESERVE
file. Return true only if success is *non-null*restore in interface Preservingpublic void addErrorListener(ErrorListener ear)
public void removeErrorListener(ErrorListener ear)
public Appointable getHighestTarget(GlobalGrouping set, Collection<Appointable> targets)
getHighestTarget in interface SchedulinggetHighestTarget in class XMLSchedulerpublic Object extendedStatus()
extendedStatus in interface StatusProvidingpublic String conciseStatus()
conciseStatus in interface StatusProvidingprivate boolean isComplete()
private boolean errorOnComplete()