@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.
- package/CHANGELOG.md +1020 -0
- package/LICENSING.md +168 -27
- package/NOTICE +78 -12
- package/README.md +288 -44
- package/dist/{api-WbxJ4Wj-.d.ts → api-ChL1N2Sr.d.ts} +33 -2
- package/dist/{ayanamsa--YQ46fET.d.ts → ayanamsa-ClFzkKmV.d.ts} +2 -1
- package/dist/calc.d.ts +90 -4
- package/dist/calc.js +360 -126
- package/dist/chunk-2PZYJQV5.js +83 -0
- package/dist/{chunk-7TRLIFFI.js → chunk-4XOYTBLS.js} +1 -1
- package/dist/chunk-767FTO7O.js +48 -0
- package/dist/{chunk-YIITY7Q7.js → chunk-7Y2F2IWN.js} +19 -17
- package/dist/{chunk-OG4OYTJJ.js → chunk-B4M2Y7FT.js} +1 -129
- package/dist/{chunk-PFGUCNOK.js → chunk-BMDASNPB.js} +6 -6
- package/dist/chunk-I3L4POY7.js +18 -0
- package/dist/{chunk-CHSYDKBL.js → chunk-LNGURVNH.js} +3 -3
- package/dist/{chunk-DMGHYCDI.js → chunk-NNOSOOWS.js} +1 -1
- package/dist/chunk-OVXQQEXL.js +41 -0
- package/dist/{chunk-SRXBTP5H.js → chunk-QLIEEICB.js} +201 -190
- package/dist/chunk-RMBWKZI2.js +130 -0
- package/dist/{chunk-FTX3JDJA.js → chunk-TZVPZHZM.js} +42 -23
- package/dist/{chunk-WS3TDSP3.js → chunk-WBTWY2OB.js} +7 -3
- package/dist/chunk-Y4E3WJU5.js +87 -0
- package/dist/chunk-YPU3MDNI.js +852 -0
- 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-exTSqBgb.d.ts +60 -0
- package/dist/geo.d.ts +16 -4
- package/dist/geo.js +2 -2
- package/dist/{houses-CFERsAlK.d.ts → houses-Bh7GCnPi.d.ts} +3 -3
- package/dist/houses-extra.d.ts +5 -4
- package/dist/index.d.ts +8 -6
- package/dist/index.js +40 -28
- package/dist/{internal-math-DJJ8BYex.d.ts → internal-math-CxenuGfm.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 +143 -65
- package/dist/{rulers-Dla6h_Sm.d.ts → rulers-CSSWtiWF.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-DpPdtXgO.d.ts +335 -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-BxmDCcTK.d.ts} +32 -10
- package/package.json +24 -3
- package/dist/types-B-yb_tGL.d.ts +0 -240
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ids a natal envelope names, by the rule of the conventions set that
|
|
3
|
+
* carries them (src/receipt.ts), and the id syntax they are written in. The
|
|
4
|
+
* receipt codec and `./conventions` share this module; it imports none.
|
|
5
|
+
*/
|
|
6
|
+
/** The id of a namespace and a value, such as `zodiac:tropical`. Throws a RangeError for a malformed one. */
|
|
7
|
+
declare function conventionId(namespace: string, value: string): string;
|
|
8
|
+
/** The fields of a natal envelope (`./receipt`) that name conventions. */
|
|
9
|
+
interface NatalConventionFields {
|
|
10
|
+
receipt: {
|
|
11
|
+
conventions: Readonly<Record<string, string>>;
|
|
12
|
+
coverage: Readonly<Record<string, string>>;
|
|
13
|
+
houses: {
|
|
14
|
+
requested: string;
|
|
15
|
+
actual: string | null;
|
|
16
|
+
absenceReason: string | null;
|
|
17
|
+
};
|
|
18
|
+
inputFlags: readonly string[];
|
|
19
|
+
resultFlags: readonly string[];
|
|
20
|
+
reference: string;
|
|
21
|
+
timeScale?: string;
|
|
22
|
+
engine: {
|
|
23
|
+
ephemeris?: {
|
|
24
|
+
name: string;
|
|
25
|
+
version: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
result: {
|
|
30
|
+
deltaT?: {
|
|
31
|
+
model: string;
|
|
32
|
+
segment: string;
|
|
33
|
+
};
|
|
34
|
+
timeScale?: {
|
|
35
|
+
input: string;
|
|
36
|
+
basis: string;
|
|
37
|
+
ut1MinusUtc: {
|
|
38
|
+
source: string;
|
|
39
|
+
} | null;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The ids a natal envelope names, in code-unit order, each once. From the
|
|
45
|
+
* receipt: each conventions and coverage field's key and value
|
|
46
|
+
* (`zodiac:tropical`), the requested and actual house systems
|
|
47
|
+
* (`house:placidus`), why there are no houses (`house-absence:unknown-time`),
|
|
48
|
+
* each flag (`flag:no-time`), the reference (`reference:supplied-instant`),
|
|
49
|
+
* the instant's scale (`time-scale:utc`) and the ephemeris
|
|
50
|
+
* (`ephemeris:astronomy-engine@2.1.19`). From the result: the ΔT model and
|
|
51
|
+
* segment (`deltat-model:iers-utc/1`), the time basis (`time-basis:iers`) and
|
|
52
|
+
* the source of UT1 − UTC (`ut1-source:observed`). Receipts of the
|
|
53
|
+
* conventions set from 1.1.0-rc.1 carry them as `conventionIds`. This is that
|
|
54
|
+
* set's rule; another rule would come with another set.
|
|
55
|
+
*/
|
|
56
|
+
declare function natalConventionIds(envelope: NatalConventionFields): string[];
|
|
57
|
+
|
|
58
|
+
/** The registry's page. An id's address is this URL with the id, through encodeURI, as its fragment. */
|
|
59
|
+
declare const CONVENTIONS_REGISTRY: string;
|
|
60
|
+
/** An id split at its first colon: the parts of the string `conventionId` returns. */
|
|
61
|
+
interface ConventionIdParts {
|
|
62
|
+
namespace: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}
|
|
65
|
+
/** An id's namespace and value. Throws a RangeError for a malformed id. */
|
|
66
|
+
declare function parseConventionId(id: string): ConventionIdParts;
|
|
67
|
+
/** An id's address: `CONVENTIONS_REGISTRY`, `#` and the id through encodeURI. Throws a RangeError for a malformed id. */
|
|
68
|
+
declare function conventionAddress(id: string): string;
|
|
69
|
+
|
|
70
|
+
export { CONVENTIONS_REGISTRY, type ConventionIdParts, type NatalConventionFields, conventionAddress, conventionId, natalConventionIds, parseConventionId };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
conventionId,
|
|
3
|
+
natalConventionIds
|
|
4
|
+
} from "./chunk-OVXQQEXL.js";
|
|
5
|
+
|
|
6
|
+
// src/conventions.ts
|
|
7
|
+
var CONVENTIONS_REGISTRY = "https://zodiacs.org/developers/conventions/";
|
|
8
|
+
function parseConventionId(id) {
|
|
9
|
+
const colon = typeof id === "string" ? id.indexOf(":") : -1;
|
|
10
|
+
if (colon < 0) throw new RangeError("A convention id is a namespace, a colon and a value.");
|
|
11
|
+
const namespace = id.slice(0, colon);
|
|
12
|
+
const value = id.slice(colon + 1);
|
|
13
|
+
conventionId(namespace, value);
|
|
14
|
+
return { namespace, value };
|
|
15
|
+
}
|
|
16
|
+
function conventionAddress(id) {
|
|
17
|
+
parseConventionId(id);
|
|
18
|
+
return `${CONVENTIONS_REGISTRY}#${encodeURI(id)}`;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
CONVENTIONS_REGISTRY,
|
|
22
|
+
conventionAddress,
|
|
23
|
+
conventionId,
|
|
24
|
+
natalConventionIds,
|
|
25
|
+
parseConventionId
|
|
26
|
+
};
|
package/dist/crossings.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { B as BodyName } from './types-
|
|
1
|
+
import { B as BodyName } from './types-DpPdtXgO.js';
|
|
2
2
|
import './deltat.js';
|
|
3
|
+
import './time-scale-DIFNa0gz.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* The instants a body sits exactly on an ecliptic longitude.
|
|
@@ -39,6 +40,14 @@ type CrossingSearchResult = {
|
|
|
39
40
|
crossings: LongitudeCrossing[];
|
|
40
41
|
/** Longitude evaluations made. */
|
|
41
42
|
samples: number;
|
|
43
|
+
/**
|
|
44
|
+
* Set by the root entry's `searchLongitudeCrossings`, on the engine's
|
|
45
|
+
* own ephemeris: `"de440-unavailable"` or `"outside-de440-span"` where
|
|
46
|
+
* a longitude of the search was astronomy-engine's as a fallback from
|
|
47
|
+
* the shipped DE440 pack, or empty. Absent from a search on a caller's
|
|
48
|
+
* longitudes.
|
|
49
|
+
*/
|
|
50
|
+
flags?: ("de440-unavailable" | "outside-de440-span")[];
|
|
42
51
|
} | {
|
|
43
52
|
status: "refused";
|
|
44
53
|
reason: "sample-budget";
|
|
@@ -62,9 +71,11 @@ type CrossingSearchResult = {
|
|
|
62
71
|
* the direction of the sample before it. Offsets of 90° or more are read as
|
|
63
72
|
* the far side of the circle, not a crossing.
|
|
64
73
|
*
|
|
65
|
-
* A plain scan
|
|
66
|
-
*
|
|
67
|
-
*
|
|
74
|
+
* A plain scan can lose both crossings when a station takes the body less
|
|
75
|
+
* than |f″|h²/8 past the target (f″ the second derivative of its longitude at
|
|
76
|
+
* the station, h the step), since both can then fall between two samples: at
|
|
77
|
+
* a 5-day step, up to 0.0056° for Saturn and 0.011° for Jupiter at their
|
|
78
|
+
* stations from 2019 to 2024. Where the sampled motion turns
|
|
68
79
|
* without the offset changing sign, and the turning sample is within reach of
|
|
69
80
|
* the local curvature, a golden-section search finds the extremum. Both
|
|
70
81
|
* crossings are bisected when it passes the target, and one is reported, as
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { De440Source } from './de440.js';
|
|
2
|
+
import './types-DpPdtXgO.js';
|
|
3
|
+
import './deltat.js';
|
|
4
|
+
import './time-scale-DIFNa0gz.js';
|
|
5
|
+
|
|
6
|
+
/** The pack this entry ships, and the kernel it was refitted from. */
|
|
7
|
+
interface De440PackDescription {
|
|
8
|
+
/** The sealed pack's file name where it was compiled. */
|
|
9
|
+
readonly file: string;
|
|
10
|
+
/** The SHA-256 of the sealed pack, lower-case hexadecimal: a source's `ephemeris.version`. */
|
|
11
|
+
readonly sha256: string;
|
|
12
|
+
/** The sealed pack's size in bytes. */
|
|
13
|
+
readonly bytes: number;
|
|
14
|
+
/** The first and last calendar years the pack was compiled for; a source refuses an instant outside its coverage. */
|
|
15
|
+
readonly fromYear: number;
|
|
16
|
+
readonly toYear: number;
|
|
17
|
+
/** NAIF's kernel the series were refitted from. */
|
|
18
|
+
readonly kernel: {
|
|
19
|
+
readonly file: string;
|
|
20
|
+
readonly sha256: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** `de440-1790-2210.v2.zeph`, refitted from NAIF's `de440.bsp`. */
|
|
24
|
+
declare const DE440_PACK: De440PackDescription;
|
|
25
|
+
/** The shipped pack's bytes, a new array at each call. They are not checked here; `openShippedDe440Pack` checks them. */
|
|
26
|
+
declare function de440PackBytes(): Uint8Array;
|
|
27
|
+
/**
|
|
28
|
+
* A DE440 source on the shipped pack, opened without a promise: the first
|
|
29
|
+
* call decodes the pack and opens it with `openDe440PackSync`, expecting
|
|
30
|
+
* `DE440_PACK.sha256`; later calls give the same source, which holds no
|
|
31
|
+
* state that a caller can change. If the pack cannot be opened (its bytes
|
|
32
|
+
* are not the sealed pack's, or the runtime has no `atob`), the first call
|
|
33
|
+
* throws, and every later call throws the same error without trying again.
|
|
34
|
+
* The root entry's default source is this one.
|
|
35
|
+
*/
|
|
36
|
+
declare function shippedDe440Source(): De440Source;
|
|
37
|
+
/**
|
|
38
|
+
* The same source as `shippedDe440Source`, as a promise, as 1.1.0-rc.8's
|
|
39
|
+
* draft gave it: it rejects where that function throws.
|
|
40
|
+
*/
|
|
41
|
+
declare function openShippedDe440Pack(): Promise<De440Source>;
|
|
42
|
+
|
|
43
|
+
export { DE440_PACK, type De440PackDescription, de440PackBytes, openShippedDe440Pack, shippedDe440Source };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DE440_PACK,
|
|
3
|
+
de440PackBytes,
|
|
4
|
+
openShippedDe440Pack,
|
|
5
|
+
shippedDe440Source
|
|
6
|
+
} from "./chunk-767FTO7O.js";
|
|
7
|
+
import "./chunk-YPU3MDNI.js";
|
|
8
|
+
import "./chunk-Y4E3WJU5.js";
|
|
9
|
+
import "./chunk-NNOSOOWS.js";
|
|
10
|
+
import "./chunk-RMBWKZI2.js";
|
|
11
|
+
export {
|
|
12
|
+
DE440_PACK,
|
|
13
|
+
de440PackBytes,
|
|
14
|
+
openShippedDe440Pack,
|
|
15
|
+
shippedDe440Source
|
|
16
|
+
};
|
package/dist/de440.d.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { P as PositionSource } from './types-DpPdtXgO.js';
|
|
2
|
+
import './deltat.js';
|
|
3
|
+
import './time-scale-DIFNa0gz.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A sealed ephemeris pack (`ZODEPH02`): the header, checked before anything
|
|
7
|
+
* is read through it, and the Chebyshev records it describes. The format,
|
|
8
|
+
* its checks and the evaluator are the research runtime's
|
|
9
|
+
* (examples/precision-alpha/src/core/container.mjs and ephemeris.mjs in the
|
|
10
|
+
* site repository), operation for operation, so a position read here equals
|
|
11
|
+
* the runtime's bit for bit. Positions are kilometres and velocities
|
|
12
|
+
* kilometres per second, in the ICRF, at TDB seconds past J2000.
|
|
13
|
+
*
|
|
14
|
+
* Environment-neutral: no file or network access. The caller hands over the
|
|
15
|
+
* bytes; they are copied, so nothing the caller does afterwards can change
|
|
16
|
+
* what was checked.
|
|
17
|
+
*/
|
|
18
|
+
/** Every way a pack or a request on it can be refused. */
|
|
19
|
+
type De440ErrorCode = "not-a-pack" | "unsupported-version" | "too-large" | "truncated" | "bad-header" | "bad-geometry" | "digest-mismatch" | "unknown-body" | "out-of-coverage" | "bad-instant" | "bad-geometry-of-sky";
|
|
20
|
+
/** A refusal with a code a caller can branch on. Messages carry no file paths. */
|
|
21
|
+
declare class De440Error extends Error {
|
|
22
|
+
readonly code: De440ErrorCode;
|
|
23
|
+
constructor(code: De440ErrorCode, message: string);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** The bodies this reduction places. */
|
|
27
|
+
declare const REDUCED_BODIES: readonly ["Sun", "Moon", "Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"];
|
|
28
|
+
type ReducedBody = (typeof REDUCED_BODIES)[number];
|
|
29
|
+
/** Bodies the kernel stores as a planetary-system barycentre, not a centre. */
|
|
30
|
+
declare const BARYCENTRE_NOT_CENTRE: readonly ["Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* `@zodiacs/engine/de440`: positions from JPL's DE440, through a sealed pack
|
|
34
|
+
* of Chebyshev series refitted from it, for the engine to compute charts,
|
|
35
|
+
* positions and events with (`withEphemeris` in the root entry).
|
|
36
|
+
*
|
|
37
|
+
* This entry fetches nothing: the caller gives the bytes (of a pack compiled
|
|
38
|
+
* from its own copy of NAIF's `de440.bsp`, or of the one the package ships,
|
|
39
|
+
* which the root entry and `@zodiacs/engine/de440/pack` open themselves) and
|
|
40
|
+
* names the SHA-256 it expects. `openDe440Pack` hashes the whole file and
|
|
41
|
+
* refuses any other bytes, then checks the pack's own trailer and header.
|
|
42
|
+
* The returned source keeps a private copy of the bytes.
|
|
43
|
+
*
|
|
44
|
+
* The reduction is the research runtime's with its shipped options
|
|
45
|
+
* (`src/de440/reduce.ts` says what it applies). Mars to Pluto are
|
|
46
|
+
* planetary-system barycentres, not planet centres. Nothing in this entry's
|
|
47
|
+
* graph imports astronomy-engine. From 1.1.0-rc.9 the root entry imports
|
|
48
|
+
* this file, to open the shipped pack as its default source.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/** The ephemeris a receipt names when a chart or position came from a DE440 pack. */
|
|
52
|
+
declare const DE440_EPHEMERIS_NAME: "jpl-de440";
|
|
53
|
+
/** What a DE440 source says about itself. */
|
|
54
|
+
interface De440Source extends PositionSource {
|
|
55
|
+
/** `version` is the SHA-256 of the sealed pack the positions came from. */
|
|
56
|
+
readonly ephemeris: {
|
|
57
|
+
readonly name: typeof DE440_EPHEMERIS_NAME;
|
|
58
|
+
readonly version: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The light-path distance too, au, and from 1.1.0-rc.12 whether the body is
|
|
62
|
+
* behind the Sun's disc, where the reduction bends no light. `behind`, when
|
|
63
|
+
* given, is taken as that decision instead of making it at `ttDays`, as a
|
|
64
|
+
* speed's samples take the decision of their middle instant.
|
|
65
|
+
*/
|
|
66
|
+
place(body: ReducedBody, ttDays: number, behind?: boolean): {
|
|
67
|
+
lon: number;
|
|
68
|
+
lat: number;
|
|
69
|
+
dist: number;
|
|
70
|
+
behindDisc: boolean;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* The instants in [fromTtDays, toTtDays] (TT days past J2000.0), ascending,
|
|
74
|
+
* at which a place or the true node may step by more than rounding: where
|
|
75
|
+
* a read passes from one Chebyshev record of the pack to the next (within
|
|
76
|
+
* the pack's fitting budget, src/de440/reduce.ts). Between two neighbours
|
|
77
|
+
* every place is a smooth function of time. The birth-time window search
|
|
78
|
+
* treats each as a seam.
|
|
79
|
+
*/
|
|
80
|
+
steps(fromTtDays: number, toTtDays: number): number[];
|
|
81
|
+
readonly pack: {
|
|
82
|
+
readonly sha256: string;
|
|
83
|
+
readonly bytes: number;
|
|
84
|
+
/** TDB seconds past J2000, the pack's coverage. */
|
|
85
|
+
readonly startEtSecTdb: number;
|
|
86
|
+
readonly stopEtSecTdb: number;
|
|
87
|
+
/** The compiler that made the pack, as its header names it, or null. */
|
|
88
|
+
readonly compiler: {
|
|
89
|
+
readonly name: string;
|
|
90
|
+
readonly version: string;
|
|
91
|
+
} | null;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
interface De440OpenOptions {
|
|
95
|
+
/** The SHA-256 of the whole sealed pack file, lower-case hexadecimal, obtained from somewhere other than the pack. */
|
|
96
|
+
readonly expectDigest: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Open a sealed DE440 pack (`ZODEPH02`) held in memory. Rejects with a
|
|
100
|
+
* `De440Error` whose code says why: `digest-mismatch` when the file's SHA-256
|
|
101
|
+
* is not `expectDigest` or the pack's trailer does not match its contents,
|
|
102
|
+
* and the header codes of `src/de440/pack.ts` otherwise.
|
|
103
|
+
*/
|
|
104
|
+
declare function openDe440Pack(bytes: Uint8Array, options: De440OpenOptions): Promise<De440Source>;
|
|
105
|
+
/**
|
|
106
|
+
* `openDe440Pack` without WebCrypto and without a promise: the same checks,
|
|
107
|
+
* with the engine's own SHA-256 (`src/de440/sha256.ts`), for code that
|
|
108
|
+
* cannot wait. It throws what `openDe440Pack` rejects with. The root entry
|
|
109
|
+
* opens the shipped pack with it.
|
|
110
|
+
*/
|
|
111
|
+
declare function openDe440PackSync(bytes: Uint8Array, options: De440OpenOptions): De440Source;
|
|
112
|
+
|
|
113
|
+
export { BARYCENTRE_NOT_CENTRE, DE440_EPHEMERIS_NAME, De440Error, type De440ErrorCode, type De440OpenOptions, type De440Source, REDUCED_BODIES, type ReducedBody, openDe440Pack, openDe440PackSync };
|
package/dist/de440.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BARYCENTRE_NOT_CENTRE,
|
|
3
|
+
DE440_EPHEMERIS_NAME,
|
|
4
|
+
De440Error,
|
|
5
|
+
REDUCED_BODIES,
|
|
6
|
+
openDe440Pack,
|
|
7
|
+
openDe440PackSync
|
|
8
|
+
} from "./chunk-YPU3MDNI.js";
|
|
9
|
+
import "./chunk-Y4E3WJU5.js";
|
|
10
|
+
import "./chunk-NNOSOOWS.js";
|
|
11
|
+
import "./chunk-RMBWKZI2.js";
|
|
12
|
+
export {
|
|
13
|
+
BARYCENTRE_NOT_CENTRE,
|
|
14
|
+
DE440_EPHEMERIS_NAME,
|
|
15
|
+
De440Error,
|
|
16
|
+
REDUCED_BODIES,
|
|
17
|
+
openDe440Pack,
|
|
18
|
+
openDe440PackSync
|
|
19
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { P as PositionSource, B as BodyName, c as BodyPosition, C as ChartInput, d as Chart } from './types-DpPdtXgO.js';
|
|
2
|
+
|
|
3
|
+
/** What a call outside `withEphemeris` computes on. */
|
|
4
|
+
type DefaultEphemerisName = "de440" | "astronomy-engine";
|
|
5
|
+
/** What `defaultEphemeris` reports. */
|
|
6
|
+
interface DefaultEphemeris {
|
|
7
|
+
/**
|
|
8
|
+
* `"de440"`: a call outside `withEphemeris` computes on the shipped DE440
|
|
9
|
+
* pack where `de440` says it can, and on astronomy-engine elsewhere.
|
|
10
|
+
* `"astronomy-engine"`: it computes on astronomy-engine always.
|
|
11
|
+
*/
|
|
12
|
+
readonly name: DefaultEphemerisName;
|
|
13
|
+
/** The shipped pack as the default source. */
|
|
14
|
+
readonly de440: {
|
|
15
|
+
/** Whether the pack opened. When false, every default call is astronomy-engine's. */
|
|
16
|
+
readonly opened: boolean;
|
|
17
|
+
/** The pack's SHA-256, a chart's `ephemeris.version`, or null when it did not open. */
|
|
18
|
+
readonly version: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Days of TT from J2000.0 between which the default is the pack, the
|
|
21
|
+
* ends included: a day inside each end of the pack's coverage. Null when
|
|
22
|
+
* it did not open.
|
|
23
|
+
*/
|
|
24
|
+
readonly fromTtDays: number | null;
|
|
25
|
+
readonly toTtDays: number | null;
|
|
26
|
+
/** Why the pack did not open, or null. */
|
|
27
|
+
readonly error: string | null;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* What a call outside `withEphemeris` computes on. The first call opens the
|
|
32
|
+
* shipped pack if nothing has yet (which hashes its 2,489,664 bytes twice).
|
|
33
|
+
* A chart says which ephemeris it came from: `chart.ephemeris` names the
|
|
34
|
+
* pack, and is absent on a chart from astronomy-engine.
|
|
35
|
+
*/
|
|
36
|
+
declare function defaultEphemeris(): DefaultEphemeris;
|
|
37
|
+
/**
|
|
38
|
+
* Choose what a call outside `withEphemeris` computes on, from now on:
|
|
39
|
+
* `"de440"` (the package's default) or `"astronomy-engine"`, which gives the
|
|
40
|
+
* positions 1.1.0-rc.7 and earlier gave at every instant. It is one setting
|
|
41
|
+
* for the whole module, so set it once, before computing; `withEphemeris`
|
|
42
|
+
* still overrides it for the calls inside.
|
|
43
|
+
*/
|
|
44
|
+
declare function setDefaultEphemeris(name: DefaultEphemerisName): void;
|
|
45
|
+
/**
|
|
46
|
+
* Run `run` with every body position the engine computes taken from
|
|
47
|
+
* `positionSource` (for example `@zodiacs/engine/de440`'s), in place of the
|
|
48
|
+
* default source, then restore the one before, whatever happens. Charts computed inside name it
|
|
49
|
+
* (`chart.ephemeris`), and so do their receipts. `run` must be synchronous:
|
|
50
|
+
* a function that returns a promise would leave its later steps on another
|
|
51
|
+
* source, so that throws TypeError (after `run` has returned). Calls nest.
|
|
52
|
+
*/
|
|
53
|
+
declare function withEphemeris<T>(positionSource: PositionSource, run: () => T): T;
|
|
54
|
+
/** Apparent longitude at a UTC instant, on the engine's time basis. */
|
|
55
|
+
declare function bodyLongitude(body: BodyName, date: Date): number;
|
|
56
|
+
declare function longitudeSpeed(body: BodyName, date: Date): number;
|
|
57
|
+
declare function computeBodies(date: Date): BodyPosition[];
|
|
58
|
+
declare function computeChart(input: ChartInput): Chart;
|
|
59
|
+
|
|
60
|
+
export { type DefaultEphemeris as D, computeChart as a, bodyLongitude as b, computeBodies as c, type DefaultEphemerisName as d, defaultEphemeris as e, longitudeSpeed as l, setDefaultEphemeris as s, withEphemeris as w };
|
package/dist/geo.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { H as HouseSystem, h as BirthInput } from './types-
|
|
2
|
-
import { T as TransitionCause, N as NatalLocalResolution } from './zone-history-
|
|
1
|
+
import { H as HouseSystem, h as BirthInput } from './types-DpPdtXgO.js';
|
|
2
|
+
import { T as TransitionCause, N as NatalLocalResolution } from './zone-history-BxmDCcTK.js';
|
|
3
3
|
import './deltat.js';
|
|
4
|
+
import './time-scale-DIFNa0gz.js';
|
|
4
5
|
|
|
5
6
|
interface City {
|
|
6
7
|
name: string;
|
|
@@ -98,7 +99,15 @@ interface LocalTimeOptions {
|
|
|
98
99
|
calendar?: CalendarName | undefined;
|
|
99
100
|
/** ISO 3166-1 alpha-2 code, or the country's name in tzdata's iso3166.tab, for `calendarNote`. */
|
|
100
101
|
country?: string | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Which instant a wall time the clock showed twice takes: "earlier" (the
|
|
104
|
+
* default), its first pass, or "later", its second. It changes nothing for
|
|
105
|
+
* any other wall time; a skipped one moves forward either way.
|
|
106
|
+
*/
|
|
107
|
+
fold?: FoldChoice | undefined;
|
|
101
108
|
}
|
|
109
|
+
/** The pass of a repeated wall time to take: the first ("earlier") or the second ("later"). */
|
|
110
|
+
type FoldChoice = "earlier" | "later";
|
|
102
111
|
/** A change of the clock that read the wall time. */
|
|
103
112
|
interface ZoneTransition {
|
|
104
113
|
/** UTC, ISO 8601. */
|
|
@@ -155,6 +164,8 @@ interface LocalBirthInput {
|
|
|
155
164
|
timeKnown?: boolean;
|
|
156
165
|
calendar?: CalendarName;
|
|
157
166
|
country?: string;
|
|
167
|
+
/** Which pass of a repeated wall time the birth was in; "earlier" by default (as `LocalTimeOptions`). */
|
|
168
|
+
fold?: FoldChoice;
|
|
158
169
|
}
|
|
159
170
|
/**
|
|
160
171
|
* UTC offset for an IANA timezone at a UTC instant, minutes east, from the
|
|
@@ -166,7 +177,8 @@ interface LocalBirthInput {
|
|
|
166
177
|
declare function offsetAt(timeZone: string, utcMilliseconds: number): number;
|
|
167
178
|
/**
|
|
168
179
|
* Resolve a local wall time in an IANA zone to UTC: a repeated one takes the
|
|
169
|
-
* earlier instant,
|
|
180
|
+
* earlier instant, or the later one with `options.fold` "later"; a skipped
|
|
181
|
+
* one moves forward by the jump. Before 1970 the
|
|
170
182
|
* shipped tzdb 2025c history answers, loaded by `prepareLocalTime` (a wall
|
|
171
183
|
* time before 1970-01-02 throws otherwise); from 1970, and in the fixed Etc
|
|
172
184
|
* zones, the host's Intl.
|
|
@@ -205,4 +217,4 @@ declare function resolveLocalBirth(input: LocalBirthInput): LocalBirthResolution
|
|
|
205
217
|
/** Convert a local birth form into the explicit UTC input accepted by the core. */
|
|
206
218
|
declare function resolveBirth(input: LocalBirthInput): BirthInput;
|
|
207
219
|
|
|
208
|
-
export { type CalendarName, type CalendarNote, type City, GREGORIAN_ADOPTION, GREGORIAN_ADOPTION_SOURCES, type GeoNamesClient, type GeoNamesClientOptions, type GeoNamesIndexMetadata, type GregorianAdoption, type GregorianAdoptionSource, type LocalBirthInput, type LocalBirthResolution, type LocalTimeOptions, type LocalTimeResolution, TZDB, TransitionCause, ZoneHistoryNotLoadedError, type ZoneTransition, calendarNote, createGeoNamesClient, gregorianAdoption, gregorianToJulian, julianToGregorian, offsetAt, prepareLocalTime, resolveBirth, resolveLocalBirth, resolveLocalToUtc, zoneOffsetAt };
|
|
220
|
+
export { type CalendarName, type CalendarNote, type City, type FoldChoice, GREGORIAN_ADOPTION, GREGORIAN_ADOPTION_SOURCES, type GeoNamesClient, type GeoNamesClientOptions, type GeoNamesIndexMetadata, type GregorianAdoption, type GregorianAdoptionSource, type LocalBirthInput, type LocalBirthResolution, type LocalTimeOptions, type LocalTimeResolution, TZDB, TransitionCause, ZoneHistoryNotLoadedError, type ZoneTransition, calendarNote, createGeoNamesClient, gregorianAdoption, gregorianToJulian, julianToGregorian, offsetAt, prepareLocalTime, resolveBirth, resolveLocalBirth, resolveLocalToUtc, zoneOffsetAt };
|
package/dist/geo.js
CHANGED
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
resolveLocalBirth,
|
|
12
12
|
resolveLocalToUtc,
|
|
13
13
|
zoneOffsetAt
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7Y2F2IWN.js";
|
|
15
15
|
import {
|
|
16
16
|
gregorianToJulian,
|
|
17
17
|
julianToGregorian
|
|
18
18
|
} from "./chunk-KFTJMMG7.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-BMDASNPB.js";
|
|
20
20
|
|
|
21
21
|
// src/geo/geonames.ts
|
|
22
22
|
var fold = (value) => value.normalize("NFD").replace(/[\u0300-\u036f]/gu, "").toLowerCase();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Angles, H as HouseSystem, a as Houses, b as HouseNumber } from './types-
|
|
1
|
+
import { A as Angles, H as HouseSystem, a as Houses, b as HouseNumber } from './types-DpPdtXgO.js';
|
|
2
2
|
|
|
3
3
|
declare const HOUSE_SYSTEMS: readonly ["whole", "placidus", "porphyry", "equal", "equal-mc", "vehlow", "koch", "regiomontanus", "campanus", "topocentric", "alcabitius", "morinus", "meridian"];
|
|
4
4
|
/**
|
|
@@ -51,8 +51,8 @@ declare function wholeSignCusps(ascendant: number): number[];
|
|
|
51
51
|
* circle, so the map is a contraction with slope at most 2q/3. The iteration
|
|
52
52
|
* settles to 1e-9° within 64 steps except within about 1e-8° of the polar
|
|
53
53
|
* limit, near the sidereal times at which a cusp's right ascension reaches 90°
|
|
54
|
-
* or 270
|
|
55
|
-
*
|
|
54
|
+
* or 270°, where the rounding of asin near ±1 can keep it from settling.
|
|
55
|
+
* Where it does not settle, the cusp
|
|
56
56
|
* is found by bisection on RAMC + offset ± (90° m + 1°), across which
|
|
57
57
|
* α − RAMC − offset − m·AD(α) increases strictly, so below the limit Placidus
|
|
58
58
|
* never falls back. Near the limit, either way, a cusp carries the rounding of
|
package/dist/houses-extra.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { A as AngleInput } from './houses-
|
|
2
|
-
import { H as HouseSystem, A as Angles } from './types-
|
|
1
|
+
import { A as AngleInput } from './houses-Bh7GCnPi.js';
|
|
2
|
+
import { H as HouseSystem, A as Angles } from './types-DpPdtXgO.js';
|
|
3
3
|
import './deltat.js';
|
|
4
|
+
import './time-scale-DIFNa0gz.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* `@zodiacs/engine/houses`: the house position of a body with ecliptic
|
|
@@ -72,8 +73,8 @@ declare function housePosition(system: HouseSystem, input: AngleInput, body: Ecl
|
|
|
72
73
|
* Munkasey's polar ascendant (Swiss Ephemeris's `ascmc[4]` to `ascmc[7]`).
|
|
73
74
|
* Each is the ecliptic point of an oblique ascension under a pole, taken as
|
|
74
75
|
* the formula gives it: inside the polar circle (and, for Munkasey's
|
|
75
|
-
* co-ascendant, within
|
|
76
|
-
*
|
|
76
|
+
* co-ascendant, within ε of the equator) it can lie west of the meridian,
|
|
77
|
+
* and it is not turned east as the ascendant is.
|
|
77
78
|
*/
|
|
78
79
|
declare function coAscendants(input: AngleInput): CoAscendants;
|
|
79
80
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export { C as ChartDeclinations, D as DECLINATION_ORB, a as DECLINATION_ORB_LUMINARY, b as DEFAULT_DECLINATION_ORB_POLICY, c as DeclinationAspect, d as DeclinationAspectType, e as DeclinationBody, f as DeclinationOrbPolicy, g as DeclinationRow, h as Declinations, E as EquatorialCoordinates, N as NatalSource, R as RA_POLE_TOLERANCE, i as ReturnSeason, S as SUN_BOUND_LATITUDE, j as SaturnReturnResult, k as SaturnReturnSource, l as chartDeclinations, m as chartPoints, n as declinationOf, o as declinationOrb, p as declinationsForBodies, q as eclipticToEquatorial, r as findDeclinationAspects, s as findLongitudeCrossings, t as groupIntoSeasons, u as moonPhase, v as natalChart, w as positions, x as saturnReturn, y as searchLongitudeCrossings, z as synastry, A as transits } from './api-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
1
|
+
export { C as ChartDeclinations, D as DECLINATION_ORB, a as DECLINATION_ORB_LUMINARY, b as DEFAULT_DECLINATION_ORB_POLICY, c as DeclinationAspect, d as DeclinationAspectType, e as DeclinationBody, f as DeclinationOrbPolicy, g as DeclinationRow, h as Declinations, E as EquatorialCoordinates, N as NatalSource, R as RA_POLE_TOLERANCE, i as ReturnSeason, S as SUN_BOUND_LATITUDE, j as SaturnReturnResult, k as SaturnReturnSource, l as chartDeclinations, m as chartPoints, n as declinationOf, o as declinationOrb, p as declinationsForBodies, q as eclipticToEquatorial, r as findDeclinationAspects, s as findLongitudeCrossings, t as groupIntoSeasons, u as moonPhase, v as natalChart, w as positions, x as saturnReturn, y as searchLongitudeCrossings, z as synastry, A as transits } from './api-ChL1N2Sr.js';
|
|
2
|
+
export { D as DefaultEphemeris, d as DefaultEphemerisName, e as defaultEphemeris, s as setDefaultEphemeris, w as withEphemeris } from './ephemeris-exTSqBgb.js';
|
|
3
|
+
import { e as DateInput, c as BodyPosition, j as Sect, k as MinimalBody, l as Element, I as InterAspect, m as Modality, n as PairSummary } from './types-DpPdtXgO.js';
|
|
4
|
+
export { A as Angles, o as Aspect, f as AspectType, h as BirthInput, B as BodyName, d as Chart, g as ChartFlag, C as ChartInput, i as ChartPoints, p as ENGINE_VERSION, q as EPHEMERIS, E as EphemerisFallback, b as HouseNumber, H as HouseSystem, a as Houses, M as MoonPhase, r as MoonPhaseName, s as PointName, t as PointPosition, u as Polarity, P as PositionSource, v as SignDefinition, w as SourceBody, S as SynastryResult, T as TransitResult, Z as ZodiacSign } from './types-DpPdtXgO.js';
|
|
5
|
+
import { A as AspectMotion } from './internal-math-CxenuGfm.js';
|
|
6
|
+
export { a as ASPECTS, b as ASPECT_BODIES, c as ASPECT_TYPES, d as AspectDefinition, E as ELEMENTS, M as MODALITIES, S as SIGNS, e as SIGN_NAMES, f as SIGN_SLUGS, g as STATIONARY_RELATIVE_SPEED, h as aspectMotion, i as degreeInSign, j as findAspects, m as matchAspect, n as normalizeLongitude, s as separation, k as signForLongitude, l as signIndexForLongitude } from './internal-math-CxenuGfm.js';
|
|
7
|
+
export { A as AngleInput, H as HOUSE_SYSTEMS, P as PLACIDUS_POLAR_FALLBACK, a as POLAR_FALLBACK, b as POLAR_UNDEFINED_HOUSE_SYSTEMS, c as alcabitiusCusps, d as campanusCusps, e as computeAngles, f as computeHouses, g as eastPointOf, h as equalCusps, i as equalMcCusps, j as houseOf, k as isPolarUndefinedHouseSystem, l as kochCusps, m as meanObliquity, n as meridianCusps, o as morinusCusps, p as placidusCusps, q as porphyryCusps, r as ramcOf, s as regiomontanusCusps, t as topocentricCusps, v as vehlowCusps, u as vertexOf, w as wholeSignCusps } from './houses-Bh7GCnPi.js';
|
|
7
8
|
export { DELTA_T_MODEL, DELTA_T_TABLE, DeltaT, DeltaTSegment, DeltaTTable, deltaT, deltaTAt } from './deltat.js';
|
|
9
|
+
export { D as DELTA_T_IERS_MODEL, L as LeapSeconds, T as TimeScale, a as TimeScaleName, U as Ut1MinusUtc } from './time-scale-DIFNa0gz.js';
|
|
8
10
|
export { E as EPHEMERIS_SPAN, R as REFERENCE_SPAN, o as outsideReferenceSpan } from './reference-span-CILpclrz.js';
|
|
9
11
|
export { BodyLongitudeAt, CrossingSearchOptions, CrossingSearchResult, LongitudeCrossing, findLongitudeCrossingsWith, searchLongitudeCrossingsWith } from './crossings.js';
|
|
10
12
|
|