Library
Documentation for AstroCoords.jl
.
AstroCoords.AstroCoordTransformation
— Typeabstract type AstroCoordTransformation <: AstrodynamicsTransformation
An abstract type representing a Transformation Between Astrodynamics Coordinates with no Time Regularization
AstroCoords.AstrodynamicsTransformation
— Typeabstract type AstrodynamicsTransformation <: Transformation
An abstract type representing a Transformation Between Astrodynamics Coordinates
AstroCoords.Cartesian
— TypeCartesian{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)
AstroCoords.Coordinate
— Typeabstract type AstroCoord{N, T} <: StaticMatrix{N, 1, T}
An abstract type representing a N-Dimensional Coordinate Set
AstroCoords.Cylindrical
— TypeCylindrical{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)
AstroCoords.Delaunay
— TypeDelaunay{T} <: AstroCoord
Delaunay Orbital Elements. 6D parameterziation of the orbit. L - Canonical Keplerian Energy G - Canonical Total Angular Momentum H - Canonical Normal Angular Momentum (Relative to Equator) M - Mean Anomaly ω - Argument of Periapsis Ω - Right Ascention of the Ascending Node
Constructors Delaunay(L, G, H, M, ω, Ω) Delaunay(X::AbstractVector{<:Number}) Delaunay(X::AstroCoord, μ::Number)
AstroCoords.IdentityTransformation
— TypeThe IdentityTransformation
is a singleton Transformation
that returns the input unchanged, similar to identity
.
AstroCoords.Keplerian
— TypeKeplerian{T} <: AstroCoord
Keplerian Orbital Elements. 6D parameterziation of the orbit. a - semi-major axis e - eccetricity i - inclination Ω - Right Ascension of Ascending Node ω - Argument of Perigee f - True Anomaly
Constructors Keplerian(a, e, i, Ω, ω, f) Keplerian(X::AbstractArray) Keplerian(X::AstroCoord, μ::Number)
AstroCoords.Milankovich
— TypeMilankovich{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 - Mean Anomaly
Constructors Milankovich(hx, hy, hz, ex, ey, ez, L) Milankovich(X::AbstractArray) Milankovich(X::AstroCoord, μ::Number)
AstroCoords.ModEq
— TypeModEq{T} <: AstroCoord
Modified Equinoctial Orbital Elements. 6D parameterziation of the orbit. p - f - g - h - k - L -
Constructors ModEq(p, f, g, h, k, l) ModEq(X::AbstractArray) ModEq(X::AstroCoord, μ::Number)
AstroCoords.Spherical
— TypeSpherical{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)
AstroCoords.Transformation
— TypeThe 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 ∘
).
AstroCoords.USM6
— TypeUSM6{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)
AstroCoords.USM7
— TypeUSM7{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)
AstroCoords.USMEM
— TypeUSMEM{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 - First Exponential Mapping Component a3 - First Exponential Mapping Component
Constructors USMEM(C, Rf1, Rf2, a1, a2, a3) USMEM(X::AbstractArray) USMEM(X::AstroCoord, μ::Number)
AstroCoords.KeplerSolver
— MethodSolves for True Anomaly given the Mean Anomaly and eccentricity of an Orbit
Arguments: -'M::Number': Mean Anomaly of the orbit -'e::Number': Eccentricity of the orbit
Returns -'f::Number': True Anomaly of the orbit *All angles are in radians
AstroCoords.Mil2cart
— MethodMil2cart(u::AbstractVector{<:Number}, μ::Number)
Converts Milankovich State Vector into the Cartesian State
Arguments: -'u::AbstractVector{<:Number}': Milankovich State Vector [H; e; L] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cart::Vector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż]
AstroCoords.ModEq2koe
— MethodModEq2koe(u::AbstractVector{<:Number}, μ::Number)
Converts Modified Equinoctial Elements into the Keplerian Elements
Arguments: -'u:AbstractVector{<:Number}': Modified Equinoctial State Vector [p; f; g; h; k; l] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_koe::Vector{<:Number}': Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); ν(True Anomaly)] *All Angles are in Radians
AstroCoords.ModEqN2koe
— MethodModEqN2koe(u::AbstractVector{<:Number}, μ::Number)
Converts Modified Equinoctial Elements with Mean Motion into the Keplerian Elements
Arguments: -'u:AbstractVector{<:Number}': Modified Equinoctial State Vector [p; f; g; h; k; l] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_koe::Vector{<:Number}': Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); ν(True Anomaly)] *All Angles are in Radians
AstroCoords.USM62USM7
— MethodUSM62USM7(u::AbstractArray{<:Number}, μ::Number)
Converts USM with Modified Rodrigue Parameters to USM with Quaternions
Arguments: -'u::AbstractVector{<:Number}': USM6 Vector [C; Rf1; Rf2; σ1; σ2; σ3] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_USM::Vector{Number}': Unified State Model Vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0]
AstroCoords.USM72USM6
— MethodUSM72USM6(u::AbstractVector{<:Number}, μ::Number)
Converts USM with Quaternions to USM with Modified Rodrigue Parameters
Arguments: -'u::AbstractVector{<:Number}': Unified State Model Vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_USM6::Vector{Number}': USM6 State Vector [C; Rf1; Rf2; σ1; σ2; σ3]
AstroCoords.USM72USMEM
— MethodUSM72USMEM(u::AbstractVector{<:Number}, μ::Number)
Converts USM with Quaternions to USM with Exponential Mapping
Arguments: -'u::AbstractVector{<:Number}': Unified State Model Vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_USMEM::Vector{Number}': USMEM State Vector [C; Rf1; Rf2; a1; a2; a3, Φ]
AstroCoords.USM72koe
— MethodUSM72koe(u::AbstractVector{<:Number}, μ::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
Arguments: -'u::AbstractVector{<:Number}': Unified State Model Vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_koe:Vector{<:Number}': Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)] *All Angles are in Radians
AstroCoords.USMEM2USM7
— MethodUSMEM2USM7(u::AbstractVector{<:Number}, μ::Number)
Converts USM with Exponential Mapping to USM with Quaternions
Arguments: -'u::AbstractVector{<:Number}': USMEM Vector [C; Rf1; Rf2; a1; a2; a3, Φ] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_USM::Vector{<:Number}': Unified State Model Vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0]
AstroCoords.angularMomentumQuantity
— MethodComputes the Instantaneous Angular Velocity Quantity
Arguments: -'u::AbstractVector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż]
Returns -'angular_momentum::Number' - Norm of Angular Momentum Vector
AstroCoords.angularMomentumQuantity
— MethodComputes the Instantaneous Angular Velocity Quantity
Arguments: -'X::AstroCoord': Astro Coordinate -'μ::Number': Standard Graviational Parameter of Central Body
Returns -'angular_momentum::Number' - Norm of Angular Momentum Vector
AstroCoords.angularMomentumVector
— MethodComputes the Instantaneous Angular Velocity Vector
Arguments: -'u::AbstractVector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż]
Returns -'angular_momentum::Vector{<:Number}' - 3-Dimensional Angular Momemtum Vector
AstroCoords.angularMomentumVector
— MethodComputes the Instantaneous Angular Velocity Vector
Arguments: -'X::AstroCoord': Astro Coordinate -'μ::Number': Standard Graviational Parameter of Central Body
Returns -'angular_momentum::Vector{<:Number}' - 3-Dimensional Angular Momemtum Vector
AstroCoords.cart2Mil
— Methodcart2Mil(u::AbstractVector{<:Number}, μ::Number)
Converts Cartesian State Vector into the Milankovich State
Arguments: -'u::AbstractVector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_Mil::Vector{Number}': Milankovich State Vector [H; e; L]
AstroCoords.cart2cylind
— Methodcart2cylind(u::AbstractVector{<:Number}, μ::Number)
Computes the Cylindrical Orbital Elements from a Cartesian Set
Arguments: -'u::AbstractVector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cylind::Vector{<:Number}': Cylindrical Orbital Element Vector [r; θ; z; ṙ; θdot; ż] *All Angles are in Radians
AstroCoords.cart2delaunay
— Methodcart2delaunay(u::AbstractVector{<:Number}, μ::Number)
Computes the Delaunay Orbital Elements from a Cartesian Set
Arguments: -'u::AbstractVector{<:Number}': Cartesian Orbital Element Vector [x; y; z; ẋ; ẏ; ż] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cart::Vector{<:Number}': Delaunay Orbital Element Vector [L; G; H; M; ω; Ω] *All Angles are in Radians
AstroCoords.cart2koe
— Methodcart2koe(u::AbstractVector{T}, μ::Number; equatorial_tol::Float64=1E-15, circular_tol::Float64=1E-15)
Computes the Keplerian Orbital Elements from a Cartesian Set.
Arguments: -'u::AbstractVector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_koe::Vector{<:Number}': Keplerian Orbital Element Vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)] *All Angles are in Radians
AstroCoords.cart2koeM
— MethodConverts Cartesian State Vector into the Alternative Keplerian State Vector
Arguments: -'u::AbstractVector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cart::Vector{<:Number}': Alternative Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); M(Mean Anomaly)]
AstroCoords.cart2sphere
— Methodcart2sphere(u::AbstractVector{<:Number}, μ::Number)
Computes the Spherical Orbital Elements from a Spherical Set
Arguments: -'u::AbstractVector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_sphere::Vector{<:Number}': Spherical Orbital Element Vector [r; θ; ϕ; ṙ; θdot; ϕdot] *All Angles are in Radians
AstroCoords.cylind2cart
— Methodcylind2cart(u::AbstractVector{<:Number}, μ::Number)
Computes the Cartesian Orbital Elements from a Cylindrical Set
Arguments: -'u::AbstractVector{<:Number}': Cylindrical State Vector [r; θ; z; ṙ; θdot; ż] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cart::Vector{<:Number}': Cartesian Orbital Element Vector [x; y; z; ẋ; ẏ; ż] *All Angles are in Radians
AstroCoords.delaunay2cart
— Methoddelaunay2cart(u::AbstractVector{<:Number}, μ::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.
Arguments: -'u::AbstractVector{<:Number}': Delaunay Orbital Element Vector [L; G; H; M; ω; Ω] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cart::Vector{<:Number}': Cartesian Orbital Element Vector [x; y; z; ẋ; ẏ; ż] *All Angles are in Radians
AstroCoords.eccentricAnomaly2MeanAnomaly
— MethodConverts the True Anomaly into the Mean Anomaly
Arguments: -'E::Number': Eccentric Anomaly of the orbit -'e::Number': Eccentricity of the orbit
Returns -'M::Number': Mean Anomaly of the orbit *All angles are in radians
AstroCoords.eccentricAnomaly2TrueAnomaly
— MethodConverts the Eccentric Anomaly into the True Anomaly
Arguments: -'E::Number': Eccentric Anomaly of the orbit -'e::Number': Eccentricity of the orbit
Returns -'f::Number': True Anomaly of the orbit *All angles are in radians
AstroCoords.koe2ModEq
— Methodkoe2ModEq(u::AbstractVector{<:Number}, μ::Number)
Converts Keplerian Elements into the Modified Equinoctial Elements
Arguments: -'u:AbstractVector{<:Number}': Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); ν(True Anomaly)] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_ModEq::Vector{<:Number}': Modified Equinoctial State Vector [p; f; g; h; k; l] *All Angles are in Radians
AstroCoords.koe2ModEqN
— Methodkoe2ModEqN(u::AbstractVector{<:Number}, μ::Number)
Converts Keplerian Elements into the Modified Equinoctial Elements with Mean Motion
Arguments: -'u:AbstractVector{<:Number}': Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); ν(True Anomaly)] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_ModEq::Vector{<:Number}': Modified Equinoctial State Vector [n; f; g; h; k; l] *All Angles are in Radians
AstroCoords.koe2USM7
— Methodkoe2USM7(u::AbstractVector{<:Number}, μ::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
Arguments: -'u:AbstractVector{<:Number}': Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_USM::Vector{<:Number}': Unified State Model Vector [C; Rf1; Rf2; ϵO1; ϵO2; ϵO3; η0] *All Angles are in Radians
AstroCoords.koe2cart
— Methodkoe2cart(u::AbstractVector{<:Number}, μ::Number)
Computes the Cartesian Orbital Elements from a Keplerian Set.
Arguments: -'u::AbstractVector{<:Number}': Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); f(True Anomaly)] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cart::Vector{<:Number}': Keplerian Orbital Element Vector [x; y; z; ẋ; ẏ; ż] *All Angles are in Radians
AstroCoords.koeM2cart
— MethodkoeM2cart(u::AbstractVector{<:Number}, μ::Number)
Converts Alternative Keplerian State Vector into the Cartesian State
Arguments: -'u::AbstractVector{<:Number}': Alternative Keplerian State Vector [a; e; i; Ω(RAAN); ω(AOP); M(Mean Anomaly)] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cart::Vector{<:Number}': Cartesian State Vector [x; y; z; ẋ; ẏ; ż]
AstroCoords.meanAnomaly2EccentricAnomaly
— MethodConverts the Mean Anomaly into the Eccentric Anomaly
Arguments: -'M::Number': Mean Anomaly of the orbit -'e::Number': Eccentricity of the orbit
Returns -'E::Number': Eccentric Anomaly of the orbit *All angles are in radians
AstroCoords.meanAnomaly2TrueAnomaly
— MethodConverts the Mean Anomaly into the True Anomaly
Arguments: -'M::Number': Mean Anomaly of the orbit -'e::Number': Eccentricity of the orbit
Returns -'f::Number': Mean Anomaly of the orbit *All angles are in radians
AstroCoords.meanMotion
— MethodComputes the Keplerian Mean Motion About a Central Body
Arguments:
- 'X::AstroCoord': Astro Coordinate
- 'μ::Number': Standard Graviational Parameter of Central Body
Returns:
- 'n::Number': Orbital Mean Motion
AstroCoords.meanMotion
— MethodComputes the Keplerian Mean Motion About a Central Body
Arguments:
- 'a::Number': Semi-Major Axis
- 'μ::Number': Standard Graviational Parameter of Central Body
Returns:
- 'n::Number': Orbital Mean Motion
AstroCoords.orbitalNRG
— MethodComputes the Keplerian Orbital Energy
Arguments: -'X::AstroCoord': Astro Coordinate -'μ::Number': Standard Graviational Parameter of Central Body
Returns -'NRG::Number' - Orbital energy
AstroCoords.orbitalNRG
— MethodComputes the Keplerian Orbital Energy
Arguments: -'a::Number': AstroCoord State Vector -'μ::Number': Standard Graviational Parameter of Central Body
Returns -'NRG::Number' - Orbital energy
AstroCoords.orbitalPeriod
— MethodComputes the Keplerian Orbital Period About a Central Body
Arguments:
- 'X::AstroCoord': Astro Coordinate
- 'μ::Number': Standard Graviational Parameter of Central Body
Returns:
- 'T::Number': Orbital Period
AstroCoords.orbitalPeriod
— MethodComputes the Keplerian Orbital Period About a Central Body
Arguments:
- 'a::Number': Semi-Major Axis
- 'μ::Number': Standard Graviational Parameter of Central Body
Returns:
- 'T::Number': Orbital Period
AstroCoords.sphere2cart
— Methodsphere2cart(u::AbstractVector{<:Number}, μ::Number)
Computes the Cartesian Orbital Elements from a Spherical Set
Arguments: -'u::AbstractVector{<:Number}': Spherical Orbital Element Vector [r; θ; ϕ; ṙ; θdot; ϕdot] -'μ::Number': Standard Graviational Parameter of Central Body
Returns: -'u_cart::Vector{<:Number}': Cartesian Orbital Element Vector [x; y; z; ẋ; ẏ; ż] *All Angles are in Radians
AstroCoords.trueAnomaly2EccentricAnomaly
— MethodConverts the True Anomaly into the Mean Anomaly
Arguments: -'f::Number': True Anomaly of the orbit -'e::Number': Eccentricity of the orbit
Returns -'E::Number': Eccentric Anomaly of the orbit *All angles are in radians
AstroCoords.trueAnomaly2MeanAnomaly
— MethodConverts the True Anomaly into the Mean Anomaly
Arguments: -'f::Number': True Anomaly of the orbit -'e::Number': Eccentricity of the orbit
Returns -'M::Number': Mean Anomaly of the orbit *All angles are in radians
Base.inv
— Methodinv(trans::Transformation)
Returns the inverse (or reverse) of the transformation trans