Package org.orekit.forces
Class PythonForceModel
- java.lang.Object
-
- org.orekit.forces.PythonForceModel
-
- All Implemented Interfaces:
ForceModel
,ParametersDriversProvider
public class PythonForceModel extends Object implements ForceModel
-
-
Constructor Summary
Constructors Constructor Description PythonForceModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends CalculusFieldElement<T>>
FieldVector3D<T>acceleration(FieldSpacecraftState<T> s, T[] parameters)
Compute acceleration.Vector3D
acceleration(SpacecraftState s, double[] parameters)
Compute acceleration.<T extends CalculusFieldElement<T>>
FieldVector3D<T>acceleration_FT(FieldSpacecraftState<T> s, T[] parameters)
Compute acceleration.<T extends CalculusFieldElement<T>>
voidaddContribution(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
Compute the contribution of the force model to the perturbing acceleration.void
addContribution(SpacecraftState s, TimeDerivativesEquations adder)
Compute the contribution of the force model to the perturbing acceleration.<T extends CalculusFieldElement<T>>
voidaddContribution_FF(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
boolean
dependsOnPositionOnly()
Check if force models depends on position only.void
finalize()
Part of JCC Python interface to objectStream<EventDetector>
getEventsDetectors()
Get the discrete events related to the model.<T extends CalculusFieldElement<T>>
Stream<FieldEventDetector<T>>getFieldEventsDetectors(Field<T> field)
Get the discrete events related to the model.ParameterDriver
getParameterDriver(String name)
Get parameter value from its name.double[]
getParameters()
Get force model parameters.<T extends CalculusFieldElement<T>>
T[]getParameters(Field<T> field)
Get force model parameters.<T extends CalculusFieldElement<T>>
T[]getParameters_F(Field<T> field)
Get force model parameters.List<ParameterDriver>
getParametersDrivers()
Get the drivers for force model parameters.void
init(SpacecraftState initialState, AbsoluteDate target)
Initialize the force model at the start of propagation.boolean
isSupported(String name)
Check if a parameter is supported.void
pythonDecRef()
Part of JCC Python interface to objectlong
pythonExtension()
Part of JCC Python interface to objectvoid
pythonExtension(long pythonObject)
Part of JCC Python interface to object-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.forces.ForceModel
init
-
-
-
-
Method Detail
-
pythonExtension
public void pythonExtension(long pythonObject)
Part of JCC Python interface to object
-
pythonExtension
public long pythonExtension()
Part of JCC Python interface to object
-
finalize
public void finalize() throws Throwable
Part of JCC Python interface to object
-
pythonDecRef
public void pythonDecRef()
Part of JCC Python interface to object
-
init
public void init(SpacecraftState initialState, AbsoluteDate target)
Initialize the force model at the start of propagation. This method will be called before any calls toaddContribution(SpacecraftState, TimeDerivativesEquations)
,addContribution(FieldSpacecraftState, FieldTimeDerivativesEquations)
,acceleration(SpacecraftState, double[])
oracceleration(FieldSpacecraftState, CalculusFieldElement[])
The default implementation of this method does nothing.
- Specified by:
init
in interfaceForceModel
- Parameters:
initialState
- spacecraft state at the start of propagation.target
- date of propagation. Not equal toinitialState.getDate()
.
-
addContribution
public void addContribution(SpacecraftState s, TimeDerivativesEquations adder)
Compute the contribution of the force model to the perturbing acceleration.The default implementation simply adds the
acceleration
as a non-Keplerian acceleration.- Specified by:
addContribution
in interfaceForceModel
- Parameters:
s
- current state information: date, kinematics, attitudeadder
- object where the contribution should be added
-
addContribution
public <T extends CalculusFieldElement<T>> void addContribution(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
Compute the contribution of the force model to the perturbing acceleration.- Specified by:
addContribution
in interfaceForceModel
- Type Parameters:
T
- type of the elements- Parameters:
s
- current state information: date, kinematics, attitudeadder
- object where the contribution should be added
-
addContribution_FF
public <T extends CalculusFieldElement<T>> void addContribution_FF(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
-
getParameters
public double[] getParameters()
Get force model parameters.- Specified by:
getParameters
in interfaceForceModel
- Returns:
- force model parameters
- Since:
- 9.0
-
getParameters
public <T extends CalculusFieldElement<T>> T[] getParameters(Field<T> field)
Get force model parameters.- Specified by:
getParameters
in interfaceForceModel
- Type Parameters:
T
- type of the elements- Parameters:
field
- field to which the elements belong- Returns:
- force model parameters
- Since:
- 9.0
-
getParameters_F
public <T extends CalculusFieldElement<T>> T[] getParameters_F(Field<T> field)
Get force model parameters.- Parameters:
field
- field to which the elements belong- Returns:
- force model parameters
- Since:
- 9.0
-
dependsOnPositionOnly
public boolean dependsOnPositionOnly()
Check if force models depends on position only.- 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
- Since:
- 9.0
-
acceleration
public Vector3D acceleration(SpacecraftState s, double[] parameters)
Compute acceleration.- Specified by:
acceleration
in interfaceForceModel
- Parameters:
s
- current state information: date, kinematics, attitudeparameters
- values of the force model parameters- Returns:
- acceleration in same frame as state
- Since:
- 9.0
-
acceleration
public <T extends CalculusFieldElement<T>> FieldVector3D<T> acceleration(FieldSpacecraftState<T> s, T[] parameters)
Compute acceleration.- Specified by:
acceleration
in interfaceForceModel
- Type Parameters:
T
- type of the elements- Parameters:
s
- current state information: date, kinematics, attitudeparameters
- values of the force model parameters- Returns:
- acceleration in same frame as state
- Since:
- 9.0
-
acceleration_FT
public <T extends CalculusFieldElement<T>> FieldVector3D<T> acceleration_FT(FieldSpacecraftState<T> s, T[] parameters)
Compute acceleration.- Parameters:
s
- current state information: date, kinematics, attitudeparameters
- values of the force model parameters- Returns:
- acceleration in same frame as state
- Since:
- 9.0
-
getEventsDetectors
public Stream<EventDetector> getEventsDetectors()
Get the discrete events related to the model.- Specified by:
getEventsDetectors
in interfaceForceModel
- Returns:
- stream of events detectors
-
getFieldEventsDetectors
public <T extends CalculusFieldElement<T>> Stream<FieldEventDetector<T>> getFieldEventsDetectors(Field<T> field)
Get the discrete events related to the model.- Specified by:
getFieldEventsDetectors
in interfaceForceModel
- Type Parameters:
T
- extends CalculusFieldElement<T>- Parameters:
field
- field to which the state belongs- Returns:
- stream of events detectors
-
getParametersDrivers
public List<ParameterDriver> getParametersDrivers()
Get the drivers for force model parameters.- Specified by:
getParametersDrivers
in interfaceParametersDriversProvider
- Returns:
- drivers for force model parameters
- Since:
- 8.0
-
getParameterDriver
public ParameterDriver getParameterDriver(String name)
Get parameter value from its name.- Specified by:
getParameterDriver
in interfaceForceModel
- Parameters:
name
- parameter name- Returns:
- parameter value
- Since:
- 8.0
-
isSupported
public boolean isSupported(String name)
Check if a parameter is supported.Supported parameters are those listed by
getParametersDrivers()
.- Specified by:
isSupported
in interfaceForceModel
- Parameters:
name
- parameter name to check- Returns:
- true if the parameter is supported
- See Also:
getParametersDrivers()
-
-