rfa 0.5.9

A port ERFA to Rust.
Documentation
use crate::vector_matrix::spherical_cartesian::{c2s::*, s2c::*};
use crate::vector_matrix::{matrix_vec_prod::rxp, angle_ops::{anp::*, anpm::*}};
use super::ltecm::*;
///  Transformation from ICRS equatorial coordinates to ecliptic
///  coordinates (mean equinox and ecliptic of date) using a long-term
///  precession model.
///
///  Given:
///     epj     double     Julian epoch (TT)
///     dr,dd   double     ICRS right ascension and declination (radians)
///
///  Returned:
///     dl,db   double     ecliptic longitude and latitude (radians)
///
///  1) No assumptions are made about whether the coordinates represent
///     starlight and embody astrometric effects such as parallax or
///     aberration.
///
///  2) The transformation is approximately that from mean J2000.0 right
///     ascension and declination to ecliptic longitude and latitude
///     (mean equinox and ecliptic of date), with only frame bias (always
///     less than 25 mas) to disturb this classical picture.
///
///  3) The Vondrak et al. (2011, 2012) 400 millennia precession model
///     agrees with the IAU 2006 precession at J2000.0 and stays within
///     100 microarcseconds during the 20th and 21st centuries.  It is
///     accurate to a few arcseconds throughout the historical period,
///     worsening to a few tenths of a degree at the end of the
///     +/- 200,000 year time span.
///  References:
///
///    Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
///    expressions, valid for long time intervals, Astron.Astrophys. 534,
///    A22
///
///    Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
///    expressions, valid for long time intervals (Corrigendum),
///    Astron.Astrophys. 541, C1
///
///  This revision:  2021 May 11
pub fn lteqec(epj: f64, dr: f64, dd: f64, dl: &mut f64, db:&mut f64)
{
    /* Spherical to Cartesian. */
       let mut v1 = [0.;3];
       s2c(dr, dd, &mut v1);
    
    /* Rotation matrix, ICRS equatorial to ecliptic. */
       let mut rm = [[0.;3];3];
       ltecm(epj, &mut rm);
    
    /* The transformation from ICRS to ecliptic. */
       let mut v2 = [0.; 3];
       rxp(&rm, &v1, &mut v2);
    
    /* Cartesian to spherical. */
       c2s(&v2, dl, db);
    
    /* Express in conventional ranges. */
       *dl = anp(*dl);
       *db = anpm(*db);
    
    /* Finished. */
}