public class AltTarget extends AbstractTargetValue implements TimeDependingValue, TimeDependingTargetValue, TargetDependIncreasing, TargetDependDecreasing, ParameterDepending, Reloadable
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private Value |
dec
The dec of the target, degrees.
|
private static String |
DEFDEC
The default name of the solar ecliptical longitude to use.
|
private static String |
DEFLATITUDE
The default name of the latitude parameter to use.
|
static String |
DEFNAME
The default name of this value.
|
private static String |
DEFTAU
The default name of the sidereal parameter to use.
|
private static DecimalFormat |
df
The formatter for the target height.
|
static String |
KEY_DEC
The name of the solar ecliptical longitude to use.
|
static String |
KEY_LATITUDE
The name of the latitude to use.
|
static String |
KEY_TAU
The name of the sidereal time to use.
|
private Value |
latitude
The latitude of Teide, degrees.
|
private Value |
tau
The actual hour angle of the target, degrees.
|
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 |
|---|
AltTarget(Map<String,String> info)
Constructs a new airmass target object.
|
| Modifier and Type | Method and Description |
|---|---|
private double |
calcTau(double h,
double phi,
double dec)
Calculates the remaining time until a given height is reached.
|
private Double |
calculate(Number tautarget,
Number dectarget)
Calculates the height using the hour angle and the declination of the
target.
|
private Double |
calculateIn(Number tautarget,
Number dectarget,
double dt)
Calculates the azimuth using the hour angle and the declination of the
target.
|
static double |
getAltDerivative(double phi,
double tau,
double de)
Calculates the derivative of the altitude with respect to the hour
angle.Formular:
|
static double |
getAltTarget(double phi,
double tau,
double de)
Calculates the height using the hour angle and the declination of the
target.
|
Long |
getAscendTime(Number until)
Returns the remaining time in ms.
|
Long |
getAscendTimeFor(TargetDefinition target,
Number until)
Returns the remaining time in ms.
|
Long |
getDescendTime(Number until)
Returns the remaining time in ms.
|
Long |
getDescendTimeFor(TargetDefinition target,
Number until)
Returns the remaining time in ms.
|
Number |
getForTarget(TargetDefinition star)
Gets the declination of the target star.
|
Number |
getForTargetIn(TargetDefinition star,
double dt)
gets the azimuth of the target in dt seconds.
|
Number |
getValue()
Returns the target's actual airmass, wrapped into a Double.
|
Number |
getValueIn(double dt)
Returns the target's actual airmass, wrapped into a Double.
|
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.
|
Number |
setValue(Number val)
Sets the airmass of the actual target.
|
get, setgetAsStar, getConstant, getFormattedFor, getSetupcreateParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, init, 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, 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, stringPropertiesinitreloadgetFormattedForpublic static final String KEY_TAU
public static final String KEY_LATITUDE
public static final String KEY_DEC
public static final String DEFNAME
private static final String DEFTAU
private static final String DEFLATITUDE
private static final String DEFDEC
private Value tau
private Value dec
private Value latitude
private static final DecimalFormat df
public double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic Number setValue(Number val) throws UnsupportedOperationException
setValue in interface ValueUnsupportedOperationExceptionpublic Number getForTarget(TargetDefinition star)
getForTarget in interface TargetDependingParametergetForTarget in interface TargetDependingValuepublic Number getForTargetIn(TargetDefinition star, double dt)
getForTargetIn in interface TimeDependingTargetValuestar - dt - public Number getValue()
public Number getValueIn(double dt)
getValueIn in interface TimeDependingValuedt - Return value not now, but in the stated number of seconds.public void registerParameter(Parameter what)
TauTarget, DecTarget or Latitude, rather than
querrying for the global name.registerParameter in interface ParameterDependingpublic void registerTarget(TargetDefinition star)
tau and dec reference of this parameter.
Note that this will set the target in the additional parameter, too.registerTarget in interface TargetDependingpublic Long getAscendTime(Number until)
getAscendTime in interface Increasinguntil - The value in the future.public Long getDescendTime(Number until)
getDescendTime in interface Decreasinguntil - The value in the future.public Long getAscendTimeFor(TargetDefinition target, Number until)
getAscendTimeFor in interface TargetDependIncreasinguntil - The value in the future.public Long getDescendTimeFor(TargetDefinition target, Number until)
getDescendTimeFor in interface TargetDependDecreasinguntil - The value in the future.private Double calculate(Number tautarget, Number dectarget)
sin(h)=sin(φ)sin(δ)+cos(φ)cos(δ)cos(τ)
private Double calculateIn(Number tautarget, Number dectarget, double dt)
tan(a)=sin(τ)/(sin(φ)cos(τ)-tan(δ)cos(φ))
public static final double getAltTarget(double phi,
double tau,
double de)
sin(h)=sin(φ)sin(δ)+cos(φ)cos(δ)cos(τ)
public static final double getAltDerivative(double phi,
double tau,
double de)
cos(h) dh =-cos(φ)cos(δ)sin(τ) dτ
dh = -sin(az) cos(φ) dτ
phi - tau - de - private double calcTau(double h,
double phi,
double dec)
h - Target height of object in degrees.phi - Latitude in degrees.dec - Declination of object in degree.target - If non-null the target depending time is used.