Class AbstractDragForceModel
- java.lang.Object
-
- org.orekit.forces.drag.AbstractDragForceModel
-
- All Implemented Interfaces:
ForceModel,EventDetectorsProvider,ParameterDriversProvider
- Direct Known Subclasses:
DragForce,TimeSpanDragForce
public abstract class AbstractDragForceModel extends Object implements ForceModel
Base class for drag force models.- Since:
- 10.2
- Author:
- Bryan Cazabonne
- See Also:
DragForce,TimeSpanDragForce
-
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.events.EventDetectorsProvider
DATATION_ACCURACY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDragForceModel(Atmosphere atmosphere)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandependsOnPositionOnly()Check if force models depends on position only.protected DerivativeStructuregetDSDensityWrtStateUsingFiniteDifferences(AbsoluteDate date, Frame frame, FieldVector3D<DerivativeStructure> position)Compute density and its derivatives.protected GradientgetGradientDensityWrtStateUsingFiniteDifferences(AbsoluteDate date, Frame frame, FieldVector3D<Gradient> position)Compute density and its derivatives.protected <T extends CalculusFieldElement<T>>
booleanisDSStateDerivative(FieldSpacecraftState<T> state)Check if a field state corresponds to derivatives with respect to state.protected <T extends CalculusFieldElement<T>>
booleanisGradientStateDerivative(FieldSpacecraftState<T> state)Check if a field state corresponds to derivatives with respect to state.protected booleanisVariable(DerivativeStructure ds, int index)Check if a derivative represents a specified variable.protected booleanisVariable(Gradient g, int index)Check if a derivative represents a specified variable.-
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.EventDetectorsProvider
getEventDetectors, getFieldEventDetectors
-
Methods inherited from interface org.orekit.forces.ForceModel
acceleration, acceleration, addContribution, addContribution, getEventDetectors, getFieldEventDetectors, init, init
-
Methods inherited from interface org.orekit.utils.ParameterDriversProvider
getNbParametersDriversValue, getParameterDriver, getParameters, getParameters, getParameters, getParameters, getParametersAllValues, getParametersAllValues, getParametersDrivers, isSupported
-
-
-
-
Constructor Detail
-
AbstractDragForceModel
protected AbstractDragForceModel(Atmosphere atmosphere)
Constructor.- Parameters:
atmosphere- atmospheric model
-
-
Method Detail
-
dependsOnPositionOnly
public boolean dependsOnPositionOnly()
Check if force models depends on position only.- Specified by:
dependsOnPositionOnlyin interfaceForceModel- Returns:
- true if force model depends on position only, false if it depends on velocity, either directly or due to a dependency on attitude
-
isDSStateDerivative
protected <T extends CalculusFieldElement<T>> boolean isDSStateDerivative(FieldSpacecraftState<T> state)
Check if a field state corresponds to derivatives with respect to state.- Type Parameters:
T- type of the field elements- Parameters:
state- state to check- Returns:
- true if state corresponds to derivatives with respect to state
-
isGradientStateDerivative
protected <T extends CalculusFieldElement<T>> boolean isGradientStateDerivative(FieldSpacecraftState<T> state)
Check if a field state corresponds to derivatives with respect to state.- Type Parameters:
T- type of the field elements- Parameters:
state- state to check- Returns:
- true if state corresponds to derivatives with respect to state
-
isVariable
protected boolean isVariable(DerivativeStructure ds, int index)
Check if a derivative represents a specified variable.- Parameters:
ds- derivative to checkindex- index of the variable- Returns:
- true if the derivative represents a specified variable
-
isVariable
protected boolean isVariable(Gradient g, int index)
Check if a derivative represents a specified variable.- Parameters:
g- derivative to checkindex- index of the variable- Returns:
- true if the derivative represents a specified variable
-
getDSDensityWrtStateUsingFiniteDifferences
protected DerivativeStructure getDSDensityWrtStateUsingFiniteDifferences(AbsoluteDate date, Frame frame, FieldVector3D<DerivativeStructure> position)
Compute density and its derivatives. Using finite differences for the derivatives. And doing the actual computation only for the derivatives with respect to position (others are set to 0.).From a theoretical point of view, this method computes the same values as
Atmosphere.getDensity(FieldAbsoluteDate, FieldVector3D, Frame)in the specific case ofDerivativeStructurewith respect to state, so it is less general. However, it is *much* faster in this important case.The derivatives should be computed with respect to position. The input parameters already take into account the free parameters (6, 7 or 8 depending on derivation with respect to drag coefficient and lift ratio being considered or not) and order (always 1). Free parameters at indices 0, 1 and 2 correspond to derivatives with respect to position. Free parameters at indices 3, 4 and 5 correspond to derivatives with respect to velocity (these derivatives will remain zero as the atmospheric density does not depend on velocity). Free parameter at indexes 6 and 7 (if present) corresponds to derivatives with respect to drag coefficient and/or lift ratio (one of these or both). This 2 last derivatives will remain zero as atmospheric density does not depend on them.
- Parameters:
date- current dateframe- inertial reference frame for state (both orbit and attitude)position- position of spacecraft in inertial frame- Returns:
- the density and its derivatives
-
getGradientDensityWrtStateUsingFiniteDifferences
protected Gradient getGradientDensityWrtStateUsingFiniteDifferences(AbsoluteDate date, Frame frame, FieldVector3D<Gradient> position)
Compute density and its derivatives. Using finite differences for the derivatives. And doing the actual computation only for the derivatives with respect to position (others are set to 0.).From a theoretical point of view, this method computes the same values as
Atmosphere.getDensity(FieldAbsoluteDate, FieldVector3D, Frame)in the specific case ofGradientwith respect to state, so it is less general. However, it is *much* faster in this important case.The derivatives should be computed with respect to position. The input parameters already take into account the free parameters (6, 7 or 8 depending on derivation with respect to drag coefficient and lift ratio being considered or not) and order (always 1). Free parameters at indices 0, 1 and 2 correspond to derivatives with respect to position. Free parameters at indices 3, 4 and 5 correspond to derivatives with respect to velocity (these derivatives will remain zero as the atmospheric density does not depend on velocity). Free parameter at indexes 6 and 7 (if present) corresponds to derivatives with respect to drag coefficient and/or lift ratio (one of these or both). This 2 last derivatives will remain zero as atmospheric density does not depend on them.
- Parameters:
date- current dateframe- inertial reference frame for state (both orbit and attitude)position- position of spacecraft in inertial frame- Returns:
- the density and its derivatives
-
-