@zodiacs/engine 0.1.1-rc.16 → 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 (80) hide show
  1. package/CHANGELOG.md +1478 -0
  2. package/LICENSING.md +184 -30
  3. package/NOTICE +81 -14
  4. package/README.md +345 -67
  5. package/dist/{api-VOW6Umy5.d.ts → api-ChL1N2Sr.d.ts} +44 -7
  6. package/dist/ayanamsa-ClFzkKmV.d.ts +135 -0
  7. package/dist/calc.d.ts +218 -21
  8. package/dist/calc.js +580 -160
  9. package/dist/chunk-2PZYJQV5.js +83 -0
  10. package/dist/chunk-47ERTK5X.js +27 -0
  11. package/dist/{chunk-O3NJRGJ2.js → chunk-4XOYTBLS.js} +1 -1
  12. package/dist/chunk-767FTO7O.js +48 -0
  13. package/dist/{chunk-N4B5JNMA.js → chunk-7Y2F2IWN.js} +40 -28
  14. package/dist/chunk-B4M2Y7FT.js +96 -0
  15. package/dist/{chunk-KHBLFXFG.js → chunk-B5LKF437.js} +29 -28
  16. package/dist/{chunk-ONBZ4HK7.js → chunk-BHJXUY67.js} +4 -2
  17. package/dist/{chunk-PFGUCNOK.js → chunk-BMDASNPB.js} +6 -6
  18. package/dist/chunk-I3L4POY7.js +18 -0
  19. package/dist/{chunk-I7O5EGFV.js → chunk-LNGURVNH.js} +3 -3
  20. package/dist/{chunk-4NV4ZEFZ.js → chunk-NNOSOOWS.js} +4 -4
  21. package/dist/chunk-OVXQQEXL.js +41 -0
  22. package/dist/{chunk-WOU7JVD3.js → chunk-QLIEEICB.js} +205 -194
  23. package/dist/chunk-RMBWKZI2.js +130 -0
  24. package/dist/{chunk-AECKV73C.js → chunk-TSS2SZWQ.js} +8 -2
  25. package/dist/{chunk-L6ZHWJZ6.js → chunk-TZVPZHZM.js} +51 -29
  26. package/dist/chunk-WBTWY2OB.js +478 -0
  27. package/dist/chunk-Y4E3WJU5.js +87 -0
  28. package/dist/chunk-YPU3MDNI.js +852 -0
  29. package/dist/conventions.d.ts +70 -0
  30. package/dist/conventions.js +26 -0
  31. package/dist/crossings.d.ts +22 -10
  32. package/dist/crossings.js +1 -1
  33. package/dist/de440-pack.d.ts +43 -0
  34. package/dist/de440-pack.js +16 -0
  35. package/dist/de440.d.ts +113 -0
  36. package/dist/de440.js +19 -0
  37. package/dist/deltat.d.ts +28 -3
  38. package/dist/deltat.js +1 -1
  39. package/dist/ephemeris-exTSqBgb.d.ts +60 -0
  40. package/dist/geo.d.ts +46 -13
  41. package/dist/geo.js +4 -2
  42. package/dist/{houses-q1O2GGp4.d.ts → houses-Bh7GCnPi.d.ts} +14 -4
  43. package/dist/houses-extra.d.ts +22 -7
  44. package/dist/houses-extra.js +4 -2
  45. package/dist/index.d.ts +36 -49
  46. package/dist/index.js +54 -34
  47. package/dist/{internal-math-CmJ9xtaW.d.ts → internal-math-CxenuGfm.d.ts} +41 -27
  48. package/dist/internal-math.d.ts +4 -3
  49. package/dist/internal-math.js +14 -12
  50. package/dist/internal.d.ts +16 -7
  51. package/dist/internal.js +27 -6
  52. package/dist/lite-composite.js +114 -0
  53. package/dist/lite-declinations.js +253 -0
  54. package/dist/lite-dignities.js +333 -0
  55. package/dist/lite-sect.js +72 -0
  56. package/dist/lite.d.ts +82 -0
  57. package/dist/lite.js +4 -0
  58. package/dist/receipt.d.ts +3 -268
  59. package/dist/receipt.js +202 -89
  60. package/dist/reference-span-CILpclrz.d.ts +40 -0
  61. package/dist/{rulers-9wljfVaO.d.ts → rulers-CSSWtiWF.d.ts} +7 -2
  62. package/dist/sky.d.ts +26 -10
  63. package/dist/sky.js +23 -14
  64. package/dist/techniques.d.ts +160 -21
  65. package/dist/techniques.js +157 -89
  66. package/dist/time-bands-CZA9AlLg.d.ts +36 -0
  67. package/dist/time-scale-DIFNa0gz.d.ts +47 -0
  68. package/dist/time.d.ts +81 -0
  69. package/dist/time.js +74 -0
  70. package/dist/timing.d.ts +55 -17
  71. package/dist/timing.js +33 -45
  72. package/dist/types-DpPdtXgO.d.ts +335 -0
  73. package/dist/vedic.d.ts +150 -123
  74. package/dist/vedic.js +398 -440
  75. package/dist/window.d.ts +102 -80
  76. package/dist/window.js +108 -51
  77. package/dist/zone-history-BxmDCcTK.d.ts +290 -0
  78. package/package.json +26 -3
  79. package/dist/chunk-2OWGBT3O.js +0 -219
  80. package/dist/types-B4MCoCCS.d.ts +0 -228
@@ -0,0 +1,83 @@
1
+ import {
2
+ tilt
3
+ } from "./chunk-Y4E3WJU5.js";
4
+ import {
5
+ normalizeLongitude
6
+ } from "./chunk-RMBWKZI2.js";
7
+
8
+ // src/frame.ts
9
+ var DEG = Math.PI / 180;
10
+ var ASEC2RAD = DEG / 3600;
11
+ var RAD = 180 / Math.PI;
12
+ var last;
13
+ function eclipticFrame(tt) {
14
+ if (last !== void 0 && last.tt === tt) return last;
15
+ const t = tt / 36525;
16
+ let eps0 = 84381.406;
17
+ let psia = ((((-951e-10 * t + 132851e-9) * t - 114045e-8) * t - 1.0790069) * t + 5038.481507) * t;
18
+ let omegaa = ((((3337e-10 * t - 467e-9) * t - 772503e-8) * t + 0.0512623) * t - 0.025754) * t + eps0;
19
+ let chia = ((((-56e-9 * t + 170663e-9) * t - 121197e-8) * t - 2.3814292) * t + 10.556403) * t;
20
+ eps0 *= ASEC2RAD;
21
+ psia *= ASEC2RAD;
22
+ omegaa *= ASEC2RAD;
23
+ chia *= ASEC2RAD;
24
+ const sa = Math.sin(eps0);
25
+ const ca = Math.cos(eps0);
26
+ const sb = Math.sin(-psia);
27
+ const cb = Math.cos(-psia);
28
+ const sc = Math.sin(-omegaa);
29
+ const cc = Math.cos(-omegaa);
30
+ const sd = Math.sin(chia);
31
+ const cd = Math.cos(chia);
32
+ const xx = cd * cb - sb * sd * cc;
33
+ const yx = cd * sb * ca + sd * cc * cb * ca - sa * sd * sc;
34
+ const zx = cd * sb * sa + sd * cc * cb * sa + ca * sd * sc;
35
+ const xy = -sd * cb - sb * cd * cc;
36
+ const yy = -sd * sb * ca + cd * cc * cb * ca - sa * cd * sc;
37
+ const zy = -sd * sb * sa + cd * cc * cb * sa + ca * cd * sc;
38
+ const xz = sb * sc;
39
+ const yz = -sc * cb * ca - sa * cc;
40
+ const zz = -sc * cb * sa + cc * ca;
41
+ const at = tilt(tt);
42
+ const e = at.mobl * DEG;
43
+ const ce = Math.cos(e);
44
+ const se = Math.sin(e);
45
+ last = {
46
+ tt,
47
+ rows: [
48
+ xx,
49
+ yx,
50
+ zx,
51
+ ce * xy + se * xz,
52
+ ce * yy + se * yz,
53
+ ce * zy + se * zz,
54
+ ce * xz - se * xy,
55
+ ce * yz - se * yy,
56
+ ce * zz - se * zy
57
+ ],
58
+ tilt: at
59
+ };
60
+ return last;
61
+ }
62
+ function meanEcliptic(frame, x, y, z) {
63
+ const m = frame.rows;
64
+ return [
65
+ m[0] * x + m[1] * y + m[2] * z,
66
+ m[3] * x + m[4] * y + m[5] * z,
67
+ m[6] * x + m[7] * y + m[8] * z
68
+ ];
69
+ }
70
+ function eclipticOfDate(x, y, z, tt) {
71
+ const frame = eclipticFrame(tt);
72
+ const [ex, ey, ez] = meanEcliptic(frame, x, y, z);
73
+ return {
74
+ lon: normalizeLongitude(Math.atan2(ey, ex) * RAD + frame.tilt.dpsi / 3600),
75
+ lat: Math.asin(ez / Math.hypot(ex, ey, ez)) * RAD
76
+ };
77
+ }
78
+
79
+ export {
80
+ eclipticFrame,
81
+ meanEcliptic,
82
+ eclipticOfDate
83
+ };
@@ -0,0 +1,27 @@
1
+ // src/read-options.ts
2
+ function readOptions(value, allowed, label) {
3
+ const out = /* @__PURE__ */ Object.create(null);
4
+ if (value === void 0) return out;
5
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
6
+ throw new RangeError(`${label} must be an options object.`);
7
+ }
8
+ const prototype = Object.getPrototypeOf(value);
9
+ if (prototype !== Object.prototype && prototype !== null) {
10
+ throw new RangeError(`${label} must be a plain options object.`);
11
+ }
12
+ for (const key of Reflect.ownKeys(value)) {
13
+ if (typeof key !== "string" || !allowed.includes(key)) {
14
+ throw new RangeError(`${label} has an unknown option: ${String(key)}.`);
15
+ }
16
+ const slot = Object.getOwnPropertyDescriptor(value, key);
17
+ if (!slot || !("value" in slot) || !slot.enumerable) {
18
+ throw new RangeError(`${label} must contain only plain data properties.`);
19
+ }
20
+ if (slot.value !== void 0) out[key] = slot.value;
21
+ }
22
+ return out;
23
+ }
24
+
25
+ export {
26
+ readOptions
27
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  eclipticFrame
3
- } from "./chunk-WOU7JVD3.js";
3
+ } from "./chunk-2PZYJQV5.js";
4
4
 
5
5
  // src/equator.ts
6
6
  var DEG = Math.PI / 180;