Class MslAttitudeDataServer
java.lang.Object
gaiasky.util.gaia.BaseAttitudeDataServer<IAttitude>
gaiasky.util.gaia.NumericalAttitudeDataServer<IAttitude>
gaiasky.util.gaia.HermiteInterpolatedAttitudeDataServer
gaiasky.util.gaia.MslAttitudeDataServer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleAn extra rotation by this angle [rad] is added to the generated attitudeprotected doubleMaximum step size for the Hermite interpolation.protected ModifiedScanningLawprotected long[]The times when the precession rate changes, calculated fromreducedPrecession.protected QuaternionDoubleQuaterniond corresponding to extraOmegaprotected boolean[]Keep track of times when the precession rate is reducedprotected longActual time step for Hermite interpolation, in [ns]protected longprotected longThe 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[]Keep track of times when the precession rate is in a transition from nominal to reduced, or vice versaprotected booleanThe default integrator time step is the same as for Hermite interpolation.Fields inherited from class HermiteInterpolatedAttitudeDataServer
nT, qW, qX, qY, qZ, rateX, rateY, rateZ, tNsFields inherited from class NumericalAttitudeDataServer
gtisFields inherited from class BaseAttitudeDataServer
initialized, initialRequestedTimeContext, nativeTimeContext, withUncertaintiesCorrelationsModifier and TypeFieldDescriptionprotected booleanSome 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 TimeContextprotected TimeContextnative and initially requested time context of the server - has to be set by the implementing classprotected booleanswitch to decide if attitude uncertainties and correlations should be calculated -
Constructor Summary
ConstructorsConstructorDescriptionMslAttitudeDataServer(long tStart, Duration tLength, ModifiedScanningLaw msl) Constructor for given start time and mission length -
Method Summary
Modifier and TypeMethodDescriptiongetAttitudeNative(long t) Evaluate the attitude in the native time system of the serverdoubleReturn the currently set maximum step used in the Hermite interpolationgetMsl()Returns the underlying ModeifiedScanningLaw.long[]Return the parameters defining the Hermite interpolation nodes (array tNs)long[]Get a list of the (approximate) times when the precession rate has changed.doubleReturns the (effective) reference value of the heliotropic angle Omega.booleaninGap(long time) voidAny numerical attitude needs to be initializedbooleanisModified(long t) Returns true if the precession rate is reduced in the interpolation interval containing tbooleanisTransition(long t) Returns true if the precession rate is in a transition phase during the interval containing tvoidsetMaxStep(double maxStepInSec) Set the maximum step size to be used in the Hermite interpolation.voidsetMaxStepForIntegrator(double maxStepInSec) This allows to override the default choice of max step for integratorvoidsetRefOmega(double refOmega) Sets the (effective) reference value of the heliotropic angle Omega.Methods inherited from class NumericalAttitudeDataServer
getGtis, getStartTime, getStopTime, isValidMethods inherited from class BaseAttitudeDataServer
getAttitude, getAttitude, getAttitude, getRefTime, isInitialized, setInitialized, setRefTimeModifier and TypeMethodDescriptiongetAttitude(long time) getAttitude(Instant instant) getAttitude(Date date) longbooleanvoidsetInitialized(boolean initialized) voidsetRefTime(long t)
-
Field Details
-
msl
-
maxStepSec
protected double maxStepSecMaximum step size for the Hermite interpolation. -
step
protected long stepActual time step for Hermite interpolation, in [ns] -
timeGranularity
protected long timeGranularityThe 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 useDefaultStepForIntegratorThe 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 extraOmegaAn extra rotation by this angle [rad] is added to the generated attitude -
reducedPrecession
protected boolean[] reducedPrecessionKeep track of times when the precession rate is reduced -
transitionPrecession
protected boolean[] transitionPrecessionKeep track of times when the precession rate is in a transition from nominal to reduced, or vice versa -
precessionRateChanges
protected volatile long[] precessionRateChangesThe times when the precession rate changes, calculated fromreducedPrecession. -
qExtraOmega
Quaterniond corresponding to extraOmega
-
-
Constructor Details
-
MslAttitudeDataServer
Constructor for given start time and mission length- Parameters:
tStart- start timetLength- coverage lengthmsl- the underlying scanning law- Throws:
IllegalArgumentException- if the tStart is before the start time of the passed scanning law, msl.
-
-
Method Details
-
initialize
public void initialize()Description copied from class:NumericalAttitudeDataServerAny numerical attitude needs to be initialized- Specified by:
initializein classHermiteInterpolatedAttitudeDataServer- See Also:
-
inGap
public boolean inGap(long time) -
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]
-
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]
-
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 }
-
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]
-
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]
-
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
Description copied from class:BaseAttitudeDataServerEvaluate the attitude in the native time system of the server- Overrides:
getAttitudeNativein classHermiteInterpolatedAttitudeDataServer- Parameters:
t- - the time elapsed since the epoch of J2010 in ns (TCB)- Returns:
- attitude for the given time
- Throws:
RuntimeException- See Also:
-
isModified
public boolean isModified(long t) Returns true if the precession rate is reduced in the interpolation interval containing t -
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.
-