public class FocusStar extends AbstractTargetParameter implements ParameterDepending, Trigger, Reloadable
AbstractValue
base class. Does not need any registereed additional
Parameters.PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private TargetDependingParameter |
alt
The height of the target.
|
private static String |
DEFALTTARGET
The default name of the sidereal parameter to use.
|
private static double |
DEFFOCUSMAG
The default magnitude limit.
|
private static String |
DEFMAGTARGET
The default name of the latitude parameter to use.
|
private static double |
DEFMINDISTANCE
The default minimum distance in degrees.
|
private static double |
DEFMINHEIGHT
The default minimum height in degrees.
|
private static double |
DEFMINMAG
The default minimum magnitude difference.
|
static String |
DEFNAME
The name of this global (ra).
|
private Trigger |
fov
If the field-of-view is crowded, this is true.
|
static String |
KEY_ALTTARGET
The name of the sidereal time to use.
|
static String |
KEY_FOCUSMAG
The minimum magnitude to act as a focus star.
|
static String |
KEY_MAGTARGET
The name of the latitude to use.
|
static String |
KEY_MINDISTANCE
The minimum distance for a companions.
|
static String |
KEY_MINHEIGHT
The minimum height to be used as a focus star.
|
static String |
KEY_MINMAG
The minimum magnitude difference on companions.
|
private TargetDependingParameter |
mag
The magnitude of the target.
|
KEY_INDEXKEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_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 |
|---|
FocusStar(Map<String,String> prop)
Constructs a new global representing the actual object's v mag.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkMagAndHeight(Object magnitude,
Object height)
Checks if the magnitude of the star is bright enough and its height is
high enough to be used as a target star.
|
Object |
get()
Returns true, if this star is a possible focus star.
|
long |
getElapsedToggleTime()
Returns the elapsed time since the last toggle event.
|
Object |
getForTarget(TargetDefinition star)
Gets the declination of the target star.
|
Date |
getLastToggleTime()
Returns the time of the last toggle event as a date.
|
Boolean |
getTrigger()
Returns true, if this star is a possible focus star.
|
void |
init()
Initializes the parameter with its class name.
|
private static boolean |
isCrowded(TargetDefinition target,
double mag,
double distance,
String id)
Cecks the field of view for close companions.
|
boolean |
isTrue()
Returns the primitive boolean
getTrigger() |
void |
registerParameter(Parameter what)
Registers the required additional globals for the Z target.
|
void |
registerTarget(TargetDefinition star)
Registers a star to this parameter.
|
double |
rescanned(String key,
String old,
String newval)
As any parameter depending instance we fail if the parameter we depend
on is now a different one.
|
Object |
set(Object to)
UnsupportedOperationExeption.
|
Boolean |
setTrigger(Boolean to)
UnsupportedOperationExeption.
|
Boolean |
toggleTrigger()
UnsupportedOperationExeption.
|
getAsStar, getConstant, getFormattedFor, getSetupcreateParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, setName, toStringclone, 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, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFormatted, getName, getStringdefaultBoolean, 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, stringPropertiesreloadpublic static final String KEY_FOCUSMAG
public static final String KEY_MINMAG
public static final String KEY_MINDISTANCE
public static final String KEY_MINHEIGHT
public static final String KEY_ALTTARGET
public static final String KEY_MAGTARGET
public static final String DEFNAME
private static final double DEFFOCUSMAG
private static final double DEFMINMAG
private static final double DEFMINDISTANCE
private static final double DEFMINHEIGHT
private static final String DEFALTTARGET
private static final String DEFMAGTARGET
private TargetDependingParameter mag
private TargetDependingParameter alt
private Trigger fov
public void init()
throws InitException
AbstractParameterinit in interface Initializableinit in class AbstractParameterInitExceptionpublic double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic void registerParameter(Parameter what)
TauTarget, DecTarget or Latitude,
rather than querrying for the global name.registerParameter in interface ParameterDependingpublic void registerTarget(TargetDefinition star)
registerTarget in interface TargetDependingpublic Object get()
KEY_MINHEIGHT, has a certain magnitude
KEY_FOCUSMAG, and no bright neighbor nearby.public Boolean getTrigger()
KEY_MINHEIGHT, has a certain magnitude
KEY_FOCUSMAG, and no bright neighbor nearby.getTrigger in interface Triggeringpublic Object getForTarget(TargetDefinition star)
getForTarget in interface TargetDependingParameterpublic boolean isTrue()
getTrigger()isTrue in interface Triggeringpublic Date getLastToggleTime()
getLastToggleTime in interface Triggeringpublic long getElapsedToggleTime()
getElapsedToggleTime in interface Triggeringpublic Boolean setTrigger(Boolean to)
setTrigger in interface Triggeringpublic Boolean toggleTrigger()
toggleTrigger in interface Triggeringprivate boolean checkMagAndHeight(Object magnitude, Object height)
private static final boolean isCrowded(TargetDefinition target, double mag, double distance, String id)