Class FieldNumericalPropagator<T extends CalculusFieldElement<T>>
- Type Parameters:
T- type of the field elements
- All Implemented Interfaces:
FieldPropagator<T>,FieldPVCoordinatesProvider<T>
orbits using
numerical integration.
Numerical propagation is much more accurate than analytical propagation
like for example Keplerian or Eckstein-Hechler, but requires a few more steps to set up to be used properly.
Whereas analytical propagators are configured only thanks to their various
constructors and can be used immediately after construction, numerical propagators
configuration involve setting several parameters between construction time
and propagation time.
The configuration parameters that can be set are:
- the initial spacecraft state (
setInitialState(FieldSpacecraftState)) - the central attraction coefficient (
setMu(CalculusFieldElement)) - the various force models (
addForceModel(ForceModel),removeForceModels()) - the
typeof orbital parameters to be used for propagation (setOrbitType(OrbitType)), - the
typeof position angle to be used in orbital parameters to be used for propagation where it is relevant (setPositionAngleType(PositionAngleType)), - whether
additional derivatives providersshould be propagated along with orbital state (FieldAbstractIntegratedPropagator.addAdditionalDerivativesProvider(org.orekit.propagation.integration.FieldAdditionalDerivativesProvider)), - the discrete events that should be triggered during propagation
(
FieldAbstractIntegratedPropagator.addEventDetector(FieldEventDetector),FieldAbstractIntegratedPropagator.clearEventsDetectors()) - the binding logic with the rest of the application (
FieldAbstractPropagator.getMultiplexer())
From these configuration parameters, only the initial state is mandatory. The default
propagation settings are in equinoctial parameters with
PositionAngleType.ECCENTRIC longitude argument. If the central attraction coefficient
is not explicitly specified, the one used to define the initial orbit will be used.
However, specifying only the initial state and perhaps the central attraction coefficient
would mean the propagator would use only Keplerian forces. In this case, the simpler KeplerianPropagator class would
perhaps be more effective.
The underlying numerical integrator set up in the constructor may also have its own configuration parameters. Typical configuration parameters for adaptive stepsize integrators are the min, max and perhaps start step size as well as the absolute and/or relative errors thresholds.
The state that is seen by the integrator is a simple seven elements double array. The six first elements are either:
- the
equinoctial orbit parameters(a, ex, ey, hx, hy, λM or λE or λv) in meters and radians, - the
Keplerian orbit parameters(a, e, i, ω, Ω, M or E or v) in meters and radians, - the
circular orbit parameters(a, ex, ey, i, Ω, αM or αE or αv) in meters and radians, - the
Cartesian orbit parameters(x, y, z, vx, vy, vz) in meters and meters per seconds.
The following code snippet shows a typical setting for Low Earth Orbit propagation in equinoctial parameters and true longitude argument:
final T zero = field.getZero(); final T dP = zero.add(0.001); final T minStep = zero.add(0.001); final T maxStep = zero.add(500); final T initStep = zero.add(60); final double[][] tolerance = ToleranceProvider.getDefaultToleranceProvider(dP).getTolerances(orbit, OrbitType.EQUINOCTIAL); AdaptiveStepsizeFieldIntegrator<T> integrator = new DormandPrince853FieldIntegrator<>(field, minStep, maxStep, tolerance[0], tolerance[1]); integrator.setInitialStepSize(initStep); propagator = new FieldNumericalPropagator<>(field, integrator);
By default, at the end of the propagation, the propagator resets the initial state to the final state,
thus allowing a new propagation to be started from there without recomputing the part already performed.
This behaviour can be changed by calling FieldAbstractIntegratedPropagator.setResetAtEnd(boolean).
Beware the same instance cannot be used simultaneously by different threads, the class is not thread-safe.
- Author:
- Mathieu Roméro, Luc Maisonobe, Guylaine Prat, Fabien Maussion, Véronique Pommier-Maurussane
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.orekit.propagation.integration.FieldAbstractIntegratedPropagator
FieldAbstractIntegratedPropagator.MainStateEquations<T extends CalculusFieldElement<T>> -
Field Summary
Fields inherited from interface org.orekit.propagation.FieldPropagator
DEFAULT_MASS -
Constructor Summary
ConstructorsConstructorDescriptionFieldNumericalPropagator(FieldODEIntegrator<T> integrator) Create a new instance of NumericalPropagator, based on orbit definition mu.FieldNumericalPropagator(FieldODEIntegrator<T> integrator, AttitudeProvider attitudeProvider) Create a new instance of NumericalPropagator, based on orbit definition mu. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddForceModel(ForceModel model) Add a force model to the global perturbation model.protected FieldStateMapper<T> createMapper(FieldAbsoluteDate<T> referenceDate, T mu, OrbitType orbitType, PositionAngleType positionAngleType, AttitudeProvider attitudeProvider, Frame frame) Create a mapper between raw double components and spacecraft state. /** Simple constructor.Get all the force models, perturbing forces and Newtonian attraction included.getMainStateEquations(FieldODEIntegrator<T> integrator) Get the differential equations to integrate (for main state only).Get propagation parameter type.Get propagation parameter type.protected AttitudeProviderMethod called when initializing the attitude provider used when evaluating derivatives.voidRemove all perturbing force models from the global perturbation model.voidresetInitialState(FieldSpacecraftState<T> state) Reset the propagator initial state.voidsetIgnoreCentralAttraction(boolean ignoreCentralAttraction) Set the flag to ignore or not the creation of aNewtonianAttraction.voidsetInitialState(FieldSpacecraftState<T> initialState) Set the initial state.voidSet the central attraction coefficient μ.voidsetOrbitType(OrbitType orbitType) Set propagation orbit type.voidsetPositionAngleType(PositionAngleType positionAngleType) Set position angle type.Methods inherited from class org.orekit.propagation.integration.FieldAbstractIntegratedPropagator
addAdditionalDerivativesProvider, addEventDetector, afterIntegration, beforeIntegration, clearEphemerisGenerators, clearEventsDetectors, getAdditionalDerivativesProviders, getBasicDimension, getCalls, getEphemerisGenerator, getEventDetectors, getFrozenAttitudeProvider, getInitialIntegrationState, getIntegrator, getIntegratorName, getManagedAdditionalData, getMu, getPropagationType, getResetAtEnd, initMapper, isAdditionalDataManaged, isMeanOrbit, propagate, propagate, resetInitialState, setAttitudeProvider, setResetAtEnd, setUpEventDetector, setUpUserEventDetectorsMethods inherited from class org.orekit.propagation.FieldAbstractPropagator
addAdditionalDataProvider, getAdditionalDataProviders, getAttitudeProvider, getField, getFrame, getInitialState, getMultiplexer, getStartDate, initializeAdditionalData, initializePropagation, removeAdditionalDataProvider, setStartDate, stateChanged, updateAdditionalData, updateUnmanagedDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.propagation.FieldPropagator
clearStepHandlers, getPosition, getPVCoordinates, getVelocity, setStepHandler, setStepHandler
-
Constructor Details
-
FieldNumericalPropagator
Create a new instance of NumericalPropagator, based on orbit definition mu. After creation, the instance is empty, i.e. the attitude provider is set to an unspecified default law and there are no perturbing forces at all. This means that ifaddForceModelis not called after creation, the integrated orbit will follow a Keplerian evolution only. The defaults areOrbitType.EQUINOCTIALforpropagation orbit typeandPositionAngleType.ECCENTRICforposition angle type.This constructor uses the
default data context.- Parameters:
integrator- numerical integrator to use for propagation.- See Also:
-
FieldNumericalPropagator
public FieldNumericalPropagator(FieldODEIntegrator<T> integrator, AttitudeProvider attitudeProvider) Create a new instance of NumericalPropagator, based on orbit definition mu. After creation, the instance is empty, i.e. the attitude provider is set to an unspecified default law and there are no perturbing forces at all. This means that ifaddForceModelis not called after creation, the integrated orbit will follow a Keplerian evolution only. The defaults areOrbitType.EQUINOCTIALforpropagation orbit typeandPositionAngleType.ECCENTRICforposition angle type.- Parameters:
integrator- numerical integrator to use for propagation.attitudeProvider- attitude law to use.- Since:
- 10.1
-
-
Method Details
-
setIgnoreCentralAttraction
public void setIgnoreCentralAttraction(boolean ignoreCentralAttraction) Set the flag to ignore or not the creation of aNewtonianAttraction.- Parameters:
ignoreCentralAttraction- if true,NewtonianAttractionis not added automatically if missing
-
setMu
Set the central attraction coefficient μ.Setting the central attraction coefficient is equivalent to
addaNewtonianAttractionforce model.- Overrides:
setMuin classFieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>- Parameters:
mu- central attraction coefficient (m³/s²)- See Also:
-
addForceModel
Add a force model to the global perturbation model.If this method is not called at all, the integrated orbit will follow a Keplerian evolution only.
- Parameters:
model- perturbingForceModelto add- See Also:
-
removeForceModels
public void removeForceModels()Remove all perturbing force models from the global perturbation model.Once all perturbing forces have been removed (and as long as no new force model is added), the integrated orbit will follow a Keplerian evolution only.
- See Also:
-
getAllForceModels
Get all the force models, perturbing forces and Newtonian attraction included.- Returns:
- list of perturbing force models, with Newtonian attraction being the last one
- Since:
- 9.1
- See Also:
-
setOrbitType
Set propagation orbit type.- Overrides:
setOrbitTypein classFieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>- Parameters:
orbitType- orbit type to use for propagation
-
getOrbitType
Get propagation parameter type.- Overrides:
getOrbitTypein classFieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>- Returns:
- orbit type used for propagation
-
setPositionAngleType
Set position angle type.The position parameter type is meaningful only if
propagation orbit typesupport it. As an example, it is not meaningful for propagation inCartesianparameters.- Overrides:
setPositionAngleTypein classFieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>- Parameters:
positionAngleType- angle type to use for propagation
-
getPositionAngleType
Get propagation parameter type.- Overrides:
getPositionAngleTypein classFieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>- Returns:
- angle type to use for propagation
-
setInitialState
Set the initial state.- Parameters:
initialState- initial state
-
resetInitialState
Reset the propagator initial state.- Specified by:
resetInitialStatein interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Overrides:
resetInitialStatein classFieldAbstractPropagator<T extends CalculusFieldElement<T>>- Parameters:
state- new initial state to consider
-
initializeAttitudeProviderForDerivatives
Method called when initializing the attitude provider used when evaluating derivatives.- Overrides:
initializeAttitudeProviderForDerivativesin classFieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>- Returns:
- attitude provider for derivatives
-
createMapper
protected FieldStateMapper<T> createMapper(FieldAbsoluteDate<T> referenceDate, T mu, OrbitType orbitType, PositionAngleType positionAngleType, AttitudeProvider attitudeProvider, Frame frame) Create a mapper between raw double components and spacecraft state. /** Simple constructor.The position parameter type is meaningful only if
propagation orbit typesupport it. As an example, it is not meaningful for propagation inCartesianparameters.- Specified by:
createMapperin classFieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>- Parameters:
referenceDate- reference datemu- central attraction coefficient (m³/s²)orbitType- orbit type to use for mappingpositionAngleType- angle type to use for propagationattitudeProvider- attitude providerframe- inertial frame- Returns:
- new mapper
-
getMainStateEquations
protected FieldAbstractIntegratedPropagator.MainStateEquations<T> getMainStateEquations(FieldODEIntegrator<T> integrator) Get the differential equations to integrate (for main state only).- Specified by:
getMainStateEquationsin classFieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>- Parameters:
integrator- numerical integrator to use for propagation.- Returns:
- differential equations for main state
-