public class ImpulseManeuver extends AbstractDetector implements EventDetector, Maneuver
This class implements an impulse maneuver as a discrete event that can be provided to any
Propagator
.
The impulse maneuver is associated to a triggering EventDetector
: the maneuver is triggered only if the underlying event generates a
STOP
event, in which case this class will
generate a RESET_STATE
event (the
stop event from the underlying object is therefore filtered out). In the simple cases, the underlying event detector
may be a basic date event
, but it can also be a more
elaborate apside event
for apogee maneuvers for
example.
The maneuver is defined by a single velocity increment satellite frame or in a frame defined by user or in a LOF with
type defined by user. The current attitude of the spacecraft, defined by the current spacecraft state, will be used
to compute the velocity direction in inertial frame when direction is defined in satellite frame. A typical case for
tangential maneuvers is to use a LOF aligned
attitude provider for
state propagation and a velocity increment along the +X satellite axis.
Beware that the triggering event detector must behave properly both before and after maneuver. If for example a node detector is used to trigger an inclination maneuver and the maneuver change the orbit to an equatorial one, the node detector will fail just after the maneuver, being unable to find a node on an equatorial orbit! This is a real case that has been encountered during validation ...
Propagator.addEventDetector(EventDetector)
,
Serialized FormAbstractDetector.PropagationDelayType
EventDetector.Action
Modifier and Type | Field and Description |
---|---|
protected Vector3D |
deltaVSat
Velocity increment in the frame defined by the user.
|
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
ImpulseManeuver(EventDetector inTrigger,
Vector3D inDeltaVSat,
double isp,
MassProvider massModel,
String part)
Build a new instance.
|
ImpulseManeuver(EventDetector inTrigger,
Vector3D inDeltaVSat,
double isp,
MassProvider massModel,
String part,
LOFType inLofType)
Build a new instance with a LocalOrbitalFrame.
|
ImpulseManeuver(EventDetector inTrigger,
Vector3D inDeltaVSat,
Frame inFrame,
double isp,
MassProvider massModel,
String part)
Build a new instance.
|
ImpulseManeuver(EventDetector inTrigger,
Vector3D inDeltaVSat,
Frame inFrame,
PropulsiveProperty engine,
MassProvider massModel,
TankProperty tank)
Build a new instance using propulsive and engine property.
|
ImpulseManeuver(EventDetector inTrigger,
Vector3D inDeltaVSat,
PropulsiveProperty engine,
MassProvider massModel,
TankProperty tank)
Build a new instance using propulsive and engine property.
|
ImpulseManeuver(EventDetector inTrigger,
Vector3D inDeltaVSat,
PropulsiveProperty engine,
MassProvider massModel,
TankProperty tank,
LOFType inLofType)
Build a new instance with a LocalOrbitalFrame and using propulsive and engine property.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle an event and choose what to do next.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
Vector3D |
getDeltaVSat()
Get the velocity increment in satellite frame.
|
Frame |
getFrame()
Get the frame of the velocity increment.
|
double |
getIsp()
Get the specific impulse.
|
LOFType |
getLofType() |
double |
getMaxCheckInterval()
Get maximal time interval between switching function checks.
|
int |
getMaxIterationCount()
Get maximal number of iterations in the event time search.
|
PropulsiveProperty |
getPropulsiveProperty()
Get the propulsive property.
|
int |
getSlopeSelection()
Get the parameter in charge of the selection of detected events by the slope of the
g-function.
|
TankProperty |
getTankProperty()
Get the tank property.
|
double |
getThreshold()
Get the convergence threshold in the event time search.
|
EventDetector |
getTrigger()
Get the triggering event.
|
Vector3D |
getUsedDV()
Get the maneuver instantaneous consumption deltaV.
|
boolean |
hasFired()
Return the hasFired variable.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
SpacecraftState |
resetState(SpacecraftState oldState)
Reset the state (including additional states) prior to continue propagation.
|
boolean |
shouldBeRemoved()
This method is called after
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean) has been triggered. |
getPropagationDelayType, getSignalEmissionDate, getSignalReceptionDate, setPropagationDelayType
protected Vector3D deltaVSat
public ImpulseManeuver(EventDetector inTrigger, Vector3D inDeltaVSat, double isp, MassProvider massModel, String part) throws PatriusException
inTrigger
- triggering event (it must generate a STOP event action to trigger the
maneuver)inDeltaVSat
- velocity increment in satellite frameisp
- engine specific impulse (s)massModel
- mass modelpart
- part of the mass model that provides the propellantsPatriusException
- thrown if mass from mass provider is negativepublic ImpulseManeuver(EventDetector inTrigger, Vector3D inDeltaVSat, Frame inFrame, double isp, MassProvider massModel, String part) throws PatriusException
inTrigger
- triggering event (it must generate a STOP event action to trigger the
maneuver)inDeltaVSat
- velocity increment in the frame defined by the userinFrame
- the frame of the velocity increment. Null frame means spacecraft frame.isp
- engine specific impulse (s)massModel
- mass modelpart
- part of the mass model that provides the propellantsPatriusException
- thrown if mass from mass provider is negativepublic ImpulseManeuver(EventDetector inTrigger, Vector3D inDeltaVSat, double isp, MassProvider massModel, String part, LOFType inLofType) throws PatriusException
inTrigger
- triggering event (it must generate a STOP event action to trigger the
maneuver)inDeltaVSat
- velocity increment in the frame defined by the userisp
- engine specific impulse (s)massModel
- mass modelpart
- part of the mass model that provides the propellantsinLofType
- the LOF type of the velocity incrementPatriusException
- thrown if mass from mass provider is negativepublic ImpulseManeuver(EventDetector inTrigger, Vector3D inDeltaVSat, PropulsiveProperty engine, MassProvider massModel, TankProperty tank)
inTrigger
- triggering event (it must generate a STOP event action to trigger the
maneuver)inDeltaVSat
- velocity increment in satellite frameengine
- engine property (specific impulse)massModel
- mass modeltank
- tank property gathering mass and part name informationpublic ImpulseManeuver(EventDetector inTrigger, Vector3D inDeltaVSat, Frame inFrame, PropulsiveProperty engine, MassProvider massModel, TankProperty tank)
inTrigger
- triggering event (it must generate a STOP event action to trigger the
maneuver)inDeltaVSat
- velocity increment in the frame defined by the userinFrame
- the frame of the velocity increment. Null frame means spacecraft frameengine
- engine property (specific impulse)massModel
- mass modeltank
- tank property gathering mass and part name informationpublic ImpulseManeuver(EventDetector inTrigger, Vector3D inDeltaVSat, PropulsiveProperty engine, MassProvider massModel, TankProperty tank, LOFType inLofType)
inTrigger
- triggering event (it must generate a STOP event action to trigger the
maneuver)inDeltaVSat
- velocity increment in the frame defined by the userengine
- engine property (specific impulse)massModel
- mass modeltank
- tank property gathering mass and part name informationinLofType
- the LOF type of the velocity incrementpublic double getMaxCheckInterval()
getMaxCheckInterval
in interface EventDetector
getMaxCheckInterval
in class AbstractDetector
public int getMaxIterationCount()
getMaxIterationCount
in interface EventDetector
getMaxIterationCount
in class AbstractDetector
public double getThreshold()
getThreshold
in interface EventDetector
getThreshold
in class AbstractDetector
public EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
The scheduling between this method and the PatriusStepHandler method handleStep() is to call this method first
and handleStep
afterwards. This scheduling allows the propagator to pass true
as the
isLast
parameter to the step handler to make it aware the step will be the last one if this method
returns EventDetector.Action.STOP
. As the interpolator may be used to navigate back throughout the last
step (as OrekitStepNormalizer
does for example), user code called by this method and user code called by step handlers
may experience apparently out of order values of the independent time variable. As an example, if the same user
object implements both this EventDetector
interface and the OrekitFixedStepHandler
interface, a forward integration may call its eventOccurred
method
with a state at 2000-01-01T00:00:10 first and call its handleStep
method with a state at
2000-01-01T00:00:09 afterwards. Such out of order calls are limited to the size of the integration step for
variable step handlers
and to the size of
the fixed step for fixed step
handlers
.
eventOccurred
in interface EventDetector
eventOccurred
in class AbstractDetector
s
- the current state information: date, kinematics, attitude for forces and events
computation, mass provider, and additional statesincreasing
- if true, the value of the switching function increases when times increases
around event (note that increase is measured with respect to physical time, not with
respect to propagation which may go backward in time)forward
- if true, the integration variable (time) increases during integration.EventDetector.Action.STOP
, EventDetector.Action.RESET_STATE
,
EventDetector.Action.RESET_DERIVATIVES
, EventDetector.Action.CONTINUE
PatriusException
- if some specific error occurspublic boolean shouldBeRemoved()
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean)
has been triggered. It returns true if the
current detector should be removed after first event detection. WARNING: this method
can be called only once a event has been triggered. Before, the value is not available.shouldBeRemoved
in interface EventDetector
shouldBeRemoved
in class AbstractDetector
public void init(SpacecraftState s0, AbsoluteDate t)
This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.
init
in interface EventDetector
init
in class AbstractDetector
s0
- initial statet
- target time for the integrationpublic double g(SpacecraftState s) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
s
- the current state information: date, kinematics, attitude for forces and events
computation, mass provider, and additional statesPatriusException
- if some specific error occurspublic SpacecraftState resetState(SpacecraftState oldState) throws PatriusException
This method is called after the step handler has returned and before the next step is started, but only when
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean)
has itself returned the EventDetector.Action.RESET_STATE
indicator. It allows the
user to reset the state for the next step, without perturbing the step handler of the finishing step. If the
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean)
never returns the EventDetector.Action.RESET_STATE
indicator, this function will
never be called, and it is safe to simply return null.
resetState
in interface EventDetector
resetState
in class AbstractDetector
oldState
- old statePatriusException
- thrown if the mass becomes negative
(PatriusMessages.SPACECRAFT_MASS_BECOMES_NEGATIVE)PatriusException
- thrown if no attitude informations is definedPatriusException
- thrown if error occurs during transformationpublic EventDetector getTrigger()
public Vector3D getDeltaVSat()
public Vector3D getUsedDV()
public double getIsp()
Warning: if a variable ISP has been used, NaN will be returned.
public Frame getFrame()
public int getSlopeSelection()
getSlopeSelection
in interface EventDetector
getSlopeSelection
in class AbstractDetector
public TankProperty getTankProperty()
public PropulsiveProperty getPropulsiveProperty()
public LOFType getLofType()
public boolean hasFired()
public EventDetector copy()
The following attributes are not deeply copied:
MassProvider
Frame
copy
in interface EventDetector
Copyright © 2021 CNES. All rights reserved.