@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
@@ -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
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  eclipticFrame
3
- } from "./chunk-SRXBTP5H.js";
3
+ } from "./chunk-2PZYJQV5.js";
4
4
 
5
5
  // src/equator.ts
6
6
  var DEG = Math.PI / 180;