public class PositionAngleDetector extends AbstractDetector<PositionAngleDetector>
The detector is based on anomaly for Keplerian
orbits, latitude argument for circular
orbits,
or longitude argument for equinoctial
orbits.
It does not support Cartesian
orbits. The
angles can be either true
, {link mean
or eccentric
angles.
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
Modifier | Constructor and Description |
---|---|
protected |
PositionAngleDetector(AdaptableInterval maxCheck,
double threshold,
int maxIter,
EventHandler handler,
OrbitType orbitType,
PositionAngleType positionAngleType,
double angle)
Protected constructor with full parameters.
|
|
PositionAngleDetector(double maxCheck,
double threshold,
OrbitType orbitType,
PositionAngleType positionAngleType,
double angle)
Build a detector.
|
|
PositionAngleDetector(OrbitType orbitType,
PositionAngleType positionAngleType,
double angle)
Build a new detector.
|
Modifier and Type | Method and Description |
---|---|
protected PositionAngleDetector |
create(AdaptableInterval newMaxCheck,
double newThreshold,
int newMaxIter,
EventHandler newHandler)
Build a new instance.
|
double |
g(SpacecraftState s)
Compute the value of the detection function.
|
double |
getAngle()
Get the fixed angle to be crossed (radians).
|
OrbitType |
getOrbitType()
Get the orbit type defining the angle type.
|
PositionAngleType |
getPositionAngleType()
Get the type of position angle.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
public PositionAngleDetector(OrbitType orbitType, PositionAngleType positionAngleType, double angle) throws OrekitIllegalArgumentException
The new instance uses default values for maximal checking interval
(AbstractDetector.DEFAULT_MAXCHECK
) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD
).
orbitType
- orbit type defining the angle typepositionAngleType
- type of position angleangle
- fixed angle to be crossedOrekitIllegalArgumentException
- if orbit type is OrbitType.CARTESIAN
public PositionAngleDetector(double maxCheck, double threshold, OrbitType orbitType, PositionAngleType positionAngleType, double angle) throws OrekitIllegalArgumentException
This instance uses by default the StopOnEvent
handler
maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)orbitType
- orbit type defining the angle typepositionAngleType
- type of position angleangle
- fixed angle to be crossedOrekitIllegalArgumentException
- if orbit type is OrbitType.CARTESIAN
protected PositionAngleDetector(AdaptableInterval maxCheck, double threshold, int maxIter, EventHandler handler, OrbitType orbitType, PositionAngleType positionAngleType, double angle) throws OrekitIllegalArgumentException
This constructor is not public as users are expected to use the builder
API with the various withXxx()
methods to set up the instance
in a readable manner without using a huge amount of parameters.
maxCheck
- maximum checking intervalthreshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchhandler
- event handler to call at event occurrencesorbitType
- orbit type defining the angle typepositionAngleType
- type of position angleangle
- fixed angle to be crossedOrekitIllegalArgumentException
- if orbit type is OrbitType.CARTESIAN
protected PositionAngleDetector create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
create
in class AbstractDetector<PositionAngleDetector>
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrencespublic OrbitType getOrbitType()
public PositionAngleType getPositionAngleType()
public double getAngle()
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.
The default implementation does nothing
This implementation sets the direction of propagation and initializes the event
handler. If a subclass overrides this method it should call super.init(s0, t)
.
init
in interface EventDetector
init
in class AbstractDetector<PositionAngleDetector>
s0
- initial statet
- target time for the integrationpublic double g(SpacecraftState s)
The value is the angle difference between the spacecraft and the fixed
angle to be crossed, with some sign tweaks to ensure continuity.
These tweaks imply the increasing
flag in events detection becomes
irrelevant here! As an example, the angle always increase in a Keplerian
orbit, but this g function will increase and decrease so it
will cross the zero value once per orbit, in increasing and decreasing
directions on alternate orbits..
g
in interface EventDetector
g
in class AbstractDetector<PositionAngleDetector>
s
- the current state information: date, kinematics, attitudeCopyright © 2002-2023 CS GROUP. All rights reserved.