public class RefractionModel extends AbstractValue implements ParameterDepending, Reloadable, CommandLineProviding
EnvironmentConfig command that tells the
TCS about current weather values. EnvironmentConfig command, rely on the
getCommandLine() method. The parameter itself returns the
correction factor to the refraction index (n-1) in a simple model.
n(T,p)-1=(n0-1)·(p(1+(0.7868-0.01178T)·10-6·p))/961.096(1+0.003661T),where T is in degrees Celcius and p is in mbar. The refraction index of the air at 15C and a pressure of 1013mbar is n0. The influence of the air humidity is roughly 6 orders of magnitude below the influence of the temperature and the pressure and therefore neglected.
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
static String |
DEFNAME
The default name of the parameter.
|
static double |
DEFNOMINALPRESS
The default nominale value of the pressure.
|
static double |
DEFNOMINALTEMP
The default nominale value of the temperature.
|
private static String |
DEFPRESSURE
The default name of the pressure parameter.
|
private static String |
DEFTEMPERATURE
The default name of the temperature parameter.
|
static String |
KEY_NOMINALPRESS
The nominale value of the pressure.
|
static String |
KEY_NOMINALTEMP
The nominale value of the temperature.
|
static String |
KEY_PRESSURE
The name of the pressure to use.
|
static String |
KEY_TEMPERATURE
The name of the temperature parameter to use.
|
private static double |
P2
The p^2 parameter.
|
private static double |
P2T
The T*p^2 parameter.
|
private static double |
PDENOM
The p-parameter, denominator.
|
private Value |
press
The pressure value.
|
private static double |
TDENOM
The denominator part depending on T.
|
private Value |
temp
The value of the temperature.
|
KEY_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 |
|---|
RefractionModel(Map prop)
Constructs a new refraction model.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCommandLine()
Returns the command line ready to use for the
EnvironmentConfig command. |
Number |
getValue()
Returns the correction factor to (n-1) for the given temperature and
pressure.
|
void |
registerParameter(Parameter tp)
Registers a parameter to the refraction model.
|
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 hour angle of the actual target.
|
get, setcreateParameter, 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, waitreloadgetFormatted, 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, stringPropertiesinitpublic static final String KEY_TEMPERATURE
public static final String KEY_PRESSURE
public static final String KEY_NOMINALTEMP
public static final String KEY_NOMINALPRESS
public static final String DEFNAME
private static final String DEFTEMPERATURE
private static final String DEFPRESSURE
public static final double DEFNOMINALTEMP
public static final double DEFNOMINALPRESS
private static final double P2
private static final double P2T
private static final double PDENOM
private static final double TDENOM
private Value temp
private Value press
public RefractionModel(Map prop)
public double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic void registerParameter(Parameter tp)
DataValue. If this is the case, its
name is matched against the KEY_TEMPERATURE and
KEY_PRESSURE properties. In case of matching name, a local
reference to the value is stored.registerParameter in interface ParameterDependingpublic Number getValue()
EnvironmentConfig command, which uses the
getCommandLine() method instead.public Number setValue(Number val) throws UnsupportedOperationException
setValue in interface ValueUnsupportedOperationExceptionpublic String getCommandLine()
EnvironmentConfig command. The PILAR-software
expects pressure in Pa, not mbar, therefore the desired conversion is
directly applied here as the pressure is converted into a string.getCommandLine in interface CommandLineProviding