General functions
This package contains some functions that helps in analysis of orbits.
Angular velocity
The angular velocity of an object in orbit when considering a Keplerian orbit (unperturbed model) is given by:
where $\mu_0$ is the standard gravitational parameter for Earth, and $a$ is the semi-major axis.
If the perturbation terms up to $J_2$ are considered, then the angular velocity is computed by:
where $e$ is the eccentricity, $i$ is the inclination, and $R_0$ is the Earth equatorial radius.
In this package, the angular velocity [rad/s] can be computed by the following functions:
function angvel(a::Number, e::Number, i::Number, pert::Symbol = :J2)
function angvel(orb::Orbit, pert::Symbol = :J2)
where:
a
is the semi-major axis [m];e
is the eccentricity;i
is the inclination [rad];pert
selects the perturbation terms it should be used, it can be:J0
,:J2
, or:J4
[1]; andorb
is an instance ofOrbit
.
julia> angvel(7130982.0, 0.001111, deg2rad(98.405))
0.0010471974485046116
julia> angvel(7130982.0, 0.001111, deg2rad(98.405), :J0)
0.0010484431282179
Time-derivative of the argument of perigee
The time-derivative of the argument of perigee $\dot{\omega}$ when considering perturbation terms up to $J_2$ is:
where $R_0$ is the Earth equatorial radius, $a$ is the semi-major axis, $e$ is the eccentricity, $i$ is the inclination, and $n_0$ is the unperturbed orbital angular velocity.
In the unperturbed model (Keplerian orbit), the time-derivative of the argument of perigee is always 0.
In this package, the time-derivative of the argument of perigee [rad/s] can be computed by the following functions:
function dArgPer(a::Number, e::Number, i::Number, pert::Symbol = :J2)
function dArgPer(orb::Orbit, pert::Symbol = :J2)
where:
a
is the semi-major axis [m];e
is the eccentricity;i
is the inclination [rad];pert
selects the perturbation terms it should be used, it can be:J0
,:J2
, or:J4
[1]; andorb
is an instance ofOrbit
.
julia> dArgPer(7130982, 0.001111, deg2rad(98.405))
-6.082892348533058e-7
julia> dArgPer(7130982, 0.001111, deg2rad(63.435))
-2.433253158726004e-12
julia> dArgPer(7130982, 0.001111, deg2rad(98.405), :J0)
0.0
Time-derivative of the RAAN
The time-derivative of the RAAN (right-ascension of the ascending node) $\dot{\Omega}$ when considering perturbation terms up to $J_2$ is:
where $R_0$ is the Earth equatorial radius, $a$ is the semi-major axis, $e$ is the eccentricity, $i$ is the inclination, and $n_0$ is the unperturbed orbital angular velocity.
In the unperturbed model (Keplerian orbit), the time-derivative of the RAAN is always 0.
In this package, the time-derivative of the RAAN [rad/s] can be computed by the following functions:
function dRAAN(a::Number, e::Number, i::Number, pert::Symbol = :J2)
function dRAAN(orb::Orbit, pert::Symbol = :J2)
where:
a
is the semi-major axis [m];e
is the eccentricity;i
is the inclination [rad];pert
selects the perturbation terms it should be used, it can be:J0
,:J2
, or:J4
[1]; andorb
is an instance ofOrbit
.
julia> dRAAN(7130982, 0.001111, deg2rad(98.405))
1.9909533223838115e-7
julia> dRAAN(7130982, 0.001111, deg2rad(98.405), :J0)
0.0
Period
The orbital period of an object in orbit is given by:
where $n$ is the angular velocity as described in Angular velocity.
In this package, the orbital period [s] can be computed by the following functions:
function period(a::Number, e::Number, i::Number, pert::Symbol = :J2)
function period(orb::Orbit, pert::Symbol = :J2)
where:
a
is the semi-major axis [m];e
is the eccentricity;i
is the inclination [rad];pert
selects the perturbation terms it should be used, it can be:J0
,:J2
, or:J4
[1]; andorb
is an instance ofOrbit
.
julia> period(7130982, 0.001111, deg2rad(98.405))/60
100.00000980636328
julia> period(7130982, 0.001111, deg2rad(98.405), :J0)/60
99.88119746433748
- 1If
pert
is:J0
, then it will be considered a Keplerian, unperturbed orbit to compute the values. Ifpert
is:J2
, then it will be considered the perturbation terms up to $J_2$ to compute the values. Otherwise, ifpert
is:J4
, then it will be considered the perturbation terms $J_2$, $J_4$, and $J_2^2$ to compute the values. Ifpert
is omitted, then it defaults to:J2
.