Library
Documentation for SatelliteToolboxAtmosphericModels.jl.
SatelliteToolboxAtmosphericModels.AtmosphericModels._EXPONENTIAL_ATMOSPHERE_H — Constant
const _EXPONENTIAL_ATMOSPHERE_HScale height for the exponential atmospheric model [km].
SatelliteToolboxAtmosphericModels.AtmosphericModels._EXPONENTIAL_ATMOSPHERE_H₀ — Constant
const _EXPONENTIAL_ATMOSPHERE_H₀Base altitude for the exponential atmospheric model [km].
SatelliteToolboxAtmosphericModels.AtmosphericModels._EXPONENTIAL_ATMOSPHERE_ρ₀ — Constant
const _EXPONENTIAL_ATMOSPHERE_ρ₀Nominal density for the exponential atmospheric model [kg / m³].
SatelliteToolboxAtmosphericModels.AtmosphericModels._HARRIS_PRIESTER_ALT_RHO — Constant
Harris-Priester min-max density (kg/m³) vs. altitude (m) table. These data are valid for a mean solar activity.
SatelliteToolboxAtmosphericModels.AtmosphericModels._JACCHIA1977_CONSTANTS — Constant
const _JACCHIA1977_CONSTANTSConstants for the Jacchia 1977 atmospheric model.
The species-dependent tuples use the internal order (He, O₂, N₂, Ar, O, H), matching the reference implementation [2].
SatelliteToolboxAtmosphericModels.AtmosphericModels._JR1971_CONSTANTS — Constant
const _JR1971_CONSTANTSConstants for the Jacchia-Roberts 1971 atmospheric model.
SatelliteToolboxAtmosphericModels.AtmosphericModels.JB2008Output — Type
struct JB2008Output{T<:Number}Output of the atmospheric model Jacchia-Bowman 2008.
Fields
total_density::T: Total atmospheric density [kg / m³].temperature::T: Temperature at the selected position [K].exospheric_temperature::T: Exospheric temperature [K].N2_number_density::T: Number density of N₂ [1 / m³].O2_number_density::T: Number density of O₂ [1 / m³].O_number_density::T: Number density of O [1 / m³].Ar_number_density::T: Number density of Ar [1 / m³].He_number_density::T: Number density of He [1 / m³].H_number_density::T: Number density of H [1 / m³].
SatelliteToolboxAtmosphericModels.AtmosphericModels.JR1971Output — Type
struct JR1971Output{T<:Number}Output of the atmospheric model Jacchia-Roberts 1971.
Fields
total_density::T: Total atmospheric density [kg / m³].temperature::T: Temperature at the selected position [K].exospheric_temperature::T: Exospheric temperature [K].N2_number_density::T: Number density of N₂ [1 / m³].O2_number_density::T: Number density of O₂ [1 / m³].O_number_density::T: Number density of O [1 / m³].Ar_number_density::T: Number density of Ar [1 / m³].He_number_density::T: Number density of He [1 / m³].H_number_density::T: Number density of H [1 / m³].
SatelliteToolboxAtmosphericModels.AtmosphericModels.Jacchia1977Output — Type
struct Jacchia1977Output{T<:Number}Output of the atmospheric model Jacchia 1977.
Fields
total_density::T: Total atmospheric density [kg / m³].temperature::T: Temperature at the selected position [K].exospheric_temperature::T: Mean exospheric temperatureT½above the selected position [K].N2_number_density::T: Number density of N₂ [1 / m³].O2_number_density::T: Number density of O₂ [1 / m³].O_number_density::T: Number density of O [1 / m³].Ar_number_density::T: Number density of Ar [1 / m³].He_number_density::T: Number density of He [1 / m³].H_number_density::T: Number density of H [1 / m³].
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00Flags — Type
struct Nrlmsise00FlagsFlags to configure NRLMSISE-00.
Fields
F10_Mean::Bool: F10.7 effect on mean.time_independent::Bool: Independent of time.sym_annual::Bool: Symmetrical annual.sym_semiannual::Bool: Symmetrical semiannual.asym_annual::Bool: Asymmetrical annual.asym_semiannual::Bool: Asymmetrical semiannual.diurnal::Bool: Diurnal.semidiurnal::Bool: Semidiurnal.daily_ap::Bool: Daily AP.all_ut_long_effects::Bool: All UT/long effects.longitudinal::Bool: Longitudinal.ut_mixed_ut_long::Bool: UT and mixed UT/long.mixed_ap_ut_long::Bool: Mixed AP/UT/long.terdiurnal::Bool: Terdiurnal.departures_from_eq::Bool: Departures from diffusive equilibrium.all_tinf_var::Bool: All TINF variations.all_tlb_var::Bool: All TLB variations.all_tn1_var::Bool: All TN1 variations.all_s_var::Bool: All S variations.all_tn2_var::Bool: All TN2 variations.all_nlb_var::Bool: All NLB variations.all_tn3_var::Bool: All TN3 variations.turbo_scale_height::Bool: Turbo scale height variations.
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00Output — Type
struct Nrlmsise00Output{T<:Number}Output structure for NRLMSISE00 model.
Fields
total_density::T: Total mass density [kg / m³].temperature: Temperature at the selected altitude [K].exospheric_temperature: Exospheric temperature [K].N_number_density: Nitrogen number density [1 / m³].N2_number_density: N₂ number density [1 / m³].O_number_density: Oxygen number density [1 / m³].aO_number_density: Anomalous Oxygen number density [1 / m³].O2_number_density: O₂ number density [1 / m³].H_number_density: Hydrogen number density [1 / m³].He_number_density: Helium number density [1 / m³].Ar_number_density: Argon number density [1 / m³].
Remarks
Anomalous oxygen is defined as hot atomic oxygen or ionized oxygen that can become appreciable at high altitudes (> 500 km) for some ranges of inputs, thereby affecting drag on satellites and debris. We group these species under the term Anomalous Oxygen, since their individual variations are not presently separable with the drag data used to define this model component.
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00Structure — Type
struct Nrlmsise00Structure{T<:Number, T_AP<:Union{Number, AbstractVector}}Structure with the configuration parameters for NRLMSISE-00 model. T is the floating-number type and T_AP is the type of the AP information, which can be a Number or AbstractVector.
SatelliteToolboxAtmosphericModels.AtmosphericModels._ccor — Method
_ccor(h::Number, r::Number, h₁::Number, zh::Number) -> NumberCompute the chemistry / dissociation correction for MSIS models.
Arguments
h::Number: Altitude.r::Number: Target ratio.h₁::Number: Transition scale length.zh::Number: Altitude of1/2 r.
SatelliteToolboxAtmosphericModels.AtmosphericModels._ccor2 — Method
_ccor2(h::Number, r::Number, h₁::Number, zh::Number, h₂::Number) -> NumberCompute the O and O₂ chemistry / dissociation correction for MSIS models.
Arguments
h::Number: Altitude.r::Number: Target ratio.h₁::Number: Transition scale length.zh::Number: Altitude of1/2 r.h₂::Number: Transition scale length 2.
SatelliteToolboxAtmosphericModels.AtmosphericModels._densm — Method
_densm(
h::Number,
d₀::Number,
xm::Number,
g_lat::Number,
r_lat::Number,
tn2::NTuple{4, Number},
tgn2::NTuple{2, Number},
tn3::NTuple{5, Number},
tgn3::NTuple{2, Number}
) -> NumberCompute the temperature and density profiles for the lower atmosphere.
Arguments
h::Number: Altitude [km].d₀::Number: Reference density, returned ifh > _ZN2[1].xm::Number: Species molecular weight [ ].g_lat::Number: Reference gravity at desired latitude [cm / s²].r_lat::Number: Reference radius at desired latitude [km].tn2::NTuple{4, Number}: Temperature at the nodes for ZN2 scale [K].tgn2::NTuple{2, Number}: Temperature gradients at the end nodes for ZN2 scale.tn3::NTuple{5, Number}: Temperature at the nodes for ZN3 scale [K].tgn3::NTuple{2, Number}: Temperature gradients at the end nodes for ZN3 scale.
Returns
Number: Density [1 / cm³] ifxmis not 0, or the temperature [K] otherwise. The type is the promotion of the types of the numeric inputs.
SatelliteToolboxAtmosphericModels.AtmosphericModels._densu — Method
_densu(
h::T,
dlb::T,
tinf::T,
tlb::T,
xm::T,
α::T,
zlb::T,
s2::T,
g_lat::T,
r_lat::T,
tn1::NTuple{5, T},
tgn1::NTuple{2, T}
) where T<:Number -> T, NTuple{5, T}, NTuple{2, T}Compute the density [1 / cm³] or temperature [K] profiles according to the new lower thermo polynomial.
Arguments
h::T: Altitude [km].dlb::T: Density at lower boundary [1 / cm³].tinf::T: Exospheric temperature [K].tlb::T: Temperature at lower boundary [K].xm::T: Species molecular weight [ ].α::T: Thermal diffusion coefficient.zlb::T: Altitude at lower boundary [km].s2::T: Slope.g_lat::T: Reference gravity at the latitude [cm / s²].r_lat::T: Reference radius at the latitude [km].tn1::NTuple{5, T}: Temperature at nodes for ZN1 scale [K].tgn1::NTuple{2, T}: Temperature gradients at end nodes for ZN1 scale.
Returns
T: Density [1 / cm³] ifxmis not 0, or the temperature [K] otherwise.NTuple{5, T}: Updatedtn1.NTuple{2, T}: Updatedtgn1.
SatelliteToolboxAtmosphericModels.AtmosphericModels._dnet — Method
_dnet(dd::Number, dm::Number, zhm::Number, xmm::Number, xm::Number) -> NumberCompute the turbopause correction for MSIS models, returning the combined density.
Arguments
dd::Number: Diffusive density.dm::Number: Full mixed density.zhm::Number: Transition scale length.xmm::Number: Full mixed molecular weight.xm::Number: Species molecular weight.
SatelliteToolboxAtmosphericModels.AtmosphericModels._get_doy — Method
_get_doy(jd::Number) -> NumberReturn the day of the year for the Julian day jd.
SatelliteToolboxAtmosphericModels.AtmosphericModels._glob7s — Method
_glob7s(
nrlmsise00d::Nrlmsise00Structure{T},
p::AbstractVector{V}
) where {T<:Number, V<:Number} -> TCompute the function G(L) with lower atmosphere parameters p and the NRLMSISE-00 structure nrlmsise00d.
SatelliteToolboxAtmosphericModels.AtmosphericModels._globe7 — Method
_globe7(
nrlmsise00d::Nrlmsise00Structure{T},
p::AbstractVector{V}
) where {T<:Number, V<:Number} -> Nrlmsise00Structure{T}, TCompute the function G(L) with upper thermosphere parameters p and the NRLMSISE-00 structure nrlmsise00.
Returns
Nrlmsise00Structure{T}: Modified structurenrlmsise00d.T: Result ofG(L).
SatelliteToolboxAtmosphericModels.AtmosphericModels._gravity_and_effective_radius — Method
_gravity_and_effective_radius(ϕ_gd::T) where T<:Number -> T, TCompute the gravity [cm / s²] and effective radius [km] at the geodetic latitude ϕ_gd [°].
SatelliteToolboxAtmosphericModels.AtmosphericModels._gtd7 — Method
_gtd7(
nrlmsise00d::Nrlmsise00Structure{T}
) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}Compute the temperatures and densities using the information inside the structure nrlmsise00d without including the anomalous oxygen in the total density.
Returns
Nrlmsise00Structure{T}: Modified structurenrlmsise00d.Nrlmsise00Output{T}: Structure with the output information.
SatelliteToolboxAtmosphericModels.AtmosphericModels._gtd7d — Method
_gtd7d(
nrlmsise00d::Nrlmsise00Structure{T}
) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}Compute the temperatures and densities using the information inside the structure nrlmsise00d including the anomalous oxygen in the total density.
Returns
Nrlmsise00Structure{T}: Modified structurenrlmsise00d.Nrlmsise00Output{T}: Structure with the output information.
SatelliteToolboxAtmosphericModels.AtmosphericModels._gts7 — Method
_gts7(
nrlmsise00d::Nrlmsise00Structure{T}
) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}Compute the temperatures and densities using the information inside the structure nrlmsise00d for altitudes higher than 72.5 km (thermospheric portion of NRLMSISE-00). Notice that the anomalous oxygen is not included in the total density.
Returns
Nrlmsise00Structure{T}: Modified structurenrlmsise00d.Nrlmsise00Output{T}: Structure with the output information.
SatelliteToolboxAtmosphericModels.AtmosphericModels._g₀ — Method
_g₀(a::Number, abs_p25::Number, p26::Number) -> NumberCompute g₀ function (see Eq. A24d) using the coefficients abs_p25 = abs(p[25]) and p26 = p[26].
SatelliteToolboxAtmosphericModels.AtmosphericModels._harris_priester_mod_density_poly — Method
_harris_priester_mod_density_poly(F10ₐ::Number, i::Integer, c::Integer) -> NumberEvaluate the cubic polynomial in the flux F10ₐ [sfu] whose coefficients are stored in the columns c to c + 3 of the i-th row of _HARRIS_PRIESTER_MOD_COEFS, returning the related density [g / km³]. Notice that we build the coefficient tuple explicitly since splatting a runtime view into @evalpoly leads to dynamic dispatch and allocations.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_diurnal — Method
_jacchia1977_diurnal(
T½::Number,
Ωp::Number,
Ωs::Number,
δs::Number,
ϕ::Number,
z::Number,
M̄::Number
) -> NTuple{6, T}, NTuple{6, T}, TCompute the base-10 logarithm of the number densities considering the diurnal variation (routine DIVARI of [2] and eqs. 24 to 27 of [1]).
Arguments
T½::Number: Mean exospheric temperature [K].Ωp::Number: Right ascension of the selected location [rad].Ωs::Number: Right ascension of the Sun [rad].δs::Number: Declination of the Sun [rad].ϕ::Number: Latitude [rad].z::Number: Altitude [km].M̄::Number: Local mean molecular mass [g / mol].
Returns
NTuple{6, T}: Base-10 logarithm of the number densities [1 / m³] evaluated at the per-species pseudo exospheric temperatures, in the internal order (He, O₂, N₂, Ar, O, H), whereTis the promotion of the input types.NTuple{6, T}: Base-10 logarithm of the number densities [1 / m³] of the static model evaluated at the hydrogen pseudo exospheric temperature.T: Pseudo exospheric temperature of the hydrogen [K], used as the quiet temperature by the geomagnetic variation.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_dynamic — Method
_jacchia1977_dynamic(
z::Number,
ϕ::Number,
Ωp::Number,
Ωs::Number,
δs::Number,
λ::Number,
Φ::Number,
F10::Number,
F10ₐ::Number,
Kp::Number
) -> Jacchia1977OutputCompute the Jacchia 1977 dynamic model (routine ISDAMO of [2]).
Arguments
z::Number: Altitude [km].ϕ::Number: Latitude [rad].Ωp::Number: Right ascension of the selected location [rad].Ωs::Number: Right ascension of the Sun [rad].δs::Number: Declination of the Sun [rad].λ::Number: Longitude of the selected location [rad].Φ::Number: Fraction of the tropic year starting on January 1st [-].F10::Number: 10.7-cm solar flux [sfu].F10ₐ::Number: 10.7-cm averaged solar flux [sfu].Kp::Number: Kp geomagnetic index [-].
Returns
Jacchia1977Output: Structure containing the results obtained from the model. Its element type is the promotion of the types of the numeric inputs.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_geomagnetic — Method
_jacchia1977_geomagnetic(
T_quiet::Number,
Kp::Number,
ϕ::Number,
λ::Number,
z::Number
) -> NTuple{6, T}Compute the base-10 logarithm of the number densities of the static model evaluated at the exospheric temperature increased by the geomagnetic activity Kp [-], together with the homopause displacement and equatorial wave corrections (routine GEOACI of [2] and eqs. 28 to 35 of [1]), given the quiet exospheric temperature T_quiet [K], the latitude ϕ [rad], the longitude λ [rad], and the altitude z [km].
Returns
NTuple{6, T}: Base-10 logarithm of the number densities [1 / m³] in the internal order (He, O₂, N₂, Ar, O, H), whereTis the promotion of the input types. The caller must subtract the static model evaluated atT_quietto obtain the geomagnetic variation.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_profile_params — Method
_jacchia1977_profile_params(T∞::Number) -> NTuple{7, Number}Compute the parameters of the temperature profile (eqs. 1 to 4 of [1]) related to the exospheric temperature T∞ [K].
See also: _jacchia1977_temperature
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_seasonal_latitudinal — Method
_jacchia1977_seasonal_latitudinal(
Φ::Number,
δs::Number,
ϕ::Number,
z::Number
) -> NTuple{6, T}Compute the seasonal-latitudinal variation of the base-10 logarithm of the number densities (routine SEALAT of [2] and eqs. 36 to 39 of [1]) given the fraction of the tropic year Φ [-], the Sun declination δs [rad], the latitude ϕ [rad], and the altitude z [km]. The result is in the internal order (He, O₂, N₂, Ar, O, H), and T is the promotion of the input types.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_semiannual — Method
_jacchia1977_semiannual(Φ::Number, z::Number) -> NumberCompute the semiannual variation of the base-10 logarithm of the number densities (routine SEMIAN of [2] and eqs. 40 to 44 of [1]) given the fraction of the tropic year Φ [-] and the altitude z [km]. The variation is the same for all species.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_static — Method
_jacchia1977_static(T∞::T1, z::T2) where {T1<:Number, T2<:Number} -> NTuple{6, T}, T, TCompute the Jacchia 1977 static model (routine IMOWEI of [2]) for the exospheric temperature T∞ [K] and altitude z [km].
The function numerically integrates the barometric equation between 90 km and 100 km and the diffusion equations above 100 km using the Boole rule, as in the reference implementation [2]. The atomic hydrogen is anchored at 500 km and integrated with its flux term for other altitudes.
Returns
NTuple{6, T}: Base-10 logarithm of the number densities [1 / m³] in the internal order (He, O₂, N₂, Ar, O, H), whereTis the promotion ofT1andT2.T: Mean molecular mass at the selected altitude [g / mol].T: Total density at the selected altitude [kg / m³].
References
- [1] Jacchia, L. G (1977). Thermospheric temperature, density and composition: New models. SAO Special Report #375.
- [2] de Matos, B. S., Carrara, V (1985-1987). Fortran implementation of the Jacchia 1977 model. INPE, São José dos Campos, BR.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_step — Method
_jacchia1977_step(z_ini::Number, z_end::Number, base_step::Number) -> NumberCompute the integration step [km] so that the interval between z_ini and z_end [km] is divided into an integer number of Boole rule applications with a step close to base_step [km], as in the reference implementation [2].
SatelliteToolboxAtmosphericModels.AtmosphericModels._jacchia1977_temperature — Method
_jacchia1977_temperature(z::Number, c::NTuple{7, T}) where {T<:Number} -> NumberCompute the temperature [K] at the altitude z [km] using the profile parameters c obtained from _jacchia1977_profile_params (eqs. 3 and 4 of [1]).
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_gravity — Method
_jb2008_gravity(z::Number) -> NumberCompute the gravity [m / s²] at altitude z [km] according to the model Jacchia 1971 [3].
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_high_altitude — Method
_jb2008_high_altitude(h::Number, F10ₐ::Number) -> NumberCompute the high altitude exospheric density correction factor [-] at the altitude h [km] given the averaged 10.7-cm solar flux F10ₐ [sfu], which must be obtained using an 81-day window centered on the input time, using the model in Section 6.2 of [2].
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_mean_molecular_mass — Method
_jb2008_mean_molecular_mass(z::Number; kwargs...) -> NumberCompute the mean molecular mass [g / mol] at the altitude z [km] using the empirical profile in eq. 1 [3], which is valid only between 90 km and 105 km.
Keywords
verbose::Val: Set toVal(true)to emit a warning when the altitude is outside the validity range, or toVal(false)to suppress it. (Default:Val(true))
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_semiannual — Method
_jb2008_semiannual(
doy::Number,
h::Number,
F10ₐ::Number,
S10ₐ::Number,
M10ₐ::Number
) -> Number, Number, NumberCompute the semiannual density variation considering the JB2008 model [1].
Arguments
doy::Number: Day of the year plus the fraction of the day [-].h::Number: Height [km].F10ₐ::Number: Averaged 10.7-cm flux, which must use an 81-day window centered on the input time [sfu].S10ₐ::Number: EUV 81-day averaged centered index.M10ₐ::Number: MG2 81-day averaged centered index.
Returns
Number: SemiannualF(z)height function, clamped to be equal or higher than 10⁻⁶.Number: SemiannualG(t)yearly periodic function.Number: Semiannual variation of the densityΔsalog₁₀ρ.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_temperature — Method
_jb2008_temperature(z::Number, Tx::Number, T∞::Number) -> NumberCompute the temperature [K] at height z [km] given the temperature Tx [K] at the inflection point, and the exospheric temperature T∞ [K] according to the theory of the model Jacchia 1971 [3]. The inflection point is considered to be z = 125 km.
The function throws an ArgumentError if z is lower than 90 km or if T∞ is negative.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_ΔTc — Method
_jb2008_ΔTc(F10::Number, lst::Number, ϕ_gd::Number, h::Number) -> NumberCompute the correction ΔTc [K] in the exospheric temperature for the Jacchia-Bowman model.
This correction is mentioned in [2]. However, the equations do not seem to match those in the source-code. The ones implemented here are exactly the same as in the source-code.
Arguments
F10::Number: 10.7-cm solar flux [sfu].lst::Number: Local solar time (0 - 24) [hr].ϕ_gd::Number: Geodetic latitude [rad].h::Number: Altitude [km].
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_δf1 — Method
_jb2008_δf1(z::Number, Tx::Number, T∞::Number; kwargs...) -> NumberCompute the integrand M̄´ g / T used by _jb2008_∫ between 90 km and 105 km at the altitude z [km] given the temperature Tx [K] at the inflection point and the exospheric temperature T∞ [K].
Keywords
verbose::Val: Set toVal(true)to emit warnings from the internal functions, or toVal(false)to suppress them. (Default:Val(true))
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_δf2 — Method
_jb2008_δf2(z::Number, Tx::Number, T∞::Number; kwargs...) -> NumberCompute the integrand g / T used by _jb2008_∫ above 105 km at the altitude z [km] given the temperature Tx [K] at the inflection point and the exospheric temperature T∞ [K].
Keywords
verbose::Val: Set toVal(true)to emit warnings from the internal functions, or toVal(false)to suppress them. (Default:Val(true))
SatelliteToolboxAtmosphericModels.AtmosphericModels._jb2008_∫ — Method
_jb2008_∫(
z₀::Number,
z₁::Number,
R::Number,
Tx::Number,
T∞::Number,
δf::Function;
kwargs...
) -> Number, NumberCompute the integral of the function δf between the altitudes z₀ and z₁ [km] using the Newton-Cotes 4th degree method, where R defines the step size [-], Tx is the temperature at the inflection point [K], and T∞ is the exospheric temperature [K]. The integrand function δf must be _jb2008_δf1 or _jb2008_δf2.
Keywords
verbose::Val: Set toVal(true)to emit warnings from the internal functions, or toVal(false)to suppress them. (Default:Val(true))
Returns
Number: Value of the integral.Number: Last value ofz[km] used in the numerical algorithm.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jr1971_S — Method
_jr1971_S(
z::Number,
B₀::Number,
B₁::Number,
B₂::Number,
B₃::Number,
B₄::Number,
B₅::Number
) -> NumberCompute the S(z) polynomial [1, p. 371] at the altitude z [km] given its coefficients B₀ to B₅.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jr1971_U — Method
_jr1971_U(ν::Number, Ra::Number, x::Number, y::Number, r₁::Number, r₂::Number) -> NumberCompute the partial-fraction helper function U(ν) [1, p. 372] given the mean Earth radius Ra [km], the real roots r₁ and r₂ [km], and the real and imaginary parts x and y [km] of the complex root of the quartic polynomial.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jr1971_V — Method
_jr1971_V(ν::Number, x::Number, y::Number, r₁::Number, r₂::Number) -> NumberCompute the partial-fraction helper function V(ν) [1, p. 372] given the real roots r₁ and r₂ [km], and the real and imaginary parts x and y [km] of the complex root of the quartic polynomial.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jr1971_W — Method
_jr1971_W(ν::Number, Ra::Number, x::Number, y::Number, r₁::Number, r₂::Number) -> NumberCompute the partial-fraction helper function W(ν) [1, p. 372] given the mean Earth radius Ra [km], the real roots r₁ and r₂ [km], and the real and imaginary parts x and y [km] of the complex root of the quartic polynomial. Notice that the equation for W in [1] is incorrect and the corrected form from [3, 4] is used.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jr1971_mean_molecular_mass — Method
_jr1971_mean_molecular_mass(z::Number; kwargs...) -> NumberCompute the mean molecular mass [g / mol] at the altitude z [km] using the empirical profile in eq. 1 [3, 4], which is valid only between 90 km and 100 km.
Keywords
verbose::Val: Set toVal(true)to emit a warning when the altitude is outside the validity range, or toVal(false)to suppress it. (Default:Val(true))
SatelliteToolboxAtmosphericModels.AtmosphericModels._jr1971_roots — Method
_jr1971_roots(c₀::Number, c₁::Number, c₂::Number, c₃::Number) -> T, T, T, TCompute the roots of the monic quartic polynomial:
P(z) = z⁴ + c₃ ⋅ z³ + c₂ ⋅ z² + c₁ ⋅ z + c₀,which is necessary to compute the density below 125 km. The model theory states that this polynomial always has two distinct real roots and one complex conjugate pair [1].
The algorithm uses the Ferrari method: the depressed quartic is split into two quadratic factors whose coefficients are obtained from the largest root of the resolvent cubic, computed by the Cardano method. The real roots are polished with Newton iterations and the complex pair is recovered from the Vieta relations, keeping the accuracy close to the machine precision. Since only closed-form expressions are used, this function does not allocate and is compatible with automatic differentiation.
Returns
T: Highest real rootr₁, whereTis the promotion of the input types to float.T: Lowest real rootr₂.T: Real partxof the complex conjugate pair.T: Positive imaginary partyof the complex conjugate pair.
SatelliteToolboxAtmosphericModels.AtmosphericModels._jr1971_temperature — Method
_jr1971_temperature(z::Number, Tx::Number, T∞::Number) -> NumberCompute the temperature [K] at height z [km] according to the theory of the model Jacchia-Roberts 1971 [1, 3, 4] given the temperature Tx [K] at the inflection point and the exospheric temperature T∞ [K]. The inflection point is considered to be z = 125 km.
The function throws an ArgumentError if z is lower than 90 km or if T∞ is negative.
SatelliteToolboxAtmosphericModels.AtmosphericModels._scale_height — Method
_scale_height(h::Number, xm::Number, temp::Number, g_lat::Number, r_lat::Number) -> NumberCompute the scale height.
Arguments
h::Number: Altitude [km].xm::Number: Species molecular weight [ ].temp::Number: Temperature [K].g_lat::Number: Reference gravity at desired latitude [cm / s²].r_lat::Number: Reference radius at desired latitude [km].
SatelliteToolboxAtmosphericModels.AtmosphericModels._scale_height_junk — Method
_scale_height_junk(
xbar::AbstractVector{<:Number},
h::Number,
H_ρ_min::AbstractVector{<:Number},
H_ρ_max::AbstractVector{<:Number}
) -> Number, Number, NumberCompute the scale heights at the altitude h [km] using the Junkins / Jancaitis weighting method for third-order continuity [1, Section 3.2], given the abscissas xbar [km] of the blending interval and the minimum and maximum density scale heights H_ρ_min and H_ρ_max [km] at its borders.
Returns
Number: Weighting function value [-].Number: Blended minimum density scale height [km].Number: Blended maximum density scale height [km].
SatelliteToolboxAtmosphericModels.AtmosphericModels._sg₀ — Method
_sg₀(ex::Number, ap::AbstractVector, abs_p25::Number, p26::Number) -> NumberCompute the sg₀ function (see Eq. A24a) using the ap vector and the coefficients abs_p25 and p26.
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline — Method
_spline(
x::NTuple{N, T},
y::NTuple{N, T},
∂²y::NTuple{N, T},
xᵢ::T
) where {N, T<:Number} -> float(T)Compute the interpolation of the cubic spline y(x) with second derivatives ∂²y at xᵢ.
Arguments
x::NTuple{N, T}: X components of the tabulated function in ascending order.y::NTuple{N, T}: Y components of the tabulated function evaluated atx.∂²y::NTuple{N, T}: Second derivatives ofy(x)∂²y/∂x²evaluated atx.xᵢ::T: Point to compute the interpolation.
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline_∂² — Method
_spline_∂²(
x::NTuple{N, T},
y::NTuple{N, T},
∂²y₁::T,
∂²yₙ::T
) where {N, T<:Number} -> NTuple{N, T}Compute the 2nd derivatives of the cubic spline interpolation y(x) given the 2nd derivatives at x[1] (∂²y₁) and at x[N] (∂²yₙ). This functions return a tuple with the evaluated 2nd derivatives at each point in x.
Values higher than 0.99e30 in the 2nd derivatives at the borders (∂²y₁ and ∂²yₙ) are interpreted as 0.
Arguments
x::NTuple{N, T}: X components of the tabulated function in ascending order.y::NTuple{N, T}: Y components of the tabulated function evaluated atx.∂²y₁::T: Second derivative ofy(x)∂²y/∂x²evaluated atx[1].∂²yₙ::T: Second derivative ofy(x)∂²y/∂x²evaluated atx[N].
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline_∫ — Method
_spline_∫(
x::NTuple{N, T},
y::NTuple{N, T},
∂²y::NTuple{N, T},
xf::Number
) where {N, T<:Number} -> float(T)Compute the integral of the cubic spline function y(x) from x[1] to xf, where the function second derivatives evaluated at x are ∂²y.
Arguments
x::NTuple{N, T}: X components of the tabulated function in ascending order.y::NTuple{N, T}: Y components of the tabulated function evaluated atx.∂²y::NTuple{N, T}: Second derivatives ofy(x)∂²y/∂x²evaluated atx.xf::Number: Abscissa endpoint for integration.
SatelliteToolboxAtmosphericModels.AtmosphericModels._ζ — Method
_ζ(r_lat::Number, zz::Number, zl::Number) -> NumberCompute the zeta function.
SatelliteToolboxAtmosphericModels.AtmosphericModels.exponential — Method
exponential(h::Number) -> NumberCompute the atmospheric density [kg / m³] at the altitude h [m] above the ellipsoid using the exponential atmospheric model:
┌ ┐
│ h - h₀ │
ρ(h) = ρ₀ . exp │ - ──────── │ ,
│ H │
└ ┘in which ρ₀, h₀, and H are parameters obtained from tables that depend only on h.
SatelliteToolboxAtmosphericModels.AtmosphericModels.harrispriester — Method
harrispriester(
instant::DateTime,
ϕ_gd::Number,
λ::Number,
h::Number;
kwargs...
) -> Number
harrispriester(jd::Number, ϕ_gd::Number, λ::Number, h::Number; kwargs...) -> NumberCompute the atmospheric density [kg / m³] using the Harris-Priester model.
The model is valid only inside the altitude range of the density profile alt_ρ (100 km to 1000 km for the default profile). The function throws an ArgumentError if the altitude h is lower than the minimum altitude in the profile, and returns zero if it is higher than the maximum altitude.
Arguments
instant::DateTime: Instant to compute the model represented usingDateTime.jd::Number: Julian day to compute the model.ϕ_gd::Number: Geodetic latitude [rad].λ::Number: Geodetic longitude [rad].h::Number: Geodetic altitude [m].
Keywords
n::Int: Cosine exponent in the diurnal bulge modeling (2 <= n <= 6). Ifnis2, it models a smooth transition, whereas ifnis6, it models a sharp transition. (Default:4)alt_ρ::AbstractMatrix: Matrix containing the minimum and maximum density profiles, where the columns are the altitude [m], the minimum density [kg / m³], and the maximum density [kg / m³], respectively. (Default:_HARRIS_PRIESTER_ALT_RHO, related to the mean solar activity)
Returns
Number: Atmospheric density [kg / m³]. The type is the promotion of the types of the numeric inputs.
SatelliteToolboxAtmosphericModels.AtmosphericModels.harrispriester_modified — Method
harrispriester_modified(
instant::DateTime,
ϕ_gd::Number,
λ::Number,
h::Number[, F10ₐ::Number];
kwargs...
) -> Number
harrispriester_modified(
jd::Number,
ϕ_gd::Number,
λ::Number,
h::Number[, F10ₐ::Number];
kwargs...
) -> NumberCompute the atmospheric density [kg / m³] using the modified Harris-Priester model.
This model is a Julia translation of the Fortran code harris_priester_mod_dist.f90 developed by Noble Hatten and Ryan P. Russell [1]. It ensures continuous first derivatives, eliminates singularities, and uses a cubic dependency on the 81-day centered average of the F10.7 solar flux index (F10ₐ) to model density variations.
If F10ₐ is not provided, it will be automatically fetched using the SpaceIndices package. In this case, the initialization of the space indices package with SpaceIndices.init() is required.
Arguments
instant::DateTime: Instant to compute the model represented usingDateTime.jd::Number: Julian day to compute the model.ϕ_gd::Number: Geodetic latitude [rad].λ::Number: Geodetic longitude [rad].h::Number: Geodetic altitude [m].F10ₐ::Number: 81-day centered average of the F10.7 solar flux index [sfu].
Keywords
n::Number: Cosine exponent in the diurnal bulge modeling. The original Fortran implementation computesnfrom the orbital inclination asn = 2.001 + 4 sin²(inclination). Hence, usen = 2.001for equatorial orbits,n = 6.001for polar orbits, and interpolate for intermediate inclinations. If the orbital inclination is unknown, the default provides a reasonable approximation. This functionality was purposefully removed here to avoid needing an additional dependency. (Default:4)
Returns
Number: Atmospheric density [kg / m³]. The type is the promotion of the types of the numeric inputs.
References
- [1] Hatten, N., & Russell, R. P. (2017). A smooth and robust Harris-Priester atmospheric density model for low Earth orbit applications. Advances in Space Research, 59(2), 571-586.
SatelliteToolboxAtmosphericModels.AtmosphericModels.jacchia1977 — Method
jacchia1977(
instant::DateTime,
ϕ_gd::Number,
λ::Number,
h::Number[, F10::Number, F10ₐ::Number, Kp::Number];
kwargs...
) -> Jacchia1977Output
jacchia1977(
jd::Number,
ϕ_gd::Number,
λ::Number,
h::Number[, F10::Number, F10ₐ::Number, Kp::Number];
kwargs...
) -> Jacchia1977OutputCompute the atmospheric density using the Jacchia 1977 model.
Unlike the Jacchia-Roberts 1971 model, the Jacchia 1977 model does not have a closed-form solution. Hence, the barometric and diffusion equations are numerically integrated here, making this model considerably slower than jr1971.
If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant using the prescriptions in the report [1]: the daily flux is evaluated with a lag that depends on the solar hour angle, the averaged flux is a Gaussian-weighted mean with a standard width of 71 days centered on the input time, and the Kp is delayed by an interval that depends on the geomagnetic latitude. However, the indices must be already initialized using the function SpaceIndices.init(). Notice that the Gaussian-weighted mean requires the indices to be available up to 213 days after the input time.
The function throws an ArgumentError if the altitude h is outside the interval [90, 2000] km.
Arguments
jd::Number: Julian day to compute the model.instant::DateTime: Instant to compute the model represented usingDateTime.ϕ_gd::Number: Geodetic latitude [rad].λ::Number: Longitude [rad].h::Number: Altitude [m].F10::Number: 10.7-cm solar flux [sfu], evaluated with the lag prescribed in [1] (from 0.9 day to 1.6 days, depending on the local solar time).F10ₐ::Number: 10.7-cm averaged solar flux, Gaussian-weighted mean centered on the input time with a standard width of 71 days [sfu].Kp::Number: Kp geomagnetic index, delayed by 0.1 day to 0.3 day depending on the geomagnetic latitude, as prescribed in [1].
Keywords
verbose::Val: Set toVal(true)to emit debug messages related to the automatic space index fetching, or toVal(false)to suppress them. Notice that this keyword must be aValobject, not aBool, and it is only available in the methods that fetch the space indices automatically. (Default:Val(true))
Returns
Jacchia1977Output: Structure containing the results obtained from the model. Its element type is the promotion of the types of the numeric inputs.
References
- [1] Jacchia, L. G (1977). Thermospheric temperature, density and composition: New models. SAO Special Report #375.
- [2] de Matos, B. S., Carrara, V (1985-1987). Fortran implementation of the Jacchia 1977 model. INPE, São José dos Campos, BR.
SatelliteToolboxAtmosphericModels.AtmosphericModels.jb2008 — Method
jb2008(instant::DateTime, ϕ_gd::Number, λ::Number, h::Number; kwargs...) -> JB2008Output
jb2008(
instant::DateTime,
ϕ_gd::Number,
λ::Number,
h::Number,
F10::Number,
F10ₐ::Number,
S10::Number,
S10ₐ::Number,
M10::Number,
M10ₐ::Number,
Y10::Number,
Y10ₐ::Number,
DstΔTc::Number;
kwargs...
) -> JB2008Output
jb2008(jd::Number, ϕ_gd::Number, λ::Number, h::Number; kwargs...) -> JB2008Output
jb2008(
jd::Number,
ϕ_gd::Number,
λ::Number,
h::Number,
F10::Number,
F10ₐ::Number,
S10::Number,
S10ₐ::Number,
M10::Number,
M10ₐ::Number,
Y10::Number,
Y10ₐ::Number,
DstΔTc::Number;
kwargs...
) -> JB2008OutputCompute the atmospheric density using the Jacchia-Bowman 2008 (JB2008) model.
This model is a product of the Space Environment Technologies, please, refer to the following website for more information:
https://spacewx.com/JB2008/
If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().
Arguments
jd::Number: Julian day to compute the model.instant::DateTime: Instant to compute the model represented usingDateTime.ϕ_gd: Geodetic latitude [rad].λ: Longitude [rad].h: Altitude [m].F10: 10.7-cm solar flux [sfu] obtained 1 day beforejd.F10ₐ: 10.7-cm averaged solar flux using a 81-day window centered on input time obtained 1 day beforejd.S10: EUV index (26-34 nm) scaled to F10.7 obtained 1 day beforejd.S10ₐ: EUV 81-day averaged centered index obtained 1 day beforejd.M10: MG2 index scaled to F10.7 obtained 2 days beforejd.M10ₐ: MG2 81-day averaged centered index obtained 2 days beforejd.Y10: Solar X-ray & Ly-α index scaled to F10.7 obtained 5 days beforejd.Y10ₐ: Solar X-ray & Ly-α 81-day averaged centered index obtained 5 days beforejd.DstΔTc: Temperature variation related to the Dst.
Keywords
verbose::Val: Set toVal(true)to emit debug messages related to the automatic space index fetching, or toVal(false)to suppress them. Notice that this keyword must be aValobject, not aBool. (Default:Val(true))
Returns
JB2008Output: Structure containing the results obtained from the model. Its element type is the promotion of the types of the numeric inputs.
SatelliteToolboxAtmosphericModels.AtmosphericModels.jr1971 — Method
jr1971(
instant::DateTime,
ϕ_gd::Number,
λ::Number,
h::Number;
kwargs...
) -> JR1971Output
jr1971(
instant::DateTime,
ϕ_gd::Number,
λ::Number,
h::Number,
F10::Number,
F10ₐ::Number,
Kp::Number;
kwargs...
) -> JR1971Output
jr1971(jd::Number, ϕ_gd::Number, λ::Number, h::Number; kwargs...) -> JR1971Output
jr1971(
jd::Number,
ϕ_gd::Number,
λ::Number,
h::Number,
F10::Number,
F10ₐ::Number,
Kp::Number;
kwargs...
) -> JR1971OutputCompute the atmospheric density using the Jacchia-Roberts 1971 model.
If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().
The function throws an ArgumentError if the altitude h is lower than 90 km.
Arguments
jd::Number: Julian day to compute the model.instant::DateTime: Instant to compute the model represented usingDateTime.ϕ_gd::Number: Geodetic latitude [rad].λ::Number: Longitude [rad].h::Number: Altitude [m].F10::Number: 10.7-cm solar flux [sfu].F10ₐ::Number: 10.7-cm averaged solar flux, 81-day centered on input time [sfu].Kp::Number: Kp geomagnetic index with a delay of 3 hours.
Keywords
verbose::Val: Set toVal(true)to emit debug messages related to the automatic space index fetching, or toVal(false)to suppress them. Notice that this keyword must be aValobject, not aBool. (Default:Val(true))roots_container::Union{Nothing, AbstractVector}: This keyword is not used anymore and is kept only for backward compatibility. The quartic polynomial roots are now computed using a closed-form algorithm that does not allocate. (Default:nothing)
Returns
JR1971Output: Structure containing the results obtained from the model. Its element type is the promotion of the types of the numeric inputs.
SatelliteToolboxAtmosphericModels.AtmosphericModels.nrlmsise00 — Method
nrlmsise00(
instant::DateTime,
h::Number,
ϕ_gd::Number,
λ::Number;
kwargs...
) -> Nrlmsise00Output
nrlmsise00(
instant::DateTime,
h::Number,
ϕ_gd::Number,
λ::Number,
F10ₐ::Number,
F10::Number,
ap::Union{Number, AbstractVector};
kwargs...
) -> Nrlmsise00Output
nrlmsise00(
jd::Number,
h::Number,
ϕ_gd::Number,
λ::Number;
kwargs...
) -> Nrlmsise00Output
nrlmsise00(
jd::Number,
h::Number,
ϕ_gd::Number,
λ::Number,
F10ₐ::Number,
F10::Number,
ap::Union{Number, AbstractVector};
kwargs...
) -> Nrlmsise00OutputCompute the atmospheric density using the NRLMSISE-00 model.
If we omit all space indices, the system tries to obtain them automatically for the selected day jd or instant. However, the indices must be already initialized using the function SpaceIndices.init().
Arguments
instant::DateTime: Instant to compute the model represented usingDateTime.jd::Number: Julian day to compute the model.h::Number: Altitude [m].ϕ_gd::Number: Geodetic latitude [rad].λ::Number: Longitude [rad].F10ₐ::Number: 10.7-cm averaged solar flux, 81-day centered on input time [sfu].F10::Number: 10.7-cm solar flux [sfu].ap::Union{Number, AbstractVector}: Magnetic index, see the section AP for more information.
Keywords
flags::Nrlmsise00Flags: A list of flags to configure the model. For more information, seeNrlmsise00Flags. (Default:Nrlmsise00Flags())include_anomalous_oxygen::Bool: Iftrue, the anomalous oxygen density will be included in the total density computation. (Default:true)P::Union{Nothing, Matrix}: If the user passes a matrix with dimensions equal to or greater than 8 × 4, it will be used when computing the Legendre associated functions, reducing allocations and improving the performance. If it isnothing, the matrix is allocated inside the function. (Default:nothing)verbose::Val: Set toVal(true)to emit debug messages related to the automatic space index fetching, or toVal(false)to suppress them. Notice that this keyword must be aValobject, not aBool, and it is only available in the methods that fetch the space indices automatically. (Default:Val(true))
Returns
Nrlmsise00Output: Structure containing the results obtained from the model. Its element type is the promotion of the types of the numeric inputs.
AP
The input variable ap contains the magnetic index. It can be a Number or an AbstractVector.
If ap is a number, it must contain the daily magnetic index.
If ap is an AbstractVector, it must be a vector with 7 elements as described below:
| Index | Description |
|---|---|
| 1 | Daily AP. |
| 2 | 3 hour AP index for current time. |
| 3 | 3 hour AP index for 3 hours before current time. |
| 4 | 3 hour AP index for 6 hours before current time. |
| 5 | 3 hour AP index for 9 hours before current time. |
| 6 | Average of eight 3 hour AP indices from 12 to 33 hours prior to current time. |
| 7 | Average of eight 3 hour AP indices from 36 to 57 hours prior to current time. |
Extended help
- The densities of
O,H, andNare set to0below72.5 km. - The exospheric temperature is set to global average for altitudes below
120 km. The120 kmgradient is left at global average value for altitudes below72.5 km. - Anomalous oxygen is defined as hot atomic oxygen or ionized oxygen that can become appreciable at high altitudes (
> 500 km) for some ranges of inputs, thereby affecting drag on satellites and debris. We group these species under the term Anomalous Oxygen, since their individual variations are not presently separable with the drag data used to define this model component.
Notes on Input Variables
F10 and F10ₐ values used to generate the model correspond to the 10.7 cm radio flux at the actual distance of the Earth from the Sun rather than the radio flux at 1 AU. The following site provides both classes of values:
ftp://ftp.ngdc.noaa.gov/STP/SOLAR_DATA/SOLAR_RADIO/FLUX/F10, F10ₐ, and ap effects are neither large nor well established below 80 km and these parameters should be set to 150, 150, and 4 respectively.
If include_anomalous_oxygen is false, the total_density field in the output is the sum of the mass densities of the species He, O, N₂, O₂, Ar, H, and N, but does not include anomalous oxygen.
If include_anomalous_oxygen is true, the total_density field in the output is the effective total mass density for drag and is the sum of the mass densities of all species in this model including the anomalous oxygen.