The seven cases in tests/fixtures/swiss-ephemeris.json cover dates from 1900 to 2100 and locations in both hemispheres. The reference values were generated independently with the official Swiss Ephemeris CLI using Moshier calculations, Lahiri sidereal mode and the mean ascending lunar node.
Each fixture records its date, coordinates, CLI arguments, source revision and executable SHA256. The reference executable is used locally to regenerate fixtures and is not included in the repository or the application.
The tests compare the Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, mean Rahu and ascendant using a tolerance of 0.03°. The largest observed differences are 0.02208° for a planetary longitude and 0.00620° for the ascendant. Ketu is defined as the point opposite mean Rahu and checked separately.
These are sampled comparisons. They do not establish a maximum error for every date and location. A position close to a sign, nakshatra or pada boundary can be classified differently by another ephemeris.
The sunrise checks use Hyderabad at 17.385° N, 78.4867° E and sea level on 7 September 2026. The independent reference gives sunrise at 00:33:03.7 UTC, sunset at 12:54:59.4 UTC and moonset at 10:05:24.8 UTC. The application passes a tolerance of two minutes for those events. Terrain, elevation and atmospheric conditions affect observed rising and setting times.
Sources: Astronomy Engine, Swiss Ephemeris documentation and the official Swiss Ephemeris repository.
The API accepts dates from 1900 to 2100. A birth date must also be in the past. Missing details and impossible calendar dates are rejected.
Birth times are converted using an IANA timezone. A local time skipped during a daylight saving change is rejected. If a local time occurs twice, the form needs an explicit UTC offset in minutes, positive east of UTC and negative west of UTC.
City coordinates come from a local database or the geocoder. The report shows the coordinates, timezone and source used. These are approximate city centers. Manual coordinates are available when more precision is needed. An unresolved location produces an error.
Longitudes are geocentric and sidereal, with an approximate Lahiri ayanamsa. Mean lunar nodes are mathematical points, not visible planets. D1 uses divisions of 30°. D9 uses divisions of 3°20′. Houses use complete signs relative to the ascendant or natal Moon, as labeled in the view.
Vimshottari begins with the balance of the period identified by the Moon’s position within its nakshatra. One year is 365.25 days. The displayed timeline is the cycle of 120 years containing the calculation instant. Period timestamps retain time precision; an ending instant belongs to the following period. Saved reports identify when their periods were calculated.
The calculation compares transiting sidereal Saturn with the natal Moon sign calculated from the birth details. It does not use the Sun sign or the Moon's current transit. Signs are counted inclusively from the natal Moon:
| Saturn's sign from the natal Moon | Classification |
|---|---|
| 12th | Sade Sati: rising phase |
| 1st | Sade Sati: peak phase |
| 2nd | Sade Sati: setting phase |
| 4th | Ardhashtama Shani / Dhaiya |
| 8th | Ashtama Shani / Dhaiya |
| Other signs | None of these periods |
Elinati Shani is a regional name for Sade Sati. The fourth- and eighth-sign flags are related Saturn periods, not Sade Sati. These are traditional classifications rather than predictions of personal hardship, health or future events. The implementation does not infer severity or promise outcomes or remedies.
Rules: FuturePoint's sample horoscope and AstroSage's explanation of Sade Sati and Dhaiya. These sources describe the traditional rules; their sample dates and interpretations are not used as astronomical reference values.
Dates are found from Saturn's calculated sign ingresses using the same Astronomy Engine and approximate Lahiri ayanamsa as the chart. Retrograde returns produce separate intervals, so phases can repeat or pause. The familiar seven-and-a-half-year description is approximate; the code does not assign a fixed two-and-a-half-year duration to each sign. Each interval includes its start and excludes its end, and the displayed dates are approximate boundary dates that can differ from another ephemeris or ayanamsa.
The current interval has its actual ingress start and end. The forecast searches ten years forward, includes unflagged intervals, and finishes at the actual end of the Saturn-sign interval containing that horizon. timelineEnd records that final date. This finite timeline is not a complete lifelong schedule or a guarantee that the final shown phase is the ultimate end of a Sade Sati cycle.
Birth reports retain a shani snapshot with computedAt, the natal Moon and current Saturn signs, phase, retrograde motion, current interval and upcoming intervals. Reopening a saved report preserves that snapshot. The sky view requests a current report for the selected birth chart's natal Moon; /api/transits?moonSign=0 through moonSign=11 accepts Aries through Pisces and permits caching for at most 60 seconds. Without moonSign, the route returns the general planetary positions. Invalid, fractional or repeated Moon-sign values are rejected. The calculation is deterministic and needs no AI key.
Tithi, nakshatra, yoga and karana are calculated at local sunrise. When there is no sunrise on the selected date, the reference is 06:00 local time and the interface says so.
A rising or setting event is included only if it belongs to the requested local date. Missing events and unavailable daylight intervals are left unavailable. Rahu Kalam, Yamaganda and Gulikai use the weekday’s assigned eighth of daylight. Abhijit is the central fifteenth of daylight. Regional conventions can differ.
The score maxima are Varna 1, Vashya 2, Tara 3, Yoni 4, Graha Maitri 5, Gana 6, Bhakoot 7 and Nadi 8. The total is the sum of these eight values. The UI derives rasi from nakshatra and pada; the API rejects contradictory combinations.
The tables and direction rules are in vedic.ts.
- Varna compares the groom’s category with the bride’s.
- Vashya uses five categories. Sagittarius and Capricorn change category at 15°. Purva Ashadha pada 1 and Shravana pada 2 cross that boundary, so those combinations require an exact Moon degree within the selected pada.
- Tara is checked in both directions. Each direction gives 1.5 points unless its tara is 3, 5 or 7.
- Yoni uses a matrix of 14 animal categories.
- Graha Maitri uses permanent relationships between the sign lords.
- Gana is directional.
- Bhakoot gives zero for relationships of 2/12, 5/9 and 6/8.
- Equal Nadi gives zero points. Cancellation is reported for the same nakshatra with different padas, or the same rasi with different nakshatras. Cancellation does not restore points in this implementation.
Regional scoring and cancellation conventions differ. Tests check this implementation’s arithmetic, input consistency and stated rules. The score is not a probability of relationship success. Mangal dosha is a traditional Mars house flag.
An LLM does not calculate numerical charts, transit positions or matching scores. The Guru provides general explanations with current transit context; it is not supplied with a personal birth chart. Palm analysis describes visible creases and does not infer health, lifespan, personality or future events from appearance.
These optional Gemini responses are labeled as AI descriptions and can contain errors. A missing key, provider failure, malformed output or incomplete result produces an error. Sample personalized readings are not substituted.