Library
Documentation for SatelliteToolboxGravityModels.jl
.
SatelliteToolboxGravityModels.fetch_icgem_file
— Methodfetch_icgem_file(url::AbstractString; kwargs...) -> String
fetch_icgem_file(model::Symbol; kwargs...) -> String
Fetch a ICGEM file from the url
and return its file path to be parsed with the function GravityModels.load
. If the file already exists, it will not be re-downloaded unless the keyword force = true
is passed.
A symbol can be passed instead the URL to fetch pre-configured gravity field models. The supported values are:
:EGM96
: Earth Gravitational Model from 1996.:EGM2008
: Earth Gravitational Model from 2008.:JGM2
: Joint Gravity Model 2.:JGM3
: Joint Gravity Model 3.
Examples
julia> fetch_icgem_file(:EGM96)
[ Info: Downloading the ICGEM file 'EGM96.gfc' from 'http://icgem.gfz-potsdam.de/getmodel/gfc/971b0a3b49a497910aad23cd85e066d4cd9af0aeafe7ce6301a696bed8570be3/EGM96.gfc'...
"/Users/ronan.arraes/.julia/scratchspaces/bd9e9728-6f7b-4d28-9e50-c765cb1b7c8c/icgem/EGM96.gfc"
julia> fetch_icgem_file(:EGM96)
"/Users/ronan.arraes/.julia/scratchspaces/bd9e9728-6f7b-4d28-9e50-c765cb1b7c8c/icgem/EGM96.gfc"
SatelliteToolboxGravityModels.icgem_coefficients
— Methodicgem_coefficients(model::IcgemFile{T}, degree::Int, order::Int, time::Union{Number, DateTime}) where T<:Number -> T, T
Compute the ICGEM coefficients (Clm
and Slm
) of the model
for the specified degree
and order
in the instant time
.
time
can be expressed using a DateTime
object or the number of ellapsed seconds from J2000.0 epoch (2000-01-01T12:00:00.000).
SatelliteToolboxGravityModels.parse_icgem
— Functionparse_icgem(filename::AbstractString, T::DataType = Float64) -> IcgemFile
Parse the ICGEM file filename
using the data type T
.
T
is converted to float to obtain the output type.
SatelliteToolboxGravityModels.GravityModels.AbstractGravityModel
— Typeabstract type AbstractGravityModel{T<:Number}
Abstract data type of all gravity models.
SatelliteToolboxGravityModels.GravityModels.coefficient_norm
— Functioncoefficient_norm(model::AbstractGravityModel) where T<:Number -> Symbol
Return the normalization we must use in the spherical harmonics when computing the Legendre associated functions. The accepted values are:
:full
: Use full normalization.:schmidt
: Use Schmidt quasi-normalization.:unnormalized
: Do not perform normalization.
SatelliteToolboxGravityModels.GravityModels.coefficients
— Functioncoefficients(model::AbstractGravityModel{T}, degree::Int, order::Int[, time::Union{Number, DateTime}]) where T<:Number -> T, T
Return the Clm
and Slm
coefficients of the gravity model
for the specified degree
, order
, and time
. If the latter argument is omitted, the J2000.0 epoch is used.
time
can be expressed using a DateTime
object or the number of ellapsed seconds from J2000.0 epoch.
SatelliteToolboxGravityModels.GravityModels.gravitational_acceleration
— Methodgravitational_acceleration(model::AbstractGravityModel{Number}, r::AbstractVector{Number}[, time::Union{Number, DateTime}]; kwargs...) -> NTuple{3, RT}
Compute the gravitational acceleration [m / s²] represented in ITRF using the model
in the position r
[m], also represented in ITRF, at instant time
. If the latter argument is omitted, the J2000.0 epoch is used (2000-01-01T12:00:00).
time
can be expressed using a DateTime
object or the number of ellapsed seconds from J2000.0 epoch.
Gravitational acceleration is the acceleration caused by the central body mass only, i.e., without considering the centrifugal potential.
Keywords
max_degree::Int
: Maximum degree used in the spherical harmonics when computing the gravitational field derivative. If it is higher than the available number of coefficients in themodel
, it will be clamped. If it is lower than 0, it will be set to the maximum degree available. (Default = -1)max_order::Int
: Maximum order used in the spherical harmonics when computing the gravitational field derivative. If it is higher thanmax_degree
, it will be clamped. If it is lower than 0, it will be set to the same value asmax_degree
. (Default = -1)P::Union{Nothing, AbstractMatrix}
: An optional matrix that must contain at leastmax_degree + 1 × max_degree + 1
real numbers that will be used to store the Legendre coefficients, reducing the allocations. If it isnothing
, the matrix will be created when calling the function. (Default =nothing
)dP::Union{Nothing, AbstractMatrix}
: An optional matrix that must contain at leastmax_degree + 1 × max_degree + 1
real numbers that will be used to store the Legendre derivative coefficients, reducing the allocations. If it isnothing
, the matrix will be created when calling the function. (Default =nothing
)
Returns
RT
: The derivative of the gravitational field w.r.t. the radius (∂U/∂r
).RT
: The derivative of the gravitational field w.r.t. the geocentric latitude (∂U/∂ϕ
).RT
: The derivative of the gravitational field w.r.t. the longitude (∂U/∂λ
).
SatelliteToolboxGravityModels.GravityModels.gravitational_field_derivative
— Methodgravitational_field_derivative(model::AbstractGravityModel{Number}, r::AbstractVector{Number}[, time::Union{Number, DateTime}]; kwargs...) -> NTuple{3, RT}
Compute the gravitational field derivative [SI] with respect to the spherical coordinates (∂U/∂r
, ∂U/∂ϕ
, ∂U/∂λ
) using the model
in the position r
[m], represented in ITRF, at instant time
. If the latter argument is omitted, the J2000.0 epoch is used.
time
can be expressed using a DateTime
object or the number of ellapsed seconds from J2000.0 epoch.
In this case, ϕ
is the geocentric latitude and λ
is the longitude.
Keywords
max_degree::Int
: Maximum degree used in the spherical harmonics when computing the gravitational field derivative. If it is higher than the available number of coefficients in themodel
, it will be clamped. If it is lower than 0, it will be set to the maximum degree available. (Default = -1)max_order::Int
: Maximum order used in the spherical harmonics when computing the gravitational field derivative. If it is higher thanmax_degree
, it will be clamped. If it is lower than 0, it will be set to the same value asmax_degree
. (Default = -1)P::Union{Nothing, AbstractMatrix}
: An optional matrix that must contain at leastmax_degree + 1 × max_degree + 1
real numbers that will be used to store the Legendre coefficients, reducing the allocations. If it isnothing
, the matrix will be created when calling the function. (Default =nothing
)dP::Union{Nothing, AbstractMatrix}
: An optional matrix that must contain at leastmax_degree + 1 × max_degree + 1
real numbers that will be used to store the Legendre derivative coefficients, reducing the allocations. If it isnothing
, the matrix will be created when calling the function. (Default =nothing
)
Returns
RT
: The derivative of the gravitational field w.r.t. the radius (∂U/∂r
).RT
: The derivative of the gravitational field w.r.t. the geocentric latitude (∂U/∂ϕ
).RT
: The derivative of the gravitational field w.r.t. the longitude (∂U/∂λ
).
SatelliteToolboxGravityModels.GravityModels.gravity_acceleration
— Methodgravity_acceleration(model::AbstractGravityModel{Number}, r::AbstractVector{Number}[, time::Union{Number, DataTime}]; kwargs...) -> NTuple{3, RT}
Compute the gravity acceleration [m / s²] represented in ITRF using the model
in the position r
[m], also represented in ITRF, at instant time
. If the latter argument is omitted, the J2000.0 epoch is used.
time
can be expressed using a DateTime
object or the number of ellapsed seconds from J2000.0 epoch.
Gravity acceleration is the compound acceleration caused by the central body mass and the centrifugal force due to the planet's rotation.
Keywords
max_degree::Int
: Maximum degree used in the spherical harmonics when computing the gravitational field derivative. If it is higher than the available number of coefficients in themodel
, it will be clamped. If it is lower than 0, it will be set to the maximum degree available. (Default = -1)max_order::Int
: Maximum order used in the spherical harmonics when computing the gravitational field derivative. If it is higher thanmax_degree
, it will be clamped. If it is lower than 0, it will be set to the same value asmax_degree
. (Default = -1)P::Union{Nothing, AbstractMatrix}
: An optional matrix that must contain at leastmax_degree + 1 × max_degree + 1
real numbers that will be used to store the Legendre coefficients, reducing the allocations. If it isnothing
, the matrix will be created when calling the function. (Default =nothing
)dP::Union{Nothing, AbstractMatrix}
: An optional matrix that must contain at leastmax_degree + 1 × max_degree + 1
real numbers that will be used to store the Legendre derivative coefficients, reducing the allocations. If it isnothing
, the matrix will be created when calling the function. (Default =nothing
)
Returns
RT
: The derivative of the gravitational field w.r.t. the radius (∂U/∂r
).RT
: The derivative of the gravitational field w.r.t. the geocentric latitude (∂U/∂ϕ
).RT
: The derivative of the gravitational field w.r.t. the longitude (∂U/∂λ
).
SatelliteToolboxGravityModels.GravityModels.gravity_constant
— Functiongravity_constant(model::AbstractGravityModel{T}) where T<:Number -> T
Return the gravity constant [m³ / s²] for the gravity model.
SatelliteToolboxGravityModels.GravityModels.load
— Functionload(::Type{T}, args...; kwargs...) where T<:AbstractGravityModel -> T
Load a gravity model of type T
using the arguments args...
and keywords kwargs...
.
SatelliteToolboxGravityModels.GravityModels.maximum_degree
— Functionmaximum_degree(model::AbstractGravityModel) -> Int
Return the maximum degree of the gravity model
.
SatelliteToolboxGravityModels.GravityModels.radius
— Functionradius(model::AbstractGravityModel{T}) where T<:Number -> T
Return the radius [m] for the gravity model.