@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
package/dist/receipt.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
julianToGregorian,
|
|
3
|
-
parseCalendarDate
|
|
4
|
-
} from "./chunk-KFTJMMG7.js";
|
|
5
1
|
import {
|
|
6
2
|
dateFrom
|
|
7
3
|
} from "./chunk-CPALRSPC.js";
|
|
4
|
+
import {
|
|
5
|
+
ASPECTS,
|
|
6
|
+
ASPECT_BODY_SET,
|
|
7
|
+
ASPECT_TYPES,
|
|
8
|
+
EPHEMERIS,
|
|
9
|
+
aspectMotion
|
|
10
|
+
} from "./chunk-T6F4FYYS.js";
|
|
8
11
|
import {
|
|
9
12
|
DELTA_T_IERS_MODEL,
|
|
10
13
|
TIME_SCALE_NAMES,
|
|
@@ -12,19 +15,21 @@ import {
|
|
|
12
15
|
outsideReferenceSpan,
|
|
13
16
|
timeBasis
|
|
14
17
|
} from "./chunk-B5LKF437.js";
|
|
18
|
+
import {
|
|
19
|
+
natalConventionIds
|
|
20
|
+
} from "./chunk-OVXQQEXL.js";
|
|
21
|
+
import {
|
|
22
|
+
SIGNS
|
|
23
|
+
} from "./chunk-RMBWKZI2.js";
|
|
15
24
|
import {
|
|
16
25
|
DELTA_T_MODEL,
|
|
17
26
|
DELTA_T_TABLE,
|
|
18
27
|
deltaTAt
|
|
19
28
|
} from "./chunk-BHJXUY67.js";
|
|
20
29
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
EPHEMERIS,
|
|
25
|
-
SIGNS,
|
|
26
|
-
aspectMotion
|
|
27
|
-
} from "./chunk-OG4OYTJJ.js";
|
|
30
|
+
julianToGregorian,
|
|
31
|
+
parseCalendarDate
|
|
32
|
+
} from "./chunk-KFTJMMG7.js";
|
|
28
33
|
|
|
29
34
|
// src/receipt-json.ts
|
|
30
35
|
function parseReceiptJson(json, limits) {
|
|
@@ -211,17 +216,29 @@ var CONVENTIONS_RC15 = /* @__PURE__ */ (() => Object.freeze({
|
|
|
211
216
|
timeScale: "tt-from-leap-seconds-and-ut1-from-iers-1972-to-table-end;delta-t-model-otherwise;in-result",
|
|
212
217
|
localTime: "tzdb-shards-before-1970;host-intl-from-1970;flags-from-transition-record"
|
|
213
218
|
}))();
|
|
214
|
-
var
|
|
219
|
+
var CONVENTIONS_RC16 = /* @__PURE__ */ (() => Object.freeze({
|
|
215
220
|
...CONVENTIONS_RC15,
|
|
216
221
|
moonPosition: "astronomy-engine-geo-moon;no-light-time;no-aberration",
|
|
217
222
|
nutation: "iau2000b;equation-of-equinoxes-with-two-complementary-terms"
|
|
218
223
|
}))();
|
|
224
|
+
var CONVENTIONS = /* @__PURE__ */ (() => Object.freeze({
|
|
225
|
+
...CONVENTIONS_RC16,
|
|
226
|
+
conventionIds: "zodiacs-conventions-registry;receipt-and-result;sorted-unique;in-receipt"
|
|
227
|
+
}))();
|
|
228
|
+
var CONVENTIONS_DE440 = /* @__PURE__ */ (() => Object.freeze({
|
|
229
|
+
...CONVENTIONS,
|
|
230
|
+
planetPositions: "apparent-geocentric-ecliptic-of-date;light-time;solar-deflection;relativistic-aberration;barycentres-mars-to-pluto",
|
|
231
|
+
moonPosition: "ephemeris-geocentric-moon;light-time;solar-deflection;relativistic-aberration",
|
|
232
|
+
positionFrame: "icrf-to-true-ecliptic-of-date;iau2006-precession-with-bias;iau2000b-nutation-p03;tdb-three-term"
|
|
233
|
+
}))();
|
|
219
234
|
var NATAL_RECEIPT_CONVENTION_SETS = /* @__PURE__ */ Object.freeze([
|
|
220
235
|
CONVENTIONS,
|
|
236
|
+
CONVENTIONS_RC16,
|
|
221
237
|
CONVENTIONS_RC15,
|
|
222
238
|
CONVENTIONS_RC8,
|
|
223
239
|
CONVENTIONS_RC7,
|
|
224
|
-
CONVENTIONS_RC3
|
|
240
|
+
CONVENTIONS_RC3,
|
|
241
|
+
CONVENTIONS_DE440
|
|
225
242
|
]);
|
|
226
243
|
var RC3_TO_RC6 = /^0\.1\.1-rc\.[3-6](?:\+[A-Za-z0-9.-]+)?$/;
|
|
227
244
|
var RC7 = /^0\.1\.1-rc\.7(?:\+[A-Za-z0-9.-]+)?$/;
|
|
@@ -229,6 +246,11 @@ var RC8_TO_RC14 = /^0\.1\.1-rc\.(?:[89]|1[0-4])(?:\+[A-Za-z0-9.-]+)?$/;
|
|
|
229
246
|
var RC15 = /^0\.1\.1-rc\.15(?:\+[A-Za-z0-9.-]+)?$/;
|
|
230
247
|
var before = (version2, release) => compareVersions(version2, release) < 0;
|
|
231
248
|
var NUTATION_RELEASE = "0.1.1-rc.16";
|
|
249
|
+
var IDS_FEATURE = "convention-ids";
|
|
250
|
+
var DE440_FEATURE = "ephemeris-jpl-de440";
|
|
251
|
+
var DE440_EPHEMERIS = "jpl-de440";
|
|
252
|
+
var DE440_RELEASE = "1.1.0-rc.3";
|
|
253
|
+
var SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
232
254
|
var RC9_RELEASE = "0.1.1-rc.9";
|
|
233
255
|
var RC10_RELEASE = "0.1.1-rc.10";
|
|
234
256
|
var COVERAGE = /* @__PURE__ */ Object.freeze({
|
|
@@ -253,7 +275,12 @@ var BODIES = [
|
|
|
253
275
|
];
|
|
254
276
|
var FLAGS_RC7 = ["dst-gap", "dst-fold", "lmt", "no-time", "polar-fallback"];
|
|
255
277
|
var FLAGS = [...FLAGS_RC7, "outside-reference-span"];
|
|
278
|
+
var FLAGS_TIME_BASIS = [...FLAGS, "delta-t-extrapolated", "de440-unavailable", "outside-de440-span", "calendar-unknown", "polar-angles"];
|
|
279
|
+
var FALLBACK_FLAGS = ["de440-unavailable", "outside-de440-span"];
|
|
256
280
|
var TIME_FLAGS = ["dst-gap", "dst-fold", "lmt"];
|
|
281
|
+
var TIME_FLAGS_TIME_BASIS = [...TIME_FLAGS, "calendar-unknown"];
|
|
282
|
+
var CALENDAR_UNKNOWN_DATES = { from: "1582-10-05", to: "1918-02-26" };
|
|
283
|
+
var CALENDAR_UNKNOWN_INSTANTS = { from: "1582-10-04", to: "1918-02-28" };
|
|
257
284
|
var HOUSE_SYSTEMS = [
|
|
258
285
|
"whole",
|
|
259
286
|
"placidus",
|
|
@@ -460,6 +487,7 @@ var DELTA_T_SEGMENTS = [
|
|
|
460
487
|
"extrapolated"
|
|
461
488
|
];
|
|
462
489
|
var J2000_MS = Date.UTC(2e3, 0, 1, 12);
|
|
490
|
+
var meanObliquity = (t) => (84381.406 - 46.836769 * t - 1831e-7 * t * t + 20034e-7 * t ** 3 - 576e-9 * t ** 4 - 434e-10 * t ** 5) / 3600;
|
|
463
491
|
var IERS_SEGMENTS = ["observed", "predicted", "fallback"];
|
|
464
492
|
function validateDeltaT(value, instant, timeBasis2) {
|
|
465
493
|
const deltaT = record(value);
|
|
@@ -674,16 +702,22 @@ function validateLocal(value, receipt, timeBasis2) {
|
|
|
674
702
|
fail("invalid_context");
|
|
675
703
|
if (wall + Math.round(shiftMs) - Math.round(offsetMs) !== dateFrom(receipt.instant, "instant").getTime())
|
|
676
704
|
fail("invalid_context");
|
|
677
|
-
|
|
705
|
+
const policy = record(local.policy);
|
|
706
|
+
fields(policy, ["fold", "gap"]);
|
|
707
|
+
if (policy.fold !== "earlier" && policy.fold !== "later" || policy.gap !== "shift-forward")
|
|
708
|
+
fail("unsupported_feature");
|
|
709
|
+
const later = policy.fold === "later";
|
|
710
|
+
if (later && !timeBasis2) fail("unsupported_feature");
|
|
711
|
+
if (later && !receipt.inputFlags.includes("dst-fold")) fail("invalid_context");
|
|
678
712
|
if (receipt.inputFlags.includes("dst-gap") !== shift > 0) fail("invalid_context");
|
|
679
713
|
if (receipt.reference === "local-noon" && time !== "12:00") fail("invalid_context");
|
|
680
714
|
if (!timeBasis2) {
|
|
681
715
|
if (receipt.inputFlags.includes("lmt") !== Math.abs(offset % 1) > 1e-9) fail("invalid_context");
|
|
682
716
|
return;
|
|
683
717
|
}
|
|
684
|
-
validateLocalRecord(local, receipt, date, offset, shift);
|
|
718
|
+
validateLocalRecord(local, receipt, date, offset, shift, later);
|
|
685
719
|
}
|
|
686
|
-
function validateLocalRecord(local, receipt, date, offset, shift) {
|
|
720
|
+
function validateLocalRecord(local, receipt, date, offset, shift, later) {
|
|
687
721
|
const has = (key) => Object.hasOwn(local, key);
|
|
688
722
|
const calendar = has("calendar") ? choice(local.calendar, ["gregorian", "julian"]) : "gregorian";
|
|
689
723
|
const written = has("writtenDate") ? text(local.writtenDate, 10) : null;
|
|
@@ -697,7 +731,7 @@ function validateLocalRecord(local, receipt, date, offset, shift) {
|
|
|
697
731
|
const fold = flags.includes("dst-fold");
|
|
698
732
|
if (
|
|
699
733
|
// A local time resolves to UTC.
|
|
700
|
-
receipt.timeScale !== "utc" || written !== null && (!parseCalendarDate(written, calendar) || (calendar === "gregorian" ? written : julianToGregorian(written)) !== date) || form !== void 0 && form !== "host" && version2 === null || flags.includes("lmt") !== lmt || local.transition === null && (gap || fold)
|
|
734
|
+
receipt.timeScale !== "utc" || written !== null && (!parseCalendarDate(written, calendar) || (calendar === "gregorian" ? written : julianToGregorian(written)) !== date) || form !== void 0 && form !== "host" && version2 === null || flags.includes("lmt") !== lmt || flags.includes("calendar-unknown") && !(date >= CALENDAR_UNKNOWN_DATES.from && date <= CALENDAR_UNKNOWN_DATES.to) || local.transition === null && (gap || fold)
|
|
701
735
|
)
|
|
702
736
|
fail("invalid_context");
|
|
703
737
|
let before2 = null;
|
|
@@ -711,7 +745,10 @@ function validateLocalRecord(local, receipt, date, offset, shift) {
|
|
|
711
745
|
const near = (a, b) => Math.abs(a - b) <= 1e-9;
|
|
712
746
|
if (
|
|
713
747
|
// A change of half a day or more moves the date: a move across the date line.
|
|
714
|
-
choice(transition.cause, ["dst", "legal-change", "date-line"]) === "date-line" !== Math.abs(after - before2) >= 720 || !(gap ? after > before2 && near(after - before2, shift) && near(offset, after) && at <= instant : fold ? after < before2 &&
|
|
748
|
+
choice(transition.cause, ["dst", "legal-change", "date-line"]) === "date-line" !== Math.abs(after - before2) >= 720 || !(gap ? after > before2 && near(after - before2, shift) && near(offset, after) && at <= instant : fold ? after < before2 && // The first pass is before the clock went back, on the offset it
|
|
749
|
+
// left; the second is after it, within the repeated span, on the
|
|
750
|
+
// offset it took.
|
|
751
|
+
(later ? near(offset, after) && at <= instant && instant - at < (before2 - after) * 6e4 : near(offset, before2) && at > instant) : near(offset, after) && at <= instant)
|
|
715
752
|
)
|
|
716
753
|
fail("invalid_context");
|
|
717
754
|
}
|
|
@@ -740,7 +777,7 @@ function commit(value) {
|
|
|
740
777
|
if (typeof value !== "string" || !/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/.test(value))
|
|
741
778
|
fail("invalid_value");
|
|
742
779
|
}
|
|
743
|
-
function validateProvenance(value, engineVersion) {
|
|
780
|
+
function validateProvenance(value, engineVersion, de440Version) {
|
|
744
781
|
if (value === null) return;
|
|
745
782
|
const facts = record(value);
|
|
746
783
|
fields(facts, ["status"], ["source", "artifact", "runtime", "ephemeris"]);
|
|
@@ -776,16 +813,20 @@ function validateProvenance(value, engineVersion) {
|
|
|
776
813
|
if (facts.ephemeris !== void 0) {
|
|
777
814
|
const ephemeris = record(facts.ephemeris);
|
|
778
815
|
fields(ephemeris, ["name", "version"]);
|
|
779
|
-
if (
|
|
780
|
-
|
|
816
|
+
if (de440Version !== null) {
|
|
817
|
+
if (ephemeris.name !== DE440_EPHEMERIS || ephemeris.version !== de440Version) fail("invalid_context");
|
|
818
|
+
} else {
|
|
819
|
+
if (ephemeris.name !== "astronomy-engine") fail("unsupported_feature");
|
|
820
|
+
version(ephemeris.version);
|
|
821
|
+
}
|
|
781
822
|
}
|
|
782
823
|
}
|
|
783
824
|
function validateEnvelope(input) {
|
|
784
825
|
const envelope = record(input);
|
|
785
826
|
if (envelope.schema !== NATAL_ENVELOPE_SCHEMA) fail("unsupported_version");
|
|
786
827
|
fields(envelope, ["schema", "requiredFeatures", "receipt", "result"], ["extensions"]);
|
|
787
|
-
|
|
788
|
-
if (
|
|
828
|
+
const features = list(envelope.requiredFeatures);
|
|
829
|
+
if (features.some((feature) => feature !== IDS_FEATURE && feature !== DE440_FEATURE)) fail("unsupported_feature");
|
|
789
830
|
const receipt = record(envelope.receipt);
|
|
790
831
|
if (receipt.schema !== NATAL_RECEIPT_SCHEMA) fail("unsupported_version");
|
|
791
832
|
fields(receipt, [
|
|
@@ -803,7 +844,7 @@ function validateEnvelope(input) {
|
|
|
803
844
|
"provenance",
|
|
804
845
|
"conventions",
|
|
805
846
|
"coverage"
|
|
806
|
-
], ["timeScale"]);
|
|
847
|
+
], ["timeScale", "conventionIds"]);
|
|
807
848
|
canonicalInstant(receipt.instant);
|
|
808
849
|
if (receipt.sourceInstant !== null) {
|
|
809
850
|
if (typeof receipt.sourceInstant !== "string" || receipt.sourceInstant.length > 40)
|
|
@@ -828,9 +869,15 @@ function validateEnvelope(input) {
|
|
|
828
869
|
if (timeKnown && Math.abs(coords.latitude) === 90) fail("unsupported_feature");
|
|
829
870
|
}
|
|
830
871
|
const conventions = conventionSet(receipt.conventions);
|
|
831
|
-
const
|
|
872
|
+
const de440 = conventions === CONVENTIONS_DE440;
|
|
873
|
+
const withIds = conventions === CONVENTIONS || de440;
|
|
874
|
+
const timeBasis2 = withIds || conventions === CONVENTIONS_RC16 || conventions === CONVENTIONS_RC15;
|
|
832
875
|
const current = timeBasis2 || conventions === CONVENTIONS_RC8;
|
|
833
876
|
if (timeBasis2 !== Object.hasOwn(receipt, "timeScale")) fail("invalid_shape");
|
|
877
|
+
if (withIds !== Object.hasOwn(receipt, "conventionIds")) fail("invalid_shape");
|
|
878
|
+
const expectedFeatures = de440 ? [IDS_FEATURE, DE440_FEATURE] : withIds ? [IDS_FEATURE] : [];
|
|
879
|
+
if (features.length !== expectedFeatures.length || features.some((feature, index) => feature !== expectedFeatures[index]))
|
|
880
|
+
fail("inconsistent_result");
|
|
834
881
|
const scale = timeBasis2 ? choice(receipt.timeScale, TIME_SCALE_NAMES) : null;
|
|
835
882
|
const result = validateResult(
|
|
836
883
|
envelope.result,
|
|
@@ -849,30 +896,54 @@ function validateEnvelope(input) {
|
|
|
849
896
|
fail("inconsistent_result");
|
|
850
897
|
if (result.houses && result.angles && TURNING_WITH_ASCENDANT.includes(result.houses.system) && !angularClose(result.houses.cusps[9], result.angles.mc) && Math.abs(receipt.coordinates.latitude) < 65)
|
|
851
898
|
fail("inconsistent_result");
|
|
852
|
-
const inputFlags = flagList(receipt.inputFlags, TIME_FLAGS);
|
|
853
|
-
const
|
|
899
|
+
const inputFlags = flagList(receipt.inputFlags, timeBasis2 ? TIME_FLAGS_TIME_BASIS : TIME_FLAGS);
|
|
900
|
+
const instant = receipt.instant;
|
|
901
|
+
if (inputFlags.includes("calendar-unknown") && !(instant >= CALENDAR_UNKNOWN_INSTANTS.from && instant < CALENDAR_UNKNOWN_INSTANTS.to))
|
|
902
|
+
fail("inconsistent_result");
|
|
903
|
+
const resultFlags = flagList(receipt.resultFlags, timeBasis2 ? FLAGS_TIME_BASIS : current ? FLAGS : FLAGS_RC7);
|
|
854
904
|
const expected = [...inputFlags];
|
|
855
905
|
if (!timeKnown) expected.push("no-time");
|
|
856
906
|
if (POLAR_UNDEFINED.includes(requested) && result.houses?.system === "whole")
|
|
857
907
|
expected.push("polar-fallback");
|
|
858
908
|
if (current && outsideReferenceSpan(new Date(receipt.instant)))
|
|
859
909
|
expected.push("outside-reference-span");
|
|
860
|
-
if (!sameFlags(expected, resultFlags)) fail("inconsistent_result");
|
|
861
910
|
const engine = record(receipt.engine);
|
|
862
911
|
fields(engine, current ? ["name", "version", "ephemeris"] : ["name", "version"]);
|
|
863
912
|
if (engine.name !== "@zodiacs/engine") fail("unsupported_feature");
|
|
864
913
|
const engineVersion = version(engine.version);
|
|
914
|
+
if (timeBasis2 && (scale !== "tt" || result.houses) && result.timeScale?.basis === "delta-t" && result.deltaT?.segment === "extrapolated" && (resultFlags.includes("delta-t-extrapolated") || compareVersions(engineVersion, "1.1.0-rc.9") > 0))
|
|
915
|
+
expected.push("delta-t-extrapolated");
|
|
916
|
+
if (resultFlags.includes("polar-angles") && result.angles && Math.abs(receipt.coordinates.latitude) >= 90 - meanObliquity(
|
|
917
|
+
(Date.parse(receipt.instant) + (scale === "tt" ? 0 : (result.deltaT?.seconds ?? 0) * 1e3) - J2000_MS) / 315576e7
|
|
918
|
+
) - 3e-3)
|
|
919
|
+
expected.push("polar-angles");
|
|
920
|
+
if (!de440) {
|
|
921
|
+
for (const reason2 of FALLBACK_FLAGS) if (resultFlags.includes(reason2)) expected.push(reason2);
|
|
922
|
+
}
|
|
923
|
+
if (!sameFlags(expected, resultFlags)) fail("inconsistent_result");
|
|
865
924
|
if (current) {
|
|
866
925
|
const ephemeris = record(engine.ephemeris);
|
|
867
926
|
fields(ephemeris, ["name", "version"]);
|
|
868
|
-
if (
|
|
869
|
-
|
|
927
|
+
if (de440) {
|
|
928
|
+
if (ephemeris.name !== DE440_EPHEMERIS) fail("unsupported_feature");
|
|
929
|
+
if (typeof ephemeris.version !== "string" || !SHA256_HEX.test(ephemeris.version)) fail("invalid_value");
|
|
930
|
+
} else {
|
|
931
|
+
if (ephemeris.name !== "astronomy-engine") fail("unsupported_feature");
|
|
932
|
+
version(ephemeris.version);
|
|
933
|
+
}
|
|
870
934
|
}
|
|
871
|
-
validateProvenance(receipt.provenance, engineVersion);
|
|
935
|
+
validateProvenance(receipt.provenance, engineVersion, de440 ? record(engine.ephemeris).version : null);
|
|
872
936
|
validateLocal(receipt.localResolution, receipt, timeBasis2);
|
|
873
|
-
if (conventions === CONVENTIONS_RC3 && !RC3_TO_RC6.test(engineVersion) || conventions === CONVENTIONS_RC7 && !RC7.test(engineVersion) || conventions === CONVENTIONS_RC8 && !RC8_TO_RC14.test(engineVersion) || conventions === CONVENTIONS_RC15 && !RC15.test(engineVersion) || conventions === CONVENTIONS && before(engineVersion, NUTATION_RELEASE) || !HOUSE_SYSTEMS_BEFORE_RC9.includes(requested) && before(engineVersion, RC9_RELEASE) || !HOUSE_SYSTEMS_BEFORE_RC10.includes(requested) && before(engineVersion, RC10_RELEASE))
|
|
937
|
+
if (conventions === CONVENTIONS_RC3 && !RC3_TO_RC6.test(engineVersion) || conventions === CONVENTIONS_RC7 && !RC7.test(engineVersion) || conventions === CONVENTIONS_RC8 && !RC8_TO_RC14.test(engineVersion) || conventions === CONVENTIONS_RC15 && !RC15.test(engineVersion) || (conventions === CONVENTIONS || conventions === CONVENTIONS_RC16) && before(engineVersion, NUTATION_RELEASE) || de440 && before(engineVersion, DE440_RELEASE) || !HOUSE_SYSTEMS_BEFORE_RC9.includes(requested) && before(engineVersion, RC9_RELEASE) || !HOUSE_SYSTEMS_BEFORE_RC10.includes(requested) && before(engineVersion, RC10_RELEASE))
|
|
874
938
|
fail("inconsistent_result");
|
|
875
939
|
fixedFields(receipt.coverage, COVERAGE);
|
|
940
|
+
if (withIds) {
|
|
941
|
+
const ids = list(receipt.conventionIds);
|
|
942
|
+
if (ids.some((id) => typeof id !== "string")) fail("invalid_value");
|
|
943
|
+
const named = natalConventionIds({ receipt, result });
|
|
944
|
+
if (ids.length !== named.length || ids.some((id, index) => id !== named[index]))
|
|
945
|
+
fail("inconsistent_result");
|
|
946
|
+
}
|
|
876
947
|
if (envelope.extensions !== void 0) record(envelope.extensions);
|
|
877
948
|
return envelope;
|
|
878
949
|
}
|
|
@@ -908,6 +979,18 @@ function createNatalEnvelope(chart, context = {}) {
|
|
|
908
979
|
["latitude", "longitude", "flags", "deltaT", "timeScale"]
|
|
909
980
|
);
|
|
910
981
|
if (!(input.utc instanceof Date)) fail("invalid_value");
|
|
982
|
+
const ephemerisNamed = source.ephemeris === void 0 ? null : record(source.ephemeris);
|
|
983
|
+
let de440 = false;
|
|
984
|
+
if (ephemerisNamed !== null) {
|
|
985
|
+
fields(ephemerisNamed, ["name", "version"]);
|
|
986
|
+
if (ephemerisNamed.name === EPHEMERIS.name) {
|
|
987
|
+
if (ephemerisNamed.version !== EPHEMERIS.version) fail("unsupported_feature");
|
|
988
|
+
} else {
|
|
989
|
+
if (ephemerisNamed.name !== DE440_EPHEMERIS) fail("unsupported_feature");
|
|
990
|
+
if (typeof ephemerisNamed.version !== "string" || !SHA256_HEX.test(ephemerisNamed.version)) fail("invalid_value");
|
|
991
|
+
de440 = true;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
911
994
|
const supplied = record(cloneData(context));
|
|
912
995
|
fields(
|
|
913
996
|
supplied,
|
|
@@ -918,43 +1001,49 @@ function createNatalEnvelope(chart, context = {}) {
|
|
|
918
1001
|
fields(record(supplied.provenance), [], ["source", "artifact", "runtime", "ephemeris"]);
|
|
919
1002
|
if (input.latitude === void 0 !== (input.longitude === void 0)) fail("invalid_value");
|
|
920
1003
|
const houses = source.houses === null ? null : record(source.houses);
|
|
921
|
-
const
|
|
922
|
-
schema:
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
requested: input.houseSystem,
|
|
935
|
-
actual: houses?.system ?? null,
|
|
936
|
-
absenceReason: !input.timeKnown ? "unknown-time" : input.latitude === void 0 ? "missing-location" : null
|
|
937
|
-
},
|
|
938
|
-
inputFlags: input.flags ?? [],
|
|
939
|
-
resultFlags: source.flags,
|
|
940
|
-
engine: {
|
|
941
|
-
name: "@zodiacs/engine",
|
|
942
|
-
version: source.engineVersion,
|
|
943
|
-
ephemeris: { ...EPHEMERIS }
|
|
944
|
-
},
|
|
945
|
-
provenance: supplied.provenance === void 0 ? null : { ...record(supplied.provenance), status: "claimed" },
|
|
946
|
-
conventions: { ...CONVENTIONS },
|
|
947
|
-
coverage: { ...COVERAGE }
|
|
1004
|
+
const receipt = {
|
|
1005
|
+
schema: NATAL_RECEIPT_SCHEMA,
|
|
1006
|
+
instant: Date.prototype.toISOString.call(input.utc),
|
|
1007
|
+
timeScale: input.timeScale ?? "utc",
|
|
1008
|
+
sourceInstant: supplied.sourceInstant === void 0 ? null : supplied.sourceInstant,
|
|
1009
|
+
timeKnown: input.timeKnown,
|
|
1010
|
+
reference: supplied.reference === void 0 ? "supplied-instant" : supplied.reference,
|
|
1011
|
+
localResolution: supplied.localResolution ?? null,
|
|
1012
|
+
coordinates: input.latitude === void 0 ? null : { latitude: input.latitude, longitude: input.longitude },
|
|
1013
|
+
houses: {
|
|
1014
|
+
requested: input.houseSystem,
|
|
1015
|
+
actual: houses?.system ?? null,
|
|
1016
|
+
absenceReason: !input.timeKnown ? "unknown-time" : input.latitude === void 0 ? "missing-location" : null
|
|
948
1017
|
},
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
deltaT: kept(source.deltaT, DELTA_T_RECORD),
|
|
956
|
-
timeScale: timeScaleKept(source.timeScale)
|
|
1018
|
+
inputFlags: input.flags ?? [],
|
|
1019
|
+
resultFlags: source.flags,
|
|
1020
|
+
engine: {
|
|
1021
|
+
name: "@zodiacs/engine",
|
|
1022
|
+
version: source.engineVersion,
|
|
1023
|
+
ephemeris: de440 ? { name: DE440_EPHEMERIS, version: ephemerisNamed.version } : { ...EPHEMERIS }
|
|
957
1024
|
},
|
|
1025
|
+
provenance: supplied.provenance === void 0 ? null : { ...record(supplied.provenance), status: "claimed" },
|
|
1026
|
+
conventions: { ...de440 ? CONVENTIONS_DE440 : CONVENTIONS },
|
|
1027
|
+
coverage: { ...COVERAGE }
|
|
1028
|
+
};
|
|
1029
|
+
const result = {
|
|
1030
|
+
bodies: list(source.bodies).map((body) => kept(body, BODY_RECORD)),
|
|
1031
|
+
angles: source.angles === null ? null : kept(source.angles, ANGLES_RECORD),
|
|
1032
|
+
houses: houses === null ? null : kept(houses, HOUSES_RECORD),
|
|
1033
|
+
aspects: list(source.aspects).map((aspect) => kept(aspect, ASPECT_RECORD)),
|
|
1034
|
+
deltaT: kept(source.deltaT, DELTA_T_RECORD),
|
|
1035
|
+
timeScale: timeScaleKept(source.timeScale)
|
|
1036
|
+
};
|
|
1037
|
+
let conventionIds = [];
|
|
1038
|
+
try {
|
|
1039
|
+
conventionIds = natalConventionIds({ receipt, result });
|
|
1040
|
+
} catch {
|
|
1041
|
+
}
|
|
1042
|
+
const envelope = {
|
|
1043
|
+
schema: NATAL_ENVELOPE_SCHEMA,
|
|
1044
|
+
requiredFeatures: de440 ? [IDS_FEATURE, DE440_FEATURE] : [IDS_FEATURE],
|
|
1045
|
+
receipt: { ...receipt, conventionIds },
|
|
1046
|
+
result,
|
|
958
1047
|
...supplied.extensions === void 0 ? {} : { extensions: supplied.extensions }
|
|
959
1048
|
};
|
|
960
1049
|
return checked(envelope);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as ZodiacSign } from './types-
|
|
1
|
+
import { Z as ZodiacSign } from './types-BCnyWBQZ.js';
|
|
2
2
|
|
|
3
3
|
/** The seven visible planets of the traditional rulership scheme. */
|
|
4
4
|
type TraditionalPlanet = "Sun" | "Moon" | "Mercury" | "Venus" | "Mars" | "Jupiter" | "Saturn";
|
package/dist/sky.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { B as BodyName,
|
|
2
|
-
import { T as TraditionalPlanet } from './rulers-
|
|
3
|
-
export { C as CHALDEAN_ORDER } from './rulers-
|
|
1
|
+
import { B as BodyName, e as DateInput } from './types-BCnyWBQZ.js';
|
|
2
|
+
import { T as TraditionalPlanet } from './rulers-CpS9qkvu.js';
|
|
3
|
+
export { C as CHALDEAN_ORDER } from './rulers-CpS9qkvu.js';
|
|
4
4
|
import './deltat.js';
|
|
5
|
+
import './time-scale-DIFNa0gz.js';
|
|
5
6
|
|
|
6
7
|
/** A body the sky functions accept: the Sun, the Moon and the planets. */
|
|
7
8
|
type SkyBody = Exclude<BodyName, "North Node" | "South Node">;
|
package/dist/sky.js
CHANGED
|
@@ -4,23 +4,29 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
equatorRows,
|
|
6
6
|
turn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LWZS7HI3.js";
|
|
8
|
+
import {
|
|
9
|
+
gastHours,
|
|
10
|
+
onChartClock,
|
|
11
|
+
refuseUnderSource
|
|
12
|
+
} from "./chunk-PNXIA7MI.js";
|
|
8
13
|
import {
|
|
9
14
|
dateFrom
|
|
10
15
|
} from "./chunk-CPALRSPC.js";
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
} from "./chunk-TSS2SZWQ.js";
|
|
14
|
-
import {
|
|
15
|
-
gastHours,
|
|
16
|
-
onChartClock
|
|
17
|
-
} from "./chunk-SRXBTP5H.js";
|
|
16
|
+
import "./chunk-T6F4FYYS.js";
|
|
17
|
+
import "./chunk-EEW7746S.js";
|
|
18
18
|
import {
|
|
19
19
|
outsideReferenceSpan
|
|
20
20
|
} from "./chunk-B5LKF437.js";
|
|
21
|
+
import {
|
|
22
|
+
searchLongitudeCrossingsWith
|
|
23
|
+
} from "./chunk-TSS2SZWQ.js";
|
|
24
|
+
import "./chunk-UXY4RU57.js";
|
|
25
|
+
import "./chunk-HNVGWN3S.js";
|
|
26
|
+
import "./chunk-CV53HA7R.js";
|
|
27
|
+
import "./chunk-SCRO6HWB.js";
|
|
28
|
+
import "./chunk-RMBWKZI2.js";
|
|
21
29
|
import "./chunk-BHJXUY67.js";
|
|
22
|
-
import "./chunk-DMGHYCDI.js";
|
|
23
|
-
import "./chunk-OG4OYTJJ.js";
|
|
24
30
|
|
|
25
31
|
// src/sky/riseset.ts
|
|
26
32
|
import { Body, GeoVector } from "astronomy-engine";
|
|
@@ -125,6 +131,7 @@ function conventionsOf(body, input) {
|
|
|
125
131
|
return Object.freeze({ limb, refraction, refractionArcmin: refraction === "standard" ? STANDARD_REFRACTION_ARCMIN : 0 });
|
|
126
132
|
}
|
|
127
133
|
function stateAt(body, site, conventions, ms) {
|
|
134
|
+
refuseUnderSource("@zodiacs/engine/sky's rising and setting");
|
|
128
135
|
return onChartClock(ms, "utc", void 0, (time) => {
|
|
129
136
|
const g = GeoVector(BODIES[body], time, true);
|
|
130
137
|
const [vx, vy, vz] = turn(equatorRows(time.tt, "true"), g.x, g.y, g.z);
|
package/dist/techniques.d.ts
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { E as EphemerisFallback, d as Chart, H as HouseSystem, e as DateInput, D as DetailedResult, B as BodyName, f as AspectType, Z as ZodiacSign, l as Element, j as Sect } from './types-BCnyWBQZ.js';
|
|
2
|
+
import { N as NatalSource } from './api-C_SVd9BJ.js';
|
|
3
3
|
import './deltat.js';
|
|
4
|
+
import './time-scale-DIFNa0gz.js';
|
|
4
5
|
import './crossings.js';
|
|
5
6
|
|
|
6
|
-
/**
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* `"outside-reference-span"`: the ephemeris was read outside 1800 to 2200
|
|
9
|
+
* (`REFERENCE_SPAN`). `"de440-unavailable"` and `"outside-de440-span"`: a
|
|
10
|
+
* position was astronomy-engine's as a fallback from the shipped DE440 pack
|
|
11
|
+
* (the root entry's `EphemerisFallback`).
|
|
12
|
+
*/
|
|
13
|
+
type TechniqueFlag = "outside-reference-span" | EphemerisFallback;
|
|
8
14
|
/** Latitude in [−90, 90] and longitude east in [−180, 180], degrees. */
|
|
9
15
|
interface GeoPlace {
|
|
10
16
|
readonly latitude: number;
|
|
11
17
|
readonly longitude: number;
|
|
12
18
|
}
|
|
19
|
+
/** The ephemeris a result names: `{ name: "jpl-de440", version }` on the shipped pack, astronomy-engine's otherwise. */
|
|
20
|
+
interface TechniqueEphemeris {
|
|
21
|
+
readonly name: string;
|
|
22
|
+
readonly version: string;
|
|
23
|
+
}
|
|
13
24
|
|
|
14
25
|
/** Half-width of the solar return search around its date, days. */
|
|
15
26
|
declare const SOLAR_RETURN_WINDOW_DAYS: number;
|
|
@@ -64,13 +75,24 @@ interface LunarReturn extends ReturnChart {
|
|
|
64
75
|
* crossing solver at 1-day steps over ±200 days; a tie goes to the earlier.
|
|
65
76
|
*/
|
|
66
77
|
declare function solarReturnInstant(natalSunLongitude: number, near: DateInput): Date;
|
|
78
|
+
/**
|
|
79
|
+
* `solarReturnInstant`'s instant as `value`, with the ephemeris the Sun's
|
|
80
|
+
* longitudes came from and the flags that say why that is astronomy-engine
|
|
81
|
+
* where the shipped DE440 pack was the default (`DetailedResult`), over the
|
|
82
|
+
* whole window searched.
|
|
83
|
+
*/
|
|
84
|
+
declare function solarReturnInstantDetailed(natalSunLongitude: number, near: DateInput): DetailedResult<Date, TechniqueFlag>;
|
|
67
85
|
/** The latest instant at or before `at` when the apparent Sun is at `natalSunLongitude`, within 370 days. */
|
|
68
86
|
declare function mostRecentSolarReturnInstant(natalSunLongitude: number, at: DateInput): Date;
|
|
87
|
+
/** `mostRecentSolarReturnInstant`'s instant as `value`, labelled as `solarReturnInstantDetailed`'s is. */
|
|
88
|
+
declare function mostRecentSolarReturnInstantDetailed(natalSunLongitude: number, at: DateInput): DetailedResult<Date, TechniqueFlag>;
|
|
69
89
|
/**
|
|
70
90
|
* The first instant in (after, after + 40 days] when the apparent Moon is at
|
|
71
91
|
* `natalMoonLongitude`: the crossing solver at 6-hour steps.
|
|
72
92
|
*/
|
|
73
93
|
declare function lunarReturnInstant(natalMoonLongitude: number, after: DateInput): Date;
|
|
94
|
+
/** `lunarReturnInstant`'s instant as `value`, labelled over the 40 days searched as `solarReturnInstantDetailed`'s is. */
|
|
95
|
+
declare function lunarReturnInstantDetailed(natalMoonLongitude: number, after: DateInput): DetailedResult<Date, TechniqueFlag>;
|
|
74
96
|
/**
|
|
75
97
|
* The solar return of a natal chart or birth nearest `date` (or the latest at
|
|
76
98
|
* or before it), and its chart. The natal Sun is the chart's own.
|
|
@@ -98,6 +120,20 @@ interface CompositeAspect {
|
|
|
98
120
|
interface CompositeChart {
|
|
99
121
|
readonly bodies: readonly CompositePosition[];
|
|
100
122
|
readonly aspects: readonly CompositeAspect[];
|
|
123
|
+
/**
|
|
124
|
+
* The ephemeris both charts name (`chart.ephemeris`): `{ name: "jpl-de440", version }` on the shipped DE440
|
|
125
|
+
* pack, astronomy-engine's name and version otherwise; null where the two do not name one and the same, or a
|
|
126
|
+
* supplied chart from an earlier release names none. Set by `compositeChart` from 1.1.0-rc.11.
|
|
127
|
+
*/
|
|
128
|
+
readonly ephemeris: {
|
|
129
|
+
readonly name: string;
|
|
130
|
+
readonly version: string;
|
|
131
|
+
} | null;
|
|
132
|
+
/**
|
|
133
|
+
* The flags among `"outside-reference-span"`, `"de440-unavailable"` and `"outside-de440-span"` that either
|
|
134
|
+
* chart carries, in that order. Set by `compositeChart` from 1.1.0-rc.11.
|
|
135
|
+
*/
|
|
136
|
+
readonly flags: readonly ("outside-reference-span" | "de440-unavailable" | "outside-de440-span")[];
|
|
101
137
|
}
|
|
102
138
|
/**
|
|
103
139
|
* The composite positions of the bodies in both lists, in the first list's
|
|
@@ -113,6 +149,7 @@ declare function compositeMidpoints(first: readonly {
|
|
|
113
149
|
}[]): readonly CompositePosition[];
|
|
114
150
|
/** The major aspects among the composite Sun to Pluto, with the natal orbs of `ASPECTS`, by orb. */
|
|
115
151
|
declare function compositeAspects(points: readonly CompositePosition[]): readonly CompositeAspect[];
|
|
152
|
+
|
|
116
153
|
/** The composite of two charts or births: every body's midpoint and their aspects. No angles or houses. */
|
|
117
154
|
declare function compositeChart(first: NatalSource, second: NatalSource): CompositeChart;
|
|
118
155
|
/**
|
|
@@ -195,6 +232,16 @@ declare const VOID_OF_COURSE_CONVENTION: Readonly<{
|
|
|
195
232
|
interface MoonIngress {
|
|
196
233
|
readonly at: Date;
|
|
197
234
|
readonly sign: ZodiacSign;
|
|
235
|
+
/**
|
|
236
|
+
* The ephemeris the Moon's and the bodies' longitudes behind it came from: `{ name: "jpl-de440", version }` on
|
|
237
|
+
* the shipped DE440 pack, astronomy-engine's name and version otherwise. From 1.1.0-rc.11.
|
|
238
|
+
*/
|
|
239
|
+
readonly ephemeris: TechniqueEphemeris;
|
|
240
|
+
/**
|
|
241
|
+
* `"de440-unavailable"` or `"outside-de440-span"` where those longitudes were astronomy-engine's as a fallback
|
|
242
|
+
* from the pack, `"outside-reference-span"` where one was read outside 1800 to 2200; none otherwise. From 1.1.0-rc.11.
|
|
243
|
+
*/
|
|
244
|
+
readonly flags: readonly TechniqueFlag[];
|
|
198
245
|
}
|
|
199
246
|
interface MoonAspect {
|
|
200
247
|
readonly at: Date;
|
|
@@ -202,6 +249,16 @@ interface MoonAspect {
|
|
|
202
249
|
readonly aspect: AspectType;
|
|
203
250
|
/** The Moon's longitude at `at`, degrees. */
|
|
204
251
|
readonly moonLon: number;
|
|
252
|
+
/**
|
|
253
|
+
* The ephemeris the Moon's and the bodies' longitudes behind it came from: `{ name: "jpl-de440", version }` on
|
|
254
|
+
* the shipped DE440 pack, astronomy-engine's name and version otherwise. From 1.1.0-rc.11.
|
|
255
|
+
*/
|
|
256
|
+
readonly ephemeris: TechniqueEphemeris;
|
|
257
|
+
/**
|
|
258
|
+
* `"de440-unavailable"` or `"outside-de440-span"` where those longitudes were astronomy-engine's as a fallback
|
|
259
|
+
* from the pack, `"outside-reference-span"` where one was read outside 1800 to 2200; none otherwise. From 1.1.0-rc.11.
|
|
260
|
+
*/
|
|
261
|
+
readonly flags: readonly TechniqueFlag[];
|
|
205
262
|
}
|
|
206
263
|
interface VoidOfCourseWindow {
|
|
207
264
|
/** The last aspect in the sign, or the entry into it when `lastAspect` is null. */
|
|
@@ -211,6 +268,16 @@ interface VoidOfCourseWindow {
|
|
|
211
268
|
readonly lastAspect: MoonAspect | null;
|
|
212
269
|
readonly sign: ZodiacSign;
|
|
213
270
|
readonly nextSign: ZodiacSign;
|
|
271
|
+
/**
|
|
272
|
+
* The ephemeris the Moon's and the bodies' longitudes behind it came from: `{ name: "jpl-de440", version }` on
|
|
273
|
+
* the shipped DE440 pack, astronomy-engine's name and version otherwise. From 1.1.0-rc.11.
|
|
274
|
+
*/
|
|
275
|
+
readonly ephemeris: TechniqueEphemeris;
|
|
276
|
+
/**
|
|
277
|
+
* `"de440-unavailable"` or `"outside-de440-span"` where those longitudes were astronomy-engine's as a fallback
|
|
278
|
+
* from the pack, `"outside-reference-span"` where one was read outside 1800 to 2200; none otherwise. From 1.1.0-rc.11.
|
|
279
|
+
*/
|
|
280
|
+
readonly flags: readonly TechniqueFlag[];
|
|
214
281
|
}
|
|
215
282
|
interface VoidOfCourseStatus {
|
|
216
283
|
readonly at: Date;
|
|
@@ -219,6 +286,16 @@ interface VoidOfCourseStatus {
|
|
|
219
286
|
readonly current: VoidOfCourseWindow | null;
|
|
220
287
|
/** The next period to begin after `at`. */
|
|
221
288
|
readonly next: VoidOfCourseWindow | null;
|
|
289
|
+
/**
|
|
290
|
+
* The ephemeris the Moon's and the bodies' longitudes behind it came from: `{ name: "jpl-de440", version }` on
|
|
291
|
+
* the shipped DE440 pack, astronomy-engine's name and version otherwise. From 1.1.0-rc.11.
|
|
292
|
+
*/
|
|
293
|
+
readonly ephemeris: TechniqueEphemeris;
|
|
294
|
+
/**
|
|
295
|
+
* `"de440-unavailable"` or `"outside-de440-span"` where those longitudes were astronomy-engine's as a fallback
|
|
296
|
+
* from the pack, `"outside-reference-span"` where one was read outside 1800 to 2200; none otherwise. From 1.1.0-rc.11.
|
|
297
|
+
*/
|
|
298
|
+
readonly flags: readonly TechniqueFlag[];
|
|
222
299
|
}
|
|
223
300
|
interface VoidOfCourseOptions {
|
|
224
301
|
/** `"modern"` by default. */
|
|
@@ -287,6 +364,19 @@ interface AspectPatterns {
|
|
|
287
364
|
/** Every pattern, sorted by id. */
|
|
288
365
|
readonly patterns: readonly AspectPattern[];
|
|
289
366
|
}
|
|
367
|
+
/** `chartAspectPatterns`'s result: the patterns, and the chart's label (from 1.1.0-rc.11). */
|
|
368
|
+
interface ChartAspectPatterns extends AspectPatterns {
|
|
369
|
+
/**
|
|
370
|
+
* The chart's `ephemeris`: `{ name: "jpl-de440", version }` on the shipped DE440 pack, astronomy-engine's name
|
|
371
|
+
* and version otherwise; null where a supplied chart from an earlier release names none.
|
|
372
|
+
*/
|
|
373
|
+
readonly ephemeris: {
|
|
374
|
+
readonly name: string;
|
|
375
|
+
readonly version: string;
|
|
376
|
+
} | null;
|
|
377
|
+
/** The flags among `"outside-reference-span"`, `"de440-unavailable"` and `"outside-de440-span"` the chart carries, in that order. */
|
|
378
|
+
readonly flags: readonly TechniqueFlag[];
|
|
379
|
+
}
|
|
290
380
|
/**
|
|
291
381
|
* The grand trines, T-squares, grand crosses and kites (Hand, 1981) that the
|
|
292
382
|
* aspect records form among the Sun to Pluto. Every aspect of a pattern must
|
|
@@ -295,7 +385,7 @@ interface AspectPatterns {
|
|
|
295
385
|
*/
|
|
296
386
|
declare function aspectPatterns(points: readonly PatternPoint[], aspects: readonly PatternEdgeInput[]): AspectPatterns;
|
|
297
387
|
/** The aspect patterns of a chart or birth, from its own bodies and aspects. */
|
|
298
|
-
declare function chartAspectPatterns(natal: NatalSource):
|
|
388
|
+
declare function chartAspectPatterns(natal: NatalSource): ChartAspectPatterns;
|
|
299
389
|
/** `roots`: the patterns inside no other. `included[id]`: those inside `id`. */
|
|
300
390
|
interface PatternContainment {
|
|
301
391
|
readonly roots: readonly AspectPattern[];
|
|
@@ -440,6 +530,12 @@ interface MoonSignOptions {
|
|
|
440
530
|
}
|
|
441
531
|
/** Every sign the apparent Moon is in during [from, to], at most 20 days, in order. */
|
|
442
532
|
declare function moonSignsBetween(from: DateInput, to: DateInput): readonly ZodiacSign[];
|
|
533
|
+
/**
|
|
534
|
+
* `moonSignsBetween`'s signs as `value`, with the ephemeris the Moon's two
|
|
535
|
+
* longitudes came from and the flags that say why that is astronomy-engine
|
|
536
|
+
* where the shipped DE440 pack was the default (`DetailedResult`).
|
|
537
|
+
*/
|
|
538
|
+
declare function moonSignsBetweenDetailed(from: DateInput, to: DateInput): DetailedResult<readonly ZodiacSign[], TechniqueFlag>;
|
|
443
539
|
/**
|
|
444
540
|
* The Moon signs possible over a civil date with an unknown birth time. With
|
|
445
541
|
* `timeZone`, from local midnight to local midnight, read as
|
|
@@ -450,4 +546,4 @@ declare function moonSignsBetween(from: DateInput, to: DateInput): readonly Zodi
|
|
|
450
546
|
*/
|
|
451
547
|
declare function moonSignCandidates(date: string, options?: MoonSignOptions): MoonSignCandidates;
|
|
452
548
|
|
|
453
|
-
export { type AspectPattern, type AspectPatterns, CHALDEAN_FACES, CLASSICAL_PLANETS, type ClassicalPlanet, type CompositeAspect, type CompositeChart, type CompositePosition, DOMICILE_RULERS, type DavisonChart, type DavisonOptions, type DavisonPlaceConvention, type Debility, type DignityRulers, type DignitySpan, EGYPTIAN_TERMS, EVERY_ZONE_OFFSETS, EXALTATIONS, type EssentialDignity, type GeoPlace, LUNAR_RETURN_HORIZON_DAYS, LUNAR_RETURN_STEP_DAYS, type LunarReturn, MOON_SIGN_MAX_SPAN_DAYS, type MoonAspect, type MoonIngress, type MoonSignCandidates, type MoonSignOptions, type MutualReception, PATTERN_BODIES, type PatternBody, type PatternContainment, type PatternEdge, type PatternEdgeInput, type PatternKind, type PatternPoint, type PlanetDignities, type PlanetaryReturn, type ReceptionOptions, type ReturnChart, type ReturnOptions, SOLAR_RETURN_LOOKBACK_DAYS, SOLAR_RETURN_STEP_DAYS, SOLAR_RETURN_WINDOW_DAYS, type SignDignity, type SolarReturn, type SolarReturnOptions, type SolarReturnSelection, TRIPLICITY_LORDS, type TechniqueFlag, VOID_BODIES, VOID_OF_COURSE_CONVENTION, VOID_OF_COURSE_MAX_DAYS, type VoidBodies, type VoidBody, type VoidOfCourseOptions, type VoidOfCourseStatus, type VoidOfCourseWindow, aspectPatterns, chartAspectPatterns, compositeAspects, compositeChart, compositeMidpoints, davisonChart, davisonPlace, dignitiesFor, dignityFor, dignityRulersAt, essentialDignities, hasClassicalDignities, lunarReturn, lunarReturnInstant, moonAspects, moonIngresses, moonSignCandidates, moonSignsBetween, mostRecentSolarReturnInstant, mutualReceptions, patternContainment, solarReturn, solarReturnInstant, voidOfCourseAt, voidOfCourseWindows };
|
|
549
|
+
export { type AspectPattern, type AspectPatterns, CHALDEAN_FACES, CLASSICAL_PLANETS, type ChartAspectPatterns, type ClassicalPlanet, type CompositeAspect, type CompositeChart, type CompositePosition, DOMICILE_RULERS, type DavisonChart, type DavisonOptions, type DavisonPlaceConvention, type Debility, DetailedResult, type DignityRulers, type DignitySpan, EGYPTIAN_TERMS, EVERY_ZONE_OFFSETS, EXALTATIONS, type EssentialDignity, type GeoPlace, LUNAR_RETURN_HORIZON_DAYS, LUNAR_RETURN_STEP_DAYS, type LunarReturn, MOON_SIGN_MAX_SPAN_DAYS, type MoonAspect, type MoonIngress, type MoonSignCandidates, type MoonSignOptions, type MutualReception, PATTERN_BODIES, type PatternBody, type PatternContainment, type PatternEdge, type PatternEdgeInput, type PatternKind, type PatternPoint, type PlanetDignities, type PlanetaryReturn, type ReceptionOptions, type ReturnChart, type ReturnOptions, SOLAR_RETURN_LOOKBACK_DAYS, SOLAR_RETURN_STEP_DAYS, SOLAR_RETURN_WINDOW_DAYS, type SignDignity, type SolarReturn, type SolarReturnOptions, type SolarReturnSelection, TRIPLICITY_LORDS, type TechniqueEphemeris, type TechniqueFlag, VOID_BODIES, VOID_OF_COURSE_CONVENTION, VOID_OF_COURSE_MAX_DAYS, type VoidBodies, type VoidBody, type VoidOfCourseOptions, type VoidOfCourseStatus, type VoidOfCourseWindow, aspectPatterns, chartAspectPatterns, compositeAspects, compositeChart, compositeMidpoints, davisonChart, davisonPlace, dignitiesFor, dignityFor, dignityRulersAt, essentialDignities, hasClassicalDignities, lunarReturn, lunarReturnInstant, lunarReturnInstantDetailed, moonAspects, moonIngresses, moonSignCandidates, moonSignsBetween, moonSignsBetweenDetailed, mostRecentSolarReturnInstant, mostRecentSolarReturnInstantDetailed, mutualReceptions, patternContainment, solarReturn, solarReturnInstant, solarReturnInstantDetailed, voidOfCourseAt, voidOfCourseWindows };
|