Class BetaAngleDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<BetaAngleDetector>
-
- org.orekit.propagation.events.BetaAngleDetector
-
- All Implemented Interfaces:
EventDetector
public class BetaAngleDetector extends AbstractDetector<BetaAngleDetector>
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(SpacecraftState)
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 callingAbstractDetector.withHandler(EventHandler)
after construction.- Since:
- 12.1
- Author:
- Joe Reed
- See Also:
Propagator.addEventDetector(EventDetector)
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description BetaAngleDetector(double betaAngleThreshold)
Solar beta angle constructor.BetaAngleDetector(double betaAngleThreshold, PVCoordinatesProvider celestialBodyProvider, Frame inertialFrame)
Class constructor.protected
BetaAngleDetector(EventDetectionSettings detectionSettings, EventHandler handler, double betaAngleThreshold, PVCoordinatesProvider celestialBodyProvider, Frame inertialFrame)
Protected constructor with full parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
calculateBetaAngle(SpacecraftState state, PVCoordinatesProvider celestialBodyProvider)
Calculate the beta angle between the orbit plane and the celestial body.static double
calculateBetaAngle(SpacecraftState state, PVCoordinatesProvider celestialBodyProvider, Frame frame)
Calculate the beta angle between the orbit plane and the celestial body.protected BetaAngleDetector
create(EventDetectionSettings detectionSettings, EventHandler newHandler)
Build a new instance.double
g(SpacecraftState s)
Compute the value of the switching function.double
getBetaAngleThreshold()
The beta angle threshold (radians).PVCoordinatesProvider
getCelestialBodyProvider()
Coordinate provider for the celestial body.Frame
getInertialFrame()
The inertial frame in which beta angle is computed.BetaAngleDetector
withBetaThreshold(double newBetaAngleThreshold)
Create a new instance with the provided beta angle threshold.BetaAngleDetector
withCelestialProvider(PVCoordinatesProvider newProvider)
Create a new instance with the provided coordinate provider.BetaAngleDetector
withInertialFrame(Frame newFrame)
Create a new instance with the provided inertial frame.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getDetectionSettings, getHandler, init, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.propagation.events.EventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold
-
-
-
-
Constructor Detail
-
BetaAngleDetector
@DefaultDataContext public BetaAngleDetector(double 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)
-
BetaAngleDetector
public BetaAngleDetector(double betaAngleThreshold, PVCoordinatesProvider celestialBodyProvider, Frame inertialFrame)
Class constructor.- Parameters:
betaAngleThreshold
- beta angle threshold (radians)celestialBodyProvider
- coordinate provider for the celestial providerinertialFrame
- inertial frame in which to compute the beta angle
-
BetaAngleDetector
protected BetaAngleDetector(EventDetectionSettings detectionSettings, EventHandler handler, double betaAngleThreshold, PVCoordinatesProvider 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:
detectionSettings
- detection settingshandler
- 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 PVCoordinatesProvider 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 double getBetaAngleThreshold()
The beta angle threshold (radians).- Returns:
- the beta angle threshold (radians)
-
withCelestialProvider
public BetaAngleDetector withCelestialProvider(PVCoordinatesProvider 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 BetaAngleDetector withBetaThreshold(double 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 (radians)- Returns:
- the new detector instance
-
withInertialFrame
public BetaAngleDetector 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 double g(SpacecraftState 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.- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
calculateBetaAngle
public static double calculateBetaAngle(SpacecraftState state, PVCoordinatesProvider 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.
- Parameters:
state
- spacecraft statecelestialBodyProvider
- celestial body coordinate provider- Returns:
- the beta angle (radians)
-
calculateBetaAngle
public static double calculateBetaAngle(SpacecraftState state, PVCoordinatesProvider celestialBodyProvider, Frame frame)
Calculate the beta angle between the orbit plane and the celestial body.- Parameters:
state
- spacecraft statecelestialBodyProvider
- celestial body coordinate providerframe
- inertial frame in which beta angle will be computed- Returns:
- the beta angle (radians)
-
create
protected BetaAngleDetector create(EventDetectionSettings detectionSettings, EventHandler newHandler)
Build a new instance.- Specified by:
create
in classAbstractDetector<BetaAngleDetector>
- Parameters:
detectionSettings
- detection settingsnewHandler
- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
-