astroceleste-engine 0.0.13 → 0.0.14
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/README.md
CHANGED
|
@@ -23,7 +23,7 @@ const chart = engine.chart({
|
|
|
23
23
|
utc: "1987-05-17T14:30:00Z",
|
|
24
24
|
latitude: 41.9,
|
|
25
25
|
longitude: 12.5,
|
|
26
|
-
house_system: "P", // optional: P, K, R, C, T, B, M, O, E, V, W
|
|
26
|
+
house_system: "P", // optional: P, K, R, C, T, B, M, O, S, E, V, W
|
|
27
27
|
zodiac_type: "sidereal", // optional: tropical (default) or sidereal
|
|
28
28
|
ayanamsa: "lahiri", // optional
|
|
29
29
|
chinese_calendar: true, // optional: add the Chinese calendar of the moment
|
|
@@ -45,6 +45,12 @@ export class Engine {
|
|
|
45
45
|
* The sky of `request`, with its cross-aspects to `natalPlanets`.
|
|
46
46
|
*/
|
|
47
47
|
transit(natal_planets: any, request: any): any;
|
|
48
|
+
/**
|
|
49
|
+
* The panchanga at `utc` (ISO 8601) for a place: sunrise, vara, tithi, nakshatra,
|
|
50
|
+
* yoga, karana, lunar month and year; `null` when the loaded kernels do not cover the
|
|
51
|
+
* lunar month around it.
|
|
52
|
+
*/
|
|
53
|
+
vedicCalendar(utc: string, latitude: number, longitude: number): any;
|
|
48
54
|
/**
|
|
49
55
|
* `[firstJD, lastJD]` covered by the loaded kernels, or `undefined`.
|
|
50
56
|
*/
|
|
@@ -95,6 +101,14 @@ export function excerptKernel(kernel: Uint8Array, start_jd: number, end_jd: numb
|
|
|
95
101
|
*/
|
|
96
102
|
export function julianDay(utc: string): number;
|
|
97
103
|
|
|
104
|
+
/**
|
|
105
|
+
* The Vedic reading of a computed `chart` born at `birth` (ISO 8601 UTC): sidereal
|
|
106
|
+
* placements with their nakshatras, the vargas and the Vimshottari dasha. `options`:
|
|
107
|
+
* `{ ayanamsa?, outer_planets?, vargas?, hora?, dasha_year?, dasha_path?, dasha_depth?,
|
|
108
|
+
* date? }`, or `undefined` for the defaults. No kernel is needed.
|
|
109
|
+
*/
|
|
110
|
+
export function jyotish(chart: any, birth: string, options: any): any;
|
|
111
|
+
|
|
98
112
|
/**
|
|
99
113
|
* Cross-aspects from chart B's planets (overlay) to chart A's (base).
|
|
100
114
|
*/
|
|
@@ -135,8 +149,10 @@ export interface InitOutput {
|
|
|
135
149
|
readonly engine_new: () => number;
|
|
136
150
|
readonly engine_supports: (a: number, b: number) => number;
|
|
137
151
|
readonly engine_transit: (a: number, b: any, c: any) => [number, number, number];
|
|
152
|
+
readonly engine_vedicCalendar: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
138
153
|
readonly excerptKernel: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
139
154
|
readonly julianDay: (a: number, b: number) => [number, number, number];
|
|
155
|
+
readonly jyotish: (a: any, b: number, c: number, d: any) => [number, number, number];
|
|
140
156
|
readonly synastry: (a: any, b: any, c: any) => [number, number, number];
|
|
141
157
|
readonly timeLords: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
142
158
|
readonly ziWei: (a: any, b: number, c: number, d: number, e: number, f: any) => [number, number, number];
|
|
@@ -153,6 +153,24 @@ export class Engine {
|
|
|
153
153
|
}
|
|
154
154
|
return takeFromExternrefTable0(ret[0]);
|
|
155
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* The panchanga at `utc` (ISO 8601) for a place: sunrise, vara, tithi, nakshatra,
|
|
158
|
+
* yoga, karana, lunar month and year; `null` when the loaded kernels do not cover the
|
|
159
|
+
* lunar month around it.
|
|
160
|
+
* @param {string} utc
|
|
161
|
+
* @param {number} latitude
|
|
162
|
+
* @param {number} longitude
|
|
163
|
+
* @returns {any}
|
|
164
|
+
*/
|
|
165
|
+
vedicCalendar(utc, latitude, longitude) {
|
|
166
|
+
const ptr0 = passStringToWasm0(utc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
167
|
+
const len0 = WASM_VECTOR_LEN;
|
|
168
|
+
const ret = wasm.engine_vedicCalendar(this.__wbg_ptr, ptr0, len0, latitude, longitude);
|
|
169
|
+
if (ret[2]) {
|
|
170
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
171
|
+
}
|
|
172
|
+
return takeFromExternrefTable0(ret[0]);
|
|
173
|
+
}
|
|
156
174
|
}
|
|
157
175
|
if (Symbol.dispose) Engine.prototype[Symbol.dispose] = Engine.prototype.free;
|
|
158
176
|
|
|
@@ -272,6 +290,26 @@ export function julianDay(utc) {
|
|
|
272
290
|
return ret[0];
|
|
273
291
|
}
|
|
274
292
|
|
|
293
|
+
/**
|
|
294
|
+
* The Vedic reading of a computed `chart` born at `birth` (ISO 8601 UTC): sidereal
|
|
295
|
+
* placements with their nakshatras, the vargas and the Vimshottari dasha. `options`:
|
|
296
|
+
* `{ ayanamsa?, outer_planets?, vargas?, hora?, dasha_year?, dasha_path?, dasha_depth?,
|
|
297
|
+
* date? }`, or `undefined` for the defaults. No kernel is needed.
|
|
298
|
+
* @param {any} chart
|
|
299
|
+
* @param {string} birth
|
|
300
|
+
* @param {any} options
|
|
301
|
+
* @returns {any}
|
|
302
|
+
*/
|
|
303
|
+
export function jyotish(chart, birth, options) {
|
|
304
|
+
const ptr0 = passStringToWasm0(birth, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
305
|
+
const len0 = WASM_VECTOR_LEN;
|
|
306
|
+
const ret = wasm.jyotish(chart, ptr0, len0, options);
|
|
307
|
+
if (ret[2]) {
|
|
308
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
309
|
+
}
|
|
310
|
+
return takeFromExternrefTable0(ret[0]);
|
|
311
|
+
}
|
|
312
|
+
|
|
275
313
|
/**
|
|
276
314
|
* Cross-aspects from chart B's planets (overlay) to chart A's (base).
|
|
277
315
|
* @param {any} chart_a_planets
|
|
Binary file
|