Utility Functions

CRTBPNaturalMotion.jacobi_integralMethod
jacobi_integral(x, μ)

Computes the Jacobi integral for the CRTBP given the state x and mass parameter μ.

Arguments

  • x::AbstractVector: State vector.
  • μ::Real: Mass parameter.
source
CRTBPNaturalMotion.derivativeMethod
derivative(m::FastChebInterpolation{1}, τ1) where IT -> SVector{6, Float64}

Evaluate the derivative of the interpolation at the given τ1 for a uni-variate interpolation.

Arguments

  • m::FastChebInterpolation{IT}: The interpolation object.
  • τ1: The variable.

Returns

  • SVector{6, Float64}: The derivative of the interpolation.
source
CRTBPNaturalMotion.hessianMethod
hessian(m::FastChebInterpolation{1}, τ1, τ2) -> SMatrix{6, 1, Float64, 6}

Evaluate the Hessian of the interpolation at the given τ1. This computes the second derivative of the interpolation at the given τ1 for a uni-variate interpolation and returns a SMatrix{6, 1, Float64, 6} (rather than an SVector{6, Float64} like second_derivative).

Arguments

  • m::FastChebInterpolation{IT}: The interpolation object.
  • τ1: The variable.

Returns

  • SMatrix{6, 1, Float64, 6}: The Hessian of the interpolation.
source
CRTBPNaturalMotion.hessianMethod
hessian(m::FastChebInterpolation{2}, τ1, τ2) -> SArray{Tuple{6, 2, 2}, Float64, 3, 24}

Evaluate the Hessian of the interpolation at the given τ1 and τ2. This computes the second derivative of the interpolation at the given τ1 and τ2 for a bi-variate interpolation and returns a SArray{Tuple{6, 2, 2}, Float64, 3, 24}.

Arguments

  • m::FastChebInterpolation{IT}: The interpolation object.
  • τ1: The first variable.
  • τ2: The second variable.

Returns

  • SArray{Tuple{6, 2, 2}, Float64, 3, 24}: The Hessian of the interpolation.
source
CRTBPNaturalMotion.jacobianMethod
jacobian(m::FastChebInterpolation{1}, τ1) where IT -> SMatrix{6, 1, Float64, 6}

Evaluate the Jacobian of the interpolation at the given τ1 for a uni-variate interpolation.

Arguments

  • m::FastChebInterpolation{IT}: The interpolation object.
  • τ1: The variable.

Returns

  • SMatrix{6, 1, Float64, 6}: The Jacobian of the interpolation.
source
CRTBPNaturalMotion.jacobianMethod
jacobian(m::FastChebInterpolation{2}, τ1, τ2) where IT -> SMatrix{6, 2, Float64, 12}

Evaluate the Jacobian of the interpolation at the given τ1 and τ2 for a bi-variate interpolation.

Arguments

  • m::FastChebInterpolation{IT}: The interpolation object.
  • τ1: The first variable.
  • τ2: The second variable.

Returns

  • SMatrix{6, 2, Float64, 12}: The Jacobian of the interpolation.
source
CRTBPNaturalMotion.second_derivativeMethod
second_derivative(m::FastChebInterpolation{1}, τ1) -> SVector{6, Float64}

Evaluate the second derivative of the interpolation at the given τ1 for a uni-variate interpolation. The second derivatives are computed by employing Enzyme to differentiate the analytical computation of the first derivative.

Arguments

  • m::FastChebInterpolation{IT}: The interpolation object.
  • τ1: The variable.

Returns

  • SVector{6, Float64}: The second derivative of the interpolation.
source
CRTBPNaturalMotion.valueMethod
value(m::FastChebInterpolation{N}, τ1[, τ2]) -> SVector{6, Float64}

Evaluate the interpolation at the given τ1 and τ2 (if employing a bi-variate interpolation).

Arguments

  • m::FastChebInterpolation{IT}: The interpolation object.
  • τ1: The variable.
  • τ2: The second variable (if employing a bi-variate interpolation).

Returns

  • SVector{6, Float64}: The interpolated state.
source