FieldPropagator<T>
, FieldPVCoordinatesProvider<T>
public class FieldNumericalPropagator<T extends RealFieldElement<T>> extends FieldAbstractIntegratedPropagator<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:
setInitialState(FieldSpacecraftState)
)setMu(double)
)addForceModel(ForceModel)
,
removeForceModels()
)type
of orbital parameters to be used for propagation
(setOrbitType(OrbitType)
),
type
of position angle to be used in orbital parameters
to be used for propagation where it is relevant (setPositionAngleType(PositionAngle)
),
additional equations
should be propagated along with orbital state
(FieldAbstractIntegratedPropagator.addAdditionalEquations(org.orekit.propagation.integration.FieldAdditionalEquations)
),
FieldAbstractIntegratedPropagator.addEventDetector(FieldEventDetector)
,
FieldAbstractIntegratedPropagator.clearEventsDetectors()
)FieldAbstractIntegratedPropagator.setSlaveMode()
,
FieldAbstractPropagator.setMasterMode(RealFieldElement, org.orekit.propagation.sampling.FieldOrekitFixedStepHandler)
,
FieldAbstractIntegratedPropagator.setMasterMode(org.orekit.propagation.sampling.FieldOrekitStepHandler)
,
FieldAbstractIntegratedPropagator.setEphemerisMode()
, FieldAbstractIntegratedPropagator.getGeneratedEphemeris()
)From these configuration parameters, only the initial state is mandatory. The default
propagation settings are in equinoctial
parameters with
true
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:
equinoctial orbit parameters
(a, ex,
ey, hx, hy, λM or λE
or λv) in meters and radians,Keplerian orbit parameters
(a, e, i, ω, Ω,
M or E or v) in meters and radians,circular orbit parameters
(a, ex, ey, i,
Ω, αM or αE or αv) in meters
and radians,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 = FieldNumericalPropagator.tolerances(dP, orbit, OrbitType.EQUINOCTIAL); AdaptiveStepsizeFieldIntegratorintegrator = 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 chenged by calling FieldAbstractIntegratedPropagator.setResetAtEnd(boolean)
.
Beware the same instance cannot be used simultaneously by different threads, the class is not thread-safe.
FieldSpacecraftState
,
ForceModel
,
FieldOrekitStepHandler
,
FieldOrekitFixedStepHandler
,
FieldIntegratedEphemeris
,
FieldTimeDerivativesEquations
FieldAbstractIntegratedPropagator.MainStateEquations<T extends RealFieldElement<T>>
DEFAULT_LAW, DEFAULT_MASS, EPHEMERIS_GENERATION_MODE, MASTER_MODE, SLAVE_MODE
Constructor | Description |
---|---|
FieldNumericalPropagator(Field<T> field,
FieldODEIntegrator<T> integrator) |
Create a new instance of NumericalPropagator, based on orbit definition mu.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addForceModel(ForceModel model) |
Add a force model to the global perturbation model.
|
protected FieldStateMapper<T> |
createMapper(FieldAbsoluteDate<T> referenceDate,
double mu,
OrbitType orbitType,
PositionAngle positionAngleType,
AttitudeProvider attitudeProvider,
Frame frame) |
Create a mapper between raw double components and spacecraft state.
|
List<ForceModel> |
getAllForceModels() |
Get all the force models, perturbing forces and Newtonian attraction included.
|
List<ForceModel> |
getForceModels() |
Deprecated.
as of 9.1, this method is deprecated, the perturbing
force models are retrieved together with the Newtonian attraction
by calling
getAllForceModels() |
protected FieldAbstractIntegratedPropagator.MainStateEquations<T> |
getMainStateEquations(FieldODEIntegrator<T> integrator) |
Get the differential equations to integrate (for main state only).
|
NewtonianAttraction |
getNewtonianAttractionForceModel() |
Deprecated.
as of 9.1, this method is deprecated, the Newtonian
attraction force model (if any) is the last in the
getAllForceModels() |
OrbitType |
getOrbitType() |
Get propagation parameter type.
|
PositionAngle |
getPositionAngleType() |
Get propagation parameter type.
|
TimeStampedFieldPVCoordinates<T> |
getPVCoordinates(FieldAbsoluteDate<T> date,
Frame frame) |
Get the
FieldPVCoordinates of the body in the selected frame. |
void |
removeForceModels() |
Remove all perturbing force models from the global perturbation model.
|
void |
resetInitialState(FieldSpacecraftState<T> state) |
Reset the propagator initial state.
|
void |
setInitialState(FieldSpacecraftState<T> initialState) |
Set the initial state.
|
void |
setMu(double mu) |
Set the central attraction coefficient μ.
|
void |
setOrbitType(OrbitType orbitType) |
Set propagation orbit type.
|
void |
setPositionAngleType(PositionAngle positionAngleType) |
Set position angle type.
|
static <T extends RealFieldElement<T>> |
tolerances(T dP,
FieldOrbit<T> orbit,
OrbitType type) |
Estimate tolerance vectors for integrators.
|
addAdditionalEquations, addEventDetector, afterIntegration, beforeIntegration, clearEventsDetectors, getBasicDimension, getCalls, getEventsDetectors, getGeneratedEphemeris, getInitialIntegrationState, getIntegrator, getManagedAdditionalStates, getMu, initMapper, isAdditionalStateManaged, isMeanOrbit, propagate, propagate, propagate, setAttitudeProvider, setEphemerisMode, setMasterMode, setResetAtEnd, setSlaveMode, setUpEventDetector, setUpUserEventDetectors
addAdditionalStateProvider, getAdditionalStateProviders, getAttitudeProvider, getField, getFixedStepSize, getFrame, getInitialState, getMode, getStartDate, getStepHandler, setMasterMode, setStartDate, updateAdditionalStates
public FieldNumericalPropagator(Field<T> field, FieldODEIntegrator<T> integrator)
addForceModel
is not
called after creation, the integrated orbit will follow a Keplerian
evolution only. The defaults are OrbitType.EQUINOCTIAL
for propagation
orbit type
and PositionAngle.TRUE
for position angle type
.integrator
- numerical integrator to use for propagation.field
- Field used by defaultpublic void setMu(double mu)
setMu
in class FieldAbstractIntegratedPropagator<T extends RealFieldElement<T>>
mu
- central attraction coefficient (m³/s²)addForceModel(ForceModel)
public void addForceModel(ForceModel model)
If this method is not called at all, the integrated orbit will follow a Keplerian evolution only.
model
- perturbing ForceModel
to addremoveForceModels()
,
setMu(double)
public void removeForceModels()
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.
addForceModel(ForceModel)
public List<ForceModel> getAllForceModels()
addForceModel(ForceModel)
,
setMu(double)
@Deprecated public List<ForceModel> getForceModels()
getAllForceModels()
@Deprecated public NewtonianAttraction getNewtonianAttractionForceModel()
getAllForceModels()
public void setOrbitType(OrbitType orbitType)
setOrbitType
in class FieldAbstractIntegratedPropagator<T extends RealFieldElement<T>>
orbitType
- orbit type to use for propagationpublic OrbitType getOrbitType()
getOrbitType
in class FieldAbstractIntegratedPropagator<T extends RealFieldElement<T>>
public void setPositionAngleType(PositionAngle positionAngleType)
The position parameter type is meaningful only if propagation orbit type
support it. As an example, it is not meaningful for propagation
in Cartesian
parameters.
setPositionAngleType
in class FieldAbstractIntegratedPropagator<T extends RealFieldElement<T>>
positionAngleType
- angle type to use for propagationpublic PositionAngle getPositionAngleType()
getPositionAngleType
in class FieldAbstractIntegratedPropagator<T extends RealFieldElement<T>>
public void setInitialState(FieldSpacecraftState<T> initialState) throws OrekitException
initialState
- initial stateOrekitException
- if initial state cannot be setpublic void resetInitialState(FieldSpacecraftState<T> state) throws OrekitException
resetInitialState
in interface FieldPropagator<T extends RealFieldElement<T>>
resetInitialState
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
state
- new initial state to considerOrekitException
- if initial state cannot be resetpublic TimeStampedFieldPVCoordinates<T> getPVCoordinates(FieldAbsoluteDate<T> date, Frame frame) throws OrekitException
FieldPVCoordinates
of the body in the selected frame.getPVCoordinates
in interface FieldPVCoordinatesProvider<T extends RealFieldElement<T>>
getPVCoordinates
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
date
- current dateframe
- the frame where to define the positionOrekitException
- if position cannot be computed in given frameprotected FieldStateMapper<T> createMapper(FieldAbsoluteDate<T> referenceDate, double mu, OrbitType orbitType, PositionAngle positionAngleType, AttitudeProvider attitudeProvider, Frame frame)
The position parameter type is meaningful only if propagation orbit type
support it. As an example, it is not meaningful for propagation
in Cartesian
parameters.
createMapper
in class FieldAbstractIntegratedPropagator<T extends RealFieldElement<T>>
referenceDate
- reference datemu
- central attraction coefficient (m³/s²)orbitType
- orbit type to use for mappingpositionAngleType
- angle type to use for propagationattitudeProvider
- attitude providerframe
- inertial frameprotected FieldAbstractIntegratedPropagator.MainStateEquations<T> getMainStateEquations(FieldODEIntegrator<T> integrator)
getMainStateEquations
in class FieldAbstractIntegratedPropagator<T extends RealFieldElement<T>>
integrator
- numerical integrator to use for propagation.public static <T extends RealFieldElement<T>> double[][] tolerances(T dP, FieldOrbit<T> orbit, OrbitType type) throws OrekitException
The errors are estimated from partial derivatives properties of orbits, starting from a scalar position error specified by the user. Considering the energy conservation equation V = sqrt(mu (2/r - 1/a)), we get at constant energy (i.e. on a Keplerian trajectory):
V² r |dV| = mu |dr|So we deduce a scalar velocity error consistent with the position error. From here, we apply orbits Jacobians matrices to get consistent errors on orbital parameters.
The tolerances are only orders of magnitude, and integrator tolerances are only local estimates, not global ones. So some care must be taken when using these tolerances. Setting 1mm as a position error does NOT mean the tolerances will guarantee a 1mm error position after several orbits integration.
T
- elements typedP
- user specified position errororbit
- reference orbittype
- propagation type for the meaning of the tolerance vectors elements
(it may be different from orbit.getType()
)OrekitException
- if Jacobian is singularCopyright © 2002-2018 CS Systèmes d'information. All rights reserved.