Class FieldStateMapper<T extends CalculusFieldElement<T>>

  • Type Parameters:
    T - type of the field elements

    public abstract class FieldStateMapper<T extends CalculusFieldElement<T>>
    extends Object
    This class maps between raw double elements and FieldSpacecraftState instances.
    Author:
    Luc Maisonobe
    • Constructor Detail

      • FieldStateMapper

        protected FieldStateMapper​(FieldAbsoluteDate<T> referenceDate,
                                   T mu,
                                   OrbitType orbitType,
                                   PositionAngleType positionAngleType,
                                   AttitudeProvider attitudeProvider,
                                   Frame frame)
        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
    • Method Detail

      • getReferenceDate

        public FieldAbsoluteDate<T> getReferenceDate()
        Get reference date.
        Returns:
        reference date
      • getOrbitType

        public OrbitType getOrbitType()
        Get propagation parameter type.
        Returns:
        orbit type used for propagation
      • setPositionAngleType

        public void setPositionAngleType()
        Set position angle type.
      • getPositionAngleType

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

        public T getMu()
        Get the central attraction coefficient μ.
        Returns:
        mu central attraction coefficient (m³/s²)
      • getFrame

        public Frame getFrame()
        Get the inertial frame.
        Returns:
        inertial frame
      • getAttitudeProvider

        public AttitudeProvider getAttitudeProvider()
        Get the attitude provider.
        Returns:
        attitude provider
      • setAttitudeProvider

        public void setAttitudeProvider​(AttitudeProvider attitudeProvider)
        Setter for the attitude provider.
        Parameters:
        attitudeProvider - new attitude provider
      • mapDoubleToDate

        public FieldAbsoluteDate<T> mapDoubleToDate​(T t)
        Map the raw double time offset to a date.
        Parameters:
        t - date offset
        Returns:
        date
      • mapDoubleToDate

        public FieldAbsoluteDate<T> mapDoubleToDate​(T t,
                                                    FieldAbsoluteDate<T> date)
        Map the raw double time offset to a date.
        Parameters:
        t - date offset
        date - The expected date.
        Returns:
        date if it is the same time as t to within the lower precision of the latter. Otherwise a new date is returned that corresponds to time t.
      • mapDateToDouble

        public T mapDateToDouble​(FieldAbsoluteDate<T> date)
        Map a date to a raw double time offset.
        Parameters:
        date - date
        Returns:
        time offset
      • mapArrayToState

        public FieldSpacecraftState<T> mapArrayToState​(T t,
                                                       T[] y,
                                                       T[] yDot,
                                                       PropagationType type)
        Map the raw double components to a spacecraft state.
        Parameters:
        t - date offset
        y - state components
        yDot - state derivative components
        type - type of the elements used to build the state (mean or osculating)
        Returns:
        spacecraft state
      • mapArrayToState

        public abstract FieldSpacecraftState<T> mapArrayToState​(FieldAbsoluteDate<T> date,
                                                                T[] y,
                                                                T[] yDot,
                                                                PropagationType type)
        Map the raw double components to a spacecraft state.
        Parameters:
        date - of the state components
        y - state components
        yDot - state derivative components
        type - type of the elements used to build the state (mean or osculating).
        Returns:
        spacecraft state
      • mapStateToArray

        public abstract void mapStateToArray​(FieldSpacecraftState<T> state,
                                             T[] y,
                                             T[] yDot)
        Map a spacecraft state to raw double components.
        Parameters:
        state - state to map
        y - placeholder where to put the components
        yDot - placeholder where to put the components derivatives