@zodiacs/engine 1.0.0 → 1.1.0

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 (70) hide show
  1. package/CHANGELOG.md +1020 -0
  2. package/LICENSING.md +168 -27
  3. package/NOTICE +78 -12
  4. package/README.md +288 -44
  5. package/dist/{api-WbxJ4Wj-.d.ts → api-ChL1N2Sr.d.ts} +33 -2
  6. package/dist/{ayanamsa--YQ46fET.d.ts → ayanamsa-ClFzkKmV.d.ts} +2 -1
  7. package/dist/calc.d.ts +90 -4
  8. package/dist/calc.js +360 -126
  9. package/dist/chunk-2PZYJQV5.js +83 -0
  10. package/dist/{chunk-7TRLIFFI.js → chunk-4XOYTBLS.js} +1 -1
  11. package/dist/chunk-767FTO7O.js +48 -0
  12. package/dist/{chunk-YIITY7Q7.js → chunk-7Y2F2IWN.js} +19 -17
  13. package/dist/{chunk-OG4OYTJJ.js → chunk-B4M2Y7FT.js} +1 -129
  14. package/dist/{chunk-PFGUCNOK.js → chunk-BMDASNPB.js} +6 -6
  15. package/dist/chunk-I3L4POY7.js +18 -0
  16. package/dist/{chunk-CHSYDKBL.js → chunk-LNGURVNH.js} +3 -3
  17. package/dist/{chunk-DMGHYCDI.js → chunk-NNOSOOWS.js} +1 -1
  18. package/dist/chunk-OVXQQEXL.js +41 -0
  19. package/dist/{chunk-SRXBTP5H.js → chunk-QLIEEICB.js} +201 -190
  20. package/dist/chunk-RMBWKZI2.js +130 -0
  21. package/dist/{chunk-FTX3JDJA.js → chunk-TZVPZHZM.js} +42 -23
  22. package/dist/{chunk-WS3TDSP3.js → chunk-WBTWY2OB.js} +7 -3
  23. package/dist/chunk-Y4E3WJU5.js +87 -0
  24. package/dist/chunk-YPU3MDNI.js +852 -0
  25. package/dist/conventions.d.ts +70 -0
  26. package/dist/conventions.js +26 -0
  27. package/dist/crossings.d.ts +15 -4
  28. package/dist/de440-pack.d.ts +43 -0
  29. package/dist/de440-pack.js +16 -0
  30. package/dist/de440.d.ts +113 -0
  31. package/dist/de440.js +19 -0
  32. package/dist/ephemeris-exTSqBgb.d.ts +60 -0
  33. package/dist/geo.d.ts +16 -4
  34. package/dist/geo.js +2 -2
  35. package/dist/{houses-CFERsAlK.d.ts → houses-Bh7GCnPi.d.ts} +3 -3
  36. package/dist/houses-extra.d.ts +5 -4
  37. package/dist/index.d.ts +8 -6
  38. package/dist/index.js +40 -28
  39. package/dist/{internal-math-DJJ8BYex.d.ts → internal-math-CxenuGfm.d.ts} +2 -2
  40. package/dist/internal-math.d.ts +4 -3
  41. package/dist/internal-math.js +14 -12
  42. package/dist/internal.d.ts +16 -7
  43. package/dist/internal.js +25 -4
  44. package/dist/lite-composite.js +114 -0
  45. package/dist/lite-declinations.js +253 -0
  46. package/dist/lite-dignities.js +333 -0
  47. package/dist/lite-sect.js +72 -0
  48. package/dist/lite.d.ts +82 -0
  49. package/dist/lite.js +4 -0
  50. package/dist/receipt.d.ts +3 -2
  51. package/dist/receipt.js +143 -65
  52. package/dist/{rulers-Dla6h_Sm.d.ts → rulers-CSSWtiWF.d.ts} +1 -1
  53. package/dist/sky.d.ts +4 -3
  54. package/dist/sky.js +17 -10
  55. package/dist/techniques.d.ts +102 -6
  56. package/dist/techniques.js +131 -56
  57. package/dist/time-bands-CZA9AlLg.d.ts +36 -0
  58. package/dist/time-scale-DIFNa0gz.d.ts +47 -0
  59. package/dist/time.d.ts +81 -0
  60. package/dist/time.js +74 -0
  61. package/dist/timing.d.ts +6 -5
  62. package/dist/timing.js +24 -17
  63. package/dist/types-DpPdtXgO.d.ts +335 -0
  64. package/dist/vedic.d.ts +112 -4
  65. package/dist/vedic.js +369 -14
  66. package/dist/window.d.ts +22 -2
  67. package/dist/window.js +86 -28
  68. package/dist/{zone-history-ghdyO0Sc.d.ts → zone-history-BxmDCcTK.d.ts} +32 -10
  69. package/package.json +24 -3
  70. package/dist/types-B-yb_tGL.d.ts +0 -240
package/dist/calc.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { DeltaT } from './deltat.js';
2
2
  import { E as EPHEMERIS_SPAN } from './reference-span-CILpclrz.js';
3
- import { e as TimeScale, T as TimeScaleName, B as BodyName, H as HouseSystem, g as ChartFlag, d as Chart, A as Angles } from './types-B-yb_tGL.js';
4
- import { A as AyanamsaName, a as AyanamsaPrecessionModel } from './ayanamsa--YQ46fET.js';
3
+ import { T as TimeBands } from './time-bands-CZA9AlLg.js';
4
+ import { T as TimeScale, a as TimeScaleName } from './time-scale-DIFNa0gz.js';
5
+ import { g as ChartFlag, B as BodyName, H as HouseSystem, d as Chart, A as Angles } from './types-DpPdtXgO.js';
6
+ import { A as AyanamsaName, a as AyanamsaPrecessionModel } from './ayanamsa-ClFzkKmV.js';
5
7
 
6
8
  /**
7
9
  * The frames of the calc entry point. A position is first found as a vector on
@@ -178,8 +180,14 @@ interface CalcReceipt<Request> {
178
180
  readonly engine: {
179
181
  readonly name: "@zodiacs/engine";
180
182
  readonly version: string;
183
+ /**
184
+ * What the result was computed on: `"jpl-de440"` with the shipped pack's
185
+ * SHA-256, or `"astronomy-engine"` with its version (docs/calc.md, "Which
186
+ * ephemeris"). Where astronomy-engine stands in for the pack, the
187
+ * result's flags say so.
188
+ */
181
189
  readonly ephemeris: {
182
- readonly name: "astronomy-engine";
190
+ readonly name: string;
183
191
  readonly version: string;
184
192
  };
185
193
  };
@@ -203,6 +211,27 @@ interface CalcBounds {
203
211
  readonly stepDays: number | null;
204
212
  }) | null;
205
213
  }
214
+ /**
215
+ * A position's band from the time basis: how far its coordinates move, to
216
+ * first order, when the instant's TT and UT1 move by their 1-σ bands. Two
217
+ * kinds are not that movement: for the true nodes, whose speed is a
218
+ * difference over ±0.25 day, the band is that smoothed speed times the TT
219
+ * band; and for a topocentric position it is a conservative bound on the
220
+ * movement, at or above it, since it takes an upper bound on the rate at
221
+ * which the observer's turn moves the position. A band is not a bound on
222
+ * the error: it leaves out the ephemeris's error, which `bounds` gives, and
223
+ * the input time's own (docs/calc.md, "Bands").
224
+ */
225
+ interface CalcTimeBand {
226
+ /** The 1-σ bands of the instant's TT and UT1, seconds (`timeBands` in `@zodiacs/engine/time`). */
227
+ readonly time: TimeBands;
228
+ /** Arcseconds, in `lon`'s coordinate, whatever `flags.units` says. */
229
+ readonly lon: number;
230
+ /** Arcseconds. */
231
+ readonly lat: number;
232
+ /** au; null where `dist` is null. */
233
+ readonly dist: number | null;
234
+ }
206
235
  interface CalcPosition {
207
236
  readonly status: "ok";
208
237
  readonly body: CalcBody;
@@ -232,6 +261,14 @@ interface CalcPosition {
232
261
  readonly ayanamsa: CalcAyanamsaValue | null;
233
262
  /** In the sidereal zodiac, each includes the ayanamsa's own bound. */
234
263
  readonly bounds: CalcBounds;
264
+ /** The band from the time basis, which is not a bound on the error; null without speeds. */
265
+ readonly band: CalcTimeBand | null;
266
+ /**
267
+ * "delta-t-extrapolated" where the position moves with an extrapolated ΔT, and `bounds` are widened (docs/calc.md,
268
+ * "Bounds"). "de440-unavailable" where the shipped DE440 pack gives this position and could not be opened, so
269
+ * that astronomy-engine gave it: never silently (docs/calc.md, "Which ephemeris").
270
+ */
271
+ readonly flags: readonly ChartFlag[];
235
272
  readonly receipt: CalcReceipt<CalcRequest>;
236
273
  }
237
274
  /**
@@ -303,6 +340,24 @@ interface HousesResult {
303
340
  readonly angles: CalcBound;
304
341
  readonly cusps: CalcBound;
305
342
  };
343
+ /**
344
+ * The bands from the time basis, which are not bounds: the instant's, and
345
+ * each angle's and cusp's, arcseconds, its rate on UT1 times the UT1 band
346
+ * plus its rate on TT times the TT band (in the sidereal zodiac the sidereal
347
+ * longitude's, with the ayanamsa's rate). Whole-sign cusps, and the cusps
348
+ * where Placidus or Koch falls back to whole signs, have none: 0. Where TT
349
+ * moved 600 s one way would make Placidus or Koch fall back, a cusp's rate
350
+ * on TT is taken the other way alone, and where both ways would, it is 0
351
+ * (docs/calc.md, "Bands").
352
+ */
353
+ readonly band: {
354
+ readonly time: TimeBands;
355
+ readonly asc: number;
356
+ readonly mc: number;
357
+ readonly vertex: number;
358
+ readonly eastPoint: number;
359
+ readonly cusps: readonly number[];
360
+ };
306
361
  readonly receipt: CalcReceipt<HousesRequest>;
307
362
  }
308
363
  /** The angles, the Vertex, the East Point and the cusps for an instant and a place, as natalChart() computes them. */
@@ -329,6 +384,15 @@ interface CalcEvent {
329
384
  readonly jdTt: number;
330
385
  /** True when the body moved backward through the longitude. */
331
386
  readonly retrograde: boolean;
387
+ /**
388
+ * The 1-σ bands, seconds, of the event's UTC and UT1 from the time basis at
389
+ * the event: the ephemeris fixes it in TT, so its TT has none, `utc` is the
390
+ * band of TT − UTC there and `ut1` that of TT − UT1 (docs/calc.md, "Bands").
391
+ */
392
+ readonly band: {
393
+ readonly utc: number;
394
+ readonly ut1: number;
395
+ };
332
396
  }
333
397
  interface EventsResult {
334
398
  readonly status: "ok";
@@ -336,6 +400,12 @@ interface EventsResult {
336
400
  readonly events: readonly CalcEvent[];
337
401
  /** Longitude evaluations made. */
338
402
  readonly samples: number;
403
+ /**
404
+ * "delta-t-extrapolated" where an event's UTC moves with an extrapolated ΔT; `timing` then adds the widest such
405
+ * band. "de440-unavailable" where the search ran on astronomy-engine because the shipped DE440 pack could not be
406
+ * opened.
407
+ */
408
+ readonly flags: readonly ChartFlag[];
339
409
  readonly bounds: {
340
410
  readonly timing: CalcBound;
341
411
  };
@@ -365,6 +435,22 @@ interface ChartResult {
365
435
  readonly chart: Chart;
366
436
  /** In the sidereal zodiac, the chart's longitudes as `@zodiacs/engine/vedic`'s siderealChart() gives them; null in the tropical zodiac. */
367
437
  readonly sidereal: CalcSiderealChart | null;
438
+ /**
439
+ * The bands of `chart`, the tropical chart, from the time basis, which are
440
+ * not bounds: the instant's; each body's longitude, its speed times the TT
441
+ * band; and the ascendant's and the midheaven's, their rates on UT1 and on
442
+ * TT times those bands, as houses() gives them in the tropical zodiac, null
443
+ * without angles; arcseconds (docs/calc.md, "Bands").
444
+ */
445
+ readonly band: {
446
+ readonly time: TimeBands;
447
+ readonly bodies: readonly {
448
+ readonly body: BodyName;
449
+ readonly lon: number;
450
+ }[];
451
+ readonly asc: number | null;
452
+ readonly mc: number | null;
453
+ };
368
454
  readonly receipt: CalcReceipt<ChartRequest>;
369
455
  }
370
456
  /** A chart's sidereal longitudes, degrees in [0, 360), as siderealChart() gives them. */
@@ -387,4 +473,4 @@ interface CalcSiderealChart {
387
473
  /** A natal chart from the calc vocabulary: natalChart()'s chart, with a receipt. */
388
474
  declare function chart(request: ChartRequest): ChartResult | CalcRefusal;
389
475
 
390
- export { Angles, CALC_AYANAMSAS, CALC_BODIES, CALC_FRAMES, CALC_RECEIPT_SCHEMA, CALC_SPAN, type CalcAyanamsa, type CalcAyanamsaModel, type CalcAyanamsaValue, type CalcBody, type CalcBound, type CalcBounds, type CalcCenter, type CalcCorrection, type CalcEvent, type CalcFlags, type CalcFrame, type CalcInstant, type CalcLocation, type CalcPlace, type CalcPosition, type CalcReceipt, type CalcRefusal, type CalcRequest, type CalcScale, type CalcSiderealChart, type CalcSpan, type CalcTime, type CalcUserAyanamsa, type CalcZodiac, Chart, ChartFlag, type ChartRequest, type ChartResult, DeltaT, type EventsRequest, type EventsResult, HouseSystem, type HousesRequest, type HousesResult, TimeScale, calc, chart, events, houses };
476
+ export { Angles, CALC_AYANAMSAS, CALC_BODIES, CALC_FRAMES, CALC_RECEIPT_SCHEMA, CALC_SPAN, type CalcAyanamsa, type CalcAyanamsaModel, type CalcAyanamsaValue, type CalcBody, type CalcBound, type CalcBounds, type CalcCenter, type CalcCorrection, type CalcEvent, type CalcFlags, type CalcFrame, type CalcInstant, type CalcLocation, type CalcPlace, type CalcPosition, type CalcReceipt, type CalcRefusal, type CalcRequest, type CalcScale, type CalcSiderealChart, type CalcSpan, type CalcTime, type CalcTimeBand, type CalcUserAyanamsa, type CalcZodiac, Chart, ChartFlag, type ChartRequest, type ChartResult, DeltaT, type EventsRequest, type EventsResult, HouseSystem, type HousesRequest, type HousesResult, TimeBands, TimeScale, calc, chart, events, houses };