AstroManeuvers

The AstroManeuvers module provides utilities and functions for orbital maneuver calculations in astrodynamics applications. The module includes impulsive maneuver models and functions for applying maneuvers to spacecraft objects.

Quick Start

Apply an impulsive orbital maneuver:

using AstroModels, AstroManeuvers
m = ImpulsiveManeuver(axes=Inertial(), 
                      Isp=300.0, 
                      element1=0.01, 
                      element2=0.0, 
                      element3=0.0)

sc = Spacecraft()
maneuver!(sc, m)

Table of Contents

API Reference

AstroManeuvers.ImpulsiveManeuverType
ImpulsiveManeuver{A<:AbstractAxes, T<:Real}

Represents an impulsive delta-v command defined in a local maneuver frame.

Fields

  • axes::A local maneuver frame (e.g., VNB() or Inertial())
  • g0::T standard gravity in m/s^2 (internally converted to km/s^2 where needed)
  • Isp::T specific impulse in seconds
  • element1::T delta-v component along axis 1 of axes (km/s)
  • element2::T delta-v component along axis 2 of axes (km/s)
  • element3::T delta-v component along axis 3 of axes (km/s)

Notes:

  • Use keyword constructor for convenience to avoid setting all values.
  • Delta-v components are interpreted in the provided axes frame and expressed in km/s.
  • Numeric types are generic over Real to support AD and high-precision arithmetic.

Examples

using AstroManeuvers, AstroFrames

m = ImpulsiveManeuver(axes=VNB(), 
                      g0=9.81, Isp=300.0,
                      element1=0.010, 
                      element2=0.005, 
                      element3=-0.002)

# output
ImpulsiveManeuver(
  axes = VNB()
  g0 = 9.81
  Isp = 300.0
  element1 = 0.01
  element2 = 0.005
  element3 = -0.002)
source
AstroManeuvers.ImpulsiveManeuverMethod
ImpulsiveManeuver(; axes=VNB(), g0=9.81, Isp=220.0, element1=0.0, element2=0.0, element3=0.0)

Construct an impulsive maneuver from keyword arguments with defaults.

source
AstroManeuvers.compute_mass_usedMethod
compute_mass_used(m::ImpulsiveManeuver, initial_mass::Real, Isp::Real) -> Real

Computes mass consumed from impulsive maneuver using the rocket equation.

source
AstroManeuvers.get_deltav_elementsMethod
get_deltav_elements(m::ImpulsiveManeuver) -> (dv1, dv2, dv3)

Return the delta-v components in the maneuver axes (as defined by m.axes).

Arguments

  • m::ImpulsiveManeuver maneuver definition

Returns

  • (dv1, dv2, dv3)::Tuple components in the maneuver frame axes
source
AstroManeuvers.maneuver!Method
maneuver!(sc::Spacecraft, m::ImpulsiveManeuver) -> Spacecraft

Apply an impulsive delta-v maneuver to a spacecraft, updating velocity, mass, and history.

Arguments

  • sc::Spacecraft Spacecraft being maneuvered
  • m::ImpulsiveManeuver Maneuver definition (axes, Δv components, g0, Isp)

Notes:

  • Model updates spacecraft velocity, mass, and history.
  • In places updates to spacecraft are performed.

Returns

  • sc::Spacecraft The same spacecraft instance with updated state, mass, and history

Examples

using AstroManeuvers, AstroFrames, AstroModels

m = ImpulsiveManeuver(axes=Inertial(), 
                      Isp=300.0, 
                      element1=0.01, 
                      element2=0.0, 
                      element3=0.0)

sc = Spacecraft()
maneuver!(sc, m)

# output
Spacecraft: unnamed
  AstroEpochs.Time
    value  = 2015-09-21T12:23:12.000
    scale  = UTC()
    format = ISOT()
  OrbitState:
    statetype: AstroStates.Cartesian
  CartesianState:
    x   =  7000.00000000
    y   =     0.00000000
    z   =     0.00000000
    vx  =     0.01000000
    vy  =     7.50000000
    vz  =     0.00000000
  CoordinateSystem:
    origin: Earth
    axes: ICRFAxes
  Total Mass = 996.6078730003628 kg
source
AstroManeuvers.rot_mat_vnb_to_inertialMethod
rot_mat_vnb_to_inertial(posvel::AbstractVector) -> 3x3

Build the VNB→Inertial DCM from position/velocity (km, km/s).

Notes:

  • V is along v,
  • N is orbital normal r×v,
  • B completes right-handed triad.
source
Base.promoteMethod
promote(m::ImpulsiveManeuver, ::Type{T}) where T<:Real -> ImpulsiveManeuver{A,T}

Promote all Real fields of an ImpulsiveManeuver to type T for automatic differentiation.

Arguments

  • m::ImpulsiveManeuver: The maneuver to promote
  • ::Type{T}: Target numeric type (e.g., ForwardDiff.Dual, BigFloat)

Returns

  • ImpulsiveManeuver{A,T}: New maneuver with all Real fields promoted to type T

Examples

using ForwardDiff
m = ImpulsiveManeuver(axes=VNB(), g0=9.81, Isp=300.0, element1=0.01, element2=0.02, element3=0.03)
m_dual = promote(m, ForwardDiff.Dual{Float64})
source
Base.showMethod
Base.show(io::IO, sc::ImpulsiveManeuver)

Pretty-print an ImpulsiveManeuver in a human-readable, multi-line summary.

source