diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f48352..254e263 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,8 +59,8 @@ jobs: julia --color=yes --project=docs -e ' import Pkg; Pkg.add("Documenter") using Documenter: doctest - using IERS - doctest(IERS)' + using IERSConventions + doctest(IERSConventions)' - run: julia --project=docs --color=yes docs/make.jl env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Project.toml b/Project.toml index b8c26c1..e1cdb19 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -name = "IERS" +name = "IERSConventions" uuid = "4e86e20e-879b-40dc-9e12-cee74f4cd199" authors = ["JSMD Team"] version = "1.0.0" diff --git a/README.md b/README.md index 7ffceca..b8657c6 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# IERS.jl +# IERSConventions.jl _IERS Conventions made easy._ -[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaspacemissiondesign.github.io/IERS.jl/stable/) -[![Dev Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaspacemissiondesign.github.io/IERS.jl/dev/) -[![Build Status](https://github.com/JuliaSpaceMissionDesign/IERS.jl/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/JuliaSpaceMissionDesign/IERS.jl/actions/workflows/ci.yml) -[![codecov](https://codecov.io/gh/JuliaSpaceMissionDesign/IERS.jl/branch/main/graph/badge.svg?token=7fj9BjJhKF)](https://codecov.io/gh/JuliaSpaceMissionDesign/IERS.jl) +[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaspacemissiondesign.github.io/IERSConventions.jl/stable/) +[![Dev Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaspacemissiondesign.github.io/IERSConventions.jl/dev/) +[![Build Status](https://github.com/JuliaSpaceMissionDesign/IERSConventions.jl/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/JuliaSpaceMissionDesign/IERSConventions.jl/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/JuliaSpaceMissionDesign/IERSConventions.jl/branch/main/graph/badge.svg?token=7fj9BjJhKF)](https://codecov.io/gh/JuliaSpaceMissionDesign/IERSConventions.jl) [![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) The aim of this package is to provide a set of standardised functions that allow the user to easily handle all the computations related to the IERS, from the earlier 1996 up to the latest 2010 conventions. @@ -17,7 +17,7 @@ This package will soon be registered within Julia's general registry. ## Documentation For further information on this package and its tutorials please refer to the -[stable documentation](https://juliaspacemissiondesign.github.io/IERS.jl/stable/). +[stable documentation](https://juliaspacemissiondesign.github.io/IERSConventions.jl/stable/). ## Support If you found this package useful, please consider starring the repository. We also encourage you to take a look at other astrodynamical packages of the [JSMD](https://github.com/JuliaSpaceMissionDesign/) organisation. \ No newline at end of file diff --git a/docs/make.jl b/docs/make.jl index 3aee889..f374af9 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,4 +1,4 @@ -using Documenter, IERS +using Documenter, IERSConventions using Pkg const CI = get(ENV, "CI", "false") == "true" @@ -6,7 +6,7 @@ const CI = get(ENV, "CI", "false") == "true" makedocs(; authors="Julia Space Mission Design Development Team", - sitename="IERS.jl", + sitename="IERSConventions.jl", modules=[IERS], format=Documenter.HTML(; prettyurls=CI, highlights=["yaml"], ansicolor=true), pages=[ @@ -26,5 +26,5 @@ makedocs(; ) deploydocs(; - repo="github.com/JuliaSpaceMissionDesign/IERS.jl", branch="gh-pages" + repo="github.com/JuliaSpaceMissionDesign/IERSConventions.jl", branch="gh-pages" ) \ No newline at end of file diff --git a/src/IERS.jl b/src/IERSConventions.jl similarity index 93% rename from src/IERS.jl rename to src/IERSConventions.jl index b0029e9..9edd002 100644 --- a/src/IERS.jl +++ b/src/IERSConventions.jl @@ -1,4 +1,4 @@ -module IERS +module IERSConventions using Tempo @@ -7,7 +7,7 @@ module IERS using StaticArrays # Basic definitions - include("conventions.jl") + include("models.jl") include("angles.jl") include("poisson.jl") diff --git a/src/bpn.jl b/src/bpn.jl index 6362cf2..0f0297e 100644 --- a/src/bpn.jl +++ b/src/bpn.jl @@ -2,7 +2,7 @@ export iers_bias, iers_pb, iers_npb """ - iers_bias(m::IERSConventions, t::Number) + iers_bias(m::IERSModel, t::Number) Compute the frame bias matrix, which transform vectors from the GCRF axes to the Mean Equinox and Mean Equator of J2000 (MEME2000) axes. @@ -23,7 +23,7 @@ iers_bias """ - iers_pb(m::IERSConventions, t::Number) + iers_pb(m::IERSModel, t::Number) Compute the precession-bias (PB) matrix, which transforms vectors from the GCRF axes to Mean-of-Date (MOD) axes, at time `t` expressed in `TT` Julian centuries since `J2000`, according @@ -43,7 +43,7 @@ iers_pb """ - iers_npb(m::IERSConventions, t::Number, δΔψ=0, δΔϵ=0) + iers_npb(m::IERSModel, t::Number, δΔψ=0, δΔϵ=0) Compute the nutation-bias-precession (NPB) matrix, which transforms vectors from the GCRF to True-of-Date (TOD) axes, at time `t` expressed in `TT` Julian centuries since `J2000`, diff --git a/src/cip.jl b/src/cip.jl index bf0b97d..91df1f4 100644 --- a/src/cip.jl +++ b/src/cip.jl @@ -2,7 +2,7 @@ export iers_cip_motion, cip_xy, cip_xys, cip_vector """ - iers_cip_motion(m::IERSConventions, t::Number, δX::Number=0, δY::Number=0) + iers_cip_motion(m::IERSModel, t::Number, δX::Number=0, δY::Number=0) Compute the GCRF-to-CIRF rotation matrix, following the IERS Conventions `m`, at time `t` expressed in `TT` Julian centuries since J2000. Optional IERS EOP corrections for free-core @@ -14,7 +14,7 @@ nutation and time dependent effects can be provided via `δX` and `δY` ### See also See also [`cip_xy`](@ref) and [`cip_xys`](@ref). """ -function iers_cip_motion(m::IERSConventions, t::Number, δX::Number=0, δY::Number=0) +function iers_cip_motion(m::IERSModel, t::Number, δX::Number=0, δY::Number=0) # Compute CIP coordinates X, Y, s = cip_xys(m, t, δX, δY) @@ -26,7 +26,7 @@ end """ - cip_xy(m::IERSConventions, t::Number) + cip_xy(m::IERSModel, t::Number) Compute the CIP X and Y coordinates, in radians, following the IERS Conventions `m`, at time `t`, expressed in `TT` Julian centuries since J2000. @@ -50,7 +50,7 @@ cip_xy """ - cip_xys(m::IERSConventions, t::Number, δX::Number=0, δY::Number=0) + cip_xys(m::IERSModel, t::Number, δX::Number=0, δY::Number=0) Compute the CIP X, Y and CIO locator s coordinates, in radians, following the IERS conventions `m` at time `t`, expressed in `TT`` Julian centuries since J2000. Optional EOP @@ -70,7 +70,7 @@ nutation corrections can be provided via the `δX` and `δY` parameters. ### See also See also [`iers_cip_motion`](@ref) and [`cip_xy`](@ref). """ -function cip_xys(m::IERSConventions, t::Number, δX::Number=0, δY::Number=0) +function cip_xys(m::IERSModel, t::Number, δX::Number=0, δY::Number=0) # Compute CIP coordinates x, y = cip_xy(m, t) @@ -88,7 +88,7 @@ end """ - cip_vector(m::IERSConventions, t::Number) + cip_vector(m::IERSModel, t::Number) Compute the Celestial Intermediate Pole (CIP) vector, following the IERS Conventions `m` at time `t`, expressed in `TT` Julian centuries since J2000. @@ -100,14 +100,14 @@ time `t`, expressed in `TT` Julian centuries since J2000. ### See also See also [`cip_xy`](@ref). """ -function cip_vector(m::IERSConventions, t::Number) +function cip_vector(m::IERSModel, t::Number) xs, ys = cip_xy(m, t) return SA[xs, ys, sqrt(1 - xs^2 - ys^2)] end """ - cio_locator(m::IERSConventions, t::Number, x::Number, y::Number) + cio_locator(m::IERSModel, t::Number, x::Number, y::Number) Compute the CIO locator `s`, in radians, following the IERS Conventions `m' at time `t`, expressed in `TT` Julian centuries since J2000, given the CIP coordinates `x` and `y`. @@ -121,7 +121,7 @@ expressed in `TT` Julian centuries since J2000, given the CIP coordinates `x` an ### See also See also [`iers_cip_motion`](@ref), [`cip_xy`](@ref) and [`cip_xys`](@ref). """ -function cio_locator(m::IERSConventions, t, x, y) +function cio_locator(m::IERSModel, t, x, y) _cio_locator(m, t, DelaunayArgs(m, t), PlanetaryArgs(m, t)) - x*y/2 end diff --git a/src/delaunay.jl b/src/delaunay.jl index b314c69..2b86da0 100644 --- a/src/delaunay.jl +++ b/src/delaunay.jl @@ -28,7 +28,7 @@ struct DelaunayArgs{T} Ω::T end -function DelaunayArgs(m::IERSConventions, t::Number) +function DelaunayArgs(m::IERSModel, t::Number) DelaunayArgs( delaunay_anomaly_moon(m, t), @@ -42,7 +42,7 @@ end """ - delaunay_anomaly_moon(m::IERSConventions, t::Number) + delaunay_anomaly_moon(m::IERSModel, t::Number) Compute the mean anomaly of the Moon, in radians, given time `t` expressed in TDB Julian centuries since J2000. @@ -56,7 +56,7 @@ function delaunay_anomaly_moon(::IERSAModels, t::Number) ) end -function delaunay_anomaly_moon(::IERSConventions, t::Number) +function delaunay_anomaly_moon(::IERSModel, t::Number) arcsec2rad(mod(485868.249036 + 1717915923.2178t, 1296000)) end @@ -67,7 +67,7 @@ end """ - delaunay_anomaly_sun(m::IERSConventions, t::Number) + delaunay_anomaly_sun(m::IERSModel, t::Number) Compute the mean anomaly of the Sun, in radians, given time `t` expressed in TDB Julian centuries since J2000. @@ -80,7 +80,7 @@ function delaunay_anomaly_sun(::IERSAModels, t::Number) ) end -function delaunay_anomaly_sun(::IERSConventions, t::Number) +function delaunay_anomaly_sun(::IERSModel, t::Number) arcsec2rad(mod(1287104.79305 + 129596581.0481t, 1296000)) end @@ -91,7 +91,7 @@ end """ - delaunay_longitude_diff(m::IERSConventions, t::Number) + delaunay_longitude_diff(m::IERSModel, t::Number) Compute the difference between the longitude of the Moon and the longitude of the Moon's node, in radians, given time `t` expressed in TDB Julian centuries since J2000. @@ -104,7 +104,7 @@ function delaunay_longitude_diff(::IERSAModels, t::Number) ) end -function delaunay_longitude_diff(::IERSConventions, t::Number) +function delaunay_longitude_diff(::IERSModel, t::Number) arcsec2rad(mod(335779.526232 + 1739527262.8478t, 1296000)) end @@ -114,7 +114,7 @@ function delaunay_longitude_diff(::IERS1996, t::Number) end """ - delaunay_elongation_moon(m::IERSConventions, t::Number) + delaunay_elongation_moon(m::IERSModel, t::Number) Compute the mean elongation of the Moon from the Sun, in radians, given time `t` expressed in TDB Julian centuries since J2000. @@ -127,7 +127,7 @@ function delaunay_elongation_moon(::IERSAModels, t::Number) ) end -function delaunay_elongation_moon(::IERSConventions, t::Number) +function delaunay_elongation_moon(::IERSModel, t::Number) arcsec2rad(mod(1072260.70369 + 1602961601.2090t, 1296000)) end @@ -137,7 +137,7 @@ function delaunay_elongation_moon(::IERS1996, t::Number) end """ - delaunay_longitude_node(m::IERSConventions, t::Number) + delaunay_longitude_node(m::IERSModel, t::Number) Compute the longitude of the mean ascending node of the lunar orbit on th ecliptic, measured from the mean equinox of date, in radians, given time `t` expressed in TDB Julian @@ -151,7 +151,7 @@ function delaunay_longitude_node(::IERSAModels, t::Number) ) end -function delaunay_longitude_node(::IERSConventions, t::Number) +function delaunay_longitude_node(::IERSModel, t::Number) arcsec2rad(mod(450160.398036 - 6962890.5431t, 1296000)) end diff --git a/src/eop.jl b/src/eop.jl index 7166058..a683afa 100644 --- a/src/eop.jl +++ b/src/eop.jl @@ -9,7 +9,7 @@ # ========================================= """ - eop_δΔψ(m::IERSConventions, t::Number) + eop_δΔψ(m::IERSModel, t::Number) Interpolate and retrieve the EOP nutation correction in longitude `δΔψ`, in radians, at time `t` expressed in `TT` Julian centuries since J2000 for the IERS convention `m`. @@ -24,11 +24,11 @@ function eop_δΔψ(m::IERS1996, t::Number) return 0 end -eop_δΔψ(::IERSConventions, ::Number) = 0 +eop_δΔψ(::IERSModel, ::Number) = 0 """ - eop_δΔϵ(m::IERSConventions, t::Number) + eop_δΔϵ(m::IERSModel, t::Number) Interpolate and retrieve the EOP nutation correction in obliquity `δΔϵ`, in radians, at time `t` expressed in `TT` Julian centuries since J2000 for the IERS convention `m`. @@ -43,11 +43,11 @@ function eop_δΔϵ(m::IERS1996, t::Number) return 0 end -eop_δΔϵ(::IERSConventions, ::Number) = 0 +eop_δΔϵ(::IERSModel, ::Number) = 0 """ - eop_δX(m::IERSConventions, t::Number) + eop_δX(m::IERSModel, t::Number) Interpolate and retrieve the CIP `δX` correction, in radians, at time `t` expressed in `TT` Julian centuries since J2000 for the IERS convention `m`. @@ -62,11 +62,11 @@ function eop_δX(m::IERS1996, t::Number) return 0 end -eop_δX(::IERSConventions, ::Number) = 0 +eop_δX(::IERSModel, ::Number) = 0 """ - eop_δY(m::IERSConventions, t::Number) + eop_δY(m::IERSModel, t::Number) Interpolate and retrieve the CIP `δY` correction, in radians, at time `t` expressed in `TT` Julian centuries since J2000 for the IERS convention `m`. @@ -81,16 +81,16 @@ function eop_δY(m::IERS1996, t::Number) return 0 end -eop_δY(::IERSConventions, ::Number) = 0 +eop_δY(::IERSModel, ::Number) = 0 """ - eop_xp(m::IERSConventions, t::Number) + eop_xp(m::IERSModel, t::Number) Interpolate and retrieve the pole `xₚ` coordinate, in radians, at time `t` expressed in `TT` Julian centuries since J2000 for the IERS convention `m`. """ -function eop_xp(m::IERSConventions, t::Number) +function eop_xp(m::IERSModel, t::Number) # TODO: complete me return 0 end @@ -99,12 +99,12 @@ eop_xp(::CPND, ::Number) = 0 """ - eop_yp(m::IERSConventions, t::Number) + eop_yp(m::IERSModel, t::Number) Interpolate and retrieve the pole `yₚ` coordinate, in radians, at time `t` expressed in `TT` Julian centuries since J2000 for the IERS convention `m`. """ -function eop_yp(m::IERSConventions, t::Number) +function eop_yp(m::IERSModel, t::Number) # TODO: complete me return 0 end @@ -140,7 +140,7 @@ end # ========================================= # Function to convert nutation corrections to CIP corrections and viceversa -function δnut_to_δcip(m::IERSConventions, t::Number, δΔψ::Number, δΔϵ::Number) +function δnut_to_δcip(m::IERSModel, t::Number, δΔψ::Number, δΔϵ::Number) # Compute the precession angles ϵ₀, ψₐ, _, χₐ = precession_angles_rot4(m, t) @@ -159,7 +159,7 @@ function δnut_to_δcip(m::IERSConventions, t::Number, δΔψ::Number, δΔϵ::N end -function δcip_to_δnut(m::IERSConventions, t::Number, δx::Number, δy::Number) +function δcip_to_δnut(m::IERSModel, t::Number, δx::Number, δy::Number) # Compute the precession angles ϵ₀, ψₐ, _, χₐ = precession_angles_rot4(m, t) diff --git a/src/era.jl b/src/era.jl index 5f56d9b..e643f72 100644 --- a/src/era.jl +++ b/src/era.jl @@ -2,7 +2,7 @@ export iers_era, iers_era_rotm """ - iers_era(m::IERSConventions, t::Number) + iers_era(m::IERSModel, t::Number) Compute the Earth Rotation Angle (ERA), in radians, at time `t` expressed as UT1 days since `J2000`, according to the IERS convention `m`. @@ -17,7 +17,7 @@ since `J2000`, according to the IERS convention `m`. ### See also See also [`iers_era_rotm`](@ref). """ -function iers_era(::IERSConventions, t::Number) +function iers_era(::IERSModel, t::Number) # The function uses the fractional UT1 date to gain additional iers_bias_precession_nutation # in the computations @@ -27,7 +27,7 @@ end """ - iers_era_rotm(m::IERSConventions, t::Number) + iers_era_rotm(m::IERSModel, t::Number) Compute the CIRF-to-TIRF rotation matrix, according to the IERS conventions `m`, at time `t` expressed in UT1 days since J2000 @@ -38,6 +38,6 @@ Compute the CIRF-to-TIRF rotation matrix, according to the IERS conventions `m`, ### See also See also [`iers_era`](@ref). """ -function iers_era_rotm(m::IERSConventions, t::Number) +function iers_era_rotm(m::IERSModel, t::Number) return angle_to_dcm(iers_era(m, t), :Z) end \ No newline at end of file diff --git a/src/conventions.jl b/src/models.jl similarity index 92% rename from src/conventions.jl rename to src/models.jl index 0633688..57c9785 100644 --- a/src/conventions.jl +++ b/src/models.jl @@ -4,12 +4,12 @@ export iers1996, iers2003a, iers2003b, iers2010a, iers2010b, CPNc, CPNd -abstract type IERSConventions end +abstract type IERSModel end # IERS 1996 # ======================== -struct IERS1996 <: IERSConventions end +struct IERS1996 <: IERSModel end """ iers1996 @@ -22,7 +22,7 @@ const iers1996 = IERS1996() # IERS 2003 # ======================== -abstract type IERS2003 <: IERSConventions end +abstract type IERS2003 <: IERSModel end struct IERS2003A <: IERS2003 end @@ -46,7 +46,7 @@ const iers2003b = IERS2003B() # IERS 2010 # ======================== -abstract type IERS2010 <: IERSConventions end +abstract type IERS2010 <: IERSModel end struct IERS2010A <: IERS2010 end diff --git a/src/nutation.jl b/src/nutation.jl index 742497e..d6c5c14 100644 --- a/src/nutation.jl +++ b/src/nutation.jl @@ -3,7 +3,7 @@ export iers_nutation, iers_nutation_comp """ - iers_nutation(m::IERSConventions, t::Number, δΔψ::Number=0, δΔϵ::Number=0) + iers_nutation(m::IERSModel, t::Number, δΔψ::Number=0, δΔϵ::Number=0) Compute the nutation matrix that rotates a vector from Mean-of-Date (MOD) to True-of-Date (TOD) axes following the IERS convention `m`, at time `t` expressed in `TT` Julian @@ -18,7 +18,7 @@ Optional EOP nutation corrections can be provided via the `δΔψ` and `δΔϵ` ### See also See also [`iers_nutation_comp`](@ref) and [`iers_obliquity`](@ref). """ -function iers_nutation(m::IERSConventions, t::Number, δΔψ::Number=0, δΔϵ::Number=0) +function iers_nutation(m::IERSModel, t::Number, δΔψ::Number=0, δΔϵ::Number=0) # Compute mean obliquity at epoch ϵₐ = iers_obliquity(m, t) @@ -33,7 +33,7 @@ end """ - iers_nutation_comp(m::IERSConventions, t::Number) + iers_nutation_comp(m::IERSModel, t::Number) Compute the nutation components in longitude and obliquity for the IERS convention `m`, in radians, at time `t` expressed in `TT` Julian Centuries since `J2000`. diff --git a/src/obliquity.jl b/src/obliquity.jl index 35bb115..eaef77d 100644 --- a/src/obliquity.jl +++ b/src/obliquity.jl @@ -2,7 +2,7 @@ export iers_obliquity """ - iers_obliquity(m::IERSConventions, t::Number) + iers_obliquity(m::IERSModel, t::Number) Compute the mean obliquity of the ecliptic at epoch, in radians, at time `t` expressed in `TT` Julian centuries since `J2000`, according to the IERS convention `m`. diff --git a/src/planetary.jl b/src/planetary.jl index 31a9055..e91b224 100644 --- a/src/planetary.jl +++ b/src/planetary.jl @@ -48,13 +48,13 @@ function PlanetaryArgs(m::IERSAModels, t::Number) end -function PlanetaryArgs(::IERSConventions, ::Number) +function PlanetaryArgs(::IERSModel, ::Number) PlanetaryArgs(0, 0, 0, 0, 0, 0, 0, 0, 0) end """ - pa_mercury(m::IERSConventions, t::Number) + pa_mercury(m::IERSModel, t::Number) Return the mean heliocentric longitude of Mercury in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -67,7 +67,7 @@ Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/fame03.c) software library """ -function pa_mercury(::IERSConventions, t::Number) +function pa_mercury(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 4.402608842, 2608.7903141574)) end @@ -82,7 +82,7 @@ end """ - pa_venus(m::IERSConventions, t::Number) + pa_venus(m::IERSModel, t::Number) Return the mean heliocentric longitude of Venus in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -92,7 +92,7 @@ Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/fave03.c) software library """ -function pa_venus(::IERSConventions, t::Number) +function pa_venus(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 3.176146697, 1021.3285546211)) end @@ -102,7 +102,7 @@ end """ - pa_earth(m::IERSConventions, t::Number) + pa_earth(m::IERSModel, t::Number) Return the mean heliocentric longitude of Earth in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -112,7 +112,7 @@ Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/fae03.c) software library """ -function pa_earth(::IERSConventions, t::Number) +function pa_earth(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 1.753470314, 628.3075849991)) end @@ -122,7 +122,7 @@ end """ - pa_mars(m::IERSConventions, t::Number) + pa_mars(m::IERSModel, t::Number) Return the mean heliocentric longitude of Mars in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -132,7 +132,7 @@ Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/fama03.c) software library """ -function pa_mars(::IERSConventions, t::Number) +function pa_mars(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 6.203480913, 334.0612426700)) end @@ -142,7 +142,7 @@ end """ - pa_jupiter(m::IERSConventions, t::Number) + pa_jupiter(m::IERSModel, t::Number) Return the mean heliocentric longitude of Jupiter in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -152,7 +152,7 @@ Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/faju03.c) software library """ -function pa_jupiter(::IERSConventions, t::Number) +function pa_jupiter(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 0.599546497, 52.9690962641)) end @@ -162,7 +162,7 @@ end """ - pa_saturn(m::IERSConventions, t::Number) + pa_saturn(m::IERSModel, t::Number) Return the mean heliocentric longitude of Saturn in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -172,7 +172,7 @@ Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/fasa03.c) software library """ -function pa_saturn(::IERSConventions, t::Number) +function pa_saturn(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 0.874016757, 21.3299104960)) end @@ -182,7 +182,7 @@ end """ - pa_uranus(m::IERSConventions, t::Number) + pa_uranus(m::IERSModel, t::Number) Return the mean heliocentric longitude of Uranus in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -195,7 +195,7 @@ Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/faur03.c) software library """ -function pa_uranus(::IERSConventions, t::Number) +function pa_uranus(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 5.481293872, 7.4781598567)) end @@ -210,7 +210,7 @@ end """ - pa_neptune(m::IERSConventions, t::Number) + pa_neptune(m::IERSModel, t::Number) Return the mean heliocentric longitude of Neptune in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -223,7 +223,7 @@ Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/fane03.c) software library """ -function pa_neptune(::IERSConventions, t::Number) +function pa_neptune(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 5.311886287, 3.8133035638)) end @@ -238,7 +238,7 @@ end """ - pa_precession(m::IERSConventions, t::Number) + pa_precession(m::IERSModel, t::Number) Return the general accumulated precession in longitude `pₐ` in radians, at time `t` expressed in `TDB` Julian centuries since `J2000`. @@ -248,7 +248,7 @@ expressed in `TDB` Julian centuries since `J2000`. - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) - [ERFA](https://github.com/liberfa/erfa/blob/master/src/fapa03.c) software library """ -function pa_precession(::IERSConventions, t::Number) +function pa_precession(::IERSModel, t::Number) return mod2pi(@evalpoly(t, 0, 0.024381750, 0.00000538691)) end diff --git a/src/polar.jl b/src/polar.jl index ad2cf09..5a90c70 100644 --- a/src/polar.jl +++ b/src/polar.jl @@ -3,7 +3,7 @@ export iers_polar_motion """ - iers_polar_motion(m::IERSConventions, xₚ::Number, yₚ::Number, t::Number) + iers_polar_motion(m::IERSModel, xₚ::Number, yₚ::Number, t::Number) Compute the Polar Motion TIRF-to-ITRF rotation matrix, according to the IERS Conventions `m`, at time `t` expressed in `TT` Julian centuries since `J2000`. The function requires @@ -17,7 +17,7 @@ International Celestial Reference Frame (ITFR). - IERS Technical Note No. [32](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn32.html) - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) """ -function iers_polar_motion(m::IERSConventions, xₚ::Number, yₚ::Number, t::Number) +function iers_polar_motion(m::IERSModel, xₚ::Number, yₚ::Number, t::Number) sp = tio_locator(m, t) return angle_to_dcm(sp, -xₚ, -yₚ, :ZYX) end @@ -26,7 +26,7 @@ iers_polar_motion(::CPND, xₚ::Number, yₚ::Number, ::Number) = DCM(1I) """ - tio_locator(m::IERSConventions, t::Number) + tio_locator(m::IERSModel, t::Number) Compute the TIO locator `s'` at date, positioning the Terrestrial Intermediate Origin on the equator of the Celestial Intermediate Pole (CIP) at time `t` expressed as `TT` Julian @@ -43,6 +43,6 @@ drift of ~0.47 μas/century. - Lambert, S. and Bizouard C. (2002), Positioning the Terrestrial Ephemeris Origin in the Terrestrial Reference Frame, [DOI: 10.1051/0004-6361:20021139](https://www.aanda.org/articles/aa/pdf/2002/40/aa2747.pdf) """ -tio_locator(::IERSConventions, t::Number) = arcsec2rad(-47e-6t) +tio_locator(::IERSModel, t::Number) = arcsec2rad(-47e-6t) tio_locator(m::Union{IERS1996, CPND}, t::Number) = 0 \ No newline at end of file diff --git a/src/precession.jl b/src/precession.jl index 8835b2b..e2b21d3 100644 --- a/src/precession.jl +++ b/src/precession.jl @@ -2,7 +2,7 @@ export iers_precession """ - iers_precession(m::IERSConventions, t::Number) + iers_precession(m::IERSModel, t::Number) Return the precession matrix that rotates a vector from MEME2000 axes to Mean of Date (MOD) axes, at time `t` expressed in `TT` Julian centuries since `J2000`, according to the IERS @@ -34,7 +34,7 @@ convention `m`. ### See also See also [`precession_angles_rot3`](@ref) and [`precession_angles_rot4`](@ref) """ -function iers_precession(m::IERSConventions, t::Number) +function iers_precession(m::IERSModel, t::Number) # Compute the precession angles ϵ₀, ψₐ, ωₐ, χₐ = precession_angles_rot4(m, t) @@ -46,7 +46,7 @@ end """ - precession_angles_rot3(m::IERSConventions, t::Number) + precession_angles_rot3(m::IERSModel, t::Number) Return the equatorial precession angles zₐ, θₐ, ζₐ, in radians, at time `t` expressed in `TT` Julian centuries since `J2000` for the 3-rotations precession series initially used @@ -79,7 +79,7 @@ precession_angles_rot3 """ - precession_angles_rot4(m::IERSConventions, t::Number) + precession_angles_rot4(m::IERSModel, t::Number) Return the precession angles ϵ₀, ψₐ, ωₐ, χₐ, in radians, at time `t` expressed in `TT` Julian centuries since `J2000` required for the canonical 4-rotations precession series. diff --git a/src/rotations.jl b/src/rotations.jl index fb3420c..07d6a85 100644 --- a/src/rotations.jl +++ b/src/rotations.jl @@ -3,7 +3,7 @@ # ============================================== """ - iers_rot3_gcrf_to_mod(t::Number, m::IERSConventions=iers2010b) + iers_rot3_gcrf_to_mod(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the Geocentric Celestial Reference Frame (GCRF) to the Mean-of-Date (MOD) at time `t`, expressed in TT seconds since `J2000`. @@ -17,13 +17,13 @@ the Mean-of-Date (MOD) at time `t`, expressed in TT seconds since `J2000`. See also [`iers_pb`](@ref) and [`iers_rot3_itrf_to_mod`](@ref). """ -function iers_rot3_gcrf_to_mod(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_gcrf_to_mod(t::Number, m::IERSModel=iers2010b) return iers_pb(m, t/Tempo.CENTURY2SEC) end """ - iers_rot3_gcrf_to_tod(t::Number, m::IERSConventions=iers2010b) + iers_rot3_gcrf_to_tod(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the Geocentric Celestial Reference Frame (GCRF) to the True-of-Date (TOD) at time `t`, expressed in TT seconds since `J2000`. @@ -40,7 +40,7 @@ the True-of-Date (TOD) at time `t`, expressed in TT seconds since `J2000`. ## See also See also [`iers_npb`](@ref) and [`iers_rot3_itrf_to_tod`](@ref). """ -function iers_rot3_gcrf_to_tod(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_gcrf_to_tod(t::Number, m::IERSModel=iers2010b) # Retrieve the EOP corrections to the nutation in longitude and obliquity δΔψ = eop_δΔψ(m, t) @@ -53,7 +53,7 @@ end """ - iers_rot3_gcrf_to_gtod(t::Number, m::IERSConventions=iers2010b) + iers_rot3_gcrf_to_gtod(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the Geocentric Celestial Reference Frame (GCRF) to the Greenwich True-of-Date (GTOD) at time `t`, expressed in TT seconds since `J2000`. @@ -69,7 +69,7 @@ the Greenwich True-of-Date (GTOD) at time `t`, expressed in TT seconds since `J2 ## See also See also [`mod_to_gtod3`](@ref) and [`iers_rot3_itrf_to_gtod`](@ref). """ -function iers_rot3_gcrf_to_gtod(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_gcrf_to_gtod(t::Number, m::IERSModel=iers2010b) # Retrieve the EOP corrections to the nutation in longitude and obliquity δΔψ = eop_δΔψ(m, t) @@ -86,7 +86,7 @@ end """ - iers_rot3_gcrf_to_pef(t::Number, m::IERSConventions=iers2010b) + iers_rot3_gcrf_to_pef(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the Geocentric Celestial Reference Frame (GCRF) to the Pseudo-Earth Fixed (PEF) at time `t`, expressed in TT seconds since `J2000`. @@ -106,7 +106,7 @@ the Pseudo-Earth Fixed (PEF) at time `t`, expressed in TT seconds since `J2000`. ## See also See also [`iers_rot3_gcrf_to_gtod`](@ref) and [`iers_rot3_itrf_to_pef`](@ref). """ -function iers_rot3_gcrf_to_pef(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_gcrf_to_pef(t::Number, m::IERSModel=iers2010b) # Compute the GCRF to GTOD rotation matrix RNPB = iers_rot3_gcrf_to_gtod(t, m) @@ -126,7 +126,7 @@ end # ============================================== """ - iers_rot3_itrf_to_pef(t::Number, m::IERSConventions=iers2010b) + iers_rot3_itrf_to_pef(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the International Terrestrial Reference Frame (ITRF) to the Pseudo-Earth Fixed (PEF) at time `t`, expressed in TT seconds since `J2000`. @@ -138,7 +138,7 @@ the Pseudo-Earth Fixed (PEF) at time `t`, expressed in TT seconds since `J2000`. ## See also See also [`iers_rot3_gcrf_to_pef`](@ref). """ -function iers_rot3_itrf_to_pef(t::Number, ::IERSConventions=iers2010b) +function iers_rot3_itrf_to_pef(t::Number, ::IERSModel=iers2010b) # Retrieve pole coordinates xₚ = eop_xp(m, t) @@ -154,7 +154,7 @@ iers_rot3_itrf_to_pef(::Number, ::CPND) = DCM(1I) """ - iers_rot3_itrf_to_gtod(t::Number, m::IERSConventions=iers2010b) + iers_rot3_itrf_to_gtod(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the International Terrestrial Reference Frame (ITRF) to the Greenwich True-of-Date (GTOD) at time `t`, expressed in TT seconds since `J2000`. @@ -170,7 +170,7 @@ the Greenwich True-of-Date (GTOD) at time `t`, expressed in TT seconds since `J2 ## See also See also [`iers_rot3_itrf_to_pef`](@ref) and [`iers_rot3_gcrf_to_gtod`](@ref). """ -function iers_rot3_itrf_to_gtod(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_itrf_to_gtod(t::Number, m::IERSModel=iers2010b) # Compute ITRF to PEF rotation W = iers_rot3_itrf_to_pef(t, m) @@ -183,7 +183,7 @@ end """ - iers_rot3_itrf_to_tod(t::Number, m::IERSConventions=iers2010b) + iers_rot3_itrf_to_tod(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the International Terrestrial Reference Frame (ITRF) to the True-of-Date (TOD) at time `t`, expressed in TT seconds since `J2000`. @@ -195,7 +195,7 @@ the True-of-Date (TOD) at time `t`, expressed in TT seconds since `J2000`. ## See also See also [`iers_rot3_itrf_to_gtod`](@ref) and [`iers_rot3_gcrf_to_tod`](@ref). """ -function iers_rot3_itrf_to_tod(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_itrf_to_tod(t::Number, m::IERSModel=iers2010b) # Compute EOP nutation corrections δΔψ = eop_δΔψ(m, t) @@ -211,7 +211,7 @@ end """ - iers_rot3_itrf_to_mod(t::Number, m::IERSConventions=iers2010b) + iers_rot3_itrf_to_mod(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the International Terrestrial Reference Frame (ITRF) to the Mean-of-Date (MOD) at time `t`, expressed in TT seconds since `J2000`. @@ -223,7 +223,7 @@ the Mean-of-Date (MOD) at time `t`, expressed in TT seconds since `J2000`. ## See also See also [`iers_rot3_itrf_to_tod`](@ref) and [`iers_rot3_gcrf_to_mod`](@ref). """ -function iers_rot3_itrf_to_mod(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_itrf_to_mod(t::Number, m::IERSModel=iers2010b) # Compute ITRF to GTOD rotation W = iers_rot3_itrf_to_gtod(m, t) @@ -243,7 +243,7 @@ end # ============================================== """ - iers_rot3_gcrf_to_cirf(t::Number, m::IERSConventions=iers2010b) + iers_rot3_gcrf_to_cirf(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the Geocentric Celestial Reference Frame (GCRF) to the Celestial Intermediate Reference Frame (CIRF) at time `t`, expressed in TT seconds @@ -259,12 +259,12 @@ since `J2000`, following the IERS Conventions `m`. ### See also See also [`iers_rot3_gcrf_to_tirf`](@ref) and [`iers_rot3_gcrf_to_itrf`](@ref). """ -function iers_rot3_gcrf_to_cirf(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_gcrf_to_cirf(t::Number, m::IERSModel=iers2010b) return iers_cip_motion(m, t/Tempo.CENTURY2SEC, eop_δX(m, t), eop_δY(m, t)) end """ - iers_rot3_gcrf_to_tirf(t::Number, m::IERSConventions=iers2010b) + iers_rot3_gcrf_to_tirf(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the Geocentric Celestial Reference Frame (GCRF) to the Terrestrial Intermediate Reference Frame (TIRF) at time `t`, expressed in TT seconds @@ -280,7 +280,7 @@ since `J2000`, following the IERS Conventions `m`. ### See also See also [`iers_rot3_gcrf_to_cirf`](@ref) and [`iers_rot3_gcrf_to_itrf`](@ref). """ -function iers_rot3_gcrf_to_tirf(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_gcrf_to_tirf(t::Number, m::IERSModel=iers2010b) # Convert TT seconds to UT1 days since J2000 ut1_d = (t + offset_tt2ut1(t))/Tempo.DAY2SEC @@ -297,7 +297,7 @@ end """ - iers_rot3_gcrf_to_itrf(t::Number, m::IERSConventions=iers2010b) + iers_rot3_gcrf_to_itrf(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the Geocentric Celestial Reference Frame (GCRF) to the International Terrestrial Reference Frame (ITRF) at time `t`, expressed in TT seconds @@ -316,7 +316,7 @@ since `J2000`, following the IERS Conventions `m`. ### See also See also [`iers_rot3_gcrf_to_cirf`](@ref) and [`iers_rot3_gcrf_to_tirf`](@ref). """ -function iers_rot3_gcrf_to_itrf(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_gcrf_to_itrf(t::Number, m::IERSModel=iers2010b) # Compute the GCRF to TIRF rotation matrix RQ = iers_rot3_gcrf_to_tirf(t, m) @@ -337,7 +337,7 @@ end # ============================================== """ - iers_rot3_itrf_to_tirf(t::Number, m::IERSConventions=iers2010b) + iers_rot3_itrf_to_tirf(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the International Terrestrial Reference Frame (ITRF) to the Terrestrial Intermediate Reference Frame (TIRF) at time `t`, expressed in TT seconds @@ -352,7 +352,7 @@ since `J2000`, following the IERS Conventions `m`. ### See also See also [`iers_rot3_gcrf_to_tirf`](@ref) and [`iers_rot3_itrf_to_cirf`](@ref). """ -function iers_rot3_itrf_to_tirf(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_itrf_to_tirf(t::Number, m::IERSModel=iers2010b) # Retrieve pole coordinates xₚ = eop_xp(m, t) @@ -367,7 +367,7 @@ iers_rot3_itrf_to_tirf(::Number, ::CPND) = DCM(1I) """ - iers_rot3_itrf_to_cirf(t::Number, m::IERSConventions=iers2010b) + iers_rot3_itrf_to_cirf(t::Number, m::IERSModel=iers2010b) Compute the rotation matrix from the International Terrestrial Reference Frame (ITRF) to the Celestial Intermediate Reference Frame (CIRF) at time `t`, expressed in TT seconds @@ -382,7 +382,7 @@ since `J2000`, following the IERS Conventions `m`. ### See also See also [`iers_rot3_gcrf_to_cirf`](@ref) and [`iers_rot3_itrf_to_tirf`](@ref). """ -function iers_rot3_itrf_to_cirf(t::Number, m::IERSConventions=iers2010b) +function iers_rot3_itrf_to_cirf(t::Number, m::IERSModel=iers2010b) # Convert TT seconds to UT1 days since J2000 ut1_d = (t + offset_tt2ut1(t))/Tempo.DAY2SEC @@ -404,7 +404,7 @@ end # ============================================== # Low-level function to avoid repeating the same data -function mod_to_gtod3(t::Number, m::IERSConventions, δΔψ::Number, δΔϵ::Number) +function mod_to_gtod3(t::Number, m::IERSModel, δΔψ::Number, δΔϵ::Number) # Rather than calling the `iers_nutation` function, we manually assembly # the nutation matrix so that we don't have to compute diff --git a/src/sidereal.jl b/src/sidereal.jl index 22ee9ed..f05f61d 100644 --- a/src/sidereal.jl +++ b/src/sidereal.jl @@ -2,7 +2,7 @@ export iers_gmst, iers_gast """ - iers_gmst(m::IERSConventions, t::Number) + iers_gmst(m::IERSModel, t::Number) Compute the Greenwich Mean Sidereal Time (GMST), in radians, following the IERS Conventions `m` at time `t` expressed as `TT` Julian centuries since J2000. @@ -20,7 +20,7 @@ Compute the Greenwich Mean Sidereal Time (GMST), in radians, following the IERS ### See also See also [`iers_gast`](@ref) and [`iers_era`](@ref). """ -function iers_gmst(m::IERSConventions, t::Number) +function iers_gmst(m::IERSModel, t::Number) # Transform from TT centuries to UT1 days ut1 = t*Tempo.CENTURY2DAY + offset_tt2ut1(t*Tempo.CENTURY2SEC)/Tempo.DAY2SEC @@ -35,7 +35,7 @@ end """ - iers_gast(m::IERSConventions, t::Number, δΔψ::Number=0) + iers_gast(m::IERSModel, t::Number, δΔψ::Number=0) Compute the Greenwich Apparent Sidereal Time (GAST), in radians, following the IERS Conventions `m` at time `t` expressed as `TT` Julian centuries since J2000. An optional EOP @@ -55,13 +55,13 @@ of the equation of the equinoxes. ### See also See also [`iers_gmst`](@ref), [`equation_equinoxes`](@ref) and [`iers_era`](@ref). """ -function iers_gast(m::IERSConventions, t::Number, δΔψ::Number=0) +function iers_gast(m::IERSModel, t::Number, δΔψ::Number=0) return iers_gmst(m, t) + equation_equinoxes(m, t, δΔψ) end """ - equation_equinoxes(m::IERSConventions, t::Number, δΔψ::Number = 0) + equation_equinoxes(m::IERSModel, t::Number, δΔψ::Number = 0) Compute the Equation of the Equinoxes, in radians, according to the IERS Conventions `m`, at time `t` expressed as `TT` Julian centuries since J2000. An optional EOP correction for @@ -79,7 +79,7 @@ the nutation in longitude can be passed via `δΔψ`. ### See also See also [`iers_obliquity`](@ref), [`iers_nutation_comp`](@ref) and [`eeq_complementary`](@ref). """ -function equation_equinoxes(m::IERSConventions, t::Number, δΔψ::Number=0) +function equation_equinoxes(m::IERSModel, t::Number, δΔψ::Number=0) # Retrive the mean obliquity and the nutation in longitude ϵₐ = iers_obliquity(m, t) @@ -91,7 +91,7 @@ end """ - eeq_complementary(m::IERSConventions, t::Number) + eeq_complementary(m::IERSModel, t::Number) Compute the complementary terms of the equation of the equinoxes, in radians, associated to the IERS Conventions `m`, at time `t` expressed in `TT` Julian centuries since J2000. @@ -107,7 +107,7 @@ to the IERS Conventions `m`, at time `t` expressed in `TT` Julian centuries sinc - IERS Technical Note No. [32](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn32.html) - IERS Technical Note No. [36](https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html) """ -function eeq_complementary(m::IERSConventions, t::Number) +function eeq_complementary(m::IERSModel, t::Number) return ee_cpt(m, t, DelaunayArgs(m, t), PlanetaryArgs(m, t)) end @@ -177,7 +177,7 @@ function iers_gmst(::IERS2003, t::Number, θ::Number) end include("constants/gast2000.jl") -build_series(:ee_cpt, :IERSConventions, [COEFFS_EEQ2000]) +build_series(:ee_cpt, :IERSModel, [COEFFS_EEQ2000]) # 2010 CONVENTIONS diff --git a/test/bpn.jl b/test/bpn.jl index 21c798a..1078e3b 100644 --- a/test/bpn.jl +++ b/test/bpn.jl @@ -145,7 +145,7 @@ end; v1 = Pe*v; v1 /= norm(v1); # Test traditional parameterization - zₐ, θₐ, ζₐ = IERS.precession_angles_rot3(iers1996, tt_c) + zₐ, θₐ, ζₐ = IERSConventions.precession_angles_rot3(iers1996, tt_c) ζe, ze, θe = prec76(DJ2000, 0, DJ2000, tt_d) @test r2a*abs(zₐ - ze) ≤ 1e-6 @@ -155,7 +155,7 @@ end; # Test Capitaine parameterization (since we do not have ERFA expressions # that provide this angles, we check that the resulting precession matrix is # the same as that obtained with the original parameterization) - ϵ₀, ψₐ, ωₐ, χₐ = IERS.precession_angles_rot4(iers1996, tt_c) + ϵ₀, ψₐ, ωₐ, χₐ = IERSConventions.precession_angles_rot4(iers1996, tt_c) P = angle_to_dcm(χₐ, :Z)*angle_to_dcm(ϵ₀, -ψₐ, -ωₐ, :XZX) # This test is accurate up to 0.1 mas, which is anyway below the precision of @@ -173,7 +173,7 @@ end; v1 = Pe*v; v1 /= norm(v1); # Test traditional parameterization - zₐ, θₐ, ζₐ = IERS.precession_angles_rot3(iers2003a, tt_c) + zₐ, θₐ, ζₐ = IERSConventions.precession_angles_rot3(iers2003a, tt_c) P = angle_to_dcm(-ζₐ, θₐ, -zₐ, :ZYZ) @test v2as(v1, P*v) ≤ 1e-6 @@ -189,14 +189,14 @@ end; ϵe, ψe, ωe, χe, ze, ζe, θe = p06e(DJ2000, tt_d)[[1, 2, 3, 9, 10, 11, 12]] # Test equatorial precession angles - zₐ, θₐ, ζₐ = IERS.precession_angles_rot3(m, tt_c) + zₐ, θₐ, ζₐ = IERSConventions.precession_angles_rot3(m, tt_c) @test r2a*abs(zₐ - ze) ≤ 1e-6 @test r2a*abs(θₐ - θe) ≤ 1e-6 @test r2a*abs(ζₐ - ζe) ≤ 1e-6 # Test canonical 4-rotation precession angles - ϵ₀, ψₐ, ωₐ, χₐ = IERS.precession_angles_rot4(m, tt_c) + ϵ₀, ψₐ, ωₐ, χₐ = IERSConventions.precession_angles_rot4(m, tt_c) @test r2a*abs(ϵ₀ - ϵe) ≤ 1e-6 @test r2a*abs(ψₐ - ψe) ≤ 1e-6 @@ -224,7 +224,7 @@ end; v /= norm(v) # -- Fukushima-Williams angles (< 0.1 μas) - fw = IERS.fw_angles(iers2010a, tt_c) + fw = IERSConventions.fw_angles(iers2010a, tt_c) fe = pfw06(DJ2000, tt_d) for j in 1:4 @@ -233,12 +233,12 @@ end; # -- FW Rotation Matrix (< 0.1 μas) Rₑ = fw2m(fe[1], fe[2], fe[3], fe[4]) - Rₐ = IERS.fw_matrix(fw[1], fw[2], fw[3], fw[4]) + Rₐ = IERSConventions.fw_matrix(fw[1], fw[2], fw[3], fw[4]) @test v2as(Rₑ * v, Rₐ * v) ≤ 1e-7 # -- FW to (X, Y) CIP coordinates (< 0.1 μas) - x, y = IERS.fw2xy(fw[1], fw[2], fw[3], fw[4]) + x, y = IERSConventions.fw2xy(fw[1], fw[2], fw[3], fw[4]) xe, ye = ERFA.fw2xy(fe[1], fe[2], fe[3], fe[4]) @test r2a*abs(xe-x) ≤ 1e-7 diff --git a/test/fa.jl b/test/fa.jl index 908b2b9..e668bbc 100644 --- a/test/fa.jl +++ b/test/fa.jl @@ -6,8 +6,8 @@ r2a = 180 / π * 3600 r2a = 180 / π * 3600 da = [ - IERS.DelaunayArgs(iers1996, 0.06567), - IERS.DelaunayArgs(iers1996, 1.0) + IERSConventions.DelaunayArgs(iers1996, 0.06567), + IERSConventions.DelaunayArgs(iers1996, 1.0) ] @testset "1996" begin @@ -35,7 +35,7 @@ r2a = 180 / π * 3600 t = [rand(49)..., 1.0] @testset "2003/2010 A" begin for i in eachindex(t) - da = IERS.DelaunayArgs(rand((iers2003a, iers2010a)), t[i]) + da = IERSConventions.DelaunayArgs(rand((iers2003a, iers2010a)), t[i]) # --- Delaunay Arguments (accurate to 1μas) @test r2a*(abs(da.M - fal03(t[i]))) ≤ 1e-6 @@ -49,8 +49,8 @@ r2a = 180 / π * 3600 # Testing the truncated expressions of the Delunary Arguments dab = [ - IERS.DelaunayArgs(rand([iers2003b, iers2010b]), 0.06567), - IERS.DelaunayArgs(rand([iers2003b, iers2010b]), 1.0) + IERSConventions.DelaunayArgs(rand([iers2003b, iers2010b]), 0.06567), + IERSConventions.DelaunayArgs(rand([iers2003b, iers2010b]), 1.0) ] @testset "2003/2010 B" begin @@ -84,7 +84,7 @@ end; t = [rand(49)..., 1.0] for i in eachindex(t) - pa = IERS.PlanetaryArgs(rand((iers2003a, iers2010a)), t[i]) + pa = IERSConventions.PlanetaryArgs(rand((iers2003a, iers2010a)), t[i]) # --- Planetary Arguments (accurate to 1μas) @test r2a*(abs(pa.λ_Me - fame03(t[i]))) ≤ 1e-6 @@ -100,14 +100,14 @@ end; end # Check empty constructor - pa = IERS.PlanetaryArgs(iers2003b, rand()) + pa = IERSConventions.PlanetaryArgs(iers2003b, rand()) for j in 1:9 @test getfield(pa, j) == 0 end # Check error for 1996 models for fcn in ( - IERS.pa_mercury, IERS.pa_uranus, IERS.pa_neptune + IERSConventions.pa_mercury, IERSConventions.pa_uranus, IERSConventions.pa_neptune ) @test_throws ErrorException fcn(iers1996, 0.0) diff --git a/test/polar.jl b/test/polar.jl index aba552f..71bb8a2 100644 --- a/test/polar.jl +++ b/test/polar.jl @@ -15,13 +15,13 @@ v2as = (x, y) -> acosd(max(-1, min(1, dot(x / norm(x), y / norm(y))))) * 3600 v = rand(BigFloat, 3) # -- Testing TIO Locator - sp = IERS.tio_locator(iers2010a, tt_c) + sp = IERSConventions.tio_locator(iers2010a, tt_c) spₑ = sp00(DJ2000, tt_d) @test r2a*abs(sp-spₑ) ≤ 1e-6 - @test IERS.tio_locator(iers1996, tt_c) == 0 - @test IERS.tio_locator(CPNd, tt_c) == 0 + @test IERSConventions.tio_locator(iers1996, tt_c) == 0 + @test IERSConventions.tio_locator(CPNd, tt_c) == 0 # -- Testing Polar Motion xₚ, yₚ = rand(), rand() diff --git a/test/runtests.jl b/test/runtests.jl index 1fe6c05..3a71c69 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,5 @@ -using IERS +using IERSConventions using Test using ERFA @@ -7,7 +7,7 @@ using LinearAlgebra using ReferenceFrameRotations using Tempo -@testset "IERS" verbose=true begin +@testset "IERSConventions" verbose=true begin include("fa.jl") include("bpn.jl") diff --git a/test/sidereal.jl b/test/sidereal.jl index 497d8b3..4fb7c58 100644 --- a/test/sidereal.jl +++ b/test/sidereal.jl @@ -12,7 +12,7 @@ r2a = 180 / π * 3600 tt_c = rand()/4 tt_d = tt_c*Tempo.CENTURY2DAY - ut1_d = tt_d + IERS.offset_tt2ut1(tt_d*Tempo.DAY2SEC)/Tempo.DAY2SEC + ut1_d = tt_d + IERSConventions.offset_tt2ut1(tt_d*Tempo.DAY2SEC)/Tempo.DAY2SEC # --- Testing 1996 model (< 10 μas) # GMST @@ -21,7 +21,7 @@ r2a = 180 / π * 3600 @test r2a*abs(gm-gme) ≤ 1e-5 # Equation of the equinoxes - eeq = IERS.equation_equinoxes(iers1996, tt_c) + eeq = IERSConventions.equation_equinoxes(iers1996, tt_c) eeqe = eqeq94(DJ2000, tt_d) @test r2a*abs(eeq-eeqe) ≤ 1e-7 @@ -40,7 +40,7 @@ r2a = 180 / π * 3600 @test r2a*abs(gm-gme) ≤ 1e-6 # Equation of the equinoxes - eeq = IERS.equation_equinoxes(iers2003a, tt_c) + eeq = IERSConventions.equation_equinoxes(iers2003a, tt_c) eeqe = ee00a(DJ2000, tt_d) @test r2a*abs(eeq-eeqe) ≤ 1e-7 @@ -56,7 +56,7 @@ r2a = 180 / π * 3600 @test r2a*abs(gm-gme) ≤ 1e-6 # Equation of the equinoxes - eeq = IERS.equation_equinoxes(iers2003b, tt_c) + eeq = IERSConventions.equation_equinoxes(iers2003b, tt_c) @test r2a*abs(eeq-eeqe) ≤ 2.5e-3 # GAST