Class FieldBetaAngleDetector<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.events.FieldAbstractDetector<FieldBetaAngleDetector<T>,T>
-
- org.orekit.propagation.events.FieldBetaAngleDetector<T>
-
- Type Parameters:
T
- The field type
- All Implemented Interfaces:
FieldEventDetector<T>
public class FieldBetaAngleDetector<T extends CalculusFieldElement<T>> extends FieldAbstractDetector<FieldBetaAngleDetector<T>,T>
Finder for beta angle crossing events.Locate events when the beta angle (the angle between the orbit plane and the celestial body) crosses a threshold. The
g(FieldSpacecraftState)
function is negative when the beta angle is above the threshold and positive when the beta angle is below the threshold.The inertial frame provided must have it's origin centered at the satellite's orbit plane. The beta angle is computed as the angle between the celestial body's position in this frame with the satellite's orbital momentum vector.
The default implementation behavior is to
stop
propagation at the first event date occurrence. This can be changed by callingFieldAbstractDetector.withHandler(FieldEventHandler)
after construction.- Since:
- 12.1
- Author:
- Joe Reed
- See Also:
Propagator.addEventDetector(EventDetector)
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.FieldAbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description FieldBetaAngleDetector(Field<T> field, T betaAngleThreshold, FieldPVCoordinatesProvider<T> celestialBodyProvider, Frame inertialFrame)
Class constructor.protected
FieldBetaAngleDetector(FieldAdaptableInterval<T> maxCheck, T threshold, int maxIter, FieldEventHandler<T> handler, T betaAngleThreshold, FieldPVCoordinatesProvider<T> celestialBodyProvider, Frame inertialFrame)
Protected constructor with full parameters.FieldBetaAngleDetector(T betaAngleThreshold)
Solar beta angle constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends CalculusFieldElement<T>>
TcalculateBetaAngle(FieldSpacecraftState<T> state, FieldPVCoordinatesProvider<T> celestialBodyProvider)
Calculate the beta angle between the orbit plane and the celestial body.static <T extends CalculusFieldElement<T>>
TcalculateBetaAngle(FieldSpacecraftState<T> state, FieldPVCoordinatesProvider<T> celestialBodyProvider, Frame frame)
Calculate the beta angle between the orbit plane and the celestial body.protected FieldBetaAngleDetector<T>
create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
Build a new instance.T
g(FieldSpacecraftState<T> s)
Compute the value of the switching function.T
getBetaAngleThreshold()
The beta angle threshold (radians).FieldPVCoordinatesProvider<T>
getCelestialBodyProvider()
Coordinate provider for the celestial body.Frame
getInertialFrame()
The inertial frame in which beta angle is computed.FieldBetaAngleDetector<T>
withBetaThreshold(T newBetaAngleThreshold)
Create a new instance with the provided beta angle threshold.FieldBetaAngleDetector<T>
withCelestialProvider(FieldPVCoordinatesProvider<T> newProvider)
Create a new instance with the provided coordinate provider.FieldBetaAngleDetector<T>
withInertialFrame(Frame newFrame)
Create a new instance with the provided inertial frame.-
Methods inherited from class org.orekit.propagation.events.FieldAbstractDetector
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
-
-
-
Constructor Detail
-
FieldBetaAngleDetector
@DefaultDataContext public FieldBetaAngleDetector(T betaAngleThreshold)
Solar beta angle constructor.This method uses the default data context, assigns the sun as the celestial body and uses GCRF as the inertial frame.
- Parameters:
betaAngleThreshold
- beta angle threshold (radians)
-
FieldBetaAngleDetector
public FieldBetaAngleDetector(Field<T> field, T betaAngleThreshold, FieldPVCoordinatesProvider<T> celestialBodyProvider, Frame inertialFrame)
Class constructor.- Parameters:
field
- the field instancebetaAngleThreshold
- beta angle threshold (radians)celestialBodyProvider
- coordinate provider for the celestial providerinertialFrame
- inertial frame in which to compute the beta angle
-
FieldBetaAngleDetector
protected FieldBetaAngleDetector(FieldAdaptableInterval<T> maxCheck, T threshold, int maxIter, FieldEventHandler<T> handler, T betaAngleThreshold, FieldPVCoordinatesProvider<T> celestialBodyProvider, Frame inertialFrame)
Protected constructor with full parameters.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.- Parameters:
maxCheck
- maximum checking intervalthreshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchhandler
- event handler to call at event occurrencesbetaAngleThreshold
- beta angle threshold (radians)celestialBodyProvider
- coordinate provider for the celestial providerinertialFrame
- inertial frame in which to compute the beta angle
-
-
Method Detail
-
getCelestialBodyProvider
public FieldPVCoordinatesProvider<T> getCelestialBodyProvider()
Coordinate provider for the celestial body.- Returns:
- celestial body's coordinate provider
-
getInertialFrame
public Frame getInertialFrame()
The inertial frame in which beta angle is computed.- Returns:
- the inertial frame
-
getBetaAngleThreshold
public T getBetaAngleThreshold()
The beta angle threshold (radians).- Returns:
- the beta angle threshold (radians)
-
withCelestialProvider
public FieldBetaAngleDetector<T> withCelestialProvider(FieldPVCoordinatesProvider<T> newProvider)
Create a new instance with the provided coordinate provider.This method does not change the current instance.
- Parameters:
newProvider
- the new coordinate provider- Returns:
- the new detector instance
-
withBetaThreshold
public FieldBetaAngleDetector<T> withBetaThreshold(T newBetaAngleThreshold)
Create a new instance with the provided beta angle threshold.This method does not change the current instance.
- Parameters:
newBetaAngleThreshold
- the beta angle threshold- Returns:
- the new detector instance
-
withInertialFrame
public FieldBetaAngleDetector<T> withInertialFrame(Frame newFrame)
Create a new instance with the provided inertial frame.This method does not change the current instance.
- Parameters:
newFrame
- the inertial frame- Returns:
- the new detector instance
-
g
public T g(FieldSpacecraftState<T> s)
Compute the value of the switching function. This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.- Specified by:
g
in interfaceFieldEventDetector<T extends CalculusFieldElement<T>>
- Specified by:
g
in classFieldAbstractDetector<FieldBetaAngleDetector<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
calculateBetaAngle
public static <T extends CalculusFieldElement<T>> T calculateBetaAngle(FieldSpacecraftState<T> state, FieldPVCoordinatesProvider<T> celestialBodyProvider)
Calculate the beta angle between the orbit plane and the celestial body.This method computes the beta angle using the frame from the spacecraft state.
- Type Parameters:
T
- The field type- Parameters:
state
- spacecraft statecelestialBodyProvider
- celestial body coordinate provider- Returns:
- the beta angle (radians)
-
calculateBetaAngle
public static <T extends CalculusFieldElement<T>> T calculateBetaAngle(FieldSpacecraftState<T> state, FieldPVCoordinatesProvider<T> celestialBodyProvider, Frame frame)
Calculate the beta angle between the orbit plane and the celestial body.- Type Parameters:
T
- The field type- Parameters:
state
- spacecraft statecelestialBodyProvider
- celestial body coordinate providerframe
- inertial frame in which beta angle will be computed- Returns:
- the beta angle (radians)
-
create
protected FieldBetaAngleDetector<T> create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
Build a new instance.- Specified by:
create
in classFieldAbstractDetector<FieldBetaAngleDetector<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
- Parameters:
newMaxCheck
- maximum checking intervalnewThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
-