Library
Documentation for SatelliteToolboxGravityModels.jl.
SatelliteToolboxGravityModels.fetch_icgem_file — Methodfetch_icgem_file(url::AbstractString; kwargs...) -> String
fetch_icgem_file(model::Symbol; kwargs...) -> StringFetch 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, TCompute 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) -> IcgemFileParse the ICGEM file filename using the data type T.
SatelliteToolboxGravityModels.GravityModels.AbstractGravityModel — Typeabstract type AbstractGravityModel{T<:Number, NT<:Val}Abstract data type of all gravity models.
SatelliteToolboxGravityModels.GravityModels.coefficient_norm — Functioncoefficient_norm(model::AbstractGravityModel{T, NT}) where {T<:Number, NT<:Val} -> SymbolReturn 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, NT}, degree::Int, order::Int[, time::Union{Number, DateTime}]) where {T<:Number, NT} -> T, TReturn 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, NormType}, 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 + 1real 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 + 1real 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)
The matrices P and dP are lower triangular. Hence, the algorithm peformance for large models can be improved if they are created using the LowerTriangularStorage (defined in SatelliteToolboxBase.jl) with a row-major ordering. If those matrices are not provided by the user, they will be created using that type of storage.
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, NormType}, 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.
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 + 1real 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 + 1real 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)
The matrices P and dP are lower triangular. Hence, the algorithm peformance for large models can be improved if they are created using the LowerTriangularStorage (defined in SatelliteToolboxBase.jl) with a row-major ordering. If those matrices are not provided by the user, they will be created using that type of storage.
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, NormType}, 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 + 1real 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 + 1real 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)
The matrices P and dP are lower triangular. Hence, the algorithm peformance for large models can be improved if they are created using the LowerTriangularStorage (defined in SatelliteToolboxBase.jl) with a row-major ordering. If those matrices are not provided by the user, they will be created using that type of storage.
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, NT}) where {T<:Number, NT<:Val} -> TReturn the gravity constant [m³ / s²] for the gravity model.
SatelliteToolboxGravityModels.GravityModels.load — Functionload(::Type{T}, args...; kwargs...) where T<:AbstractGravityModel -> TLoad a gravity model of type T using the arguments args... and keywords kwargs....
SatelliteToolboxGravityModels.GravityModels.maximum_degree — Functionmaximum_degree(model::AbstractGravityModel) -> IntReturn the maximum degree of the gravity model.
SatelliteToolboxGravityModels.GravityModels.radius — Functionradius(model::AbstractGravityModel{T, NT}) where {T<:Number, NT<:Val} -> TReturn the radius [m] for the gravity model.