Class TransitionScanningLaw
- java.lang.Object
-
- gaiasky.util.gaia.BaseAttitudeDataServer<Attitude>
-
- gaiasky.util.gaia.AnalyticalAttitudeDataServer
-
- gaiasky.util.gaia.TransitionScanningLaw
-
public class TransitionScanningLaw extends AnalyticalAttitudeDataServer
Implements a smooth transition fromNsl37
toEpsl
, or vice versa.The scanning law used by this AttitudeDataServer is only valid (to required accuracy) in a short (< 0.5 day) time interval when the spin axis is less than a degree of the ecliptic. The revolving phase angle (nu) is written as nu(t) = 0.5 * acc * t^2 (in preceding mode, that is when nu is close to 0) or as nu(t) = PI + 0.5 * acc * t^2 (in following mode, that is when nu is close to PI). Here t is the time in [days] from the reference time (tRef) of this scanning law, and acc is a constant. On initialization, acc is set to a value such that nu(t) according to this law agrees with Nsl37 (for some suitable choice of initial angles) both in value and rate at t = tRef + T, where T is the ramp-up time (if T > 0) or ramp-down time (if T < 0). At t = tRef the revolving phase is exactly 0 (preceding mode) or PI (following mode). A number of reference quantities can be set as usual by means of setRefTime, setXiRef, setOmegaRef, setTargetPrecRate, and setTargetScanRate from the AnalyticalAttitudeDataServer. Only setNuRef should not be used; it is replaced by setMode(Epsl.Mode). [Nevertheless it is possible to use setNuRef(0.0) instead of setMode(Epsl.Mode.PRECEDING) and setNuRef(Math.PI) instead of setMode(Epsl.Mode.PRECEDING).]
-
-
Field Summary
Fields Modifier and Type Field Description protected double
acc
protected double
eps
Relative tolerance for exceeding the rampprotected double
om0
protected double
om1
protected double
om2
protected double
om3
protected double
om4
protected Duration
ramp
-
Fields inherited from class gaiasky.util.gaia.AnalyticalAttitudeDataServer
ARCSEC_PER_S_TO_DEG_PER_DAY, FOUR_PI, nslSun, OBLIQUITY_DEG, OBLIQUITY_RAD, PI, PI_HALF, targetScanPeriod, TWO_PI, X_AXIS, Y_AXIS, Z_AXIS
-
Fields inherited from class gaiasky.util.gaia.BaseAttitudeDataServer
initialized, initialRequestedTimeContext, nativeTimeContext, withUncertaintiesCorrelations
-
-
Constructor Summary
Constructors Constructor Description TransitionScanningLaw(Duration ramp)
The constructor is the only way to set the duration of the ramp
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attitude
getAttitudeNative(long time)
Evaluate the attitude in the native time system of the serverEpsl.Mode
getMode()
Return the Epsl.Mode (preceding or following)Duration
getRampDuration()
Return the duration of the rampvoid
initialize()
Initialization mainly calculates the acceleration required for the specified rampTransitionScanningLaw
setMode(Epsl.Mode mode)
Preferred method to set the Epsl.Mode (it can also be set using setNuRef)-
Methods inherited from class gaiasky.util.gaia.AnalyticalAttitudeDataServer
getNominalSunVector, getNuRef, getOmegaRef, getRefTime, getTargetPrecessionRate, getTargetScanPeriod, getTargetScanRate, getXiRef, inGap, setDefault, setNuRef, setOmegaRef, setRefTime, setTargetPrecessionRate, setTargetScanPeriod, setTargetScanRate, setXiRef
-
Methods inherited from class gaiasky.util.gaia.BaseAttitudeDataServer
getAttitude, getAttitude, isInitialized, setInitialized
-
-
-
-
Field Detail
-
ramp
protected Duration ramp
-
acc
protected double acc
-
om0
protected double om0
-
om1
protected double om1
-
om2
protected double om2
-
om3
protected double om3
-
om4
protected double om4
-
eps
protected double eps
Relative tolerance for exceeding the ramp
-
-
Constructor Detail
-
TransitionScanningLaw
public TransitionScanningLaw(Duration ramp)
The constructor is the only way to set the duration of the ramp- Parameters:
ramp
-
-
-
Method Detail
-
getMode
public Epsl.Mode getMode()
Return the Epsl.Mode (preceding or following)- Returns:
- The mode
-
setMode
public TransitionScanningLaw setMode(Epsl.Mode mode)
Preferred method to set the Epsl.Mode (it can also be set using setNuRef)- Parameters:
mode
- EPSL preceding or following- Returns:
- This object with the right mode set
-
getRampDuration
public Duration getRampDuration()
Return the duration of the ramp
-
initialize
public void initialize()
Initialization mainly calculates the acceleration required for the specified ramp
-
getAttitudeNative
public Attitude getAttitudeNative(long time)
Description copied from class:BaseAttitudeDataServer
Evaluate the attitude in the native time system of the server- Specified by:
getAttitudeNative
in classBaseAttitudeDataServer<Attitude>
- Parameters:
time
- - the time elapsed since the epoch of J2010 in ns (TCB)- Returns:
- attitude for the given time
- See Also:
BaseAttitudeDataServer.getAttitude(long)
-
-