Class AbstractDragForceModel

    • Constructor Detail

      • AbstractDragForceModel

        protected AbstractDragForceModel​(Atmosphere atmosphere)
        Constructor.
        Parameters:
        atmosphere - atmospheric model
    • Method Detail

      • dependsOnPositionOnly

        public boolean dependsOnPositionOnly()
        Check if force models depends on position only.
        Specified by:
        dependsOnPositionOnly in interface ForceModel
        Returns:
        true if force model depends on position only, false if it depends on velocity, either directly or due to a dependency on attitude
      • isDSStateDerivative

        protected <T extends CalculusFieldElement<T>> boolean isDSStateDerivative​(FieldSpacecraftState<T> state)
        Check if a field state corresponds to derivatives with respect to state.
        Type Parameters:
        T - type of the field elements
        Parameters:
        state - state to check
        Returns:
        true if state corresponds to derivatives with respect to state
      • isGradientStateDerivative

        protected <T extends CalculusFieldElement<T>> boolean isGradientStateDerivative​(FieldSpacecraftState<T> state)
        Check if a field state corresponds to derivatives with respect to state.
        Type Parameters:
        T - type of the field elements
        Parameters:
        state - state to check
        Returns:
        true if state corresponds to derivatives with respect to state
      • isVariable

        protected boolean isVariable​(DerivativeStructure ds,
                                     int index)
        Check if a derivative represents a specified variable.
        Parameters:
        ds - derivative to check
        index - index of the variable
        Returns:
        true if the derivative represents a specified variable
      • isVariable

        protected boolean isVariable​(Gradient g,
                                     int index)
        Check if a derivative represents a specified variable.
        Parameters:
        g - derivative to check
        index - index of the variable
        Returns:
        true if the derivative represents a specified variable
      • getDSDensityWrtStateUsingFiniteDifferences

        protected DerivativeStructure getDSDensityWrtStateUsingFiniteDifferences​(AbsoluteDate date,
                                                                                 Frame frame,
                                                                                 FieldVector3D<DerivativeStructure> position)
        Compute density and its derivatives. Using finite differences for the derivatives. And doing the actual computation only for the derivatives with respect to position (others are set to 0.).

        From a theoretical point of view, this method computes the same values as Atmosphere.getDensity(FieldAbsoluteDate, FieldVector3D, Frame) in the specific case of DerivativeStructure with respect to state, so it is less general. However, it is *much* faster in this important case.

        The derivatives should be computed with respect to position. The input parameters already take into account the free parameters (6, 7 or 8 depending on derivation with respect to drag coefficient and lift ratio being considered or not) and order (always 1). Free parameters at indices 0, 1 and 2 correspond to derivatives with respect to position. Free parameters at indices 3, 4 and 5 correspond to derivatives with respect to velocity (these derivatives will remain zero as the atmospheric density does not depend on velocity). Free parameter at indexes 6 and 7 (if present) corresponds to derivatives with respect to drag coefficient and/or lift ratio (one of these or both). This 2 last derivatives will remain zero as atmospheric density does not depend on them.

        Parameters:
        date - current date
        frame - inertial reference frame for state (both orbit and attitude)
        position - position of spacecraft in inertial frame
        Returns:
        the density and its derivatives
      • getGradientDensityWrtStateUsingFiniteDifferences

        protected Gradient getGradientDensityWrtStateUsingFiniteDifferences​(AbsoluteDate date,
                                                                            Frame frame,
                                                                            FieldVector3D<Gradient> position)
        Compute density and its derivatives. Using finite differences for the derivatives. And doing the actual computation only for the derivatives with respect to position (others are set to 0.).

        From a theoretical point of view, this method computes the same values as Atmosphere.getDensity(FieldAbsoluteDate, FieldVector3D, Frame) in the specific case of Gradient with respect to state, so it is less general. However, it is *much* faster in this important case.

        The derivatives should be computed with respect to position. The input parameters already take into account the free parameters (6, 7 or 8 depending on derivation with respect to drag coefficient and lift ratio being considered or not) and order (always 1). Free parameters at indices 0, 1 and 2 correspond to derivatives with respect to position. Free parameters at indices 3, 4 and 5 correspond to derivatives with respect to velocity (these derivatives will remain zero as the atmospheric density does not depend on velocity). Free parameter at indexes 6 and 7 (if present) corresponds to derivatives with respect to drag coefficient and/or lift ratio (one of these or both). This 2 last derivatives will remain zero as atmospheric density does not depend on them.

        Parameters:
        date - current date
        frame - inertial reference frame for state (both orbit and attitude)
        position - position of spacecraft in inertial frame
        Returns:
        the density and its derivatives