Astrodynamics

Astrodynamics

The Astrodynamics submodule provides functions, state representations, and transformations common to the field of astrodynamics.

Compute the mean motion given a semi-major axis.

Arguments:

  • a::Real: Semi-major axis. [m]
  • use_degrees:Bool: If true returns result in units of degrees
  • GM::Real: Gravitational constant of central body. Defaults to SatelliteDynamics.Constants.GM_EARTH if none is provided.

Returns:

  • n::Real: Orbital mean motion. [rad/s] or [deg/s]
source

Calculate semi-major axis given mean-motion.

Arguments:

  • n::Real: Orbital mean motion. [rad/s] or [deg/s]
  • use_degrees:Bool: If true interpret input as being in degrees.
  • GM::Real: Gravitational constant of central body. Defaults to SatelliteDynamics.Constants.GM_EARTH if none is provided.

Returns:

  • a::Real: Semi-major axis. [m]
source

Compute the satellite orbital period given the semi-major axis.

Arguments:

  • a::Real: Semi-major axis. [m]
  • GM::Real: Gravitational constant of central body. Defaults to SatelliteDynamics.Constants.GM_EARTH if none is provided.

Returns:

  • T::Real: Orbital period. [s]
source

Compute the required inclination for a Sun-synchronous Earth orbit.

Algorithm assumes the nodal precession is entirely due to the J2 perturbation, and no other perturbations are considered.

The inclination is computed using a first-order, non-iterative approximation.

Arguments:

  • a::Real: Semi-major axis. [m]
  • e::Real: Eccentricity. [dimensionless]
  • use_degrees:Bool: If true interpret output will be returned in degrees.

Returns:

  • iss::Real: Requierd inclination for a sun-synchronous orbit. [rad] or [deg]
source

Convert eccentric anomaly into mean anomaly.

Arguments:

  • E::Real: Eccentric anomaly. [rad] or [deg]
  • e::Real: Eccentricity. [dimensionless]
  • use_degrees:Bool: If true interpret input will be interpreted as being in degrees, and output will be returned in degrees.

Returns:

  • M::Real: Mean anomaly. [rad] or [deg]
source

Convert mean anomaly into eccentric anomaly.

Arguments:

  • M::Real: Mean anomaly. [deg] or [deg]
  • e::Real: Eccentricity. [dimensionless]
  • use_degrees:Bool: If true interpret input will be interpreted as being in degrees, and output will be returned in degrees.

Returns:

  • E::Real: Eccentric anomaly. [rad] or [deg]
source

Given an orbital state expressed in osculating orbital elements compute the equivalent Cartesean position and velocity of the inertial state.

The osculating elements are assumed to be (in order):

  1. a, Semi-major axis [m]
  2. e, Eccentricity [dimensionless]
  3. i, Inclination [rad]
  4. Ω, Right Ascension of the Ascending Node (RAAN) [rad]
  5. ω, Argument of Perigee [ramd]
  6. M, Mean anomaly [rad]

Arguments:

  • x_oe x::Array{<:Real, 1}: Osculating orbital elements. See above for desription of the elements and their required order.
  • use_degrees:Bool: If true interpret input will be interpreted as being in degrees, and output will be returned in degrees.
  • GM::Real: Gravitational constant of central body. Defaults to SatelliteDynamics.Constants.GM_EARTH if none is provided.

Returns

  • x x::Array{<:Real, 1}: Cartesean inertial state. Returns position and velocity. [m; m/s]
source

Given a Cartesean position and velocity in the inertial frame, return the state expressed in terms of osculating orbital elements.

The osculating elements are assumed to be (in order):

  1. a, Semi-major axis [m]
  2. e, Eccentricity [dimensionless]
  3. i, Inclination [rad]
  4. Ω, Right Ascension of the Ascending Node (RAAN) [rad]
  5. ω, Argument of Perigee [ramd]
  6. M, Mean anomaly [rad]

Arguments:

  • x x::Array{<:Real, 1}: Cartesean inertial state. Returns position and velocity. [m; m/s]
  • use_degrees:Bool: If true interpret input will be interpreted as being in degrees, and output will be returned in degrees.
  • GM::Real: Gravitational constant of central body. Defaults to SatelliteDynamics.Constants.GM_EARTH if none is provided.

Returns

  • x_oe x::Array{<:Real, 1}: Osculating orbital elements. See above for desription of the elements and their required order.
source