Package gaia.cu9.ari.gaiaorbit.util.gaia
Class MslAttitudeDataServer
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.util.gaia.BaseAttitudeDataServer<A>
-
- gaia.cu9.ari.gaiaorbit.util.gaia.NumericalAttitudeDataServer<Attitude>
-
- gaia.cu9.ari.gaiaorbit.util.gaia.HermiteInterpolatedAttitudeDataServer
-
- gaia.cu9.ari.gaiaorbit.util.gaia.MslAttitudeDataServer
-
public class MslAttitudeDataServer extends HermiteInterpolatedAttitudeDataServer
This class implements the Modified Scanning Law (MSL) by Hermite interpolation of the attitude quaternion among values obtained by numerical integration of the basic equations in heliotropic angles.
-
-
Field Summary
Fields Modifier and Type Field Description protected double
extraOmega
An extra rotation by this angle [rad] is added to the generated attitudeprotected double
maxStepSec
Maximum step size for the Hermite interpolation.protected ModifiedScanningLaw
msl
protected long[]
precessionRateChanges
The times when the precession rate changes, calculated fromreducedPrecession
.protected Quaterniond
qExtraOmega
Quaterniond corresponding to extraOmegaprotected boolean[]
reducedPrecession
Keep track of times when the precession rate is reducedprotected long
step
Actual time step for Hermite interpolation, in [ns]protected long
stepForIntegrator
protected long
timeGranularity
The actual starting and end times of the time period covered by the Hermite nodes must be multiples of the timeGranularity since the scanning law reference epoch.protected boolean[]
transitionPrecession
Keep track of times when the precession rate is in a transition from nominal to reduced, or vice versaprotected boolean
useDefaultStepForIntegrator
The default integrator time step is the same as for Hermite interpolation.-
Fields inherited from class gaia.cu9.ari.gaiaorbit.util.gaia.HermiteInterpolatedAttitudeDataServer
nT, qW, qX, qY, qZ, rateX, rateY, rateZ, tNs
-
Fields inherited from class gaia.cu9.ari.gaiaorbit.util.gaia.NumericalAttitudeDataServer
gtis
-
Fields inherited from class gaia.cu9.ari.gaiaorbit.util.gaia.BaseAttitudeDataServer
initialized, initialRequestedTimeContext, nativeTimeContext, withUncertaintiesCorrelations
-
-
Constructor Summary
Constructors Constructor Description MslAttitudeDataServer(long tStart, Duration tLength, ModifiedScanningLaw msl)
Constructor for given start time and mission length
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attitude
getAttitudeNative(long t)
Evaluate the attitude in the native time system of the serverdouble
getMaxStep()
Return the currently set maximum step used in the Hermite interpolationModifiedScanningLaw
getMsl()
Returns the underlying ModeifiedScanningLaw.long[]
getNodeParams()
Return the parameters defining the Hermite interpolation nodes (array tNs) Note: Although the super (HermiteInterpolatedAttitudeDataServer) permits to use a non-equidistant grid of Hermite nodes, the grid in MslAttitudeDataServer is always equidistant.long[]
getPrecessionRateChanges()
Get a list of the (approximate) times when the precession rate has changed.double
getRefOmega()
Returns the (effective) reference value of the heliotropic angle Omega.boolean
inGap(long time)
void
initialize()
Any numerical attitude needs to be initializedboolean
isModified(long t)
Returns true if the precession rate is reduced in the interpolation interval containing tboolean
isTransition(long t)
Returns true if the precession rate is in a transition phase during the interval containing tvoid
setMaxStep(double maxStepInSec)
Set the maximum step size to be used in the Hermite interpolation.void
setMaxStepForIntegrator(double maxStepInSec)
This allows to override the default choice of max step for integratorvoid
setRefOmega(double refOmega)
Sets the (effective) reference value of the heliotropic angle Omega.-
Methods inherited from class gaia.cu9.ari.gaiaorbit.util.gaia.NumericalAttitudeDataServer
getGtis, getStartTime, getStopTime, isValid
-
Methods inherited from class gaia.cu9.ari.gaiaorbit.util.gaia.BaseAttitudeDataServer
getAttitude, getAttitude, getRefTime, isInitialized, setInitialized, setRefTime
-
-
-
-
Field Detail
-
msl
protected ModifiedScanningLaw msl
-
maxStepSec
protected double maxStepSec
Maximum step size for the Hermite interpolation.
-
step
protected long step
Actual time step for Hermite interpolation, in [ns]
-
timeGranularity
protected long timeGranularity
The actual starting and end times of the time period covered by the Hermite nodes must be multiples of the timeGranularity since the scanning law reference epoch. This implies that the actual Hermite time step must be an integer fraction of the granularity.
-
useDefaultStepForIntegrator
protected boolean useDefaultStepForIntegrator
The default integrator time step is the same as for Hermite interpolation. This can be overridden by setMaxStepForINtegrator(double).
-
stepForIntegrator
protected long stepForIntegrator
-
extraOmega
protected double extraOmega
An extra rotation by this angle [rad] is added to the generated attitude
-
reducedPrecession
protected boolean[] reducedPrecession
Keep track of times when the precession rate is reduced
-
transitionPrecession
protected boolean[] transitionPrecession
Keep track of times when the precession rate is in a transition from nominal to reduced, or vice versa
-
precessionRateChanges
protected long[] precessionRateChanges
The times when the precession rate changes, calculated fromreducedPrecession
.
-
qExtraOmega
protected Quaterniond qExtraOmega
Quaterniond corresponding to extraOmega
-
-
Constructor Detail
-
MslAttitudeDataServer
public MslAttitudeDataServer(long tStart, Duration tLength, ModifiedScanningLaw msl)
Constructor for given start time and mission length- Parameters:
tStart
- start timetLength
- coverage lengthmsl
- the underlying scanning law- Throws:
java.lang.IllegalArgumentException
- if the tStart is before the start time of the passed scanning law, msl.
-
-
Method Detail
-
initialize
public void initialize()
Description copied from class:NumericalAttitudeDataServer
Any numerical attitude needs to be initialized- Specified by:
initialize
in classHermiteInterpolatedAttitudeDataServer
- See Also:
HermiteInterpolatedAttitudeDataServer.initialize()
-
inGap
public boolean inGap(long time)
-
setMaxStep
public void setMaxStep(double maxStepInSec)
Set the maximum step size to be used in the Hermite interpolation. Replaces the default value set at construction.- Parameters:
maxStepInSec
- [sec]
-
setMaxStepForIntegrator
public void setMaxStepForIntegrator(double maxStepInSec)
This allows to override the default choice of max step for integrator- Parameters:
maxStepInSec
- maximum step in [s]
-
getMaxStep
public double getMaxStep()
Return the currently set maximum step used in the Hermite interpolation- Returns:
- step [sec]
-
getNodeParams
public long[] getNodeParams()
Return the parameters defining the Hermite interpolation nodes (array tNs) Note: Although the super (HermiteInterpolatedAttitudeDataServer) permits to use a non-equidistant grid of Hermite nodes, the grid in MslAttitudeDataServer is always equidistant. It is therefore completely specified by three parameters: (1) the first point (= tNs[0]), (2) the increment (= tNs[1] - tNs[0]), and (3) the number of nodes (nT). These three values are returned as a long[] array.- Returns:
- { first node, increment, number of nodes }
-
setRefOmega
public void setRefOmega(double refOmega)
Sets the (effective) reference value of the heliotropic angle Omega. To avoid re-initializing, extraOmega is set to the difference between the requested refOmega and the value set in the MSL- Parameters:
refOmega
- reference value of Omega in [rad]
-
getRefOmega
public double getRefOmega()
Returns the (effective) reference value of the heliotropic angle Omega. This is the sum of refOmega (as set in the MSL) and extraOmega- Returns:
- effective reference value of Omega in [rad]
-
getMsl
public ModifiedScanningLaw getMsl()
Returns the underlying ModeifiedScanningLaw. This can be used to retrieve refNu, precRate, scanRate, etc.- Returns:
- ModifiedScanningLaw used to set up the attitude data server
-
getAttitudeNative
public Attitude getAttitudeNative(long t) throws java.lang.RuntimeException
Description copied from class:BaseAttitudeDataServer
Evaluate the attitude in the native time system of the server- Overrides:
getAttitudeNative
in classHermiteInterpolatedAttitudeDataServer
- Parameters:
t
- - the time elapsed since the epoch of J2010 in ns (TCB)- Returns:
- attitude for the given time
- Throws:
java.lang.RuntimeException
- See Also:
BaseAttitudeDataServer.getAttitude(long)
-
isModified
public boolean isModified(long t)
Returns true if the precession rate is reduced in the interpolation interval containing t- Parameters:
t
-- Returns:
-
isTransition
public boolean isTransition(long t)
Returns true if the precession rate is in a transition phase during the interval containing t- Parameters:
t
- The rate- Returns:
- Whether it is in a transition phase
-
getPrecessionRateChanges
public long[] getPrecessionRateChanges()
Get a list of the (approximate) times when the precession rate has changed.
-
-