@zodiacs/engine 0.1.1-rc.15 → 0.1.1-rc.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +433 -0
  2. package/LICENSING.md +175 -8
  3. package/NOTICE +93 -0
  4. package/README.md +255 -59
  5. package/dist/{api-CoB_kqE3.d.ts → api-VOW6Umy5.d.ts} +4 -5
  6. package/dist/calc.d.ts +279 -0
  7. package/dist/calc.js +853 -0
  8. package/dist/{chunk-MFF3VKO3.js → chunk-2OWGBT3O.js} +1 -1
  9. package/dist/{chunk-ZHVI3KWJ.js → chunk-4NV4ZEFZ.js} +1 -1
  10. package/dist/chunk-A3U2ZS2W.js +29 -0
  11. package/dist/{chunk-OYGRVGXD.js → chunk-I7O5EGFV.js} +3 -3
  12. package/dist/{chunk-CWI4YUDL.js → chunk-L6ZHWJZ6.js} +9 -9
  13. package/dist/chunk-N4B5JNMA.js +473 -0
  14. package/dist/chunk-O3NJRGJ2.js +56 -0
  15. package/dist/{chunk-ZZPITHQS.js → chunk-WOU7JVD3.js} +194 -60
  16. package/dist/crossings.d.ts +1 -1
  17. package/dist/geo.d.ts +1 -1
  18. package/dist/geo.js +15 -458
  19. package/dist/houses-extra.d.ts +81 -0
  20. package/dist/houses-extra.js +337 -0
  21. package/dist/{internal-math-BbktkHCc.d.ts → houses-q1O2GGp4.d.ts} +3 -159
  22. package/dist/index.d.ts +5 -4
  23. package/dist/index.js +17 -17
  24. package/dist/internal-math-CmJ9xtaW.d.ts +160 -0
  25. package/dist/internal-math.d.ts +3 -2
  26. package/dist/internal-math.js +2 -2
  27. package/dist/internal.d.ts +1 -1
  28. package/dist/internal.js +3 -3
  29. package/dist/receipt.d.ts +31 -6
  30. package/dist/receipt.js +13 -7
  31. package/dist/rulers-9wljfVaO.d.ts +10 -0
  32. package/dist/sky.d.ts +158 -0
  33. package/dist/sky.js +377 -0
  34. package/dist/techniques.d.ts +410 -0
  35. package/dist/techniques.js +830 -0
  36. package/dist/timing.d.ts +69 -10
  37. package/dist/timing.js +86 -33
  38. package/dist/{types-BsWaqwU_.d.ts → types-B4MCoCCS.d.ts} +2 -2
  39. package/dist/vedic.d.ts +3 -4
  40. package/dist/vedic.js +26 -43
  41. package/dist/window.d.ts +178 -0
  42. package/dist/window.js +961 -0
  43. package/package.json +23 -3
package/NOTICE CHANGED
@@ -9,6 +9,99 @@ Don Cross, distributed under the MIT License. Its distributed JavaScript source
9
9
  retains the full MIT permission and warranty notice. Source and license metadata:
10
10
  https://github.com/cosinekitty/astronomy
11
11
 
12
+ The package's frame module (src/frame.ts, built into the ephemeris chunk under
13
+ dist/) reproduces astronomy-engine's precession function, precession_rot, and
14
+ the calc entry's reduction module (src/calc-reduce.ts, built into
15
+ dist/calc.js) its function for an observer on the Earth's ellipsoid, terra:
16
+
17
+ Copyright (c) 2019-2023 Don Cross <cosinekitty@gmail.com>
18
+ MIT License: the permission and warranty notice is the one in this
19
+ package's LICENSE file, word for word.
20
+
21
+ IAU 2000B nutation
22
+ ------------------
23
+
24
+ The package's nutation module (src/nutation.ts, built into the same chunk)
25
+ carries the 77 luni-solar terms, fundamental arguments and fixed planetary
26
+ offsets of the IAU 2000B nutation model,
27
+
28
+ D. D. McCarthy and B. J. Luzum 2003, An abridged model of the
29
+ precession-nutation of the celestial pole. Celestial Mechanics and Dynamical
30
+ Astronomy 85, 37-49; IERS Conventions (2003), chapter 5,
31
+
32
+ transcribed from the function iau2000b of the Naval Observatory Vector
33
+ Astrometry Software (NOVAS) C 3.1, nutation.c, as the package novas 3.1.1.5
34
+ distributes it (sha256
35
+ 49d193c9e0d6dfb14650ed0b2603e3954ef02ab51f83d66869a769e892e471bb), a work of
36
+ the US Government, which its authors ask to be cited as:
37
+
38
+ Barron, E. G., Kaplan, G. H., Bangert, J., Bartlett, J. L., Puatua, W.,
39
+ Harris, W., & Barrett, P. (2011), "Naval Observatory Vector Astrometry
40
+ Software (NOVAS) Version 3.1, Introducing a Python Edition," Bull. AAS, 43.
41
+
42
+ Its equation of the equinoxes adds two complementary terms from the IERS
43
+ Conventions (2010), table 5.2e (IERS, https://www.iers.org/).
44
+
45
+ Calculation entry
46
+ -----------------
47
+
48
+ The calc entry (dist/calc.js and the chunks it imports) carries the frame
49
+ bias of the IAU 2000 precession-nutation model, dpsi = -0.041775",
50
+ deps = -0.0068192" and dalpha0 = -0.0146", composed as
51
+
52
+ G. Petit and B. Luzum (eds.) 2010, IERS Conventions (2010), IERS Technical
53
+ Note No. 36, chapter 5, eq. 5.21,
54
+
55
+ composes it, and the obliquity of J2000.0 of the IAU 2006 precession,
56
+ 84381.406", from
57
+
58
+ N. Capitaine, P. T. Wallace and J. Chapront 2003, Expressions for IAU 2000
59
+ precession quantities. Astronomy & Astrophysics 412, 567-586 (adopted by
60
+ IAU 2006 Resolution B1).
61
+
62
+ Its bounds and its barycentre's error are measurements: the largest
63
+ differences of this package's own results from NASA JPL Horizons (DE441)
64
+ responses at 32 instants, and of astronomy-engine's barycentre from a
65
+ Newtonian barycentre and from Horizons's. They are not coefficients derived
66
+ from JPL data, and no JPL ephemeris value is in the package.
67
+
68
+ Essential dignities
69
+ -------------------
70
+
71
+ The techniques entry (dist/techniques.js) carries the tables of the
72
+ essential dignities as these works give them, and none of their text:
73
+
74
+ Ptolemy, Tetrabiblos I.17-I.20, tr. F. E. Robbins (Loeb Classical Library,
75
+ 1940): domiciles, exaltations, the Egyptian terms.
76
+ Dorotheus of Sidon, Carmen Astrologicum I.1-I.2, ed. and tr. D. Pingree
77
+ (Leipzig: Teubner, 1976), pp. 161-162: domiciles, exaltations, triplicity
78
+ lords.
79
+ al-Biruni, The Book of Instruction in the Elements of the Art of Astrology
80
+ (1029), tr. R. Ramsay Wright (London: Luzac, 1934), sections 440-453:
81
+ detriments, triplicities, terms, the Chaldean faces.
82
+ W. Lilly, Christian Astrology (London, 1647), p. 112: reception and the
83
+ peregrine planet.
84
+
85
+ Rise, set and transit
86
+ ---------------------
87
+
88
+ The sky entry (dist/sky.js) carries 34' of refraction at the horizon, from
89
+ the US Naval Observatory's Rise, Set, and Twilight Definitions
90
+ (https://aa.usno.navy.mil/faq/RST_defs, a work of the US Government); the
91
+ Moon's mean radius, 1,737.4 km, from
92
+
93
+ B. A. Archinal et al. 2018, Report of the IAU Working Group on
94
+ Cartographic Coordinates and Rotational Elements: 2015. Celestial
95
+ Mechanics and Dynamical Astronomy 130:22;
96
+
97
+ the Sun's radius, 696,000 km, which subtends 959.64" at 1 au, where J.
98
+ Meeus, Astronomical Algorithms, 2nd ed. (Willmann-Bell, 1998), ch. 55, gives
99
+ 959.63"; the astronomical unit, 149,597,870.7 km (IAU 2012 Resolution B2);
100
+ and the WGS84 ellipsoid, a = 6,378,137 m and 1/f = 298.257223563, from
101
+
102
+ NIMA TR8350.2 2000, Department of Defense World Geodetic System 1984: Its
103
+ Definition and Relationships with Local Geodetic Systems, 3rd ed.
104
+
12
105
  ΔT (TT − UT1)
13
106
  ------------
14
107
 
package/README.md CHANGED
@@ -3,21 +3,24 @@
3
3
  Pure TypeScript astrology calculations for browsers and Node.js. The package
4
4
  computes tropical planetary positions, natal charts, transit snapshots,
5
5
  synastry, secondary progressions, Moon phase, and Saturn-return seasons, and,
6
- in separate entries, Hellenistic timing techniques and sidereal positions and
7
- Jyotish techniques. Its calculations are synchronous; only loading a zone's
6
+ in separate entries, one calculation API over frames, centers and
7
+ corrections with bounds and receipts, birth-time windows, house positions and
8
+ cusp speeds, rise, set and transit times and planetary hours, returns and
9
+ relationship charts, Hellenistic timing techniques, and sidereal positions
10
+ and Jyotish techniques. Its calculations are synchronous; only loading a zone's
8
11
  history before 1970 (`prepareLocalTime`) and the GeoNames client, both in
9
12
  `@zodiacs/engine/geo`, are asynchronous. It is ESM-only, has no import-time
10
13
  side effects, and performs no network request from its core entry point. Its
11
14
  one runtime side effect is the ΔT it installs in astronomy-engine (see Time
12
15
  below).
13
16
 
14
- **Release candidate: 0.1.1-rc.15.** Public npm lookups for this package returned
17
+ **Release candidate: 0.1.1-rc.16.** Public npm lookups for this package returned
15
18
  404 on 2026-09-26. The expansion release remains held for review and operator
16
19
  publication authority. Install the exact candidate tarball supplied with the
17
20
  review, retaining its SHA-256 receipt:
18
21
 
19
22
  ```sh
20
- pnpm add ./zodiacs-engine-0.1.1-rc.15.tgz
23
+ pnpm add ./zodiacs-engine-0.1.1-rc.16.tgz
21
24
  ```
22
25
 
23
26
  The package runs in browsers through a bundler, and in Node.js 20.19.0 or a
@@ -32,7 +35,7 @@ themselves and are not affected.
32
35
 
33
36
  From a source checkout, run `npm ci` and `npm run build`, then
34
37
  `npm pack --ignore-scripts`. Test the packed file in a clean consumer using
35
- `npm run consumer:smoke -- /absolute/path/to/zodiacs-engine-0.1.1-rc.15.tgz`.
38
+ `npm run consumer:smoke -- /absolute/path/to/zodiacs-engine-0.1.1-rc.16.tgz`.
36
39
  The smoke check
37
40
  downloads the artifact's public dependencies and TypeScript 5.9.3; its output
38
41
  records the artifact hash and runtime, and it removes its temporary consumer
@@ -61,27 +64,26 @@ dependencies afresh with `npm ci` and takes nothing from the checkout's
61
64
  needs merge commits: a squash or rebase merge drops the source commits it
62
65
  checks against, and the check then fails.
63
66
 
64
- This candidate reads a chart's instant on a time basis: from 1972 to
65
- 2027-10-02 as UTC, with TT from the leap seconds and UT1 from IERS UT1 − UTC,
66
- and otherwise as UT1 with the ΔT model, or on UT1 or TT when `timeScale` says
67
- so (see Time). From 1972 to 2027-10-02 a chart's angles therefore differ from
68
- rc.14's by UT1 − UTC, and its positions by less: in 1,801 synthetic charts the
69
- ascendant by up to 45.0″ and the Moon by up to 0.462″, and in a review's wider
70
- sample by up to 101.03″ and 0.4885″, near 65° S
71
- (`docs/evidence/rc15-20260929/review-sample.json`). Before and after that span
72
- its angles and houses are unchanged. `@zodiacs/engine/geo` reads wall times before 1970 on the
73
- tzdb 2025c history it ships, which `prepareLocalTime` must load first, and can
74
- read a birthplace's own mean time and a Julian date; unknown options and form
75
- keys now throw, and `lmt` means that a local-mean-time clock read the time. Two
76
- entry points are new, `@zodiacs/engine/timing` and `@zodiacs/engine/vedic`, and
77
- the root imports neither. Placidus no longer falls back to whole signs just
78
- below the polar limit. Receipts gain a conventions set that records the time
79
- basis; receipts of the earlier sets, rc.13's and rc.14's included, stay
80
- readable and replay. The package gate is now a budget for each entry point's
81
- import graph and a stated cap for the whole package (CHANGELOG.md). The
82
- ephemeris is still astronomy-engine 2.1.19. See CHANGELOG.md for the release
83
- history and `docs/evidence/rc15-20260929/` for this candidate's checks. Site
84
- adoption is reviewed separately.
67
+ This candidate brings five opt-in entry points onto rc.15:
68
+ `@zodiacs/engine/calc`, one calculation API over eight frames, four centers
69
+ and three corrections, with speeds, bounds and receipts; `/window`, birth-time
70
+ window partitions; `/techniques`, returns, composite and Davison charts, the
71
+ void-of-course Moon, aspect patterns, dignities and Moon signs; `/houses`,
72
+ house positions of bodies with latitude, co-ascendants and cusp speeds; and
73
+ `/sky`, rise, set, transit and planetary hours. `@zodiacs/engine/timing`
74
+ gains planetary returns. The root imports none of them. The nutation is now
75
+ the full IAU 2000B series, which the engine evaluates itself (see Nutation):
76
+ every longitude moves from rc.15's by the change in Δψ, up to 0.2701″ from
77
+ 1800 to 2200, and the angles and cusps by the change in the sidereal time and
78
+ the true obliquity, up to 0.8003″ over 9,697 synthetic charts at places up to
79
+ 60.17° N, and more toward the polar circle. Receipts gain a
80
+ conventions set that names the nutation; rc.15's receipts stay readable. As
81
+ in rc.15, a chart's instant is read on a time basis: from 1972 to 2027-10-02
82
+ as UTC, with TT from the leap seconds and UT1 from IERS UT1 − UTC, and
83
+ otherwise as UT1 with the ΔT model, or on UT1 or TT when `timeScale` says so
84
+ (see Time). The ephemeris is still astronomy-engine 2.1.19. See CHANGELOG.md
85
+ for the release history and `docs/evidence/rc16-20260930/` for this
86
+ candidate's checks. Site adoption is reviewed separately.
85
87
 
86
88
  ## Natal chart in 10 lines
87
89
 
@@ -173,16 +175,51 @@ for (const aspect of today.aspects) {
173
175
  longitude function of your own, without the ephemeris.
174
176
  - `@zodiacs/engine/geo` provides IANA local-time resolution, Julian calendar
175
177
  dates and a client for a separately hosted, sharded GeoNames index.
178
+ - `@zodiacs/engine/techniques` provides solar and lunar returns, composite and
179
+ Davison charts, the void-of-course Moon, aspect patterns, essential
180
+ dignities and the Moon signs possible over a date (see `docs/techniques.md`).
176
181
  - `@zodiacs/engine/timing` provides profections, firdaria, zodiacal releasing
177
- and solar arc directions (see `docs/timing-hellenistic.md`).
182
+ and solar arc directions (see `docs/timing-hellenistic.md`), and planetary
183
+ returns (see `docs/houses.md`).
184
+ - `@zodiacs/engine/houses` provides the house position of a body with ecliptic
185
+ latitude in each house system, the co-ascendants and the polar ascendant,
186
+ and the speeds of the cusps and the angles (see `docs/houses.md`). It
187
+ imports no ephemeris and no module of the root entry.
178
188
  - `@zodiacs/engine/vedic` provides the sidereal zodiac: ayanamsas, sidereal
179
189
  charts, nakshatras, vargas, KP sub-lords and dashas (see `docs/vedic.md`).
190
+ - `@zodiacs/engine/sky` provides rise, set and transit times for an observer
191
+ and planetary hours (see `docs/sky.md`).
192
+ - `@zodiacs/engine/window` partitions a birth-time window into cells within
193
+ which the chart's signs, houses and aspects are constant (see *Birth-time
194
+ windows*).
195
+
196
+ ### Uniform calculation API
197
+
198
+ `@zodiacs/engine/calc` offers `calc`, `houses`, `events` and `chart` with one
199
+ vocabulary: instants as ISO strings, Dates or `{ jd, scale: "UTC" | "UT1" | "TT" }`
200
+ on the engine's time basis, as `positions()` reads them;
201
+ eight frames (the ecliptic or the equator; true or mean of date, J2000.0 or
202
+ the ICRS); geocentric, heliocentric, barycentric and topocentric centers; and
203
+ apparent, astrometric or geometric positions with distances and speeds.
204
+ Results carry bounds and a receipt of convention ids. A measured bound is the
205
+ largest difference from JPL Horizons on 32 instants from 1802 to 2188: a
206
+ sample maximum, not a limit. An estimated bound names what it rests on. What
207
+ this version does not compute comes back as a typed refusal, such as the
208
+ sidereal zodiac, or an instant whose UT1 or TT is outside 1800 to 2200: there
209
+ calc has no comparison to take a bound from, while the root entry's functions
210
+ still compute such an instant and flag it `outside-reference-span`. With
211
+ every default, `calc({ body, time })` is the position `positions()` gives, to
212
+ the bit. The root entry loads none of it. The reference, with the Swiss Ephemeris flag
213
+ mapping and the measured accuracy, is
214
+ [docs/calc.md](https://github.com/zodiacs-org/engine/blob/main/docs/calc.md).
180
215
 
181
216
  Returned longitudes use degrees in `[0, 360)` and positions include sign and degree
182
217
  annotations. Charts use the tropical ecliptic of date. Planetary positions are
183
218
  geocentric and corrected for light time and aberration, but not for the Sun's
184
- gravitational deflection; the Moon's series carries neither correction. This
185
- package does not calculate topocentric parallax.
219
+ gravitational deflection; the Moon's series carries neither correction. The
220
+ chart functions do not calculate topocentric parallax; `@zodiacs/engine/calc`
221
+ gives topocentric positions (`center: { topocentric }`), and
222
+ `@zodiacs/engine/sky` finds rise and set for a topocentric observer.
186
223
 
187
224
  Positions have been compared with an independent ephemeris from 1800-01-01T00:00Z
188
225
  up to 2200-01-01T00:00Z, exported as `REFERENCE_SPAN`. A chart outside that span
@@ -348,24 +385,27 @@ Out-of-bounds means strictly `abs(dec) > trueObliquity`, without an
348
385
  uncertainty allowance. Each row also carries `boundMarginArcsec`, the signed
349
386
  margin `(abs(dec) − trueObliquity) × 3600`: positive beyond the bound, negative
350
387
  inside it. For every row but the exempt Sun below, `outOfBounds` is exactly
351
- `boundMarginArcsec > 0`. In `chartDeclinations`, `trueObliquity` is
352
- astronomy-engine's true obliquity of date at the chart instant on the chart's
353
- clock: the IAU 2006 mean obliquity plus astronomy-engine's five-term truncation
354
- of the IAU 2000B nutation in obliquity. That is not the full IAU 2000B value:
355
- it differed from ERFA's `obl06` plus `nut00b` by up to 0.086″ at 20,000
356
- instants from 1850 to 2150. The pure functions use the obliquity they are given.
388
+ `boundMarginArcsec > 0`. In `chartDeclinations`, `trueObliquity` is the
389
+ engine's true obliquity of date at the chart instant on the chart's clock: the
390
+ IAU 2006 mean obliquity plus the IAU 2000B nutation in obliquity, all 77 terms
391
+ (see *Nutation*). It equals ERFA's `obl06` plus `nut00b` within the tests'
392
+ tolerances (1e-9″ and 1e-10″), and at 20,000 instants from 1850 to 2150 it was
393
+ within 1.63 mas of `obl06` plus `nut06a` (IAU 2000A), where astronomy-engine's
394
+ five-term value, used until this change, was up to 85.6 mas from both. The
395
+ pure functions use the obliquity they are given.
357
396
 
358
397
  The flag describes the ephemeris's position, and it agrees with the real sky
359
398
  only where the margin exceeds the ephemeris's error in declination. Against
360
- JPL's DE440s at those 20,000 instants, the largest declination errors were:
399
+ JPL's DE440s at those 20,000 instants, the largest declination errors were,
400
+ rounded up (`docs/evidence/nutation-2026-09-29/results/declination-truth.json`):
361
401
 
362
402
  | Body | Largest error | Body | Largest error |
363
403
  | --- | ---: | --- | ---: |
364
404
  | Sun | 2.7″ | Jupiter | 16.1″ |
365
405
  | Moon | 3.4″ | Saturn | 21.6″ |
366
406
  | Mercury | 12.2″ | Uranus | 19.3″ |
367
- | Venus | 14.7″ | Neptune | 15.4″ |
368
- | Mars | 14.5″ | Pluto | 4.6″ |
407
+ | Venus | 14.8″ | Neptune | 15.5″ |
408
+ | Mars | 14.6″ | Pluto | 4.6″ |
369
409
 
370
410
  These are sample maxima, not bounds, and they grow outside `REFERENCE_SPAN`.
371
411
  Within them the flag can be wrong either way: at 2022-10-22T08:11:10.756Z the
@@ -415,7 +455,11 @@ not include this analysis; the result states that scope explicitly.
415
455
  `houseSystem` takes one of thirteen systems. Each is the definition Swiss
416
456
  Ephemeris uses, and every one agrees with Swiss's `swe_houses_armc` to within
417
457
  0.0001″ given the same sidereal time, latitude and obliquity (Placidus, which
418
- iterates, to 0.01″).
458
+ iterates, to 0.01″). End to end, from an instant read as UT1 as Swiss reads
459
+ it, every system was within 0.055″ of Swiss's `swe_houses_ex` from 1850 to
460
+ 2049, on a ladder of latitudes from 55° to 66.6° and on 3,000 draws within 66°
461
+ of the equator (`docs/evidence/nutation-2026-09-29/results/ladder.json`);
462
+ outside those years Swiss uses a long-term sidereal time of its own.
419
463
 
420
464
  | `houseSystem` | System | Cusps |
421
465
  | --- | --- | --- |
@@ -445,6 +489,11 @@ meridian, as in Swiss Ephemeris. When the birth time is unknown, pass a
445
489
  conventional UTC instant with `timeKnown: false`; angles and houses remain
446
490
  absent and the chart carries the `no-time` flag.
447
491
 
492
+ `@zodiacs/engine/houses` places a body with ecliptic latitude in any of these
493
+ systems, as Swiss Ephemeris's `swe_house_pos` defines the position, and gives
494
+ the co-ascendants, the polar ascendant and the speeds of the cusps and angles
495
+ (`docs/houses.md`).
496
+
448
497
  ### Points
449
498
 
450
499
  `chartPoints(natal)` takes a birth or a chart and returns `{ sect, points }`.
@@ -461,9 +510,11 @@ Each point has a longitude, a latitude, a sign and a degree, like a body.
461
510
  The mean node and Black Moon Lilith come from the Moon's mean elements: the
462
511
  IERS Conventions' fundamental arguments (Simon et al. 1994), with a mean
463
512
  inclination of 5.1453964°. The nutation in longitude puts them on the true
464
- equinox of date, like every other longitude here. They are within 0.7″ of Swiss
465
- Ephemeris's `SE_MEAN_NODE` and `SE_MEAN_APOG` from 1800 to 2199. Both carry a
466
- speed in degrees per day.
513
+ equinox of date, like every other longitude here. At 2,000 instants from 1800
514
+ to 2199 they were within 0.4503″ and 0.4887″ of Swiss Ephemeris's
515
+ `SE_MEAN_NODE` and `SE_MEAN_APOG`
516
+ (`docs/evidence/nutation-2026-09-29/results/swiss.json`). Both carry a speed in
517
+ degrees per day.
467
518
 
468
519
  Every chart gets those three. The Vertex, the East Point, the sect and the
469
520
  lots need a birth time and place.
@@ -593,6 +644,121 @@ Invalid input throws `RangeError` before any sampling: an invalid `Date`,
593
644
  shorter than a millisecond, or a `maxSamples` that is not a positive integer or
594
645
  `Infinity`. A non-finite longitude from the ephemeris throws `RangeError` too.
595
646
 
647
+ ### Birth-time windows
648
+
649
+ ```ts
650
+ import { birthWindow } from "@zodiacs/engine/window";
651
+
652
+ const result = birthWindow({
653
+ start: "1990-06-15T12:20:00Z",
654
+ end: "1990-06-15T12:40:00Z",
655
+ latitude: 40.7128,
656
+ longitude: -74.006,
657
+ houseSystem: "placidus",
658
+ rounding: { recorded: "1990-06-15T12:30:00Z", minutes: 5 }
659
+ });
660
+ for (const cell of result.cells) console.log(cell.start, cell.share, cell.roundedShare, cell.features.ascendant);
661
+ for (const change of result.switches) console.log(change.at, change.changes);
662
+ ```
663
+
664
+ `birthWindow` divides a window of possible birth instants into cells within
665
+ which every discrete feature of the chart is constant: each body's sign and
666
+ house, the signs of the ascendant and the midheaven, the aspects in orb and,
667
+ for Placidus and Koch, whether the houses fall back to whole signs. The
668
+ features are natalChart's: houses are `houseOf` on the chart's cusps, and
669
+ aspects are its five major aspects with their orbs. Each switch gives the
670
+ first millisecond of its new cell and every change at it, from and to. Each
671
+ cell gives its share of the window under a uniform prior and, when `rounding`
672
+ is given, under that rounding model. Nothing else is partitioned: two instants
673
+ in one cell can differ in natalChart's retrograde flags, positions within a
674
+ sign, speeds, orbs and whether they apply, the degrees of angles and cusps,
675
+ declinations and chart points.
676
+
677
+ The window is `start` to `end`, excluding `end`, at most 48 hours; or `at`
678
+ and `minutes`, for `minutes` either side of `at`; or only `rounding`, whose
679
+ unit is then the window. It must lie inside `REFERENCE_SPAN` (1800-01-01 to
680
+ 2200-01-01, UTC), where the search's bounds were scanned. `rounding:
681
+ { recorded, minutes, mode }` says the recorded time was rounded to `minutes`,
682
+ to the nearest (the default) or `"down"`; the true instant is taken as
683
+ uniform over that unit, which must lie inside the window. Resolve local times
684
+ first, for example with `resolveLocalToUtc` from `@zodiacs/engine/geo`.
685
+
686
+ Every value is the engine's own at a millisecond, as natalChart computes it
687
+ on UTC and the engine's time basis (not a pinned `deltaT`). Where the search's
688
+ bounds hold, each cell holds
689
+ natalChart's features at every millisecond in it, and at each switch
690
+ natalChart's value at the millisecond before `at` differs from its value at
691
+ `at` exactly as listed, except inside an interval listed in `unresolved`.
692
+
693
+ The search halves the window until each feature is settled, dropping an
694
+ interval for a feature when enclosures of the quantities it depends on keep
695
+ clear of every threshold and the feature agrees at both ends; single
696
+ milliseconds are compared directly. The enclosures rest on bounds scanned
697
+ from 1800 to 2200: `WINDOW_RATE_BOUNDS` (about twice each body's largest
698
+ rate), the obliquity's rate, and the true node's millisecond jitter, J =
699
+ 5e-5·(1 + |T|)° with T in centuries from 2000, at least 3.01 times every
700
+ departure found at 3,000 consecutive milliseconds every five days
701
+ (`docs/evidence/birth-window/rc16/node-jitter.json`). They assume TT and
702
+ UT1 run on continuously. The time basis steps at the ΔT model's seam,
703
+ 1940-12-31T18:00:00Z, where ΔT steps from
704
+ 24.834 s to 24.820 s; at 1972-01-01, where the leap seconds begin; at each
705
+ leap second, where TT and UT1 step by a second; and where the IERS UT1 table
706
+ ends, 2027-10-02. Each sample installs its own ΔT, so every position and
707
+ angle steps there together: the search finds each step inside the window
708
+ from the engine's own arithmetic, splits at its millisecond and compares
709
+ both sides. Within 1e-8° of the Placidus
710
+ or Koch polar limit, near the RAMCs where their cusps carry the rounding of
711
+ asin near ±1, the house system and the houses are compared at every
712
+ millisecond. A failed check of an enclosure adds `bound-exceeded`, and
713
+ completeness is then not established; a failure that does not show in an
714
+ interval's end-to-end change goes unseen. The method in full is in
715
+ `docs/evidence/birth-window/RESULTS.md`.
716
+
717
+ Near a sign boundary the true node's jitter makes its sign change back and
718
+ forth between milliseconds, for about 4J/|rate| days around an ingress: 1.5
719
+ minutes at the fastest from 1800 to 2200, 4.5 at the median, 2.3 hours at the
720
+ slowest. Every change is reported where the budget of two million evaluated
721
+ instants allows (299 at the ingress of March 2028,
722
+ `docs/evidence/birth-window/rc16/node-flicker.json`). Where the node
723
+ would need more, the stretch is left unresolved, found before any of the
724
+ budget is spent on it: the nodes' signs, and their houses where the houses are
725
+ whole signs, are null there, the interval is listed in `unresolved`, and the
726
+ result carries `node-unresolved`; a change to or from null is its edge, not a
727
+ crossing. 24 of the 294 ingresses from 1800 to 2200 flicker for longer than
728
+ the budget, in 1810, 1842 (two), 1848, 1865 (two), 1882 (two), 1946 (two),
729
+ 1981 (two), 2007, 2032 (two), 2049 (two), 2071, 2090 (four), 2113 and 2127
730
+ (`node-ingresses.json`). A true node from the Moon's analytic velocity,
731
+ instead of astronomy-engine's 1.728 s difference, would be smooth and leave
732
+ nothing unresolved; it changes natalChart's node in its last digits and is
733
+ left for a later release.
734
+
735
+ Results carry `verification: "sampled at one-second resolution"`: checked
736
+ against natalChart at every whole second, not proven. On 1,000 preregistered
737
+ random windows (1800 to 2200, all thirteen systems, two thirds at 60° of
738
+ latitude or more), all 24,188 sampled transitions were matched, none missed
739
+ and none extra, and natalChart confirmed every switch at its millisecond
740
+ (`docs/evidence/birth-window/RESULTS.md`); on this candidate's build, after
741
+ the time basis and the nutation, again (`docs/evidence/birth-window/rc16/`).
742
+
743
+ In one thread, a 10-minute window takes about 2 ms, two hours about 20 ms and
744
+ a whole day about 0.23 s (medians, Node.js 22; `timing.json`). A window over a
745
+ node ingress takes from seconds to a few minutes, as the node is compared at
746
+ every millisecond of its flicker (1,950 s around the ingress of 2032-11-25:
747
+ 77 s, 18,315 switches); an unresolved stretch costs a fraction of a second.
748
+ Within 1e-8° of the polar limit each passage of a sensitive RAMC adds about
749
+ 20 s, and at 89.999999° a 48-hour window takes up to three minutes
750
+ (Alcabitius).
751
+
752
+ Other flags are `polar-fallback`, when a cell uses whole-sign houses in place
753
+ of Placidus or Koch, `bound-exceeded` and `node-unresolved`. Invalid input
754
+ throws `RangeError`, including a window outside `REFERENCE_SPAN` and a
755
+ latitude within 1e-6° of either pole, where the ascendant is undefined or
756
+ turns too fast for the search. A search that would evaluate more than two
757
+ million instants outside the unresolved intervals throws `WindowBudgetError`,
758
+ which is an `Error` and not a `RangeError`. The entry point carries the
759
+ ephemeris and is separate from the root entry point, so that the root does not
760
+ grow.
761
+
596
762
  ### Resolved instant inputs
597
763
 
598
764
  `DateInput` values passed to the calculation APIs accept a valid `Date`, a finite
@@ -687,6 +853,29 @@ Gregorian adoption. Each resolution names the tzdb version, the transition
687
853
  behind the offset and its cause (`dst`, `legal-change` or `date-line`).
688
854
  [docs/time.md](docs/time.md) describes every field.
689
855
 
856
+ ## Nutation
857
+
858
+ Longitudes, the sidereal time and the obliquity of date use the IAU 2000B
859
+ nutation (McCarthy & Luzum 2003; IERS Conventions 2003, chapter 5), all 77 of
860
+ its luni-solar terms and its two fixed planetary offsets, which the engine
861
+ evaluates itself (`src/nutation.ts`, transcribed from NOVAS C 3.1). Its Δψ and
862
+ Δε equal ERFA's `nut00b` within 1e-10″ at 101 instants from 1800 to 2200
863
+ (`src/nutation.test.ts`). astronomy-engine's vectors on the J2000 mean equator
864
+ are turned to the ecliptic of date with astronomy-engine's own IAU 2006
865
+ precession (`src/frame.ts`) and that nutation. Measured against ERFA's IAU
866
+ 2006/2000A chain applied to the same vectors at 4,001 instants from 1800 to
867
+ 2200, that rotation puts a longitude at most 0.003691″ off, and the ascendant
868
+ and midheaven at latitudes within 60° at most 0.006284″ and 0.003358″ off; with
869
+ astronomy-engine's five-term nutation, used until this change, they were up to
870
+ 0.2520″, 0.8235″ and 0.2457″ off
871
+ (`docs/evidence/nutation-2026-09-29/results/erfa-frame.json`). The equation of
872
+ the equinoxes adds the two largest IAU 2000 complementary terms (IERS
873
+ Conventions 2010, table 5.2e). The opt-in entries use the same precession,
874
+ nutation and sidereal time: `@zodiacs/engine/calc` for its true-of-date
875
+ frames and its topocentric observer, `@zodiacs/engine/window` for the angles,
876
+ and `@zodiacs/engine/sky` for its apparent places and the observer's
877
+ sidereal angle.
878
+
690
879
  ## Accuracy and licensing
691
880
 
692
881
  The ephemeris is powered by the MIT-licensed `astronomy-engine`. Tests compare
@@ -702,9 +891,10 @@ CC BY 4.0, attributed in [NOTICE](NOTICE).
702
891
 
703
892
  The npm package contains no place database. It carries tzdb 2025c's zone
704
893
  histories before 1970, the IERS leap-second list, an IERS UT1 − UTC table, a
705
- table of Gregorian adoption dates from public-domain sources, and 22 catalogue
706
- values for the stars of the Vedic ayanamsas; [NOTICE](NOTICE) records their
707
- sources and the GeoNames attribution, and downstream users should retain it.
894
+ table of Gregorian adoption dates from public-domain sources, 22 catalogue
895
+ values for the stars of the Vedic ayanamsas, and the IAU 2000B nutation series
896
+ from NOVAS C 3.1, a US Government work; [NOTICE](NOTICE) records their sources
897
+ and the GeoNames attribution, and downstream users should retain it.
708
898
  [LICENSING.md](LICENSING.md) gives the terms of each.
709
899
 
710
900
  ## Internal site entry points
@@ -713,8 +903,9 @@ sources and the GeoNames attribution, and downstream users should retain it.
713
903
  compatibility boundaries for Zodiacs.org. They let the site consume the exact
714
904
  package implementation while keeping its scanner-oriented functions and lazy
715
905
  bundle boundary intact. They are not covered by semantic-versioning guarantees;
716
- third-party code must use the documented entry points: the root, `/geo`,
717
- `/timing`, `/vedic`, `/receipt`, `/crossings` and `/deltat`.
906
+ third-party code must use the documented entry points: the root, `/calc`,
907
+ `/geo`, `/houses`, `/sky`, `/techniques`, `/timing`, `/vedic`, `/window`,
908
+ `/receipt`, `/crossings` and `/deltat`.
718
909
 
719
910
  ## GeoNames request recovery
720
911
 
@@ -800,18 +991,23 @@ and that the Moon has neither correction. Receipts from rc.3 to rc.7 are still
800
991
  read, each under the conventions its engine recorded, and a set is accepted
801
992
  only from the engine versions that wrote it.
802
993
 
803
- The current set, written from 0.1.1-rc.15 on, also records the instant's scale
804
- (`receipt.timeScale`) and its time basis (`result.timeScale`), and a local
805
- resolution records the calendar, the tzdb version and form, the clock, the
806
- transition behind the offset and any birthplace mean time, each checked
807
- against the offsets and flags. Receipts under the rc.8 set (rc.8 to rc.14),
808
- which read the instant as UT1, stay readable and replay as UTC requests (see
809
- docs/time.md). A receipt's engine, ephemeris and package versions must be
810
- SemVer 2.0.0 versions. The codec accepts an earlier set only under the versions
811
- that wrote it, and compares the engine's version in SemVer order with
812
- 0.1.1-rc.15, which brought the current set, and with the releases that brought
813
- each house system: a receipt of the current set that names a version before
814
- 0.1.1-rc.15, such as 0.1.1-rc.14.1 or 0.1.1-beta, is refused.
994
+ The time-basis sets, written from 0.1.1-rc.15 on, also record the instant's
995
+ scale (`receipt.timeScale`) and its time basis (`result.timeScale`), and a
996
+ local resolution records the calendar, the tzdb version and form, the clock,
997
+ the transition behind the offset and any birthplace mean time, each checked
998
+ against the offsets and flags. The current set, written from 0.1.1-rc.16 on,
999
+ also names the nutation, the engine's IAU 2000B (`nutation`), and takes the
1000
+ Moon from astronomy-engine's geocentric series turned by the engine's frame
1001
+ (`moonPosition`); rc.15's set, which does not name the nutation, stays
1002
+ readable. Receipts under the rc.8 set (rc.8 to rc.14), which read the instant
1003
+ as UT1, stay readable and replay as UTC requests (see docs/time.md). A
1004
+ receipt's engine, ephemeris and package versions must be SemVer 2.0.0
1005
+ versions. The codec accepts an earlier set only under the versions that wrote
1006
+ it, rc.15's under 0.1.1-rc.15 alone, and compares the engine's version in
1007
+ SemVer order with 0.1.1-rc.16, which brought the current set, and with the
1008
+ releases that brought each house system: a receipt of the current set that
1009
+ names a version before 0.1.1-rc.16, such as 0.1.1-rc.15.1 or 0.1.1-beta, is
1010
+ refused.
815
1011
 
816
1012
  `natalReplayInput` recovers the recorded request. It does not select or install
817
1013
  the original engine. Recalculation with another engine, ephemeris dependency or
@@ -1,5 +1,5 @@
1
1
  import { DeltaT } from './deltat.js';
2
- import { B as BodyName, b as Chart, d as BirthInput, D as DateInput, e as ChartPoints, M as MoonPhase, a as BodyPosition, S as SynastryResult, f as TransitResult } from './types-BsWaqwU_.js';
2
+ import { B as BodyName, d as Chart, f as BirthInput, D as DateInput, i as ChartPoints, M as MoonPhase, c as BodyPosition, S as SynastryResult, j as TransitResult } from './types-B4MCoCCS.js';
3
3
  import { LongitudeCrossing, CrossingSearchOptions, CrossingSearchResult } from './crossings.js';
4
4
 
5
5
  /** Geometry over full ecliptic positions; no independent ephemeris is implied. */
@@ -89,10 +89,9 @@ interface DeclinationAspect {
89
89
  interface Declinations {
90
90
  /**
91
91
  * True obliquity of date in degrees: the bound for out-of-bounds flags. From
92
- * chartDeclinations it is astronomy-engine's, at the chart instant on its TT
93
- * clock: the IAU 2006 mean obliquity plus astronomy-engine's five-term
94
- * truncation of the IAU 2000B nutation in obliquity. Elsewhere it is the
95
- * value supplied.
92
+ * chartDeclinations it is the engine's, at the chart instant on its TT
93
+ * clock: the IAU 2006 mean obliquity plus the IAU 2000B nutation in
94
+ * obliquity, all 77 terms. Elsewhere it is the value supplied.
96
95
  */
97
96
  trueObliquity: number;
98
97
  rows: DeclinationRow[];