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
-
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.events.EventDetectorsProvider
DATATION_ACCURACY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDragForceModel(Atmosphere atmosphere)
Constructor with default value for finite differences flag.protected
AbstractDragForceModel(Atmosphere atmosphere, boolean useFiniteDifferencesOnDensityWrtPosition)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
dependsOnPositionOnly()
Check if force model depends on position only at a given, fixed date.Atmosphere
getAtmosphere()
Get the atmospheric model.protected DerivativeStructure
getDSDensityWrtState(AbsoluteDate date, Frame frame, FieldVector3D<DerivativeStructure> position)
Compute density and its derivatives.protected DerivativeStructure
getDSDensityWrtStateUsingFiniteDifferences(AbsoluteDate date, Frame frame, FieldVector3D<DerivativeStructure> position)
Compute density and its derivatives.protected <T extends CalculusFieldElement<T>>
TgetFieldDensity(FieldSpacecraftState<T> s)
Evaluate the Field density.protected Gradient
getGradientDensityWrtState(AbsoluteDate date, Frame frame, FieldVector3D<Gradient> position)
Compute density and its derivatives.protected Gradient
getGradientDensityWrtStateUsingFiniteDifferences(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 boolean
isVariable(DerivativeStructure ds, int index)
Check if a derivative represents a specified variable.protected boolean
isVariable(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
getDateDetector, getEventDetectors, getFieldDateDetector, getFieldEventDetectors
-
Methods inherited from interface org.orekit.forces.ForceModel
acceleration, acceleration, addContribution, addContribution, dependsOnAttitudeRate, 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 with default value for finite differences flag.- Parameters:
atmosphere
- atmospheric model
-
AbstractDragForceModel
protected AbstractDragForceModel(Atmosphere atmosphere, boolean useFiniteDifferencesOnDensityWrtPosition)
Constructor.- Parameters:
atmosphere
- atmospheric modeluseFiniteDifferencesOnDensityWrtPosition
- flag to use finite differences to compute density derivatives w.r.t. position (is less accurate but can be faster depending on model)- Since:
- 12.1
-
-
Method Detail
-
getAtmosphere
public Atmosphere getAtmosphere()
Get the atmospheric model.- Returns:
- atmosphere model
- Since:
- 12.1
-
dependsOnPositionOnly
public boolean dependsOnPositionOnly()
Check if force model depends on position only at a given, fixed date.- Specified by:
dependsOnPositionOnly
in 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
-
getFieldDensity
protected <T extends CalculusFieldElement<T>> T getFieldDensity(FieldSpacecraftState<T> s)
Evaluate the Field density.- Type Parameters:
T
- field type- Parameters:
s
- spacecraft state- Returns:
- atmospheric density
- Since:
- 12.1
-
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 ofDerivativeStructure
with respect to state, so it is less general. However, it can be faster depending the Field implementation.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
-
getDSDensityWrtState
protected DerivativeStructure getDSDensityWrtState(AbsoluteDate date, Frame frame, FieldVector3D<DerivativeStructure> position)
Compute density and its derivatives. And doing the actual computation only for the derivatives with respect to position (others are set to 0.).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 ofGradient
with respect to state, so it is less general. However, it can be faster depending the Field implementation.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
-
getGradientDensityWrtState
protected Gradient getGradientDensityWrtState(AbsoluteDate date, Frame frame, FieldVector3D<Gradient> position)
Compute density and its derivatives.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
- Since:
- 12.1
-
-