rfa 0.5.9

A port ERFA to Rust.
Documentation
use super::ltecm::*;
use crate::vector_matrix::{spherical_cartesian::{s2c::*, c2s::*}, angle_ops::{anp::*, anpm::*}};
use crate::vector_matrix::matrix_vec_prod::trxp;
///  Transformation from ecliptic coordinates (mean equinox and ecliptic
///  of date) to ICRS RA,Dec, using a long-term precession model.
///
///  Given:
///   * epj Julian epoch (TT)
///   * dl,db ecliptic longitude and latitude (radians)
///
///  Returned:
///   * dr,dd ICRS right ascension and declination (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 ecliptic longitude
///     and latitude (mean equinox and ecliptic of date) to mean J2000.0
///     right ascension and declination, 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 lteceq(epj: f64, dl: f64, db: f64, dr:&mut f64, dd:&mut f64)
{

 /* Spherical to Cartesian. */
    let mut v1 = [0.; 3]; 
    s2c(dl, db, &mut v1);
 
 /* Rotation matrix, ICRS equatorial to ecliptic. */
    let mut rm = [[0.;3];3];
    ltecm(epj, &mut rm);
 
 /* The transformation from ecliptic to ICRS. */
    let mut v2 = [0.; 3]; 
    trxp(&rm, &v1, &mut v2);
 
 /* Cartesian to spherical. */
    c2s(&v2, dr, dd);
 
 /* Express in conventional ranges. */
    *dr = anp(*dr);
    *dd = anpm(*dd);
 
 /* Finished. */
 
 }