org.orekit.attitudes
Class AttitudesSequence

java.lang.Object
  extended by org.orekit.attitudes.AttitudesSequence
All Implemented Interfaces:
Serializable, AttitudeLaw, AttitudeProvider

public class AttitudesSequence
extends Object
implements AttitudeLaw

This classes manages a sequence of different attitude providers that are activated in turn according to switching events.

Only one attitude provider in the sequence is in an active state. When one of the switch event associated with the active provider occurs, the active provider becomes the one specified with the event. A simple example is a provider for the sun lighted part of the orbit and another provider for the eclipse time. When the sun lighted provider is active, the eclipse entry event is checked and when it occurs the eclipse provider is activated. When the eclipse provider is active, the eclipse exit event is checked and when it occurs the sun lighted provider is activated again. This sequence is a simple loop.

An active attitude provider may have several switch events and next provider settings, leading to different activation patterns depending on which events are triggered first. An example of this feature is handling switches to safe mode if some contingency condition is met, in addition to the nominal switches that correspond to proper operations. Another example is handling of maneuver mode.

Since:
5.1
Author:
Luc Maisonobe
See Also:
Serialized Form

Constructor Summary
AttitudesSequence()
          Constructor for an initially empty sequence.
 
Method Summary
 void addSwitchingCondition(AttitudeLaw before, EventDetector switchEvent, boolean switchOnIncrease, boolean switchOnDecrease, AttitudeLaw after)
          Add a switching condition between two attitude providers.
 Attitude getAttitude(Orbit orbit)
          Compute the attitude corresponding to an orbital state.
 Attitude getAttitude(PVCoordinatesProvider pvProv, AbsoluteDate date, Frame frame)
          Compute the attitude corresponding to an orbital state.
 void registerSwitchEvents(Propagator propagator)
          Register all wrapped switch events to the propagator.
 void resetActiveProvider(AttitudeLaw provider)
          Reset the active provider.
 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

AttitudesSequence

public AttitudesSequence()
Constructor for an initially empty sequence.

Method Detail

resetActiveProvider

public void resetActiveProvider(AttitudeLaw provider)
Reset the active provider.

Parameters:
provider - the provider to activate

registerSwitchEvents

public void registerSwitchEvents(Propagator propagator)
Register all wrapped switch events to the propagator.

This method must be called once before propagation, after the switching conditions have been set up by calls to addSwitchingCondition(AttitudeLaw, EventDetector, boolean, boolean, AttitudeLaw).

Parameters:
propagator - propagator that will handle the events

addSwitchingCondition

public void addSwitchingCondition(AttitudeLaw before,
                                  EventDetector switchEvent,
                                  boolean switchOnIncrease,
                                  boolean switchOnDecrease,
                                  AttitudeLaw after)
Add a switching condition between two attitude providers.

An attitude provider may have several different switch events associated to it. Depending on which event is triggered, the appropriate provider is switched to.

The switch events specified here must not be registered to the propagator directly. The proper way to register these events is to call registerSwitchEvents(Propagator) once after all switching conditions have been set up. The reason for this is that the events will be wrapped before being registered.

Parameters:
before - attitude provider before the switch event occurrence
switchEvent - event triggering the attitude providers switch ; the event should generate ACTION.RESET_STATE when event occured. (may be null for a provider without any ending condition, in this case the after provider is not referenced and may be null too)
switchOnIncrease - if true, switch is triggered on increasing event
switchOnDecrease - if true, switch is triggered on decreasing event
after - attitude provider to activate after the switch event occurrence (used only if switchEvent is non null)

setSpinDerivativesComputation

public void setSpinDerivativesComputation(boolean computeSpinDerivatives)
                                   throws OrekitException
Method to activate spin derivative computation.

Spin derivatives computation does not apply to provided law. Call setSpinDerivativesComputation(boolean) on each law to activate/deactivate underlying law spin derivative computation.

Specified by:
setSpinDerivativesComputation in interface AttitudeProvider
Parameters:
computeSpinDerivatives - true if spin derivatives should be computed
Throws:
OrekitException - if spin derivatives can not be computed

getAttitude

public Attitude getAttitude(PVCoordinatesProvider pvProv,
                            AbsoluteDate date,
                            Frame frame)
                     throws OrekitException
Compute the attitude corresponding to an orbital state.

Specified by:
getAttitude in interface AttitudeProvider
Parameters:
pvProv - local position-velocity provider around current date
date - current date
frame - reference frame from which attitude is computed
Returns:
attitude attitude on the specified date and position-velocity state
Throws:
OrekitException - if attitude cannot be computed

getAttitude

public Attitude getAttitude(Orbit orbit)
                     throws OrekitException
Compute the attitude corresponding to an orbital state.

Specified by:
getAttitude in interface AttitudeProvider
Parameters:
orbit - current orbit
Returns:
attitude attitude on the current orbit
Throws:
OrekitException - if attitude cannot be computed


Copyright © 2016 CNES. All Rights Reserved.