Class BetaAngleDetector
- All Implemented Interfaces:
EventDetector
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 calling
AbstractDetector.withHandler(EventHandler) after construction.
- Since:
- 12.1
- Author:
- Joe Reed
- See Also:
-
Field Summary
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_CHECK, DEFAULT_MAX_ITER, DEFAULT_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionBetaAngleDetector(double betaAngleThreshold) Solar beta angle constructor.BetaAngleDetector(double betaAngleThreshold, PVCoordinatesProvider celestialBodyProvider, Frame inertialFrame) Class constructor.protectedBetaAngleDetector(EventDetectionSettings detectionSettings, EventHandler handler, double betaAngleThreshold, PVCoordinatesProvider celestialBodyProvider, Frame inertialFrame) Protected constructor with full parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalculateBetaAngle(SpacecraftState state, PVCoordinatesProvider celestialBodyProvider) Calculate the beta angle between the orbit plane and the celestial body.static doublecalculateBetaAngle(SpacecraftState state, PVCoordinatesProvider celestialBodyProvider, Frame frame) Calculate the beta angle between the orbit plane and the celestial body.protected BetaAngleDetectorcreate(EventDetectionSettings detectionSettings, EventHandler newHandler) Build a new instance.doubleg(SpacecraftState s) Compute the value of the switching function.doubleThe beta angle threshold (radians).Coordinate provider for the celestial body.The inertial frame in which beta angle is computed.withBetaThreshold(double newBetaAngleThreshold) Create a new instance with the provided beta angle threshold.withCelestialProvider(PVCoordinatesProvider newProvider) Create a new instance with the provided coordinate provider.withInertialFrame(Frame newFrame) Create a new instance with the provided inertial frame.Methods inherited from class org.orekit.propagation.events.AbstractDetector
checkIfForward, getDetectionSettings, getEventFunction, getHandler, init, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThresholdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.propagation.events.EventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold, reset
-
Constructor Details
-
BetaAngleDetector
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 Details
-
getCelestialBodyProvider
Coordinate provider for the celestial body.- Returns:
- celestial body's coordinate provider
-
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
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
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
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
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:
createin classAbstractDetector<BetaAngleDetector>- Parameters:
detectionSettings- detection settingsnewHandler- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-