@zodiacs/engine 1.0.0 → 2.0.0-rc.2
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.
- package/CHANGELOG.md +1244 -0
- package/LICENSING.md +172 -27
- package/NOTICE +78 -12
- package/README.md +344 -59
- package/dist/{api-WbxJ4Wj-.d.ts → api-C_SVd9BJ.d.ts} +39 -3
- package/dist/{ayanamsa--YQ46fET.d.ts → ayanamsa-Clgkekhh.d.ts} +2 -1
- package/dist/calc.d.ts +91 -4
- package/dist/calc.js +368 -126
- package/dist/chunk-CV53HA7R.js +87 -0
- package/dist/chunk-EEW7746S.js +83 -0
- package/dist/{chunk-WS3TDSP3.js → chunk-FVGA776A.js} +7 -3
- package/dist/chunk-HNVGWN3S.js +852 -0
- package/dist/chunk-I3L4POY7.js +18 -0
- package/dist/{chunk-FTX3JDJA.js → chunk-IXFUYEUF.js} +65 -29
- package/dist/{chunk-7TRLIFFI.js → chunk-LWZS7HI3.js} +1 -1
- package/dist/{chunk-CHSYDKBL.js → chunk-N4UQLCBN.js} +3 -3
- package/dist/{chunk-YIITY7Q7.js → chunk-NX4PHQBL.js} +34 -22
- package/dist/chunk-OVXQQEXL.js +41 -0
- package/dist/{chunk-SRXBTP5H.js → chunk-PNXIA7MI.js} +217 -192
- package/dist/chunk-RMBWKZI2.js +130 -0
- package/dist/{chunk-DMGHYCDI.js → chunk-SCRO6HWB.js} +5 -3
- package/dist/{chunk-OG4OYTJJ.js → chunk-T6F4FYYS.js} +1 -129
- package/dist/chunk-UXY4RU57.js +48 -0
- package/dist/{chunk-PFGUCNOK.js → chunk-WONTOC5W.js} +7 -6
- package/dist/conventions.d.ts +70 -0
- package/dist/conventions.js +26 -0
- package/dist/crossings.d.ts +15 -4
- package/dist/de440-pack.d.ts +43 -0
- package/dist/de440-pack.js +16 -0
- package/dist/de440.d.ts +113 -0
- package/dist/de440.js +19 -0
- package/dist/ephemeris-D1lM832F.d.ts +64 -0
- package/dist/geo.d.ts +28 -7
- package/dist/geo.js +2 -2
- package/dist/houses-extra.d.ts +5 -4
- package/dist/{houses-CFERsAlK.d.ts → houses-icK01yXi.d.ts} +3 -3
- package/dist/index.d.ts +8 -6
- package/dist/index.js +40 -28
- package/dist/{internal-math-DJJ8BYex.d.ts → internal-math-BGX23p4h.d.ts} +2 -2
- package/dist/internal-math.d.ts +4 -3
- package/dist/internal-math.js +14 -12
- package/dist/internal.d.ts +16 -7
- package/dist/internal.js +25 -4
- package/dist/lite-composite.js +114 -0
- package/dist/lite-declinations.js +253 -0
- package/dist/lite-dignities.js +333 -0
- package/dist/lite-sect.js +72 -0
- package/dist/lite.d.ts +82 -0
- package/dist/lite.js +4 -0
- package/dist/receipt.d.ts +3 -2
- package/dist/receipt.js +156 -67
- package/dist/{rulers-Dla6h_Sm.d.ts → rulers-CpS9qkvu.d.ts} +1 -1
- package/dist/sky.d.ts +4 -3
- package/dist/sky.js +17 -10
- package/dist/techniques.d.ts +102 -6
- package/dist/techniques.js +131 -56
- package/dist/time-bands-CZA9AlLg.d.ts +36 -0
- package/dist/time-scale-DIFNa0gz.d.ts +47 -0
- package/dist/time.d.ts +81 -0
- package/dist/time.js +74 -0
- package/dist/timing.d.ts +6 -5
- package/dist/timing.js +24 -17
- package/dist/types-BCnyWBQZ.d.ts +352 -0
- package/dist/vedic.d.ts +112 -4
- package/dist/vedic.js +369 -14
- package/dist/window.d.ts +22 -2
- package/dist/window.js +86 -28
- package/dist/{zone-history-ghdyO0Sc.d.ts → zone-history-0XzMGx9V.d.ts} +32 -10
- package/package.json +24 -3
- package/dist/types-B-yb_tGL.d.ts +0 -240
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meanObliquity
|
|
3
|
+
} from "./chunk-SCRO6HWB.js";
|
|
4
|
+
|
|
5
|
+
// src/nutation.ts
|
|
6
|
+
var DEG = Math.PI / 180;
|
|
7
|
+
var ARCSEC = DEG / 3600;
|
|
8
|
+
var ARGUMENTS = [
|
|
9
|
+
485868.249036,
|
|
10
|
+
17179159232178e-4,
|
|
11
|
+
128710479305e-5,
|
|
12
|
+
1295965810481e-4,
|
|
13
|
+
335779.526232,
|
|
14
|
+
17395272628478e-4,
|
|
15
|
+
107226070369e-5,
|
|
16
|
+
1602961601209e-3,
|
|
17
|
+
450160.398036,
|
|
18
|
+
-69628905431e-4
|
|
19
|
+
];
|
|
20
|
+
var MULTIPLIERS = "2222322404224242222423222234043222222423324242140422403124241224232223122231244432423024232224222444204040224242424324041242342222224222322312243244042204232203212231244324222324440242223424224432142422243324034240402243424232140322203112424220332242234033122202424524242124231424222321144412422214440222333424422231323233222324221240332224122322243412464132332040332443024441222433404";
|
|
21
|
+
var COEFFICIENT_TEXT = "-172064161,-174666,33386,92052331,9086,15377,-13170906,-1675,-13696,5730336,-3015,-4587,-2276413,-234,2796,978459,-485,1374,2074554,207,-698,-897492,470,-291,1475877,-3633,11817,73871,-184,-1924,-516821,1226,-524,224386,-677,-174,711159,73,-872,-6750,0,358,-387298,-367,380,200728,18,318,-301461,-36,816,129025,-63,367,215829,-494,111,-95929,299,132,128227,137,181,-68982,-9,39,123457,11,19,-53311,32,-4,156994,10,-168,-1235,0,82,63110,63,27,-33228,0,-9,-57976,-63,-189,31429,0,-75,-59641,-11,149,25543,-11,66,-51613,-42,129,26366,0,78,45893,50,31,-24236,-10,20,63384,11,-150,-1220,0,29,-38571,-1,158,16452,-11,68,32481,0,0,-13870,0,0,-47722,0,-18,477,0,-25,-31046,-1,131,13238,-11,59,28593,0,-1,-12338,10,-3,20441,21,10,-10758,0,-3,29243,0,-74,-609,0,13,25887,0,-66,-550,0,11,-14053,-25,79,8551,-2,-45,15164,10,11,-8001,0,-1,-15794,72,-16,6850,-42,-5,21783,0,13,-167,0,13,-12873,-10,-37,6953,0,-14,-12654,11,63,6415,0,26,-10204,0,25,5222,0,15,16707,-85,-10,168,-1,10,-7691,0,44,3268,0,19,-11024,0,-14,104,0,2,7566,-21,-11,-3250,0,-5,-6637,-11,25,3353,0,14,-7141,21,8,3070,0,4,-6302,-11,2,3272,0,4,5800,10,2,-3045,0,-1,6443,0,-7,-2768,0,-4,-5774,-11,-15,3041,0,-5,-5350,0,21,2695,0,12,-4752,-11,-3,2719,0,-3,-4940,-11,-21,2720,0,-9,7350,0,-8,-51,0,4,4065,0,6,-2206,0,1,6579,0,-24,-199,0,2,3579,0,5,-1900,0,1,4725,0,-6,-41,0,3,-3075,0,-2,1313,0,-1,-2904,0,15,1233,0,7,4348,0,-10,-81,0,2,-2878,0,8,1232,0,4,-4230,0,5,-20,0,-2,-2819,0,7,1207,0,3,-4056,0,5,40,0,-2,-2647,0,11,1129,0,5,-2294,0,-10,1266,0,-4,2481,0,-7,-1062,0,-3,2179,0,-2,-1129,0,-2,3276,0,1,-9,0,0,-3389,0,5,35,0,-2,3339,0,-13,-107,0,1,-1987,0,-6,1073,0,-2,-1981,0,0,854,0,0,4026,0,-353,-553,0,-139,1660,0,-5,-710,0,-2,-1521,0,9,647,0,4,1314,0,0,-700,0,0,-1283,0,0,672,0,0,-1331,0,8,663,0,4,1383,0,-2,-594,0,-2,1405,0,4,-610,0,2,1290,0,0,-556,0,0";
|
|
22
|
+
var coefficientValues;
|
|
23
|
+
function coefficients() {
|
|
24
|
+
return coefficientValues ??= COEFFICIENT_TEXT.split(",").map(Number);
|
|
25
|
+
}
|
|
26
|
+
var OFFSETS = [-135e-6, 388e-6];
|
|
27
|
+
var NUTATION_TERMS = 77;
|
|
28
|
+
function nutation(t, terms = NUTATION_TERMS) {
|
|
29
|
+
const c = coefficients();
|
|
30
|
+
const re = [];
|
|
31
|
+
const im = [];
|
|
32
|
+
let om = 0;
|
|
33
|
+
for (let j = 0; j < 5; j += 1) {
|
|
34
|
+
const f = (ARGUMENTS[2 * j] + t * ARGUMENTS[2 * j + 1]) % 1296e3 * ARCSEC;
|
|
35
|
+
const cos = Math.cos(f);
|
|
36
|
+
const sin = Math.sin(f);
|
|
37
|
+
const o = 7 * j;
|
|
38
|
+
re[o + 1] = cos;
|
|
39
|
+
im[o + 1] = -sin;
|
|
40
|
+
re[o + 2] = 1;
|
|
41
|
+
im[o + 2] = 0;
|
|
42
|
+
for (let k = o + 3; k < o + 7; k += 1) {
|
|
43
|
+
re[k] = re[k - 1] * cos - im[k - 1] * sin;
|
|
44
|
+
im[k] = re[k - 1] * sin + im[k - 1] * cos;
|
|
45
|
+
}
|
|
46
|
+
re[o] = re[o + 4];
|
|
47
|
+
im[o] = -im[o + 4];
|
|
48
|
+
om = f;
|
|
49
|
+
}
|
|
50
|
+
let dp = 0;
|
|
51
|
+
let de = 0;
|
|
52
|
+
for (let i = terms - 1; i >= 0; i -= 1) {
|
|
53
|
+
let cos = 1;
|
|
54
|
+
let sin = 0;
|
|
55
|
+
for (let j = 0; j < 5; j += 1) {
|
|
56
|
+
const k2 = 7 * j + MULTIPLIERS.charCodeAt(5 * i + j) - 48;
|
|
57
|
+
const next = cos * re[k2] - sin * im[k2];
|
|
58
|
+
sin = cos * im[k2] + sin * re[k2];
|
|
59
|
+
cos = next;
|
|
60
|
+
}
|
|
61
|
+
const k = 6 * i;
|
|
62
|
+
dp += (c[k] + c[k + 1] * t) * sin + c[k + 2] * cos;
|
|
63
|
+
de += (c[k + 3] + c[k + 4] * t) * cos + c[k + 5] * sin;
|
|
64
|
+
}
|
|
65
|
+
return { dpsi: dp * 1e-7 + OFFSETS[0], deps: de * 1e-7 + OFFSETS[1], om };
|
|
66
|
+
}
|
|
67
|
+
function tilt(tt) {
|
|
68
|
+
const t = tt / 36525;
|
|
69
|
+
const { dpsi, deps, om } = nutation(t);
|
|
70
|
+
const mobl = meanObliquity(t);
|
|
71
|
+
return {
|
|
72
|
+
dpsi,
|
|
73
|
+
deps,
|
|
74
|
+
mobl,
|
|
75
|
+
tobl: mobl + deps / 3600,
|
|
76
|
+
ee: dpsi * Math.cos(mobl * DEG) + 264096e-8 * Math.sin(om) + 6352e-8 * Math.sin(2 * om)
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
ARGUMENTS,
|
|
82
|
+
MULTIPLIERS,
|
|
83
|
+
coefficients,
|
|
84
|
+
OFFSETS,
|
|
85
|
+
NUTATION_TERMS,
|
|
86
|
+
tilt
|
|
87
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
tilt
|
|
3
|
+
} from "./chunk-CV53HA7R.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,14 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readOptions
|
|
3
3
|
} from "./chunk-47ERTK5X.js";
|
|
4
|
+
import {
|
|
5
|
+
onChartClock,
|
|
6
|
+
refuseUnderSource
|
|
7
|
+
} from "./chunk-PNXIA7MI.js";
|
|
4
8
|
import {
|
|
5
9
|
dateFrom
|
|
6
10
|
} from "./chunk-CPALRSPC.js";
|
|
7
11
|
import {
|
|
8
12
|
eclipticFrame,
|
|
9
|
-
meanEcliptic
|
|
10
|
-
|
|
11
|
-
} from "./chunk-SRXBTP5H.js";
|
|
13
|
+
meanEcliptic
|
|
14
|
+
} from "./chunk-EEW7746S.js";
|
|
12
15
|
import {
|
|
13
16
|
REFERENCE_SPAN,
|
|
14
17
|
TIME_SCALE_NAMES,
|
|
@@ -225,6 +228,7 @@ function bias(v) {
|
|
|
225
228
|
return [x2, y1 - eta * z2, z2 + eta * y1];
|
|
226
229
|
}
|
|
227
230
|
function apparentStar(s, time) {
|
|
231
|
+
refuseUnderSource("A star-anchored ayanamsa");
|
|
228
232
|
const ra = s.ra * DEG;
|
|
229
233
|
const dec = s.dec * DEG;
|
|
230
234
|
const p0 = bias([Math.cos(dec) * Math.cos(ra), Math.cos(dec) * Math.sin(ra), Math.sin(dec)]);
|