Internal module guide. This module is now part of
@astrology/vedic; use the public package README for application setup.
varga module
D1-to-divisional mapping, varga frames (divisional charts that split each sign into equal or unequal parts) and vargottama (same sign in D1 and D9). Public imports use the package root. See the package specification and task plan (V-03, V-04).
Run pnpm --filter @astrology/vedic build, check, and test after building dependencies (pnpm build:vedic builds all).
Mapping
mapVargaPoint(signFacts, vargaId, rules) is the single D1 → varga mapping, used for bodies and the
lagna. It reads Binder’s sign id and degree within sign and returns a sign and 1-based part, never a
varga degree. Equal parts compare against the same rational boundary at every step, so an exact
boundary opens the next part. buildVargaChart maps the ascendant through the same function and
places bodies with chart-core’s resolveWholeSignHouse/buildHouseRosters; tropical snapshots fail.
evaluateVargottama compares D1 and D9 signs.
PARASHARI_VARGA_RULES covers all sixteen Shodasavarga rows (D2 hora halves, D30 unequal reversed
spans, modality/parity/element starts). Validation rejects incomplete coverage, wrong part counts,
missing start keys and a D30 whose even spans do not reverse the odd ones. The feature serves a
varga only when the profile names that row’s scheme id; unknown ids fail.