Package gaiasky.util.gaia
Class BaseAttitudeDataServer<A extends Attitude>
- java.lang.Object
-
- gaiasky.util.gaia.BaseAttitudeDataServer<A>
-
- Type Parameters:
A- type of Attitude that the server is serving
- Direct Known Subclasses:
AnalyticalAttitudeDataServer,NumericalAttitudeDataServer
public abstract class BaseAttitudeDataServer<A extends Attitude> extends java.lang.ObjectCommon base class for all attitude data servers. This holds all common fields e.g. the time origin for relative time scales (in ns) and implementsgetAttitude(long)in terms ofgetAttitude(long)which is the same for all servers. The time context and its possible switch is implemented in a thread-safe manner. Derived classes should hence be likewise thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleaninitializedSome scanning laws have constants or tables for interpolation that need to be computed before the first use and recomputed after changing certain reference values.protected TimeContextinitialRequestedTimeContextprotected TimeContextnativeTimeContextnative and initially requested time context of the server - has to be set by the implementing classprotected booleanwithUncertaintiesCorrelationsswitch to decide if attitude uncertainties and correlations should be calculated
-
Constructor Summary
Constructors Constructor Description BaseAttitudeDataServer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AgetAttitude(long time)AgetAttitude(java.util.Date date)protected abstract AgetAttitudeNative(long time)Evaluate the attitude in the native time system of the serverlonggetRefTime()booleanisInitialized()voidsetInitialized(boolean initialized)voidsetRefTime(long t)
-
-
-
Field Detail
-
initialized
protected boolean initialized
Some scanning laws have constants or tables for interpolation that need to be computed before the first use and recomputed after changing certain reference values. This flag indicates that the constants or tables (whatever applicable) are up to date.
-
nativeTimeContext
protected TimeContext nativeTimeContext
native and initially requested time context of the server - has to be set by the implementing class
-
initialRequestedTimeContext
protected TimeContext initialRequestedTimeContext
-
withUncertaintiesCorrelations
protected boolean withUncertaintiesCorrelations
switch to decide if attitude uncertainties and correlations should be calculated
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
- Returns:
- Returns the initialised.
-
setInitialized
public void setInitialized(boolean initialized)
-
getAttitude
public A getAttitude(java.util.Date date)
-
getAttitude
public A getAttitude(long time)
- Parameters:
time- The elapsed time in nanoseconds since J2010
-
getAttitudeNative
protected abstract A getAttitudeNative(long time)
Evaluate the attitude in the native time system of the server
-
setRefTime
public void setRefTime(long t)
- Parameters:
t- Reference time in nanoseconds (jd)
-
getRefTime
public long getRefTime()
- Returns:
- The reference time in ns
-
-