stella.parameter
Class AzTelescope
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractCachedParameter
stella.parameter.AbstractStatusRequestor
stella.parameter.AzTelescope
- All Implemented Interfaces:
- Cloneable, ErrorDependingParameter, Parameter, StatusRequesting, Value, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying
public class AzTelescope
- extends AbstractStatusRequestor
- implements Value, Reloadable
The current position of the telescope, altitude in degrees. It uses a
TelescopeStatus error event to retrieve a most accurate position of
the telescope. Note that there will still be some deviation from the true
position due to the following reasons:
- The position reflected is always the last position sent. On a moving
telescope (tracking) this will always result in a sometimes even big
deviation.
- Even if the telescope is urged to send a status event just prior to
querying this parameter, the latency time (a few 100ms) will prevent
exact values on a moving telescope.
- Even if the telescope is at rest, a few arcsec. inaccuracy remains
due to the inversion of the pointing model.
|
Field Summary |
private static double |
DEFAZHOME
The home position of the telescope. |
private static String |
DEFCOMMAND
The default class name of the status event to tackle. |
static String |
DEFNAME
The default name of this parameter. |
private static DecimalFormat |
df
The formatter for the telescope altitude. |
static String |
KEY_AZHOME
The key pointing to the home position of the telescope. |
|
Constructor Summary |
AzTelescope(Map prop)
Constructs a new alt telescope parameter. |
| Methods inherited from class stella.parameter.AbstractParameter |
createParameter, delivers, exit, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString |
| Methods inherited from class util.PropertyResources |
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, 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, setObject, setProperties, setProperty, stringProperties |
| 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 |
KEY_AZHOME
public static final String KEY_AZHOME
- The key pointing to the home position of the telescope.
- See Also:
- Constant Field Values
DEFNAME
public static final String DEFNAME
- The default name of this parameter.
- See Also:
- Constant Field Values
DEFAZHOME
private static final double DEFAZHOME
- The home position of the telescope. Value adopted at construct.
- See Also:
- Constant Field Values
DEFCOMMAND
private static final String DEFCOMMAND
- The default class name of the status event to tackle.
- See Also:
- Constant Field Values
df
private static final DecimalFormat df
- The formatter for the telescope altitude.
AzTelescope
public AzTelescope(Map prop)
- Constructs a new alt telescope parameter. Until the first
TelescopeStatus event is registered, this parameter points to
the home position of the telescope KEY_AZHOME.
rescanned
public double rescanned(String key,
String old,
String newval)
- Makes this method public, no further changes.
- Specified by:
rescanned in interface Reloadable- Overrides:
rescanned in class AbstractStatusRequestor
setValue
public Number setValue(Number newaz)
- Sets the azimuth of the telescope.
- Specified by:
setValue in interface Value
getValue
public Number getValue()
- Returns the azimuth of the telescope. Deduced from the last
TelescopeStatus event registered to this parameter.
- Specified by:
getValue in interface Value
getFormatted
public String getFormatted()
- Returns the azimuth of the telescope in a properly formatted way.
- Specified by:
getFormatted in interface Parameter- Overrides:
getFormatted in class AbstractParameter
getForError
public Object getForError(ErrorEvent ee)
- Returns the azimuth of the telescope deduced from a freshly received
TelescopeStatus. This method is probably not extremly useful,
normally a TelescopeStatus error will be registered to this
parameter and its value queried later.
- Specified by:
getForError in interface ErrorDependingParameter
isStatusRequested
protected boolean isStatusRequested(ErrorEvent ee)
- Returns true if the error event received is of
TelescopeStatus
- Specified by:
isStatusRequested in class AbstractStatusRequestor