EngineeringJune 202671 checks · 0 failures

How We Verified 71 Vedic Astrology Calculations Against Jagannatha Hora

When we built VedIntel™ AstroAPI, we set one non-negotiable standard: every planet position must match Jagannatha Hora — the gold standard desktop software used by professional astrologers — to within 0.05 degrees. This is the story of how we got there, what we found, and how we built a test suite that runs 71 checks on every deployment.

Why Accuracy Is the Only Thing That Matters

Vedic astrology is not casual entertainment in India. It is used by matrimonial platforms to calculate kundali compatibility before marriages. It is used by professional astrologers billing thousands of rupees per consultation. It is embedded in apps used by millions daily. A wrong Lagna, a wrong Mahadasha date, or a wrong Kaalsarp result does not just return an incorrect answer — it causes real decisions to be made on false information. A single wrong result and a developer loses trust permanently.

The Reference Chart

Every accuracy system needs a single reference chart with known-correct values. Ours is:

dob: 01/01/1990   tob: 12:00 IST
lat: 28.6139   lon: 77.2090   tz: 5.5
ayanamsa: Lahiri

We cross-verified the expected values against Jagannatha Hora and Drik Panchang independently. Every single expected value in our test suite was manually confirmed before being written into code. The expected Lagna is Libra at 7.7167°. The expected Moon is Cancer at 16.6408° (house 10). Jupiter Mahadasha started 2014-05-14 ±2 days. These are not estimates — they are facts.

What the 71 Checks Cover

The test suite is not a high-level smoke test. It checks every field of every computation:

60 planet checks
For each of the 10 bodies (Lagna, Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu): zodiac sign, local degree (±0.05°), nakshatra, pada, nakshatra lord, and house. That is 6 checks × 10 bodies = 60.
2 Mahadasha checks
Jupiter Mahadasha start date must be within 2 days of 2014-05-14. The first dasha in the sequence (Sun, with partial balance) must be correct.
3 Kaalsarp checks
Present/absent, dosha type (Takshak for this chart), and the Rahu-Ketu axis (Libra-Aries).
4 Panchang checks
Tithi (Dwitiya), Nakshatra (Uttara Phalguni), Vara (Friday), and Yoga (Sadhya) for the birth date.
2 confidence checks
The API must return confidence.level=HIGH and zero warnings for a clean, valid input.

The degree tolerance of 0.05° (3 arcminutes) is tight enough to catch any real computation error but tolerant of sub-arcminute differences in ayanamsa rounding between software implementations. In practice, our current output differs from the expected values by 0.0031° for most planets — that is the numerical precision of Swiss Ephemeris itself, not an error.

Three Bugs Found During the Overhaul

When we first ran the golden record suite, it did not pass. We found three calculation bugs:

1

Divisional Chart Formula

normalizeDeg(planet.global_degree * divNum) — wrong for all D1–D60
Fix: Chart-specific BPHS formulas per division type (D9 uses trikona start, D2 uses Hora rule, D30 uses unequal arcs)
Impact: Every divisional chart — D9 Navamsa, D10 Dashamsha, D7 Saptamsha — returned wrong signs for most planets.
2

Vimshottari Dasha Cycle Loop

Outer 3-cycle loop with broken currentLordIdx — cycle 2 started from wrong lord
Fix: Single flat loop: for (let i = 0; i < 27; i++) lord = DASHA_SEQUENCE[(lordIdx + i) % 9]
Impact: All dasha dates after approximately year 50 were wrong. Wrong Jupiter Mahadasha for most people over 50.
3

Sunrise/Sunset UTC Bug

Spencer (1971) approximation formula (±15 min error) plus double timezone application in fallback
Fix: Swiss Ephemeris swe_rise_trans() with correct callback API. Mumbai 19 Apr 2026: was 11:52 AM, now correct 6:18 AM.
Impact: Completely wrong sunrise time breaks all Panchang muhurta calculations and Hora tables.

Running the Suite on Every Deployment

The golden record test runs as a Node.js script against the live production API. It is also available as a server-side route — authenticated with the admin secret — so it can be triggered from the admin dashboard with a single click and shows real-time pass/fail results.

$ BASE_URL=https://vedintelastroapi.com \
API_KEY=your_key node scripts/golden-record-test.mjs
✓ PASS Lagna sign Libra
✓ PASS Lagna local_degree 7.7167° (diff 0.0000°)
✓ PASS Moon sign Cancer
... 68 more checks ...
Results: 71 passed, 0 failed

Try the API — Accuracy Guaranteed

Every VedIntel™ API response includes a confidence field showing the verification level. The free plan gives you 500 calls/month — enough to validate accuracy against your own reference charts before committing.

Start Free →View Docs
Related articles
Why Swiss Ephemeris matters for Vedic astrology accuracy →The UTC timezone bug in Vimshottari dasha — and how to fix it →Rahu true node vs mean node — the 1.29° difference →