|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.orekit.attitudes.AttitudeLegsSequence
public final class AttitudeLegsSequence
This class handles a sequence of different attitude providers AttitudeLeg
.
This class is different from the AttitudesSequence
class in Orekit because even if they both represent a
sequence of attitude laws, AttitudeLegsSequence
contains attitude laws version "Attitude", while
AttitudesSequence
contains attitude laws version "Orbit determination"; moreover,
AttitudeLegsSequence
does not perform events detection between two consecutive attitude laws.
This class implements AttitudeLeg, so it can be used as one.
VERY IMPORTANT NOTICE : this class breaches the contract for AttitudeLeg : the PVCoordinatesProvider parameter in the getAttitude() calls is never used, the instance uses the inner PVCoordinatesProvider instead. This breach was necessary; it ensures the consistency between the attitude law legs and the slews between them. Indeed, to avoid performances problems, the slews are built and computed given a specific PVCoordinatesProvider. Therefore, all inner AttitudeLeg instances use the same PVCoordinatesProvider instance.
Constructor Summary | |
---|---|
AttitudeLegsSequence(PVCoordinatesProvider pvcp)
Only constructor for this class. |
Method Summary | |
---|---|
void |
add(String code,
AttitudeLeg leg)
Adds an AttitudeLeg instance to the sequence, with conditions. The conditions are : A new instance can only be inserted at the beginning or the end of the sequence (except the first one of course). |
Attitude |
getAttitude(Orbit orbit)
Compute the attitude corresponding to an orbital state. |
Attitude |
getAttitude(PVCoordinatesProvider pvProv,
AbsoluteDate date,
Frame frame)
Gets the attitude from the sequence. The AttitudeLeg matching the date is called to compute the attitude. |
AttitudeLeg |
getAttitudeLeg(AbsoluteDate date)
Gets the AttitudeLeg corresponding to the date. |
AttitudeLeg |
getAttitudeLeg(String code)
Get the attitude leg in the sequence with the selected code. |
AttitudeLeg |
getFirstAttitudeLeg()
Gets the first leg. |
AttitudeLeg |
getLastAttitudeLeg()
Gets the last leg. |
AttitudeLeg |
getNextAttitudeLeg(AttitudeLeg law)
Gets the next attitude law after the selected AttitudeLeg law. |
AttitudeLeg |
getNextAttitudeLeg(String law)
Gets the next attitude law after the AttitudeLeg law with the selected code. |
Attitude |
getOldAttitudeOnTransition(PVCoordinatesProvider pvProv,
AbsoluteDate date,
Frame frame)
Returns the attitude at a transition date for the old attitude law (the law previous to the valid transition law). |
AttitudeLeg |
getPreviousAttitudeLeg(AttitudeLeg law)
Gets the previous attitude law before the selected AttitudeLeg law. |
AttitudeLeg |
getPreviousAttitudeLeg(String law)
Gets the previous attitude law before the selected AttitudeLeg law. |
LinkedHashMap<String,AttitudeLeg> |
getSequence()
Returns a copy of the map containing of all AttitudeLeg instances. |
AbsoluteDateInterval |
getTimeInterval()
Return the time interval of validity |
boolean |
isEmpty()
Returns true if the sequence is empty. |
void |
setSpinDerivativesComputation(boolean computeSpinDerivatives)
Method to activate spin derivative computation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttitudeLegsSequence(PVCoordinatesProvider pvcp)
pvcp
- the PVCoordinates instances that all AttitudeLeg providers are meant to use.Method Detail |
---|
public Attitude getAttitude(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame) throws OrekitException
OrekitException
is thrown.
getAttitude
in interface AttitudeProvider
pvProv
- unused provider, can be null. See class comments.date
- the date for which the attitude is computedframe
- the frame for which the attitude is computed
OrekitException
- if the date is out of the sequence's range.public AbsoluteDateInterval getTimeInterval()
AttitudeLeg
getTimeInterval
in interface AttitudeLeg
public void setSpinDerivativesComputation(boolean computeSpinDerivatives)
Spin derivatives computation does not apply to provided laws. Call
setSpinDerivativesComputation(boolean)
on each law to activate/deactivate underlying law spin
derivative computation.
setSpinDerivativesComputation
in interface AttitudeProvider
computeSpinDerivatives
- true if spin derivatives should be computedpublic LinkedHashMap<String,AttitudeLeg> getSequence()
public void add(String code, AttitudeLeg leg) throws OrekitException
IllegalArgumentException
will be raised.
code
- the code of the attitude leg to be added to the sequenceleg
- the attitude leg to be added to the sequence
OrekitException
- if the AttitudeLeg is a non computed slew
IllegalArgumentException
- if the attitude leg does not match the conditionspublic boolean isEmpty()
public AttitudeLeg getFirstAttitudeLeg()
public AttitudeLeg getLastAttitudeLeg()
public AttitudeLeg getNextAttitudeLeg(AttitudeLeg law) throws OrekitException
AttitudeLeg
law.
law
- the previous AttitudeLeg
AttitudeLeg
OrekitException
- attitude exceptionpublic AttitudeLeg getNextAttitudeLeg(String law) throws OrekitException
AttitudeLeg
law with the selected code.
law
- the code of the previous AttitudeLeg
AttitudeLeg
OrekitException
- attitude exceptionpublic AttitudeLeg getPreviousAttitudeLeg(AttitudeLeg law) throws OrekitException
AttitudeLeg
law.
law
- the next AttitudeLeg
AttitudeLeg
OrekitException
- attitude exceptionpublic AttitudeLeg getPreviousAttitudeLeg(String law) throws OrekitException
AttitudeLeg
law.
law
- the next AttitudeLeg
AttitudeLeg
OrekitException
- attitude exceptionpublic Attitude getOldAttitudeOnTransition(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame) throws OrekitException
pvProv
- unused provider, can be null. See class comments.date
- the date for which the attitude is computedframe
- the frame for which the attitude is computed
OrekitException
- attitude exceptionpublic AttitudeLeg getAttitudeLeg(AbsoluteDate date) throws OrekitException
AttitudeLeg
corresponding to the date. If date corresponds to the limit of an interval, the
second law is returned.
date
- the date at which you want the AttitudeLeg
AttitudeLeg
OrekitException
- attitude exceptionpublic AttitudeLeg getAttitudeLeg(String code) throws OrekitException
code
- the code
OrekitException
- when the law with the selected code is not in the sequencepublic Attitude getAttitude(Orbit orbit) throws OrekitException
getAttitude
in interface AttitudeProvider
orbit
- current orbit
OrekitException
- if attitude cannot be computed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |