public class HjdCorrection extends AbstractTargetValue implements ParameterDepending, Reloadable
TargetDependingParameter as the correction also depends on
the position within the sky of the object:
r=q/(1+e·cos(λ-ω0)), hjd-jd=r/c·(sinδssinδ+cosδcosδscosΔα)The correction returned is in natural time units, i.e. milliseconds and should be added to jd to gain hjd.
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private SolDec |
decsol
The solar declination.
|
private DecApparent |
dectarget
The target declination.
|
private static String |
DEFDECTARGET
The default name of the jd parameter.
|
static String |
DEFNAME
The name of this global (jd).
|
private static String |
DEFRATARGET
The default name of the jd parameter.
|
private static String |
DEFSOLDEC
The default name of the jd parameter.
|
private static String |
DEFSOLDISTANCE
The default name of the jd parameter.
|
private static String |
DEFSOLRA
The default name of the jd parameter.
|
private static DecimalFormat |
df
The formatter for the target height.
|
private SolDistance |
distancesol
The solar longitude.
|
static String |
KEY_DECTARGET
The name of the object-dec paramter.
|
static String |
KEY_RATARGET
The name of the object-ra paramter.
|
static String |
KEY_SOLDEC
The name of the solar-dec paramter.
|
static String |
KEY_SOLDISTANCE
The name of the solar-longitude paramter.
|
static String |
KEY_SOLRA
The name of the solar-ra paramter.
|
private static double |
LIGHTSPEED
The light speed, in AU/ms.
|
private SolRa |
rasol
The solar right ascension.
|
private RaApparent |
ratarget
The target ra.
|
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 |
|---|
HjdCorrection(Map<String,String> define)
Constructs a new global representing the heliocentric correction that
should be applied to a julian date.
|
| Modifier and Type | Method and Description |
|---|---|
private Double |
calculate(Number ra,
Number dec)
Calculates the helicentric correction for an object at the
given sky position in ms.
|
String |
getFormatted(Object myval)
Deviates the formatting to the
protected version in
AbstractParameter. |
Number |
getForTarget(TargetDefinition target)
Gets the heliocentric correction for the specified target
|
static double |
getHjdCorrection(double d,
double solra,
double solde,
double ra,
double de)
Static access to hjd correction from solar distance, solar right
ascension, solar declination, target ra and dec.
|
Number |
getValue()
Returns the actual hjd in ms as a double.
|
void |
registerParameter(Parameter add)
Registers the additional parameters needed.
|
void |
registerTarget(TargetDefinition target)
Registers the target.
|
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 jd.
|
get, setgetAsStar, getConstant, getFormattedFor, getSetupcreateParameter, delivers, exit, 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, waitreloadgetFormattedForgetFormatted, 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_SOLDISTANCE
public static final String KEY_SOLRA
public static final String KEY_SOLDEC
public static final String KEY_RATARGET
public static final String KEY_DECTARGET
public static final String DEFNAME
private static final String DEFSOLDISTANCE
private static final String DEFSOLRA
private static final String DEFSOLDEC
private static final String DEFRATARGET
private static final String DEFDECTARGET
private static final DecimalFormat df
private static final double LIGHTSPEED
private SolDistance distancesol
private SolRa rasol
private SolDec decsol
private RaApparent ratarget
private DecApparent dectarget
public Number setValue(Number val) throws UnsupportedOperationException
setValue in interface ValueUnsupportedOperationExceptionpublic double rescanned(String key, String old, String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic void registerParameter(Parameter add)
registerParameter in interface ParameterDependingpublic void registerTarget(TargetDefinition target)
registerTarget in interface TargetDependingpublic Number getForTarget(TargetDefinition target)
getForTarget in interface TargetDependingParametergetForTarget in interface TargetDependingValuepublic Number getValue()
private Double calculate(Number ra, Number dec)
public static final double getHjdCorrection(double d,
double solra,
double solde,
double ra,
double de)
d - Solar distance in AU.solra - Right ascension of sun, degrees.solde - Declination of sun, degrees.ra - Target ra, degrees.de - Target de, degrees.public String getFormatted(Object myval)
AbstractParameter.getFormatted in class AbstractParameter