Class AbstractIntegratedPropagator

    • Constructor Detail

      • AbstractIntegratedPropagator

        protected AbstractIntegratedPropagator​(ODEIntegrator integrator,
                                               PropagationType propagationType)
        Build a new instance.
        Parameters:
        integrator - numerical integrator to use for propagation.
        propagationType - type of orbit to output (mean or osculating).
    • Method Detail

      • setResetAtEnd

        public void setResetAtEnd​(boolean resetAtEnd)
        Allow/disallow resetting the initial state at end of propagation.

        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. Calling this method with resetAtEnd set to false changes prevents such reset.

        Parameters:
        resetAtEnd - if true, at end of each propagation, the initial state will be reset to the final state of the propagation, otherwise the initial state will be preserved
        Since:
        9.0
      • getResetAtEnd

        public boolean getResetAtEnd()
        Getter for the resetting flag regarding initial state.
        Returns:
        resetting flag
        Since:
        12.0
      • initMapper

        protected void initMapper()
        Initialize the mapper.
      • getIntegratorName

        public String getIntegratorName()
        Get the integrator's name.
        Returns:
        name of underlying integrator
        Since:
        12.0
      • setOrbitType

        protected void setOrbitType​(OrbitType orbitType)
        Set propagation orbit type.
        Parameters:
        orbitType - orbit type to use for propagation, null for propagating using AbsolutePVCoordinates rather than Orbit
      • getOrbitType

        protected OrbitType getOrbitType()
        Get propagation parameter type.
        Returns:
        orbit type used for propagation, null for propagating using AbsolutePVCoordinates rather than Orbit
      • getPropagationType

        public PropagationType getPropagationType()
        Get the propagation type.
        Returns:
        propagation type.
        Since:
        11.1
      • setPositionAngleType

        protected void setPositionAngleType​(PositionAngleType positionAngleType)
        Set position angle type.

        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.

        Parameters:
        positionAngleType - angle type to use for propagation
      • getPositionAngleType

        protected PositionAngleType getPositionAngleType()
        Get propagation parameter type.
        Returns:
        angle type to use for propagation
      • setMu

        public void setMu​(double mu)
        Set the central attraction coefficient μ.
        Parameters:
        mu - central attraction coefficient (m³/s²)
      • getMu

        public double getMu()
        Get the central attraction coefficient μ.
        Returns:
        mu central attraction coefficient (m³/s²)
        See Also:
        setMu(double)
      • getCalls

        public int getCalls()
        Get the number of calls to the differential equations computation method.

        The number of calls is reset each time the propagate(AbsoluteDate) method is called.

        Returns:
        number of calls to the differential equations computation method
      • isAdditionalStateManaged

        public boolean isAdditionalStateManaged​(String name)
        Check if an additional state is managed.

        Managed states are states for which the propagators know how to compute its evolution. They correspond to additional states for which a provider has been registered by calling the addAdditionalStateProvider method.

        Additional states that are present in the initial state but have no evolution method registered are not considered as managed states. These unmanaged additional states are not lost during propagation, though. Their value are piecewise constant between state resets that may change them if some event handler resetState method is called at an event occurrence and happens to change the unmanaged additional state.

        Specified by:
        isAdditionalStateManaged in interface Propagator
        Overrides:
        isAdditionalStateManaged in class AbstractPropagator
        Parameters:
        name - name of the additional state
        Returns:
        true if the additional state is managed
      • getAdditionalDerivativesProviders

        public List<AdditionalDerivativesProvider> getAdditionalDerivativesProviders()
        Get an unmodifiable list of providers for additional derivatives.
        Returns:
        providers for the additional derivatives
        Since:
        11.1
      • setUpUserEventDetectors

        protected void setUpUserEventDetectors()
        Set up all user defined event detectors.
      • setUpEventDetector

        protected void setUpEventDetector​(ODEIntegrator integ,
                                          EventDetector detector)
        Wrap an Orekit event detector and register it to the integrator.
        Parameters:
        integ - integrator into which event detector should be registered
        detector - event detector to wrap
      • getEphemerisGenerator

        public EphemerisGenerator getEphemerisGenerator()
        Set up an ephemeris generator that will monitor the propagation for building an ephemeris from it once completed.

        This generator can be used when the user needs fast random access to the orbit state at any time between the initial and target times. A typical example is the implementation of search and iterative algorithms that may navigate forward and backward inside the propagation range before finding their result even if the propagator used is integration-based and only goes from one initial time to one target time.

        Beware that when used with integration-based propagators, the generator will store all intermediate results. It is therefore memory intensive for long integration-based ranges and high precision/short time steps. When used with analytical propagators, the generator only stores start/stop time and a reference to the analytical propagator itself to call it back as needed, so it is less memory intensive.

        The returned ephemeris generator will be initially empty, it will be filled with propagation data when a subsequent call to either propagate(target) or propagate(start, target) is called. The proper way to use this method is therefore to do:

           EphemerisGenerator generator = propagator.getEphemerisGenerator();
           propagator.propagate(target);
           BoundedPropagator ephemeris = generator.getGeneratedEphemeris();
         
        Returns:
        ephemeris generator
      • createMapper

        protected abstract StateMapper createMapper​(AbsoluteDate referenceDate,
                                                    double 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 type support it. As an example, it is not meaningful for propagation in Cartesian parameters.

        Parameters:
        referenceDate - reference date
        mu - central attraction coefficient (m³/s²)
        orbitType - orbit type to use for mapping
        positionAngleType - angle type to use for propagation
        attitudeProvider - attitude provider
        frame - inertial frame
        Returns:
        new mapper
      • getMainStateEquations

        protected abstract AbstractIntegratedPropagator.MainStateEquations getMainStateEquations​(ODEIntegrator integ)
        Get the differential equations to integrate (for main state only).
        Parameters:
        integ - numerical integrator to use for propagation.
        Returns:
        differential equations for main state
      • propagate

        public SpacecraftState propagate​(AbsoluteDate target)
        Propagate towards a target date.

        Simple propagators use only the target date as the specification for computing the propagated state. More feature rich propagators can consider other information and provide different operating modes or G-stop facilities to stop at pinpointed events occurrences. In these cases, the target date is only a hint, not a mandatory objective.

        Specified by:
        propagate in interface Propagator
        Overrides:
        propagate in class AbstractPropagator
        Parameters:
        target - target date towards which orbit state should be propagated
        Returns:
        propagated state
      • propagate

        public SpacecraftState propagate​(AbsoluteDate tStart,
                                         AbsoluteDate tEnd)
        Propagate from a start date towards a target date.

        Those propagators use a start date and a target date to compute the propagated state. For propagators using event detection mechanism, if the provided start date is different from the initial state date, a first, simple propagation is performed, without processing any event computation. Then complete propagation is performed from start date to target date.

        Parameters:
        tStart - start date from which orbit state should be propagated
        tEnd - target date to which orbit state should be propagated
        Returns:
        propagated state
      • setUpStmAndJacobianGenerators

        protected void setUpStmAndJacobianGenerators()
        Set up State Transition Matrix and Jacobian matrix handling.
        Since:
        11.1
      • getInitialIntegrationState

        protected SpacecraftState getInitialIntegrationState()
        Get the initial state for integration.
        Returns:
        initial state for integration
      • beforeIntegration

        protected void beforeIntegration​(SpacecraftState initialState,
                                         AbsoluteDate tEnd)
        Method called just before integration.

        The default implementation does nothing, it may be specialized in subclasses.

        Parameters:
        initialState - initial state
        tEnd - target date at which state should be propagated
      • afterIntegration

        protected void afterIntegration()
        Method called just after integration.

        The default implementation does nothing, it may be specialized in subclasses.

      • getBasicDimension

        public int getBasicDimension()
        Get state vector dimension without additional parameters.
        Returns:
        state vector dimension without additional parameters.
      • getIntegrator

        protected ODEIntegrator getIntegrator()
        Get the integrator used by the propagator.
        Returns:
        the integrator.