stella.xml
Class SlewTimeMerit

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.AbstractMerit
                  extended by stella.xml.SlewTimeMerit
All Implemented Interfaces:
Serializable, Cloneable, Meriting, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class SlewTimeMerit
extends AbstractMerit

A merit calculating its gain from the actual pointing position of the telescope to the position of the new target. It calculates the difference in altitude and azimuth, divides these differences with the slewing speeds KEY_AZSPEED and KEY_ALTSPEED to gain an expected slewing time. This slewing time t is then used to calculate a gain according to

   gain(t)=k(1+(pt-t)/at).
   
Here, k is the KEY_WEIGHT factor, pt is some plateau-time (e.g. the read-out time of the CCD), KEY_PLATEAU, and at is the abate time, KEY_ABATE after which the gain drops to zero, counting from after the plateau-time. Additionally, the gain is limited to the range between KEY_WEIGHT and zero.
This merit needs four parameters, the AltTelescope, the AzTelescope, the AltTarget and the AzTarget parameter.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static double DEFABATE
          Default value for the plateu abate time.
private static double DEFALTSPEED
          Default value for the azimuth slewing speed.
private static String DEFALTTARGET
          Default altitude-target parameter name.
private static String DEFALTTELESCOPE
          Default altitude-telescope parameter name.
private static double DEFAZSPEED
          Default value for the azimuth slewing speed.
private static String DEFAZTARGET
          Default azimuth-target parameter name.
private static String DEFAZTELESCOPE
          Default azimuth-telescope parameter name.
private static double DEFPLATEAU
          Default value for the plateu time.
private static double DEFWEIGHT
          Default value for the priority impact.
static String KEY_ABATE
          The time after which the gain drops to zero from the plateau.
static String KEY_ALTSPEED
          The key linked to the altitude slewing speed.
static String KEY_ALTTARGET
          The name of the AltTarget parameter.
static String KEY_ALTTELESCOPE
          The name of the AltTelescope parameter.
static String KEY_AZSPEED
          The key linked to the azimuth slewing speed.
static String KEY_AZTARGET
          The name of the AzTarget parameter.
static String KEY_AZTELESCOPE
          The name of the AzTelescope parameter.
static String KEY_PLATEAU
          The time the gain should stay constant.
static String KEY_WEIGHT
          The key linked to the impact of the slew-tima merit.
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
SlewTimeMerit(Map prop)
          Constructs a new airmass merit, defaulting all parameters if not explicetly given.
 
Method Summary
 double getMerit(ParameterClustering set, TargetDefinition target, Collection ignore, long dummy)
          Calculates the actual gain using the expected slewing time of the telescope from its current position to the target.
 
Methods inherited from class stella.AbstractMerit
createMerit, getInitializer, initMerit
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
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, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, 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, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_AZSPEED

public static final String KEY_AZSPEED
The key linked to the azimuth slewing speed.

See Also:
Constant Field Values

KEY_ALTSPEED

public static final String KEY_ALTSPEED
The key linked to the altitude slewing speed.

See Also:
Constant Field Values

KEY_WEIGHT

public static final String KEY_WEIGHT
The key linked to the impact of the slew-tima merit.

See Also:
Constant Field Values

KEY_PLATEAU

public static final String KEY_PLATEAU
The time the gain should stay constant.

See Also:
Constant Field Values

KEY_ABATE

public static final String KEY_ABATE
The time after which the gain drops to zero from the plateau.

See Also:
Constant Field Values

KEY_ALTTELESCOPE

public static final String KEY_ALTTELESCOPE
The name of the AltTelescope parameter.

See Also:
Constant Field Values

KEY_AZTELESCOPE

public static final String KEY_AZTELESCOPE
The name of the AzTelescope parameter.

See Also:
Constant Field Values

KEY_ALTTARGET

public static final String KEY_ALTTARGET
The name of the AltTarget parameter.

See Also:
Constant Field Values

KEY_AZTARGET

public static final String KEY_AZTARGET
The name of the AzTarget parameter.

See Also:
Constant Field Values

DEFAZSPEED

private static final double DEFAZSPEED
Default value for the azimuth slewing speed.

See Also:
Constant Field Values

DEFALTSPEED

private static final double DEFALTSPEED
Default value for the azimuth slewing speed.

See Also:
Constant Field Values

DEFWEIGHT

private static final double DEFWEIGHT
Default value for the priority impact.

See Also:
Constant Field Values

DEFPLATEAU

private static final double DEFPLATEAU
Default value for the plateu time.

See Also:
Constant Field Values

DEFABATE

private static final double DEFABATE
Default value for the plateu abate time.

See Also:
Constant Field Values

DEFALTTELESCOPE

private static final String DEFALTTELESCOPE
Default altitude-telescope parameter name.

See Also:
Constant Field Values

DEFAZTELESCOPE

private static final String DEFAZTELESCOPE
Default azimuth-telescope parameter name.

See Also:
Constant Field Values

DEFALTTARGET

private static final String DEFALTTARGET
Default altitude-target parameter name.

See Also:
Constant Field Values

DEFAZTARGET

private static final String DEFAZTARGET
Default azimuth-target parameter name.

See Also:
Constant Field Values
Constructor Detail

SlewTimeMerit

public SlewTimeMerit(Map prop)
Constructs a new airmass merit, defaulting all parameters if not explicetly given. Proper creation should be done using the AbstractMerit.createMerit(java.util.Map) method. This create method also takes care of proper parameter overloading.

Method Detail

getMerit

public double getMerit(ParameterClustering set,
                       TargetDefinition target,
                       Collection ignore,
                       long dummy)
Calculates the actual gain using the expected slewing time of the telescope from its current position to the target. The maximum gain is returned if the expected slewing time is less then the readout time of the CCD, KEY_PLATEAU. If the slewing time exceeds this time, the gain drops to zero within KEY_ABATE seconds. It cannot drop below zero.
The slew time only matters at the beginning of the observation, thus the time span is ignored.

Parameters:
set - Current observing conditions.
target - The actual target.
ignore - The list of targetes relevant to the actual target.
dummy - The relevant time span in ms.