Integration Guide
Coordinate Systems
Planetary positions begin as raw barycentric vectors from the JPL ephemeris and travel through a multi-step transformation pipeline before reaching the ecliptic longitudes your chart uses. This page documents each step.
The Coordinate Pipeline
ICRS Barycentric
SourceThe International Celestial Reference System is the starting frame. Positions are given as vectors from the Solar System barycenter (center of mass of the whole system) in the J2000.0 epoch.
Geocentric ICRS
Barycentric → EarthThe Earth–Moon barycenter offset is subtracted to shift the origin to Earth's center. This is where apparent positions are measured from for geocentric astrology.
Aberration Correction
IAU 2006Earth's orbital velocity causes apparent stellar positions to shift by up to ~20 arcseconds (annual aberration). The IAU 2006 stellar aberration model corrects for this, giving the apparent position as seen from Earth's surface.
Precession
IAU 2006AEarth's rotation axis wobbles slowly over ~26,000 years (precession of the equinoxes). The IAU 2006A model rotates the frame from mean J2000.0 ICRS to the mean equatorial frame of the date being computed.
Nutation
IAU 2000BShorter-period oscillations of Earth's axis (nutation) are superimposed on precession. The IAU 2000B model (a fast approximation accurate to ~1 milliarcsecond) adjusts the frame from mean to true equatorial of date.
Ecliptic Longitude & Latitude
Final OutputA final rotation by the true obliquity of the ecliptic transforms the true equatorial coordinates into ecliptic longitude and latitude — the values returned by the Vedākṣha API.
Accessing Intermediate Coordinates
By default, compute returns the fully transformed ecliptic coordinates. If you need intermediate frames — for example, to verify a specific transformation step — use the lower-level functions directly.
use vedaksha::prelude::*;
use vedaksha::coords::*;
let jd = calendar_to_jd(2024, 3, 20, 12.0);
// Step 1–2: barycentric → geocentric ICRS vector
let geo_icrs = geocentric_icrs(Body::Mars, jd)?;
// Step 3: apply aberration
let apparent = apply_aberration(geo_icrs, jd)?;
// Step 4–5: apply precession and nutation
let (psi, eps) = nutation(jd)?; // IAU 2000B
let obliquity = true_obliquity(jd)?; // including nutation
let true_equat = apply_precession_nutation(apparent, jd, psi, eps)?;
// Step 6: rotate to ecliptic
let (lon, lat) = equatorial_to_ecliptic(true_equat, obliquity)?;
println!("λ = {:.6}°", lon);
println!("β = {:.6}°", lat);Precession and Nutation Models
IAU 2006A Precession
The complete IAU 2006A precession model uses a polynomial expansion to rotate coordinates from J2000.0 to the mean equatorial frame of date. The dominant period is ~25,772 years. Accuracy degrades beyond ±200,000 years from J2000.0 — well outside any practical use case.
IAU 2000B Nutation
IAU 2000B is a truncated version of the full 1365-term IAU 2000A model. It retains 77 lunisolar terms and achieves accuracy of 1 milliarcsecond over a 50-year interval around J2000.0. The dominant nutation period is ~18.6 years (the lunar nodal cycle).
Sidereal Time
Sidereal time is Earth's rotation angle relative to the distant stars rather than the Sun. It is required to compute the RAMC (Right Ascension of the Midheaven), and from RAMC, the house cusps.
GMST
Greenwich Mean Sidereal Time
Earth's rotation angle measured from the mean (non-nutated) vernal equinox at Greenwich.
GAST
Greenwich Apparent Sidereal Time
GMST corrected for the equation of the equinoxes (nutation in right ascension). More accurate.
LAST
Local Apparent Sidereal Time
GAST plus the observer's geographic longitude (in time units). This is what drives the Ascendant and RAMC.
let jd = calendar_to_jd(2024, 3, 20, 12.0);
let lon_deg = 77.2090; // observer's geographic longitude
let gmst = greenwich_mean_sidereal_time(jd)?; // hours
let gast = greenwich_apparent_sidereal_time(jd)?;
let last = local_apparent_sidereal_time(jd, lon_deg)?;
let ramc = last * 15.0; // degrees
println!("GMST : {:.6} h", gmst);
println!("GAST : {:.6} h", gast);
println!("LAST : {:.6} h", last);
println!("RAMC : {:.4}°", ramc);Delta T (ΔT)
Ephemeris calculations use Terrestrial Time (TT), which runs at a uniform rate. Civil time (UT1) is based on Earth's actual rotation, which is slightly irregular. Delta T is the difference between them: ΔT = TT − UT1.
Vedākṣha applies Delta T automatically. When you pass a Julian Day derived from a civil date (UTC), the library converts it to TT internally before querying the ephemeris. For historical dates, it uses published tables from USNO and the International Earth Rotation Service. For future dates, it uses a polynomial extrapolation.
Current Value
For dates near 2024, ΔT is approximately 69 seconds. For ancient historical dates (e.g., 500 BCE), ΔT can exceed several hours and dominates the uncertainty in planetary position calculations.