Library

Documentation for AstroCoords.jl.

AstroCoords.AstroCoordTransformationType
abstract type AstroCoordTransformation <: AstrodynamicsTransformation

An abstract type representing a Transformation Between Astrodynamics Coordinates with no Time Regularization

source
AstroCoords.CartesianType
Cartesian{T} <: AstroCoord

Cartesian Orbital Elements. 6D parameterziation of the orbit. x - X-position y - Y-position z - Z-position ẋ - X-velocity ẏ - Y-velocity ż - Z-velocity

Constructors Cartesian(x, y, z, ẋ, ẏ, ż) Cartesian(X::AbstractArray) Cartesian(X::AstroCoord, μ::Number)

source
AstroCoords.CoordinateType
abstract type AstroCoord{N, T} <: StaticMatrix{N, 1, T}

An abstract type representing a N-Dimensional Coordinate Set

source
AstroCoords.CylindricalType
Cylindrical{T} <: AstroCoord

Cylindrical Orbital Elements. 6D parameterziation of the orbit ρ - in-plane radius θ - in-plane angle z - out-of-plane distance ρdot - instantaneous rate of change of in-plsne radius θdot - instantaneous rate of change of θ ż - instantaneous rate of change of z

Constructors Cylindrical(r, θ, z, ṙ, θdot, ż) Cylindrical(X::AbstractArray) Cylindrical(X::AstroCoord, μ::Number)

source
AstroCoords.DelaunayType
Delaunay{T} <: AstroCoord

Delaunay Orbital Elements. 6D parameterziation of the orbit.

Fields

L - Canonical Keplerian Energy G - Canonical Total Angular Momentum H - Canonical Normal Angular Momentum (Relative to Equator) M - Mean Anomaly ω - Argument of Periapsis Ω - Right Ascension of the Ascending Node

Additional Properties

E - Eccentric Anomaly (computed from mean anomaly and eccentricity extracted from L and G) f - True Anomaly (computed from mean anomaly and eccentricity extracted from L and G)

Constructors

  • Delaunay(L, G, H, M, ω, Ω)
  • Delaunay(X::AbstractVector{<:Number})
  • Delaunay(X::AstroCoord, μ::Number)
source
AstroCoords.EDromoType
EDromo{T} <: AstroCoord

EDromo state vector. ζ₁ - In-plane element 1 ζ₂ - In-plane element 2 ζ₃ - Corresponds to orbital energy ζ₄ - Quaternion element 1 ζ₅ - Quaternion element 2 ζ₆ - Quaternion element 3 ζ₇ - Quaternion element 4 ζ₈ - Time element

Constructors EDromo(ζ₁, ζ₂, ζ₃, ζ₄, ζ₅, ζ₆, ζ₇, ζ₈) EDromo(X::AbstractArray)

source
AstroCoords.GEqOEType
GEqOE{T} <: AstroCoord

Generalized Equinoctial Orbital Elements (GEqOE). 6D parametrization of the orbit that generalizes the equinoctial elements when perturbing forces are derived from a disturbing potential.

Reference: Baù, G., Hernando-Ayuso, J., & Bombardelli, C. (2021). "A generalization of the equinoctial orbital elements." Celestial Mechanics and Dynamical Astronomy, 133(9), 1-32.

Fields

  • ν::T - Generalized mean motion: ν = (1/μ)(-2E)^(3/2)
  • p₁::T - Generalized eccentricity component: p₁ = g sin(Ψ)
  • p₂::T - Generalized eccentricity component: p₂ = g cos(Ψ)
  • L::T - Generalized mean longitude
  • q₁::T - Inclination component: q₁ = tan(i/2) sin(Ω)
  • q₂::T - Inclination component: q₂ = tan(i/2) cos(Ω)

Where:

  • E is the total energy (including disturbing potential U)
  • g is the generalized Laplace vector magnitude
  • Ψ is the generalized longitude of pericenter
  • i is the orbital inclination
  • Ω is the longitude of the ascending node

Constructors

  • GEqOE(ν, p₁, p₂, L, q₁, q₂)
  • GEqOE(X::AbstractArray)
  • GEqOE(X::Cartesian, μ::Number, config::RegularizedCoordinateConfig)

Computed Properties

  • g: Generalized eccentricity magnitude √(p₁² + p₂²)
  • Ψ: Generalized longitude of pericenter atan(p₁, p₂)
  • L₀(geq, t): Generalized mean longitude at epoch L - νt

Notes

  • The perturbing potential W is passed via RegularizedCoordinateConfig. For Keplerian orbits use W = 0; for perturbed orbits precompute W = V_total - V_keplerian externally.
  • Non-singular for circular and equatorial orbits
  • Singular for retrograde equatorial orbits (i = π) and rectilinear motion
  • Defined for negative total energy (E < 0)
source
AstroCoords.J2EqOEType
J2EqOE{T} <: AstroCoord

Modified Equinoctial Orbital Elements. 6D parameterziation of the orbit. n - mean motion h - eccetricity projection onto longitude of perigee k - eccetricity projection onto ⟂ longitude of perigee p - projection of half inclination onto RAAN q - projection of half inclination onto ⟂ RAAN L - true longitude

Constructors J2EqOE(n, h, k, p, q, L) J2EqOE(X::AbstractArray) J2EqOE(X::AstroCoord, μ::Number)

source
AstroCoords.KeplerianType
Keplerian{T} <: AstroCoord

Keplerian Orbital Elements. 6D parameterziation of the orbit.

Fields

a - semi-major axis e - eccentricity i - inclination Ω - Right Ascension of Ascending Node ω - Argument of Perigee f - True Anomaly

Exotic Properties

M - Mean Anomaly (computed from true anomaly and eccentricity) E - Eccentric Anomaly (computed from true anomaly and eccentricity)

Constructors

  • Keplerian(a, e, i, Ω, ω, f)
  • Keplerian(X::AbstractArray)
  • Keplerian(X::AstroCoord, μ::Number)
source
AstroCoords.KustaanheimoStiefelType
KustaanheimoStiefel{T} <: AstroCoord

Kustaanheimo-Stiefel (KS) state vector. The KS transformation regularizes the two-body problem by transforming the 3D Cartesian coordinates into a 4D space, which eliminates the singularity at r=0.

This state vector contains 10 elements. u₁ - First component of the KS position vector u₂ - Second component of the KS position vector u₃ - Third component of the KS position vector u₄ - Fourth component of the KS position vector u₁prime - First component of the KS velocity vector u₂prime - Second component of the KS velocity vector u₃prime - Third component of the KS velocity vector u₄prime - Fourth component of the KS velocity vector h - The negative of the total orbital energy (-E) τ - The time element, which can be either physical time t or a linear time element.

Constructors KustaanheimoStiefel(u₁, u₂, u₃, u₄, u₁prime, u₂prime, u₃prime, u₄prime, h, τ) KustaanheimoStiefel(X::AbstractArray)

source
AstroCoords.MilankovichType
Milankovich{T} <: AstroCoord

Milankovich Orbital Elements. 7D parameterziation of the orbit. hx - X-component of Angular Momentum Vector hy - Y-component of Angular Momentum Vector hz - Z-component of Angular Momentum Vector ex - X-component of Eccentricity Vector ey - Y-component of Eccentricity Vector ez - Z-component of Eccentricity Vector L - True Longitude

Constructors Milankovich(hx, hy, hz, ex, ey, ez, L) Milankovich(X::AbstractArray) Milankovich(X::AstroCoord, μ::Number)

source
AstroCoords.ModEqType
ModEq{T} <: AstroCoord

Modified Equinoctial Orbital Elements. 6D parameterziation of the orbit.

Fields

p - semi-parameter f - eccentricity projection onto longitude of perigee g - eccentricity projection onto ⟂ longitude of perigee h - projection of half inclination onto RAAN k - projection of half inclination onto ⟂ RAAN L - true longitude

Constructors

  • ModEq(p, f, g, h, k, L)
  • ModEq(X::AbstractArray)
  • ModEq(X::AstroCoord, μ::Number)

See Also

  • ModEqN: Modified Equinoctial coordinates with mean motion instead of semi-parameter
source
AstroCoords.ModEqNType
ModEqN{T} <: AstroCoord

Modified Equinoctial Orbital Elements with Mean Motion. 6D parameterziation of the orbit.

Fields

η - mean motion (rad/s) f - eccentricity projection onto longitude of perigee g - eccentricity projection onto ⟂ longitude of perigee h - projection of half inclination onto RAAN k - projection of half inclination onto ⟂ RAAN L - true longitude

Constructors

  • ModEqN(η, f, g, h, k, L)
  • ModEqN(X::AbstractArray)
  • ModEqN(X::AstroCoord, μ::Number)

See Also

  • ModEq: Modified Equinoctial coordinates with semi-parameter instead of mean motion
source
AstroCoords.PoincareType
Poincare{T} <: AstroCoord

Poincaré Canonical Orbital Elements. 6D parametrization of the orbit using Cartesian-style canonical coordinate-momentum pairs derived from Delaunay variables.

These elements are non-singular for circular orbits (e → 0) and equatorial orbits (i → 0), making them particularly useful in perturbation theory and Hamiltonian celestial mechanics.

Supports both elliptic (a > 0) and hyperbolic (a < 0) orbits. For hyperbolic orbits, the eccentricity action is defined as P = Λ + G (instead of Λ - G for elliptic) to keep all quantities real-valued. The orbit type is recovered unambiguously during inversion: P ≤ Λ → elliptic, P > Λ → hyperbolic.

Fields

Λ - Canonical action for semi-major axis: Λ = √(μ|a|) λ - Mean longitude: λ = M + ω + Ω ξ - Eccentricity cosine component: ξ = √(2P) cos(ω̃) η - Eccentricity sine component: η = -√(2P) sin(ω̃), where ω̃ = ω + Ω p - Inclination cosine component: p = √(2Q) cos(Ω), where Q = G(1 - cos(i)) q - Inclination sine component: q = -√(2Q) sin(Ω)

where P = Λ - G (elliptic) or P = Λ + G (hyperbolic), and G is the Delaunay angular momentum.

Constructors

  • Poincare(Λ, λ, ξ, η, p, q)
  • Poincare(X::AbstractVector{<:Number})
  • Poincare(X::AstroCoord, μ::Number)

References

  • Murray, C.D. and Dermott, S.F. "Solar System Dynamics." Cambridge University Press (1999).
  • Laskar, J. and Robutel, P. "Stability of the Planetary Three-Body Problem." Celestial Mechanics and Dynamical Astronomy 62 (1995): 193-217.
source
AstroCoords.RegularizedCoordinateConfigType
RegularizedCoordinateConfig{DT,TT,WT,TT2,FT}

Configuration struct for regularized coordinate transformations (EDromo, GEqOE, Kustaanheimo-Stiefel, Stiefel-Scheifele).

This struct encapsulates the parameters required for regularized coordinate transformations:

  • DU: Reference distance unit for non-dimensionalization
  • TU: Reference time unit for non-dimensionalization
  • W: Perturbing potential energy (unified for all coordinate systems)
  • t₀: Initial physical time
  • flag_time: Time element formulation (PhysicalTime, ConstantTime, or LinearTime)
source
AstroCoords.SphericalType
Spherical{T} <: AstroCoord

Spherical Orbital Elements. 6D parameterziation of the orbit r - radius θ - in-plane angle ϕ - out-of-plane angle ṙ - instantaneous rate of change of radius θdot - instantaneous rate of change of θ ϕdot - instantaneous rate of change of ϕ

Constructors Spherical(r, θ, ϕ, ṙ, ω, Ω) Spherical(X::AbstractArray) Spherical(X::AstroCoord, μ::Number)

source
AstroCoords.StiefelScheifeleType
StiefelScheifele{T} <: AstroCoord

Stiefel-Scheifele orbital elements. This is a 10-dimensional parameterization of a regularized orbit.

The elements are: α1 - The first component of the Stiefel-Scheifele position vector α2 - The second component of the Stiefel-Scheifele position vector α3 - The third component of the Stiefel-Scheifele position vector α4 - The fourth component of the Stiefel-Scheifele position vector β1 - The first component of the Stiefel-Scheifele velocity vector β2 - The second component of the Stiefel-Scheifele velocity vector β3 - The third component of the Stiefel-Scheifele velocity vector β4 - The fourth component of the Stiefel-Scheifele velocity vector ω - Related to the total energy of the orbit t - Time or a time element, depending on flag_time

Constructors: StiefelScheifele(α1, α2, α3, α4, β1, β2, β3, β4, ω, t) StiefelScheifele(v::AbstractVector)

source
AstroCoords.TransformationType

The Transformation supertype defines a simple interface for performing transformations. Subtypes should be able to apply a coordinate system transformation on the correct data types by overloading the call method, and usually would have the corresponding inverse transformation defined by Base.inv(). Efficient compositions can optionally be defined by compose() (equivalently ).

source
AstroCoords.USM6Type
USM6{T} <: AstroCoord

Unified State Model Orbital Elements. 6D parameterziation of the orbit using Velocity Hodograph and MRP's C - Velocity Hodograph Component Normal to the Radial Vector Laying in the Orbital Plane Rf1 - Velocity Hodograph Component 90 degrees ahead of the Eccentricity Vector - Along the Intermediate Rotating Frame X-Axis Rf2 - Velocity Hodograph Component 90 degrees ahead of the Eccentricity Vector - Along the Intermediate Rotating Frame Y-Axis σ1 - First Modified Rodriguez Parameter σ2 - Second Modified Rodriguez Parameter σ3 - Third Modified Rodriguez Parameter

Constructors USM6(C, Rf1, Rf2, σ1, σ2, σ3) USM6(X::AbstractArray) USM6(X::AstroCoord, μ::Number)

source
AstroCoords.USM7Type
USM7{T} <: AstroCoord

Unified State Model Orbital Elements. 7D parameterziation of the orbit using Velocity Hodograph and Quaternions C - Velocity Hodograph Component Normal to the Radial Vector Laying in the Orbital Plane Rf1 - Velocity Hodograph Component 90 degrees ahead of the Eccentricity Vector - Along the Intermediate Rotating Frame X-Axis Rf2 - Velocity Hodograph Component 90 degrees ahead of the Eccentricity Vector - Along the Intermediate Rotating Frame Y-Axis ϵO1 - First Imaginary Quaternion Component ϵO2 - Second Imaginary Quaternion Component ϵO3 - Third Imaginary Quaternion Component η0 - Real Quaternion Component

Constructors USM7(C, Rf1, Rf2, ϵO1, ϵO2, ϵO3, η0) USM7(X::AbstractArray) USM7(X::AstroCoord, μ::Number)

source
AstroCoords.USMEMType
USMEM{T} <: AstroCoord

Unified State Model Orbital Elements. 6D parameterziation of the orbit using Velocity Hodograph and Exponential Mapping C - Velocity Hodograph Component Normal to the Radial Vector Laying in the Orbital Plane Rf1 - Velocity Hodograph Component 90 degrees ahead of the Eccentricity Vector - Along the Intermediate Rotating Frame X-Axis Rf2 - Velocity Hodograph Component 90 degrees ahead of the Eccentricity Vector - Along the Intermediate Rotating Frame Y-Axis a1 - First Exponential Mapping Component a2 - Second Exponential Mapping Component a3 - Third Exponential Mapping Component

Constructors USMEM(C, Rf1, Rf2, a1, a2, a3) USMEM(X::AbstractArray) USMEM(X::AstroCoord, μ::Number)

source
AstroCoords.EDromo2cartMethod
EDromo2cart(u, μ, ϕ::Number, config::RegularizedCoordinateConfig)

Converts an EDromo state vector to a Cartesian state vector.

This is the backend implementation for the transformation from EDromo to Cartesian. It requires the fictitious time ϕ and a RegularizedCoordinateConfig with the same parameters used in the forward transformation.

Arguments

  • u::AbstractVector: EDromo state vector [ζ₁, ζ₂, ζ₃, ζ₄, ζ₅, ζ₆, ζ₇, ζ₈].
  • μ::Number: Gravitational parameter of the central body.
  • ϕ::Number: Fictitious time parameter.
  • config::RegularizedCoordinateConfig: Configuration parameters for the transformation.

Returns

  • SVector{6, RT}: The 6-element Cartesian state vector [x, y, z, ẋ, ẏ, ż].
source
AstroCoords.EP2MRPMethod
EP2MRP(β::AbstractVector{<:Number})

Converts Euler Parameter rotation description into Modified Rodriguez Parameters.

Arguments

  • β::AbstractVector{<:Number}: The Euler Parameter description of a rotation.

Returns

  • σ::AbstractVector{<:Number}: The Modified Rodriguez Parameter description of a rotation.
source
AstroCoords.IOE2J2IOEMethod
function IOE2J2IOE(u::AbstractVector{T}, μ::V) where {T<:Number, V<:Number}

Computes the J2 Perturbed Intermediate Orbit Elements from a Intermediate Orbit Element set.

Arguments

-u::AbstractVector{<:Number}: The Intermediate Orbit Element vector [I1; I2; I3; I4; I5; I6]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_J2IOR::SVector{6, <:Number}: The J2 Perturbed Intermediate Orbit Element vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)].

source
AstroCoords.IOE2koeMethod
function IOE2koeM(u::AbstractVector{T}, μ::V) where {T<:Number, V<:Number}

Computes the Keplerian orbital elements from a Intermediate Orbit Element set.

Arguments

-u::AbstractVector{<:Number}: The Intermediate Orbit Element vector [I1; I2; I3; I4; I5; I6]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_koeM::SVector{6, <:Number}: The Keplerian state vector [a; e; i; Ω(RAAN); ω(AOP); M(Mean Anomaly)].

source
AstroCoords.IOE2modEqNMethod
function IOE2modEq(u::AbstractVector{T}, μ::V) where {T<:Number, V<:Number}

Computes the Modified Equinoctial orbital elements from a Intermediate Orbit Element set.

Arguments

-u::AbstractVector{<:Number}: The Intermediate Orbit Element vector [I1; I2; I3; I4; I5; I6]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_modEq::SVector{6, <:Number}: The Modified Equinoctial state vector [n; f; g; h; k; L].

source
AstroCoords.J2EqOE2cartMethod
function J2EqOE2cart(u::AbstractVector{<:Number}, μ::Number)

Computes the Cartesian state vector from a J2 Perturbed Equinoctial Orbit Elements.

Arguments

-u::AbstractVector{<:Number}: The J2 Perturbed Equinoctial Orbit Element vector [n; h; k; p; q; L]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_cart::SVector{6, <:Number}: The Cartesian state vector [x; y; z; ẋ; ẏ; ż].

source
AstroCoords.J2IOE2IOEMethod
function J2IOE2IOE(u::AbstractVector{T}, μ::V) where {T<:Number, V<:Number}

Computes the Intermediate Orbit Elements from a J2 Perturbed Intermediate Orbit Element set.

Arguments

-u::AbstractVector{<:Number}: The J2 Perturbed Intermediate Orbit Element vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_IOE::SVector{6, <:Number}: The Intermediate Orbit Element vector [I1; I2; I3; I4; I5; I6].

source
AstroCoords.KS2cartMethod
KS2cart(u_ks, μ, config::RegularizedCoordinateConfig)

Converts a Kustaanheimo-Stiefel (KS) state vector to a Cartesian state vector.

Arguments

  • u_ks::AbstractVector: 10-element KS state vector.
  • μ::Number: Gravitational parameter (unused in this direction, kept for API consistency).
  • config::RegularizedCoordinateConfig: Configuration parameters.

Returns

  • SVector{6, RT}: The 6-element Cartesian state [x, y, z, ẋ, ẏ, ż].
source
AstroCoords.KeplerSolverMethod
KeplerSolver(M::T, e::Number; tol::Float64=10 * eps(T), max_iters::Int=100) where {T<:Number}

Solves for true anomaly given the mean anomaly and eccentricity of an orbit.

Arguments

-M::Number: Mean Anomaly of the orbit [radians]. -e::Number: Eccentricity of the orbit.

Keyword Arguments

-tol::Float64: Convergence tolerance of Kepler solver. [Default=10*eps(T)] -max_iters::Int: Maximum number of iterations. [Default=100]

Returns

-f::Number`: True Anomaly of the orbit [radians]

source
AstroCoords.L₀Method
L₀(geq::GEqOE, t::Number; t₀::Number=0.0)

Generalized mean longitude at epoch: L₀ = L - νt

source
AstroCoords.MRP2EPMethod
MRP2EP(σ::AbstractVector{<:Number})

Converts Modified Rodriguez Parameters rotation description into Euler Parameter.

Arguments

  • σ::AbstractVector{<:Number}: The Modified Rodriguez Parameter description of a rotation.

Returns

  • β::AbstractVector{<:Number}: The Euler Parameter description of a rotation.
source
AstroCoords.Mil2cartMethod

Mil2cart(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Milankovich state vector into the Cartesian state vector.

Arguments

-u::AbstractVector{<:Number}: The Milankovich state vector [H; e; L]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_cart::SVector{6, <:Number}: The Cartesian state vector [x; y; z; ẋ; ẏ; ż].

source
AstroCoords.ModEq2ModEqNMethod
ModEq2ModEqN(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Modified Equinoctial elements to Modified Equinoctial with mean motion.

Note

All angles are in radians.

Arguments

-u:AbstractVector{<:Number}: The Modified Equinoctial state vector [p; f; g; h; k; L]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_ModEqN::SVector{6, <:Number}: The Modified Equinoctial (mean motion) state vector [η; f; g; h; k; L].

source
AstroCoords.ModEq2koeMethod
ModEq2koe(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Modified Equinoctial elements into the Keplerian elements.

Note

All angles are in radians.

Arguments

-u:AbstractVector{<:Number}: The Modified Equinoctial state vector [p; f; g; h; k; l]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_koe::SVector{6, <:Number}: The Keplerian state vector [a; e; i; Ω(RAAN); ω(AOP); ν(True Anomaly)].

source
AstroCoords.ModEqN2ModEqMethod
ModEqN2ModEq(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Modified Equinoctial with mean motion to Modified Equinoctial elements.

Note

All angles are in radians.

Arguments

-u:AbstractVector{<:Number}: The Modified Equinoctial (mean motion) state vector [η; f; g; h; k; L]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_ModEq::SVector{6, <:Number}: The Modified Equinoctial state vector [p; f; g; h; k; L].

source
AstroCoords.StiefelScheifele2cartMethod
StiefelScheifele2cart(ss_vec, μ, ϕ::Number, config::RegularizedCoordinateConfig)

Converts a Stiefel-Scheifele state vector to a Cartesian state vector.

Arguments

  • ss_vec::AbstractVector: The Stiefel-Scheifele state vector.
  • μ::Number: The gravitational parameter of the central body.
  • ϕ::Number: Fictitious time parameter.
  • config::RegularizedCoordinateConfig: Configuration parameters.

Returns

  • Cartesian: The Cartesian state vector.
source
AstroCoords.USM62USM7Method
USM62USM7(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts USM with Modified Rodrigue Parameters to USM with quaternions.

Arguments

-u::AbstractVector{<:Number}: The USM6 vector [C; Rf1; Rf2; σ1; σ2; σ3]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_USM::SVector{6, <:Number}: The Unified State Model vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0].

source
AstroCoords.USM72USM6Method
USM72USM6(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts USM with quaternions to USM with Modified Rodrigue Parameters.

Arguments

-u::AbstractVector{<:Number}: The Unified State Model vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_USM6::SVector{6, <:Number}: The USM6 State vector [C; Rf1; Rf2; σ1; σ2; σ3].

source
AstroCoords.USM72USMEMMethod
USM72USMEM(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts USM with quaternions to USM with exponential mapping.

Arguments

-u::AbstractVector{<:Number}: The Unified State Model vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_USMEM::SVector{6, <:Number}: The USMEM State Vector [C; Rf1; Rf2; a1; a2; a3].

source
AstroCoords.USM72koeMethod
USM72koe(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Unified State Model elements into the Keplerian orbital element set. Van den Broeck, Michael. "An Approach to Generalizing Taylor Series Integration for Low-Thrust Trajectories." (2017). https://repository.tudelft.nl/islandora/object/uuid%3A2567c152-ab56-4323-bcfa-b076343664f9

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The Unified State Model vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_koe:SVector{6, <:Number}: The Keplerian State vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)].

source
AstroCoords.USMEM2USM7Method
USMEM2USM7(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts USM with exponential mapping to USM with quaternions.

Arguments

-u::AbstractVector{<:Number}: The USMEM vector [C; Rf1; Rf2; a1; a2; a3]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_USM::SVector{7, <:Number}: The Unified State Model vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0].

source
AstroCoords._solve_kepler_generalizedMethod
_solve_kepler_generalized(L, p₁, p₂; tol=1e-14, maxiter=200)

Solve the generalized Kepler equation (Eq. 25): L = K + p₁ cos(K) - p₂ sin(K)

Uses Newton-Raphson iteration.

source
AstroCoords.angle_between_vectorsMethod
angle_between_vectors(
    v1::AbstractVector{T1}, v2::AbstractVector{T2}
) where {T1<:Number,T2<:Number}

Computes the angle between two vectors in a more numerically stable way than dot product.

Arguments

-v1::AbstractVector{<:Number}: The first vector of the computation -v2::AbstractVector{<:Number}: The second vector of the computation

Returns

-angle::Number: The angle between the two vectors

source
AstroCoords.angularMomentumQuantityMethod
angularMomentumQuantity(u::AbstractVector{<:Number})

Computes the instantaneous angular momentum.

Arguments

-u::AbstractVector{<:Number}: The Cartesian state vector [x; y; z; ẋ; ẏ; ż].

Returns

-angular_momentum::Number: Angular momentum of the body.

source
AstroCoords.angularMomentumQuantityMethod
angularMomentumQuantity(X::AstroCoord, μ::Number)

Computes the instantaneous angular momentum.

Arguments

-X::AstroCoord: An coordinate set describing the orbit. -μ::Number: Standard graviational parameter of central body.

Returns

-angular_momentum::Number: Angular momentum of the body.

source
AstroCoords.angularMomentumVectorMethod
angularMomentumVector(u::AbstractVector{<:Number})

Computes the instantaneous angular momentum vector from a Cartesian state vector.

Arguments

-u::AbstractVector{<:Number}: The Cartesian state vector [x; y; z; ẋ; ẏ; ż].

Returns

-'angular_momentum::Vector{<:Number}': 3-Dimensional angular momentum vector.

source
AstroCoords.angularMomentumVectorMethod
angularMomentumVector(X::AstroCoord, μ::Number)

Computes the instantaneous angular momentum vector from a Cartesian state vector.

Arguments

-X::AstroCoord: An coordinate set describing the orbit. -μ::Number: Standard graviational parameter of central body.

Returns

-angular_momentum::Vector{<:Number}: 3-Dimensional angular momentum vector.

source
AstroCoords.cart2EDromoMethod
cart2EDromo(u, μ, ϕ::Number, config::RegularizedCoordinateConfig)

Converts a Cartesian state vector to an EDromo state vector.

This is the backend implementation for the transformation from Cartesian to EDromo. It requires the fictitious time ϕ and a RegularizedCoordinateConfig with necessary parameters.

Arguments

  • u::AbstractVector: Cartesian state vector [x, y, z, ẋ, ẏ, ż] in [L] and [L/T].
  • μ::Number: Gravitational parameter in [L³/T²].
  • ϕ::Number: Fictitious time parameter.
  • config::RegularizedCoordinateConfig: Configuration parameters for the transformation.

Returns

  • SVector{8, RT}: The 8-element EDromo state vector.
source
AstroCoords.cart2J2EqOEMethod
function cart2J2EqOE(u::AbstractVector{<:Number}, μ::Number)

Computes the J2 Perturbed Equinoctial Orbit Elements from a Cartesian state vector.

Arguments

-u::AbstractVector{<:Number}: The Cartesian state vector [x; y; z; ẋ; ẏ; ż]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_J2EqOE::SVector{6, <:Number}: The J2 Perturbed Equinoctial Orbit Element vector [n; h; k; p; q; L].

source
AstroCoords.cart2KSMethod
cart2KS(u, μ, config::RegularizedCoordinateConfig)

Converts a Cartesian state vector to a Kustaanheimo-Stiefel (KS) state vector.

Arguments

  • u::AbstractVector: Cartesian state [x, y, z, ẋ, ẏ, ż].
  • μ::Number: Gravitational parameter.
  • config::RegularizedCoordinateConfig: Configuration parameters (uses config.W for perturbing potential).

Returns

  • SVector{10, RT}: The 10-element KS state vector.
source
AstroCoords.cart2MilMethod
cart2Mil(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Cartesian state vector into the Milankovich state vector.

Arguments

-u::AbstractVector{<:Number}: The Cartesian state vector [x; y; z; ẋ; ẏ; ż]. -μ::Number: Standard graviational parameter of central body.

Keyword Arguments

-equatorial_tol::Float64: The tolerance on what is considered an equatorial orbit (no inclination). [Default=1e-15] -circular_tol::Float64: The tolerance on what is considered a circular orbit (no eccentricity). [Default=1e-15]

Returns

-u_Mil::SVector{7, <:Number}: The Milankovich state vector [H; e; L].

source
AstroCoords.cart2StiefelScheifeleMethod
cart2StiefelScheifele(cart_vec, μ, ϕ::Number, config::RegularizedCoordinateConfig)

Converts Cartesian coordinates to Stiefel-Scheifele coordinates.

Arguments

  • cart_vec::AbstractVector: The Cartesian state vector.
  • μ::Number: The gravitational parameter of the central body.
  • ϕ::Number: Fictitious time parameter.
  • config::RegularizedCoordinateConfig: Configuration parameters.

Returns

  • StiefelScheifele: The Stiefel-Scheifele state vector.
source
AstroCoords.cart2cylindMethod

cart2cylind(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Computes the cylindrical orbital elements from a Cartesian set.

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: Cartesian state vector [x; y; z; ẋ; ẏ; ż]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_cylind::SVector{6, <:Number}`: The cylindrical orbital element vector [r; θ; z; ṙ; θdot; ż].

source
AstroCoords.cart2delaunayMethod
cart2delaunay(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Computes the Delaunay orbital elements from a Cartesian set. Laskar, Jacques. "Andoyer construction for Hill and Delaunay variables." Celestial Mechanics and Dynamical Astronomy 128.4 (2017): 475-482.

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The Cartesian orbital element vector [x; y; z; ẋ; ẏ; ż]. -μ::Number: Standard graviational parameter of central body.

Returns

-'u_cart::SVector{6, <:Number}': Delaunay Orbital Element Vector [L; G; H; M; ω; Ω]

source
AstroCoords.cart2geqoeMethod
cart2geqoe(u, μ, config::RegularizedCoordinateConfig)

Transform Cartesian coordinates to Generalized Equinoctial Orbital Elements (GEqOE).

The perturbing potential W is taken from the config struct. For a pure Keplerian orbit, set W = 0. For perturbed orbits, precompute the disturbing potential (Vtotal - Vkeplerian) externally and pass it via the config.

Reference: Baù, G., Hernando-Ayuso, J., & Bombardelli, C. (2021). "A generalization of the equinoctial orbital elements." Celestial Mechanics and Dynamical Astronomy, 133(9), 1-32.

Arguments

  • u::AbstractVector{<:Number}: Cartesian state vector [x; y; z; ẋ; ẏ; ż]
  • μ::Number: Gravitational parameter
  • config::RegularizedCoordinateConfig: Configuration containing the perturbing potential W

Returns

  • SVector{6}: GEqOE state vector [ν; p₁; p₂; L; q₁; q₂]
source
AstroCoords.cart2koeMethod
function cart2koe(
    u::AbstractVector{T}, μ::V; equatorial_tol::Float64=1E-15, circular_tol::Float64=1E-15
) where {T<:Number,V<:Number}

Computes the Keplerian orbital elements from a cartesian set.

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The Cartesian state vector [x; y; z; ẋ; ẏ; ż]. -μ::Number: Standard graviational parameter of central body.

Keyword Arguments

-equatorial_tol::Float64: The tolerance on what is considered an equatorial orbit (no inclination). [Default=1e-15] -circular_tol::Float64: The tolerance on what is considered a circular orbit (no eccentricity). [Default=1e-15]

Returns

-u_koe::SVector{6, <:Number}`: Keplerian orbital element vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)].

source
AstroCoords.cart2sphereMethod
cart2sphere(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Computes the spherical orbital elements from a spherical set.

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The Cartesian state vector [x; y; z; ẋ; ẏ; ż]. -μ::Number: Standard graviational parameter of central body.

Returns

-'u_sphere::SVector{6, <:Number}': Spherical Orbital Element Vector [r; θ; ϕ; ṙ; θdot; ϕdot]

source
AstroCoords.compute_characteristic_scalesMethod
compute_characteristic_scales(state, μ)

Computes characteristic distance and time scales for regularized coordinate transformations.

The scales are computed as:

  • DU: Distance unit based on the position magnitude
  • TU: Time unit derived from DU and μ using Kepler's third law: TU = sqrt(DU³/μ)

Arguments

  • state::AbstractVector: Cartesian state vector [x, y, z, ẋ, ẏ, ż]
  • μ::Number: Gravitational parameter

Returns

  • (DU, TU): Tuple of characteristic distance and time scales
source
AstroCoords.compute_initial_phiMethod
compute_initial_phi(state, μ, config)

Computes the initial value of the fictitious time ϕ for regularized coordinates (EDromo, Stiefel-Scheifele).

This calculation is based on Baù, G., Bombardelli, C., Peláez, J., and Lorenzini, E., "Nonsingular orbital elements for special perturbations in the two-body problem". MNRAS 454(3), pp. 2890-2908. 2015.

Arguments

  • state::AbstractVector: Cartesian state vector [x, y, z, ẋ, ẏ, ż]
  • μ::Number: Gravitational parameter
  • config::RegularizedCoordinateConfig: Configuration struct containing DU, TU, and W

Returns

  • Number: The computed value of ϕ₀
source
AstroCoords.cylind2cartMethod
cylind2cart(u::AbstractVector{T}, μ::Number) where {T<:Number}

Computes the Cartesian orbital elements from a cylindrical set.

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The cylindrical state vector [r; θ; z; ṙ; θdot; ż]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_cart::SVector{6, <:Number}: The Cartesian orbital element vector [x; y; z; ẋ; ẏ; ż].

source
AstroCoords.delaunay2cartMethod
delaunay2cart(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Computes the Cartesian orbital elements from a Delaunay set. Laskar, Jacques. "Andoyer construction for Hill and Delaunay variables." Celestial Mechanics and Dynamical Astronomy 128.4 (2017): 475-482.

Note

All angles are in radians.

Argument

-u::AbstractVector{<:Number}: The Delaunay orbital element vector [L; G; H; M; ω; Ω]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_cart::SVector{6, <:Number}`: The cartesian orbital element vector [x; y; z; ẋ; ẏ; ż].

source
AstroCoords.eccentricAnomaly2MeanAnomalyMethod
eccentricAnomaly2MeanAnomaly(E::Number, e::Number)

Converts the true anomaly into the mean anomaly.

Arguments

-E::Number: Eccentric anomaly of the orbit [radians]. -e::Number: Eccentricity of the orbit.

Returns

-'M::Number': Mean anomaly of the orbit [radians].

source
AstroCoords.eccentricAnomaly2TrueAnomalyMethod
eccentricAnomaly2TrueAnomaly(E::Number, e::Number)

Converts the eccentric anomaly into the true anomaly.

Arguments

-E::Number: Eccentric anomaly of the orbit [radians]. -e::Number: Eccentricity of the orbit.

Returns

-f::Number: True anomaly of the orbit [radians].

source
AstroCoords.geqoe2cartMethod
geqoe2cart(u, μ, config::RegularizedCoordinateConfig)

Transform GEqOE to Cartesian coordinates.

The perturbing potential W is taken from the config struct. It must be the same value used in the forward transformation.

Arguments

  • u::AbstractVector{<:Number}: GEqOE state vector [ν; p₁; p₂; L; q₁; q₂]
  • μ::Number: Gravitational parameter
  • config::RegularizedCoordinateConfig: Configuration containing the perturbing potential W

Returns

  • SVector{6}: Cartesian state vector [x; y; z; ẋ; ẏ; ż]
source
AstroCoords.get_EDromo_timeMethod
get_EDromo_time(u, ϕ::Number, config::RegularizedCoordinateConfig)

Computes the physical time from the EDromo state vector.

Arguments

  • u::AbstractVector: EDromo state vector [ζ₁, ζ₂, ζ₃, ζ₄, ζ₅, ζ₆, ζ₇, ζ₈].
  • ϕ::Number: Fictitious time parameter.
  • config::RegularizedCoordinateConfig: Configuration parameters for the transformation.

Returns

  • Number: The computed physical time.
source
AstroCoords.get_KS_timeMethod
get_KS_time(u, config::RegularizedCoordinateConfig)

Computes the physical time from the KS state vector.

Arguments

  • u::AbstractVector: KS state vector [u₁, u₂, u₃, u₄, u₅, u₆, u₇, u₈, h, τ].
  • config::RegularizedCoordinateConfig: Configuration parameters.

Returns

  • Number: The computed physical time.
source
AstroCoords.get_stiefelscheifele_timeMethod
get_stiefelscheifele_time(u::AbstractVector{T}, ϕ::Number, config::RegularizedCoordinateConfig) where {T<:Number}

Computes the time element for Stiefel-Scheifele transformations.

Arguments

  • u::AbstractVector{T}: The Stiefel-Scheifele state vector.
  • ϕ::Number: Fictitious time parameter.
  • config::RegularizedCoordinateConfig: Configuration parameters.

Returns

  • The time element.
source
AstroCoords.koe2IOEMethod
function koeM2IOE(u::AbstractVector{T}, μ::V) where {T<:Number, V<:Number}

Computes the Intermediate Orbit Elements from a Keplerian set.

Arguments

-u::AbstractVector{<:Number}: The Keplerian state vector [a; e; i; Ω(RAAN); ω(AOP); M(Mean Anomaly)]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_IOE::SVector{6, <:Number}: The Intermediate Orbit Element vector [I1; I2; I3; I4; I5; I6].

source
AstroCoords.koe2ModEqMethod
koe2ModEq(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Keplerian elements into the Modified Equinoctial elements.

Note

All angles are in radians.

Arguments

-u:AbstractVector{<:Number}: The Keplerian State vector [a; e; i; Ω(RAAN); ω(AOP); ν(True Anomaly)]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_ModEq::SVector{6, <:Number}: The Modified Equinoctial state vector [p; f; g; h; k; l].

source
AstroCoords.koe2USM7Method
koe2USM7(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Keplerian orbital elements into the Unified State Model set. Van den Broeck, Michael. "An Approach to Generalizing Taylor Series Integration for Low-Thrust Trajectories." (2017). https://repository.tudelft.nl/islandora/object/uuid%3A2567c152-ab56-4323-bcfa-b076343664f9

Note

All angles are in radians.

Arguments

-u:AbstractVector{<:Number}: The Keplerian state vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_USM::SVector{7, <:Number}: The Unified State Model vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0].

source
AstroCoords.koe2cartMethod
koe2cart(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Computes the Cartesian orbital elements from a Keplerian set.

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The Keplerian state vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_cart::Vector{6, <:Number}: The Keplerian orbital element vector [x; y; z; ẋ; ẏ; ż].

source
AstroCoords.koe2poincareMethod
koe2poincare(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Keplerian orbital elements into Poincaré canonical variables. Poincaré elements use Cartesian-style canonical coordinate-momentum pairs derived from Delaunay variables, and are non-singular for circular (e → 0) and equatorial (i → 0) orbits.

Supports both elliptic (a > 0) and hyperbolic (a < 0) orbits, following the same convention as Delaunay: Λ = √(μ|a|). For hyperbolic orbits, the eccentricity action is defined as P = Λ + G (instead of Λ - G) to keep √(2P) real.

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The Keplerian state vector [a; e; i; Ω(RAAN); ω(AOP); ν(True Anomaly)]. -μ::Number: Standard gravitational parameter of central body.

Returns

-u_poincare::SVector{6, <:Number}: The Poincaré state vector [Λ; λ; ξ; η; p; q].

References

  • Murray, C.D. and Dermott, S.F. "Solar System Dynamics." Cambridge University Press (1999).
  • Laskar, J. and Robutel, P. "Stability of the Planetary Three-Body Problem." Celestial Mechanics and Dynamical Astronomy 62 (1995): 193-217.
source
AstroCoords.meanAnomaly2EccentricAnomalyMethod
meanAnomaly2EccentricAnomaly(M::T, e::Number; tol::Float64=10 * eps(T), max_iters::Int=100) where {T<:Number}

Converts the Mean Anomaly into the Eccentric Anomaly

Arguments

-M::Number: Mean Anomaly of the orbit [radians] -e::Number: Eccentricity of the orbit

Keyword Arguments

-tol::Float64: Convergence tolerance of Kepler solver. [Default=10*eps(T)] -max_iters::Int: Maximum number of iterations. [Default=100]

Returns

-E::Number: Eccentric Anomaly of the orbit [radians]

source
AstroCoords.meanAnomaly2TrueAnomalyMethod
meanAnomaly2TrueAnomaly(M::T, e::Number; tol::Float64=10 * eps(T), max_iters::Int=100) where {T<:Number}

Converts the mean anomaly into the true anomaly.

Arguments

-M::Number: Mean anomaly of the orbit [radians]. -e::Number: Eccentricity of the orbit.

Keyword Arguments

-tol::Float64: Convergence tolerance of Kepler solver. [Default=10*eps(T)] -max_iters::Int: Maximum number of iterations. [Default=100]

Returns

-f::Number: Mean anomaly of the orbit [radians].

source
AstroCoords.meanMotionMethod
meanMotion(X::AstroCoord, μ::Number)

Computes the Keplerian mean motion about a central body.

Arguments

-X::AstroCoord: An coordinate set describing the orbit. -μ::Number: Standard graviational parameter of central body.

Returns

  • n::Number: The orbital mean motion.
source
AstroCoords.meanMotionMethod
meanMotion(a::Number, μ::Number)

Computes the Keplerian mean motion about a central body.

Arguments

-a::Number: The semi-major axis of the orbit. -μ::Number: Standard graviational parameter of central body.

Returns

  • n::Number: The orbital mean motion.
source
AstroCoords.modEqN2IOEMethod
function modEq2IOE(u::AbstractVector{T}, μ::V) where {T<:Number, V<:Number}

Computes the Intermediate Orbit Elements from a Modified Equinoctial set.

Arguments

-u::AbstractVector{<:Number}: The Modified Equinoctial state vector [p; f; g; h; k; L]. -μ::Number: Standard graviational parameter of central body.

Returns

-u_IOE::SVector{6, <:Number}: The Intermediate Orbit Element vector [I1; I2; I3; I4; I5; I6].

source
AstroCoords.orbitalNRGMethod
orbitalNRG(X::AstroCoord, μ::Number)

Computes the keplerian orbital energy.

Arguments

-X::AstroCoord: An coordinate set describing the orbit. -μ::Number: Standard graviational parameter of central body.

Returns

-NRG::Number: The orbital energy.

source
AstroCoords.orbitalNRGMethod
orbitalNRG(a::Number, μ::Number)

Computes the keplerian orbital energy.

Arguments

-a::Number: The semi-major axis of the orbit. -μ::Number: Standard graviational parameter of central body.

Returns

-NRG::Number: The orbital energy.

source
AstroCoords.orbitalPeriodMethod
orbitalPeriod(X::AstroCoord, μ::Number)

Computes the Keplerian orbital period about a central body.

Arguments

-X::AstroCoord: An coordinate set describing the orbit. -μ::Number: Standard graviational parameter of central body.

Returns

-T::Number: The orbital period.

source
AstroCoords.orbitalPeriodMethod
orbitalPeriod(a::Number, μ::Number)

Computes the Keplerian orbital period about a central body.

Arguments

-a::Number: The semi-major axis of the orbit. -μ::Number: Standard graviational parameter of central body.

Returns

-T::Number: The orbital period.

source
AstroCoords.poincare2koeMethod
poincare2koe(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Converts Poincaré canonical variables into Keplerian orbital elements.

Supports both elliptic and hyperbolic orbits. The orbit type is determined by comparing the eccentricity action P = (ξ² + η²)/2 against Λ:

  • P ≤ Λ → elliptic (a > 0)
  • P > Λ → hyperbolic (a < 0)
Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The Poincaré state vector [Λ; λ; ξ; η; p; q]. -μ::Number: Standard gravitational parameter of central body.

Returns

-u_koe::SVector{6, <:Number}: The Keplerian state vector [a; e; i; Ω(RAAN); ω(AOP); ν(True Anomaly)].

References

  • Murray, C.D. and Dermott, S.F. "Solar System Dynamics." Cambridge University Press (1999).
  • Laskar, J. and Robutel, P. "Stability of the Planetary Three-Body Problem." Celestial Mechanics and Dynamical Astronomy 62 (1995): 193-217.
source
AstroCoords.sphere2cartMethod
sphere2cart(u::AbstractVector{T}, μ::V) where {T<:Number,V<:Number}

Computes the Cartesian orbital elements from a spherical set.

Note

All angles are in radians.

Arguments

-u::AbstractVector{<:Number}: The spherical orbital element vector [r; θ; ϕ; ṙ; θdot; ϕdot]. -μ::Number: Standard graviational parameter of central body.

Returns

-'u_cart::SVector{6, <:Number}': The Cartesian orbital element vector [x; y; z; ẋ; ẏ; ż].

source
AstroCoords.trueAnomaly2EccentricAnomalyMethod
trueAnomaly2EccentricAnomaly(f::Number, e::Number)

Converts the true anomaly into the mean anomaly.

Arguments

-f::Number: True anomaly of the orbit [radians]. -e::Number: Eccentricity of the orbit.

Returns

-E::Number: Eccentric anomaly of the orbit [radians].

source
AstroCoords.trueAnomaly2MeanAnomalyMethod
trueAnomaly2MeanAnomaly(f::Number, e::Number)

Converts the true anomaly into the mean anomaly.

Arguments

-f::Number: True anomaly of the orbit [radians]. -e::Number: Eccentricity of the orbit.

Returns

-M::Number: Mean anomaly of the orbit [radians].

source
Base.getpropertyMethod

Computed properties for GEqOE coordinate set.

Additional Properties

  • a: Generalized semi-major axis: a = (μ/ν²)^(1/3)
  • g: Generalized eccentricity magnitude: g = √(p₁² + p₂²)
  • Ψ: Generalized longitude of pericenter: Ψ = atan(p₁, p₂)
source
Base.invMethod
inv(trans::Transformation)

Returns the inverse (or reverse) of the transformation trans

source