Axes

Core

FrameTransformations.add_axes!Function
add_axes!(frames, name::Symbol, id::Int, class::Int, funs, parentid)

Add a new axes node to frames.

Inputs

  • frames – Target frame system
  • name – Axes name, must be unique within frames
  • id – Axes ID, must be unique within frames
  • class – Axes class.
  • funsFrameAxesFunctions object storing the functions to compute the DCM and, eventually, its time derivatives. It must match the type and order of frames.
  • parentid – Axes ID of the parent axes. Not required only for the root axes.
Warning

This is a low-level function and is NOT meant to be directly used. Instead, to add a set of axes to the frame system, see add_axes_inertial!, add_axes_rotating!, add_axes_fixedoffset! and add_axes_root!.

source
FrameTransformations.add_axes_rotating!Function
add_axes_rotating!(frames, name::Symbol, id::Int, parent, fun, δfun=nothing, 
    δ²fun=nothing, δ³fun=nothing)

Add axes as a set of rotating axes to frames. The orientation of these axes depends only on time and is computed through the custom functions provided by the user.

The input functions must accept only time as argument and their outputs must be as follows:

  • fun: return a Direction Cosine Matrix (DCM).
  • δfun: return the DCM and its 1st order time derivative.
  • δ²fun: return the DCM and its 1st and 2nd order time derivatives.
  • δ³fun: return the DCM and its 1st, 2nd and 3rd order time derivatives.

If δfun, δ²fun or δ³fun are not provided, they are computed via automatic differentiation.

Warning

It is expected that the input functions and their outputs have the correct signature. This function does not perform any checks on the output types.

source
FrameTransformations.add_axes_fixedoffset!Function
add_axes_fixedoffset!(frames, name::Symbol, id::Int, parent, dcm:DCM)

Add axes name with id id to frames with a fixed-offset from parent. Fixed offset axes have a constant orientation with respect to their parent axes, represented by dcm, a Direction Cosine Matrix (DCM).

See also

See also add_axes!.

source
FrameTransformations.add_axes_frozen!Function
add_axes_frozen!(frames, name, id, frozen, e)

Create a frozen axes version of frozen at epoch e, with name and id and add it to frames.

Warning

The parent axes are automatically assigned to the frozen parent.

source
FrameTransformations.add_axes_ephemeris!Function
add_axes_ephemeris!(frames::FrameSystem{O, N}, eph::AbstractEphemerisProvider, 
    name::Symbol, id::Int, seq::Symbol, class::Int) where {O, N}

Add axes coming from an AbstractEphemerisProvider subtype to frames. The axes are identifies by the id and a have a user defined name. The rotation matrix is build using the rotation sequence specified in seq. The axes type is specified by class.

Warning

This is an interface only, concrete subtypes of AbstractEphemerisProvider requires an proper implementation.

source

Celestial

FrameTransformations.add_axes_gcrf!Function
add_axes_gcrf!(frames::FrameSystem)

Add the Geocentric Celestial Reference Frame (GCRF) to the frames graph. The axes are automatically named GCRF and assigned the 23 ID. These axes can only be defined as a set of root axes or as child of the ICRF (ID = 1).

See also

See also add_axes_icrf! and AXESID_GCRF.

source

Ecliptic

FrameTransformations.add_axes_ecl2000!Function
add_axes_ecl2000!(frames, name::Symbol=:ECL2000, parentid::Int, id::Int = AXESID_ECL2000; 
    model::IERSModel=iers1996)

Add Ecliptic Equinox of J2000 (ECL2000) axes to frames. Custom id, name and parentid can be assigned by the user. The admissible parent axes are the following:

  • ICRF: for the International Celestial Reference Frame, with ID = 1
  • GCRF: for the Geocentric Celestial Reference Frame, with ID = 23
  • EME2000: the Mean Earth/Moon Ephemeris of J2000, with ID = 22
Note

The obliquity of the ecliptic is computed using the IERS convention model. To retrieve the same orientation of the ECLIPJ2000 axes avaialble in the SPICE Toolkit, the iers1996 model must be used.

source

Terrestrial

FrameTransformations.add_axes_itrf!Function
add_axes_itrf!(frames::FrameSystem, name::Symbol, parentid::Int=AXESID_ICRF, id::Int=AXESID_ITRF,
    model::IERSModel=iers2010b)

Add International Terrestrial Reference Frame (ITRF) axes to frames. Use the model argument to specify which IERS convention should be used for the computations.

Warning

If the ID of the parent set of axes is neither the ICRF (ID = 1) nor the GCRF (ID = 23), an error is thrown.

source
FrameTransformations.add_axes_tirf!Function
add_axes_tirf!(frames::FrameSystem, name::Symbol, id::Int, parentid::Int=AXESID_ICRF, 
    model::IERSModel=iers2010b)

Add Terrestrial Intermediate Reference Frame (TIRF) axes to frames. Use the model argument to specify which IERS convention should be used for the computations.

Note

Despite this class of axes has a rotation matrix that depends on time, its derivatives are assumed null.

Warning

The ID of the parent set of axes must be 1 (ICRF) or 23 (GCRF) otherwise an error is thrown.

source
FrameTransformations.add_axes_cirf!Function
add_axes_cirf!(frames::FrameSystem, name::Symbol, id::Int, parentid::Int=AXESID_ICRF, 
    model::IERSModel=iers2010b)

Add Celestial Intermediate Reference Frame (CIRF) axes to frames. Use the model argument to specify which IERS convention should be used for the computations.

Note

Despite this class of axes has a rotation matrix that depends on time, its derivatives are assumed null.

Warning

The ID of the parent set of axes must be 1 (ICRF) or 23 (GCRF) otherwise an error is thrown.

source
FrameTransformations.add_axes_mod!Function
add_axes_mod!(frames, name::Symbol, axesid::Int, parentid::Int, 
    model::IERSConventions.IERSModel=iers2010b)

Add Mean Equator and Equinox of Date (MOD) axes to frames. Use the model argument to specify which IERS convention should be used for the computations.

Note

The Mean-of-Date axes are obtained by applying the frame bias and precession matrix. For this reason, if the IERS 1996 conventions are used, the rotation is actually computed starting from the EME2000 rather than the GCRF.

Note

Despite this class of axes has a rotation matrix that depends on time, its derivatives are assumed null.

Warning

The ID of the parent set of axes must be 1 (ICRF) or 23 (GCRF) otherwise an error is thrown.

source
FrameTransformations.add_axes_tod!Function
add_axes_tod!(frames::FrameSystem, name::Symbol, id::Int, parentid::Int=AXESID_ICRF, 
    model::IERSModel=iers2010b)

Add True Equator of Date (TOD) axes to frames. Use the model argument to specify which IERS convention should be used for the computations.

Note

The True-of-Date axes are obtained by applying the frame bias, precession and nutation matrix. For this reason, if the IERS 1996 conventions are used, the rotation is actually computed starting from the EME2000 rather than the GCRF.

Note

Despite this class of axes has a rotation matrix that depends on time, its derivatives are assumed null.

Warning

The ID of the parent set of axes must be 1 (ICRF) or 23 (GCRF) otherwise an error is thrown.

source
FrameTransformations.add_axes_gtod!Function
add_axes_gtod!(frames::FrameSystem, name::Symbol, id::Int, parentid::Int=AXESID_ICRF, 
    model::IERSModel=iers2010b)

Add Greenwich True-of-Date (GTOD) axes to frames. Use the model argument to specify which IERS convention should be used for the computations.

Note

Despite this class of axes has a rotation matrix that depends on time, its derivatives are assumed null.

Warning

The ID of the parent set of axes must be 1 (ICRF) or 23 (GCRF) otherwise an error is thrown.

source
FrameTransformations.add_axes_pef!Function
add_axes_pef!(frames::FrameSystem, name::Symbol, id::Int, parentid::Int=AXESID_ICRF, 
    model::IERSModel=iers2010b)

Add Pseudo-Earth Fixed (PEF) axes to frames. Use the model argument to specify which IERS convention should be used for the computations.

Warning

The ID of the parent set of axes must be 1 (ICRF) or 23 (GCRF) otherwise an error is thrown.

source

Planetary

FrameTransformations.add_axes_bci2000!Function
add_axes_bci2000!(frames, axes::AbstractFrameAxes, center, data)

Add Body-Centered Inertial (BCI) axes at J2000 with name and id to frames. The center point (i.e., the reference body) is center.

Warning

The parent axes are automatically set to the ICRF (ID = 1). If the ICRF is not defined in frames, an error is thrown.

See also

See also add_axes_fixedoffset!, add_axes_bcrtod!.

source
FrameTransformations.add_axes_bcrtod!Function
add_axes_bcrtod!(frames, name, id, center; deriv=true)

Add Body-Centered Rotating (BCR), True-of-Date (TOD) axes with name and id to frames. The center point (i.e., the reference body) is center.

These axes are the equivalent of SPICE's IAU_<BODY_NAME> frames.

Warning

The parent axes are automatically set to the ICRF (ID = 1). If the ICRF is not defined in frames, an error is thrown.

See also

See also add_axes_rotating!, add_axes_bci2000!.

source

Lunar

FrameTransformations.add_axes_me421!Function
add_axes_me421!(frames, name::Symbol, parentid::Int, axesid::Int=AXESID_MOONME_DE421)

Add DE421 Moon's Mean Earth/Mean Rotation (ME) axes to frames.

Warning

The parent set of axes must either the DE440 Principal Axes (PA440, ID =

  1. or the DE421 Principal Axes (PA421, ID =

31006), otherwise an error is thrown. Depending on that, the relative axes orientation will be automatically selected by this function.

source
FrameTransformations.add_axes_pa421!Function
add_axes_pa421!(frames, eph::AbstractEphemerisProvider, name::Symbol, 
    id::Int=AXESID_MOONPA_DE421)

Add DE421 Moon's Principal Axes (PA) axes to frames. The libration angles are extracted from the eph ephemeris kernels, an error is thrown if such orientation data is not available.

Warning

The parent axes are automatically set to the ICRF (ID = 1). If such axes are not registered in the frame system, an error is thrown.

Warning

To properly read the ephemeris kernels, the ID associated to the input axes must match NAIF's FRAME ID for the Moon PA DE421 axes (31006).

source
FrameTransformations.add_axes_pa440!Function
add_axes_pa440!(frames, eph::AbstractEphemerisProvider, name::Symbol, 
    id::Int=AXESID_MOONPA_DE440)

Add DE440 Moon's Principal Axes (PA) axes to frames. The libration angles are extracted from the eph ephemeris kernels, an error is thrown if such orientation data is not available.

Warning

The parent axes are automatically set to the ICRF (ID = 1). If such axes are not registered in the frame system, an error is thrown.

Warning

To properly read the ephemeris kernels, the ID associated to the input axes must match NAIF's FRAME ID for the Moon PA DE440 axes (31008).

source

Topocentric

FrameTransformations.add_axes_topocentric!Function
add_axes_topocentric!(frames, name::Symbol, id::Int, parentid::Int, λ, ϕ, mount)

Add topocentric axes to frames at a specified location and mounting.

The orientation relative to the parent axes parentid is defined throuh the longitude λ, the geodetic latitude ϕ and the mounting type mount, which may be any of the following:

  • :NED (North, East, Down): the X-axis points North, the Y-axis is directed eastward and the Z-axis points inwards towards the nadir.
  • :SEZ (South, East, Zenith): the X-axis points South, the Y-axis is directed East, and the Z-axis points outwards towards the zenith.
  • :ENU (East, North, Up): the X-axis points East, the Y-axis is directed North and the Z-axis points outwards towards the zenith.
Warning

The parent axes must be a set of body-fixed reference axes. This is under user resposibility.

source

Others

FrameTransformations.add_axes_twovectors!Function
add_axes_twovectors!(frames, name::Symbol, id::Int, parentid::Int,
    from1::Int, to1::Int, from2::Int, to2::Int, seq::Symbol; 
    inertial::Bool=false)

Add a set of axes to frames based on two vectors defined by four points.

This function adds a new set of axes to frames using two vectors defined by four points. The vectors are constructed from the points specified by from1 to to1 and from2 to to2. A right-handed coordinate system is generated based on the specified sequence direction (seq), which determines the order in which the vectors are used to define the basis. The inertial flag specifies whether the resulting axes are inertial.

source

Utils

IDs

This is a list of NAIF IDs for standard axes that are used in astrodynamic applications.

FrameTransformations.AXESID_EME2000Constant
AXESID_EME2000

Axes ID for the Mean Dynamical Equator and Equinox of J2000.0.

Note

In SPICE the J2000 (EME2000) and ICRF axes are considered equal, thus there exist no specific NAIF ID for the EME2000 axes. 22 has been chosen because it is the first unassigned axes ID among the built-in SPICE frames.

source
FrameTransformations.AXESID_GCRFConstant
AXESID_GCRF

Axes ID for the Geocentric Celestial Reference Frame (GCRFF)

Note

Although the ICRF and GCRF axes are identical, they are based upon a different timescale. A different ID is here assigned to provide a robust way of distinguishing between the two. 23 has been chosen because it is one of the unassigned axes ID among the built-in SPICE frames.

source

Rotation Matrices

FrameTransformations.DCM_ICRF_TO_EME2000Constant
DCM_ICRF_TO_EME2000

DCM for the rotation from the International Celestial Reference Frame (ICRF) and the Mean Equator and Equinox of J2000.0 (EME2000). This corresponds to the J2000 frame in the SPICE toolkit.

Note

The frame bias is here computed using the IAU 2006 Precession model, similarly to ESA's GODOT. Some other software libraries, such as Orekit, use the frame bias of the IAU 2000 precession model. The two definitions differ of about 1 arcsecond.

Moreover, according to Hilton there are multiple possibilities to define the proper rotation between the ICRS and the EME2000. The transformation implemented here correspond to Eq. 6 using the parameters in Table 3, line 1 (RIERS).

References

  • Hilton, James L., and Catherine Y. Hohenkerk. – Rotation matrix from the mean dynamical equator and equinox at J2000. 0 to the ICRS. – Astronomy & Astrophysics 513.2 (2004): 765-770. DOI: 10.1051/0004-6361:20031552
  • SOFA docs
source