stem-branch 0.8.0

Native Rust port of stem-branch's solar ephemeris core (full VSOP87D Earth series + JPL DE441-fitted correction + IAU2000B nutation).
Documentation
// @generated by scripts/gen-rust-solar-data.mjs from the TypeScript source.
// Do not edit by hand; re-run the generator to update.
// VSOP87 phase coefficients legitimately sit near math constants (e.g. π),
// which is not a sloppy approximation here.
#![allow(clippy::approx_constant)]

/// IAU2000B nutation-in-longitude terms (77 lunisolar).
/// Columns: `[l, l', F, D, Omega, dpsi_sin, dpsi_sin_T]`, the last two in
/// units of 0.1 microarcseconds. arg = sum(col[0..5] * delaunay), and
/// dpsi += (col[5] + col[6]*T) * sin(arg).
#[rustfmt::skip]
pub static NUT_COEFFS: &[[f64; 7]] = &[
    [0.0, 0.0, 0.0, 0.0, 1.0, -172064161.0, -174666.0],
    [0.0, 0.0, 2.0, -2.0, 2.0, -13170906.0, -1675.0],
    [0.0, 0.0, 2.0, 0.0, 2.0, -2276413.0, -234.0],
    [0.0, 0.0, 0.0, 0.0, 2.0, 2074554.0, 207.0],
    [0.0, 1.0, 0.0, 0.0, 0.0, 1475877.0, -3633.0],
    [0.0, 1.0, 2.0, -2.0, 2.0, -516821.0, 1226.0],
    [1.0, 0.0, 0.0, 0.0, 0.0, 711159.0, 73.0],
    [0.0, 0.0, 2.0, 0.0, 1.0, -387298.0, -367.0],
    [1.0, 0.0, 2.0, 0.0, 2.0, -301461.0, -36.0],
    [0.0, -1.0, 2.0, -2.0, 2.0, 215829.0, -494.0],
    [0.0, 0.0, 2.0, -2.0, 1.0, 128227.0, 137.0],
    [-1.0, 0.0, 2.0, 0.0, 2.0, 123457.0, 11.0],
    [-1.0, 0.0, 0.0, 2.0, 0.0, 156994.0, 10.0],
    [1.0, 0.0, 0.0, 0.0, 1.0, 63110.0, 63.0],
    [-1.0, 0.0, 0.0, 0.0, 1.0, -57976.0, -63.0],
    [-1.0, 0.0, 2.0, 2.0, 2.0, -59641.0, -11.0],
    [1.0, 0.0, 2.0, 0.0, 1.0, -51613.0, -42.0],
    [-2.0, 0.0, 2.0, 0.0, 1.0, 45893.0, 50.0],
    [0.0, 0.0, 0.0, 2.0, 0.0, 63384.0, 11.0],
    [0.0, 0.0, 2.0, 2.0, 2.0, -38571.0, -1.0],
    [0.0, -2.0, 2.0, -2.0, 2.0, 32481.0, 0.0],
    [-2.0, 0.0, 0.0, 2.0, 0.0, -47722.0, 0.0],
    [2.0, 0.0, 2.0, 0.0, 2.0, -31046.0, -1.0],
    [1.0, 0.0, 2.0, -2.0, 2.0, 28593.0, 0.0],
    [-1.0, 0.0, 2.0, 0.0, 1.0, 20441.0, 21.0],
    [2.0, 0.0, 0.0, 0.0, 0.0, 29243.0, 0.0],
    [0.0, 0.0, 2.0, 0.0, 0.0, 25887.0, 0.0],
    [0.0, 1.0, 0.0, 0.0, 1.0, -14053.0, -25.0],
    [-1.0, 0.0, 0.0, 2.0, 1.0, 15164.0, 10.0],
    [0.0, 2.0, 2.0, -2.0, 2.0, -15794.0, 72.0],
    [0.0, 0.0, -2.0, 2.0, 0.0, 21783.0, 0.0],
    [1.0, 0.0, 0.0, -2.0, 1.0, -12873.0, -10.0],
    [0.0, -1.0, 0.0, 0.0, 1.0, -12654.0, 11.0],
    [-1.0, 0.0, 2.0, 2.0, 1.0, -10204.0, 0.0],
    [0.0, 2.0, 0.0, 0.0, 0.0, 16707.0, -85.0],
    [1.0, 0.0, 2.0, 2.0, 2.0, -7691.0, 0.0],
    [-2.0, 0.0, 2.0, 0.0, 0.0, -11024.0, 0.0],
    [0.0, 1.0, 2.0, 0.0, 2.0, 7566.0, -21.0],
    [0.0, 0.0, 2.0, 2.0, 1.0, -6637.0, -11.0],
    [0.0, -1.0, 2.0, 0.0, 2.0, -7141.0, 21.0],
    [0.0, 0.0, 0.0, 2.0, 1.0, -6302.0, -11.0],
    [1.0, 0.0, 2.0, -2.0, 1.0, 5800.0, 10.0],
    [2.0, 0.0, 2.0, -2.0, 2.0, 6443.0, 0.0],
    [-2.0, 0.0, 0.0, 2.0, 1.0, -5774.0, -11.0],
    [2.0, 0.0, 2.0, 0.0, 1.0, -5350.0, 0.0],
    [0.0, -1.0, 2.0, -2.0, 1.0, -4752.0, -11.0],
    [0.0, 0.0, 0.0, -2.0, 1.0, -4940.0, -11.0],
    [-1.0, -1.0, 0.0, 2.0, 0.0, 7350.0, 0.0],
    [2.0, 0.0, 0.0, -2.0, 1.0, 4065.0, 0.0],
    [1.0, 0.0, 0.0, 2.0, 0.0, 6579.0, 0.0],
    [0.0, 1.0, 2.0, -2.0, 1.0, 3579.0, 0.0],
    [1.0, -1.0, 0.0, 0.0, 0.0, 4725.0, 0.0],
    [-2.0, 0.0, 2.0, 0.0, 2.0, -3075.0, 0.0],
    [3.0, 0.0, 2.0, 0.0, 2.0, -2904.0, 0.0],
    [0.0, -1.0, 0.0, 2.0, 0.0, 4348.0, 0.0],
    [1.0, -1.0, 2.0, 0.0, 2.0, -2878.0, 0.0],
    [0.0, 0.0, 0.0, 1.0, 0.0, -4230.0, 0.0],
    [-1.0, -1.0, 2.0, 2.0, 2.0, -2819.0, 0.0],
    [-1.0, 0.0, 2.0, 0.0, 0.0, -4056.0, 0.0],
    [0.0, -1.0, 2.0, 2.0, 2.0, -2647.0, 0.0],
    [-2.0, 0.0, 0.0, 0.0, 1.0, -2294.0, 0.0],
    [1.0, 1.0, 2.0, 0.0, 2.0, 2481.0, 0.0],
    [2.0, 0.0, 0.0, 0.0, 1.0, 2179.0, 0.0],
    [-1.0, 1.0, 0.0, 1.0, 0.0, 3276.0, 0.0],
    [1.0, 1.0, 0.0, 0.0, 0.0, -3389.0, 0.0],
    [1.0, 0.0, 2.0, 0.0, 0.0, 3339.0, 0.0],
    [-1.0, 0.0, 2.0, -2.0, 1.0, -1987.0, 0.0],
    [1.0, 0.0, 0.0, 0.0, 2.0, -1981.0, 0.0],
    [-1.0, 0.0, 0.0, 1.0, 0.0, 4026.0, 0.0],
    [0.0, 0.0, 2.0, 1.0, 2.0, 1660.0, 0.0],
    [-1.0, 0.0, 2.0, 4.0, 2.0, -1521.0, 0.0],
    [-1.0, 1.0, 0.0, 1.0, 1.0, 1314.0, 0.0],
    [0.0, -2.0, 2.0, -2.0, 1.0, -1283.0, 0.0],
    [1.0, 0.0, 2.0, 2.0, 1.0, -1331.0, 0.0],
    [-2.0, 0.0, 2.0, 2.0, 2.0, 1383.0, 0.0],
    [-1.0, 0.0, 0.0, 0.0, 2.0, 1405.0, 0.0],
    [1.0, 1.0, 2.0, -2.0, 2.0, 1290.0, 0.0]
];

/// IAU2000B nutation-in-obliquity coefficients, parallel to `NUT_COEFFS`
/// rows. Columns: `[deps_cos, deps_cos_T]` in 0.1 microarcseconds.
/// deps += (col[0] + col[1]*T) * cos(arg).
#[rustfmt::skip]
pub static NUT_OBLIQ: &[[f64; 2]] = &[
    [92052331.0, 9086.0],
    [5730336.0, -3015.0],
    [978459.0, -485.0],
    [-897492.0, 470.0],
    [73871.0, -184.0],
    [224386.0, -677.0],
    [-6750.0, 0.0],
    [200728.0, 18.0],
    [129025.0, -63.0],
    [-95929.0, 299.0],
    [-68982.0, -9.0],
    [-53311.0, 32.0],
    [-1235.0, 0.0],
    [-33228.0, 0.0],
    [31429.0, 0.0],
    [25543.0, -11.0],
    [26366.0, 0.0],
    [-24236.0, -10.0],
    [-1220.0, 0.0],
    [16452.0, -11.0],
    [-13870.0, 0.0],
    [477.0, 0.0],
    [13238.0, -11.0],
    [-12338.0, 10.0],
    [-10758.0, 0.0],
    [-609.0, 0.0],
    [-550.0, 0.0],
    [8551.0, -2.0],
    [-8001.0, 0.0],
    [6850.0, -42.0],
    [-167.0, 0.0],
    [6953.0, 0.0],
    [6415.0, 0.0],
    [5222.0, 0.0],
    [168.0, -1.0],
    [3268.0, 0.0],
    [104.0, 0.0],
    [-3250.0, 0.0],
    [3353.0, 0.0],
    [3070.0, 0.0],
    [3272.0, 0.0],
    [-3045.0, 0.0],
    [-2768.0, 0.0],
    [3041.0, 0.0],
    [2695.0, 0.0],
    [2719.0, 0.0],
    [2720.0, 0.0],
    [-51.0, 0.0],
    [-2206.0, 0.0],
    [-199.0, 0.0],
    [-1900.0, 0.0],
    [-41.0, 0.0],
    [1313.0, 0.0],
    [1233.0, 0.0],
    [-81.0, 0.0],
    [1232.0, 0.0],
    [-20.0, 0.0],
    [1207.0, 0.0],
    [40.0, 0.0],
    [1129.0, 0.0],
    [1266.0, 0.0],
    [-1062.0, 0.0],
    [-1129.0, 0.0],
    [-9.0, 0.0],
    [35.0, 0.0],
    [-107.0, 0.0],
    [1073.0, 0.0],
    [854.0, 0.0],
    [-553.0, 0.0],
    [-710.0, 0.0],
    [647.0, 0.0],
    [-700.0, 0.0],
    [672.0, 0.0],
    [663.0, 0.0],
    [-594.0, 0.0],
    [-610.0, 0.0],
    [-556.0, 0.0]
];