AstrodynamicsUtilities
Documentation for AstrodynamicsUtilities.
API
AstrodynamicsUtilities.CartesianStateAstrodynamicsUtilities.KeplerianStateAstrodynamicsUtilities.coe2rvAstrodynamicsUtilities.rv2coeAstrodynamicsUtilities.transformAstrodynamicsUtilities.transform
State Representations
AstrodynamicsUtilities.CartesianState — Type
CartesianState{T<:Union{Nothing, AbstractVector}}Container for cartesian state.
AstrodynamicsUtilities.KeplerianState — Type
KeplerianState{T<:Union{Nothing, AbstractVector}}Container for Keplerian state.
AstrodynamicsUtilities.transform — Method
function transform(old::CartesianState{TP}, new::KeplerianState{Nothing}) where TP<:AbstractVectorTransforms an inertial Cartesian state to an inertial Keplerian state. Uses the 'rv2coe' algorithm from Fundamentals of Astro. Vallado (2001).
Inputs:
old: Cartesian state vector container
new_type: Flag to define what type to transform to. This method is to transform to KeplerianState().
mu: gravitational parameter of central body (e.g., 398600.4418) for Earth in km^3/s^2Returns:
KeplerianState(vec): Keplerian container with transformed vecAstrodynamicsUtilities.transform — Method
function transform(old::KeplerianState{TP}, new_type::CartesianState{Nothing}, mu) where TP<:AbstractVectorTransforms an inertial keplerian state to an inertial ceplerian state. Uses the 'coe2rv' algorithm from Fundamentals of Astro. Vallado (2001).
Inputs:
old: keplerian state vector container
new_type: Flag to define what type to transform to. This method is to transform to CartesianState().
mu: gravitational parameter of central body (e.g., 398600.4418) for Earth in km^3/s^2Returns:
KeplerianState(vec): Keplerian container with transformed vecPrivate Functions
AstrodynamicsUtilities.rv2coe — Function
rv2coe(r, v, mu)Calculate the 6 classical keplerian orbital elements from r, v, mu (under the two body problem)
Inputs:
r: inertial position vector (km)
v: inertial velocity vector (km/s)
mu: gravitational parameter of central body (km^3/s^2)returns:
coe: vector of 6 Keplerian elements, which are:
a: semi major axis (km)
e: eccentricity
inc: inclination (radians)
RAAN: right-ascension (radians)
argPer: argument of perigee (radians)
trueAnom: true anomaly (radians)AstrodynamicsUtilities.coe2rv — Function
coe2rv: Calculate the inertial position and velocity vectors from Keplerian classical orbital elements.
Inputs:
`vec`: 6-element vector containing:
a: semi major axis (km)
e: eccentricity
inc: inclination (radians)
RAAN: right-ascension (radians)
w: argument of perigee (radians)
trueAnom: true anomaly (radians)
`mu`: gravitational parameter of central body (km^3/s^2)Returns:
`rv`: 6-element vector of position and velocity