sweph 2.10.0-6 → 2.10.0-8
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 +17 -13
- package/index.d.ts +32 -26
- package/package.json +1 -1
- package/src/functions/calc.cpp +1 -1
- package/src/functions/calc_pctr.cpp +1 -1
- package/src/functions/calc_ut.cpp +1 -1
- package/src/functions/deltat_ex.cpp +1 -1
- package/src/functions/fixstar.cpp +1 -1
- package/src/functions/fixstar2.cpp +1 -1
- package/src/functions/fixstar2_mag.cpp +1 -1
- package/src/functions/fixstar2_ut.cpp +1 -1
- package/src/functions/fixstar_mag.cpp +1 -1
- package/src/functions/fixstar_ut.cpp +1 -1
- package/src/functions/gauquelin_sector.cpp +1 -1
- package/src/functions/get_ayanamsa_ex.cpp +1 -1
- package/src/functions/get_ayanamsa_ex_ut.cpp +1 -1
- package/src/functions/get_orbital_elements.cpp +1 -1
- package/src/functions/heliacal_pheno_ut.cpp +1 -1
- package/src/functions/heliacal_ut.cpp +1 -1
- package/src/functions/house_pos.cpp +1 -1
- package/src/functions/houses_armc_ex2.cpp +1 -1
- package/src/functions/houses_ex2.cpp +1 -1
- package/src/functions/lat_to_lmt.cpp +1 -1
- package/src/functions/lmt_to_lat.cpp +1 -1
- package/src/functions/lun_eclipse_how.cpp +1 -1
- package/src/functions/lun_eclipse_when.cpp +1 -1
- package/src/functions/lun_eclipse_when_loc.cpp +1 -1
- package/src/functions/lun_occult_when_glob.cpp +1 -1
- package/src/functions/lun_occult_when_loc.cpp +1 -1
- package/src/functions/lun_occult_where.cpp +1 -1
- package/src/functions/nod_aps.cpp +1 -1
- package/src/functions/nod_aps_ut.cpp +1 -1
- package/src/functions/orbit_max_min_true_distance.cpp +1 -1
- package/src/functions/pheno.cpp +1 -1
- package/src/functions/pheno_ut.cpp +1 -1
- package/src/functions/rise_trans.cpp +1 -1
- package/src/functions/rise_trans_true_hor.cpp +1 -1
- package/src/functions/sol_eclipse_how.cpp +1 -1
- package/src/functions/sol_eclipse_when_glob.cpp +1 -1
- package/src/functions/sol_eclipse_when_loc.cpp +1 -1
- package/src/functions/sol_eclipse_where.cpp +1 -1
- package/src/functions/time_equ.cpp +1 -1
- package/src/functions/utc_to_jd.cpp +1 -1
- package/src/functions/vis_limit_mag.cpp +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Sweph
|
|
2
2
|
|
|
3
3
|
The definitive Swiss Ephemeris bindings for Node.js
|
|
4
|
-
Everything you need to create Astrology and Astronomy applications with
|
|
4
|
+
Everything you need to create Astrology and Astronomy applications with JavaScript and node
|
|
5
5
|
|
|
6
6
|
* 100% API coverage
|
|
7
|
-
* Built-in Typescript declarations and ESM
|
|
7
|
+
* Built-in Typescript declarations and ESM exports
|
|
8
8
|
* Built-in intellisense documentation
|
|
9
9
|
* Version matched
|
|
10
10
|
* Made with the N-API
|
|
11
11
|
|
|
12
|
-
[Official
|
|
12
|
+
[Official programmer's documentation for the Swiss Ephemeris by Astrodienst AG](https://www.astro.com/swisseph/swephprg.htm)
|
|
13
13
|
[Official guide for the Swiss Ephemeris by Astrodienst AG](https://www.astro.com/ftp/swisseph/doc/swisseph.htm)
|
|
14
|
-
[Sweph on
|
|
14
|
+
[Sweph on GitHub](https://github.com/timotejroiko/sweph)
|
|
15
15
|
[Sweph on NPM](https://npmjs.com/package/sweph)
|
|
16
16
|
|
|
17
17
|
## Installation and Licensing
|
|
@@ -26,7 +26,7 @@ To install and use this library under GPL, use `npm install sweph@gpl` or `npm i
|
|
|
26
26
|
### - AGPL
|
|
27
27
|
|
|
28
28
|
Starting from version `2.10.1` and later, this library is licensed under `AGPL-3.0`.
|
|
29
|
-
To install and use the latest version of this library under AGPL, use `npm install sweph`.
|
|
29
|
+
To install and use the latest version of this library under AGPL, use `npm install sweph` or `npm install sweph@latest`.
|
|
30
30
|
|
|
31
31
|
### - LGPL
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ If you own a professional license for the Swiss Ephemeris, you may use any versi
|
|
|
36
36
|
|
|
37
37
|
This library is version locked to the Swiss Ephemeris in addition to its own revisions. For example, version `2.10.1-1` corresponds to the Swiss Ephemeris version `2.10.1` and this library's revision `1`.
|
|
38
38
|
|
|
39
|
-
Updates to this library will be released under new revisions, while updates to Swiss Ephemeris will be released under matching
|
|
39
|
+
Updates to this library will be released under new revisions, while updates to Swiss Ephemeris will be released under matching SemVer versions.
|
|
40
40
|
|
|
41
41
|
## Documentation
|
|
42
42
|
|
|
@@ -56,22 +56,26 @@ Each main ephemeris file covers a range of 600 years starting from the century i
|
|
|
56
56
|
* semom files - moon (BC)
|
|
57
57
|
* seas files - main asteroids (AD)
|
|
58
58
|
* seasm files - main asteroids (BC)
|
|
59
|
+
|
|
59
60
|
For advanced usage, the following files can also be found:
|
|
61
|
+
|
|
60
62
|
* astxxx folders - files for individual asteroids (600 years)
|
|
61
63
|
* longfiles folder - files for individual asteroids (6000 years)
|
|
62
|
-
* jplfiles folder - files for
|
|
64
|
+
* jplfiles folder - files for NASA's JPL ephemerides
|
|
63
65
|
* sat folder - files for planetary moons
|
|
64
|
-
|
|
66
|
+
|
|
67
|
+
More information can be found in the [Swiss Ephemeris files documentation](https://www.astro.com/ftp/swisseph/doc/swisseph.htm).
|
|
65
68
|
|
|
66
69
|
## Contributing
|
|
67
70
|
|
|
68
|
-
If you find any
|
|
71
|
+
If you find any inaccuracy or bug in this library, or if you find an upstream update that is not yet included in this library, feel free to open an issue or a pull request.
|
|
72
|
+
|
|
73
|
+
## Limitations
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
* While worker_threads are supported, the underlying C library is single threaded and contains process-wide settings. Functions such as `set_ephe_path()` or `set_sid_mode()` will affect the entire process, including all worker_threads. While you can still use worker_threads as long as you don't change settings from other threads in the middle of calculations, true thread-safe multithreading can only be achieved using child_process.
|
|
71
76
|
|
|
72
|
-
*
|
|
73
|
-
* While worker_threads are supported, the underlying C library is single threaded and its settings are global. Functions such as `set_ephe_path()` will affect the entire process, including worker_threads. While you can still use worker_threads as long as you dont change settings from other threads in the middle of calculations, true thead-safe multithreading can be achieved using child_process instead.
|
|
77
|
+
* This library is a C/C++ add-on designed for Node.JS only, it will not work in browsers, other JS engines or in any other environment that does not support native C/C++ add-ons. In order to install this library, the target system must have the necessary build tools installed, such as `python`, `make` and `gcc` on Linux, `xcode` on Mac, `visual c++` on Windows, and/or other equivalent solutions.
|
|
74
78
|
|
|
75
79
|
## Author
|
|
76
80
|
|
|
77
|
-
Copyright © 2021, Timotej Valentin Rojko
|
|
81
|
+
Copyright © 2021-2022, Timotej Valentin Rojko
|
package/index.d.ts
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* ## Sweph
|
|
3
3
|
* Definitive Swiss Ephemeris bindings for Node.js
|
|
4
4
|
*
|
|
5
|
-
* [Official documentation for the Swiss Ephemeris](https://www.astro.com/swisseph/swephprg.htm)
|
|
6
|
-
* [
|
|
7
|
-
* [Sweph on
|
|
5
|
+
* [Official programmer's documentation for the Swiss Ephemeris](https://www.astro.com/swisseph/swephprg.htm)
|
|
6
|
+
* [Official guide for the Swiss Ephemeris](https://www.astro.com/ftp/swisseph/doc/swisseph.htm)
|
|
7
|
+
* [Sweph on GitHub](https://github.com/timotejroiko/sweph)
|
|
8
|
+
* [Sweph on NPM](http://npmjs.com/package/sweph)
|
|
8
9
|
*
|
|
9
10
|
* ### Usage
|
|
10
11
|
* ```
|
|
@@ -46,7 +47,7 @@ declare module "sweph" {
|
|
|
46
47
|
*/
|
|
47
48
|
flag: number;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
+
|
|
50
51
|
interface Error {
|
|
51
52
|
/**
|
|
52
53
|
* ### Description
|
|
@@ -156,7 +157,7 @@ declare module "sweph" {
|
|
|
156
157
|
* ```
|
|
157
158
|
* ```
|
|
158
159
|
*/
|
|
159
|
-
|
|
160
|
+
data: CalcData2;
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
interface FixStarMag extends Flag, Name, Error {
|
|
@@ -418,7 +419,7 @@ declare module "sweph" {
|
|
|
418
419
|
* ```
|
|
419
420
|
* ```
|
|
420
421
|
*/
|
|
421
|
-
|
|
422
|
+
data: EclipseTimes3
|
|
422
423
|
}
|
|
423
424
|
|
|
424
425
|
interface LunOccultWhenLoc extends Flag, Error {
|
|
@@ -463,7 +464,7 @@ declare module "sweph" {
|
|
|
463
464
|
* ```
|
|
464
465
|
* ```
|
|
465
466
|
*/
|
|
466
|
-
|
|
467
|
+
data: {
|
|
467
468
|
/**
|
|
468
469
|
* ### Description
|
|
469
470
|
* Array of ascending node values returned by the calculation
|
|
@@ -509,7 +510,7 @@ declare module "sweph" {
|
|
|
509
510
|
* ```
|
|
510
511
|
*/
|
|
511
512
|
aphelion: CalcData2;
|
|
512
|
-
|
|
513
|
+
};
|
|
513
514
|
}
|
|
514
515
|
|
|
515
516
|
interface Pheno extends Flag, Error {
|
|
@@ -1495,7 +1496,7 @@ declare module "sweph" {
|
|
|
1495
1496
|
* Time of third contact
|
|
1496
1497
|
*/
|
|
1497
1498
|
third_contact: number,
|
|
1498
|
-
|
|
1499
|
+
/**
|
|
1499
1500
|
* Time of fourth contact
|
|
1500
1501
|
*/
|
|
1501
1502
|
fourth_contact: number,
|
|
@@ -1811,7 +1812,7 @@ declare module "sweph" {
|
|
|
1811
1812
|
* ### Params
|
|
1812
1813
|
* ```
|
|
1813
1814
|
* • tjd_ut: number // Julian day in universal time
|
|
1814
|
-
* • calc_flag: number // Calculation flag,
|
|
1815
|
+
* • calc_flag: number // Calculation flag, SE_ECL2HOR or SE_EQU2HOR
|
|
1815
1816
|
* • geopos: Array<number> // Geographic coordinates [longitude, latitude, elevation]
|
|
1816
1817
|
* • atpress: number // Atmospheric pressure in mbar/hpa
|
|
1817
1818
|
* • attemp: number // Atmospheric temperature in celcius
|
|
@@ -1942,7 +1943,7 @@ declare module "sweph" {
|
|
|
1942
1943
|
*
|
|
1943
1944
|
*/
|
|
1944
1945
|
export function calc(tjd_et: number, ipl: number, iflag: number): Calc;
|
|
1945
|
-
|
|
1946
|
+
|
|
1946
1947
|
/**
|
|
1947
1948
|
* ### Description
|
|
1948
1949
|
* Reset swisseph internals and cleanup file handles
|
|
@@ -2063,7 +2064,7 @@ declare module "sweph" {
|
|
|
2063
2064
|
* ```
|
|
2064
2065
|
* • csec: number // Centiseconds value
|
|
2065
2066
|
* • sep: string // Separator character
|
|
2066
|
-
* •
|
|
2067
|
+
* • suppresszero: boolean // Omit seconds if they are zero
|
|
2067
2068
|
* ```
|
|
2068
2069
|
* ### Returns
|
|
2069
2070
|
* ```
|
|
@@ -2075,7 +2076,7 @@ declare module "sweph" {
|
|
|
2075
2076
|
* ```
|
|
2076
2077
|
*
|
|
2077
2078
|
*/
|
|
2078
|
-
export function cs2timestr(csec: number, sep: string,
|
|
2079
|
+
export function cs2timestr(csec: number, sep: string, suppresszero: boolean): string;
|
|
2079
2080
|
|
|
2080
2081
|
/**
|
|
2081
2082
|
* ### Description
|
|
@@ -2160,7 +2161,7 @@ declare module "sweph" {
|
|
|
2160
2161
|
* ```
|
|
2161
2162
|
*
|
|
2162
2163
|
*/
|
|
2163
|
-
export function date_conversion(year: number, month: number, day: number, hour: number, calendar: string): DateConversion;
|
|
2164
|
+
export function date_conversion(year: number, month: number, day: number, hour: number, calendar: "g" | "j" | (string & {})): DateConversion;
|
|
2164
2165
|
|
|
2165
2166
|
/**
|
|
2166
2167
|
* ### Description
|
|
@@ -2571,7 +2572,7 @@ declare module "sweph" {
|
|
|
2571
2572
|
* ```
|
|
2572
2573
|
*
|
|
2573
2574
|
*/
|
|
2574
|
-
export function gauquelin_sector(tjd_ut: number, ipl: number, starname: string | null, iflag: number, imeth: number, geopos: [number,number,number], atpress: number, attemp: number): GauquelinSector;
|
|
2575
|
+
export function gauquelin_sector(tjd_ut: number, ipl: number, starname: string | null, iflag: number, imeth: number, geopos: [longitude: number, latitude: number, elevation: number], atpress: number, attemp: number): GauquelinSector;
|
|
2575
2576
|
|
|
2576
2577
|
/**
|
|
2577
2578
|
* ### Description
|
|
@@ -2911,11 +2912,11 @@ declare module "sweph" {
|
|
|
2911
2912
|
* ```
|
|
2912
2913
|
* ### Example
|
|
2913
2914
|
* ```
|
|
2914
|
-
* const name = house_name("
|
|
2915
|
+
* const name = house_name("P"); // "Placidus"
|
|
2915
2916
|
* ```
|
|
2916
2917
|
*
|
|
2917
2918
|
*/
|
|
2918
|
-
export function house_name(hsys:
|
|
2919
|
+
export function house_name(hsys: HouseSystems | string & {}): string;
|
|
2919
2920
|
|
|
2920
2921
|
/**
|
|
2921
2922
|
* ### Description
|
|
@@ -2944,7 +2945,7 @@ declare module "sweph" {
|
|
|
2944
2945
|
* ```
|
|
2945
2946
|
*
|
|
2946
2947
|
*/
|
|
2947
|
-
export function house_pos(armc: number, geolat: number, eps: number, hsys: string, xpin: [longitude: number, latitude: number]): HousePosition;
|
|
2948
|
+
export function house_pos(armc: number, geolat: number, eps: number, hsys: HouseSystems | string & {}, xpin: [longitude: number, latitude: number]): HousePosition;
|
|
2948
2949
|
|
|
2949
2950
|
/**
|
|
2950
2951
|
* ### Description
|
|
@@ -2998,8 +2999,9 @@ declare module "sweph" {
|
|
|
2998
2999
|
* ```
|
|
2999
3000
|
*
|
|
3000
3001
|
*/
|
|
3001
|
-
export function houses_armc_ex2(armc: number, geolat: number, eps: number, hsys: HouseSystems, decl?: number): HousesEx<12>;
|
|
3002
3002
|
export function houses_armc_ex2(armc: number, geolat: number, eps: number, hsys: "G", decl?: number): HousesEx<36>;
|
|
3003
|
+
export function houses_armc_ex2(armc: number, geolat: number, eps: number, hsys: HouseSystems, decl?: number): HousesEx<12>;
|
|
3004
|
+
export function houses_armc_ex2(armc: number, geolat: number, eps: number, hsys: string, decl?: number): HousesEx<12> | HousesEx<36>;
|
|
3003
3005
|
|
|
3004
3006
|
/**
|
|
3005
3007
|
* ### Description
|
|
@@ -3045,8 +3047,9 @@ declare module "sweph" {
|
|
|
3045
3047
|
* ```
|
|
3046
3048
|
*
|
|
3047
3049
|
*/
|
|
3048
|
-
export function houses_armc(armc: number, geolat: number, eps: number, hsys: HouseSystems, decl?: number): Houses<12>;
|
|
3049
3050
|
export function houses_armc(armc: number, geolat: number, eps: number, hsys: "G", decl?: number): Houses<36>;
|
|
3051
|
+
export function houses_armc(armc: number, geolat: number, eps: number, hsys: HouseSystems, decl?: number): Houses<12>;
|
|
3052
|
+
export function houses_armc(armc: number, geolat: number, eps: number, hsys: string, decl?: number): Houses<12> | Houses<36>;
|
|
3050
3053
|
|
|
3051
3054
|
/**
|
|
3052
3055
|
* ### Description
|
|
@@ -3091,8 +3094,9 @@ declare module "sweph" {
|
|
|
3091
3094
|
* ```
|
|
3092
3095
|
*
|
|
3093
3096
|
*/
|
|
3094
|
-
export function houses_ex(tjd_ut: number, iflag: number, geolat: number, geolon: number, hsys: HouseSystems): Houses<12>;
|
|
3095
3097
|
export function houses_ex(tjd_ut: number, iflag: number, geolat: number, geolon: number, hsys: "G"): Houses<36>;
|
|
3098
|
+
export function houses_ex(tjd_ut: number, iflag: number, geolat: number, geolon: number, hsys: HouseSystems): Houses<12>;
|
|
3099
|
+
export function houses_ex(tjd_ut: number, iflag: number, geolat: number, geolon: number, hsys: string): Houses<12> | Houses<36>;
|
|
3096
3100
|
|
|
3097
3101
|
/**
|
|
3098
3102
|
* ### Description
|
|
@@ -3145,8 +3149,9 @@ declare module "sweph" {
|
|
|
3145
3149
|
* ```
|
|
3146
3150
|
*
|
|
3147
3151
|
*/
|
|
3148
|
-
export function houses_ex2(tjd_ut: number, iflag: number, geolat: number, geolon: number, hsys: HouseSystems): HousesEx<12>;
|
|
3149
3152
|
export function houses_ex2(tjd_ut: number, iflag: number, geolat: number, geolon: number, hsys: "G"): HousesEx<36>;
|
|
3153
|
+
export function houses_ex2(tjd_ut: number, iflag: number, geolat: number, geolon: number, hsys: HouseSystems): HousesEx<12>;
|
|
3154
|
+
export function houses_ex2(tjd_ut: number, iflag: number, geolat: number, geolon: number, hsys: string): HousesEx<12> | HousesEx<36>;
|
|
3150
3155
|
|
|
3151
3156
|
/**
|
|
3152
3157
|
* ### Description
|
|
@@ -3190,8 +3195,9 @@ declare module "sweph" {
|
|
|
3190
3195
|
* ```
|
|
3191
3196
|
*
|
|
3192
3197
|
*/
|
|
3193
|
-
export function houses(tjd_ut: number, geolat: number, geolon: number, hsys: HouseSystems): Houses<12>;
|
|
3194
3198
|
export function houses(tjd_ut: number, geolat: number, geolon: number, hsys: "G"): Houses<36>;
|
|
3199
|
+
export function houses(tjd_ut: number, geolat: number, geolon: number, hsys: HouseSystems): Houses<12>;
|
|
3200
|
+
export function houses(tjd_ut: number, geolat: number, geolon: number, hsys: string): Houses<12> | Houses<36>;
|
|
3195
3201
|
|
|
3196
3202
|
/**
|
|
3197
3203
|
* ### Description
|
|
@@ -3671,7 +3677,7 @@ declare module "sweph" {
|
|
|
3671
3677
|
*/
|
|
3672
3678
|
export function nod_aps_ut(tjd_ut: number, ipl: number, iflag: number, method: number): NodAps;
|
|
3673
3679
|
|
|
3674
|
-
|
|
3680
|
+
/**
|
|
3675
3681
|
* ### Description
|
|
3676
3682
|
* Calculate an object's nodes and apsides from ephemeris/terrestrial time
|
|
3677
3683
|
* If the calculation method includes `SE_NODBIT_FOPOINT`, the `aphelion` field contains the values for the object's "second focus" instead
|
|
@@ -3912,7 +3918,7 @@ declare module "sweph" {
|
|
|
3912
3918
|
* ### Params
|
|
3913
3919
|
* ```
|
|
3914
3920
|
* • tjd: number // Julian day in universal time
|
|
3915
|
-
* • gregflag: number // Calendar
|
|
3921
|
+
* • gregflag: number // Calendar system, SE_GREG_CAL for gregorian calendar, SE_JUL_CAL for julian calendar
|
|
3916
3922
|
* ```
|
|
3917
3923
|
* ### Returns
|
|
3918
3924
|
* ```
|
|
@@ -4150,7 +4156,7 @@ declare module "sweph" {
|
|
|
4150
4156
|
*
|
|
4151
4157
|
*/
|
|
4152
4158
|
export function sidtime0(tjd_ut: number, eps: number, nut: number): number;
|
|
4153
|
-
|
|
4159
|
+
|
|
4154
4160
|
/**
|
|
4155
4161
|
* ### Description
|
|
4156
4162
|
* Get solar eclipse data for a given date
|
package/package.json
CHANGED
package/src/functions/calc.cpp
CHANGED
|
@@ -13,7 +13,7 @@ Napi::Value sweph_calc(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double xx [6];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
int32 flag = swe_calc(
|
|
18
18
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
19
19
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -14,7 +14,7 @@ Napi::Value sweph_calc_pctr(const Napi::CallbackInfo& info) {
|
|
|
14
14
|
return env.Null();
|
|
15
15
|
}
|
|
16
16
|
double xx [6];
|
|
17
|
-
char serr [AS_MAXCH];
|
|
17
|
+
char serr [AS_MAXCH] = "";
|
|
18
18
|
int32 flag = swe_calc_pctr(
|
|
19
19
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
20
20
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_calc_ut(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double xx [6];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
int32 flag = swe_calc_ut(
|
|
18
18
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
19
19
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -11,7 +11,7 @@ Napi::Value sweph_deltat_ex(const Napi::CallbackInfo& info) {
|
|
|
11
11
|
if(!sweph_type_check(args, info)) {
|
|
12
12
|
return env.Null();
|
|
13
13
|
}
|
|
14
|
-
char serr [AS_MAXCH];
|
|
14
|
+
char serr [AS_MAXCH] = "";
|
|
15
15
|
double delta = swe_deltat_ex(
|
|
16
16
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
17
17
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_fixstar(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double xx [6];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
char star [AS_MAXCH];
|
|
18
18
|
strcpy(star, info[0].As<Napi::String>().Utf8Value().c_str());
|
|
19
19
|
int32 flag = swe_fixstar(
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_fixstar2(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double xx [6];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
char star [AS_MAXCH];
|
|
18
18
|
strcpy(star, info[0].As<Napi::String>().Utf8Value().c_str());
|
|
19
19
|
int32 flag = swe_fixstar2(
|
|
@@ -11,7 +11,7 @@ Napi::Value sweph_fixstar2_mag(const Napi::CallbackInfo& info) {
|
|
|
11
11
|
return env.Null();
|
|
12
12
|
}
|
|
13
13
|
double mag;
|
|
14
|
-
char serr [AS_MAXCH];
|
|
14
|
+
char serr [AS_MAXCH] = "";
|
|
15
15
|
char star [AS_MAXCH];
|
|
16
16
|
strcpy(star, info[0].As<Napi::String>().Utf8Value().c_str());
|
|
17
17
|
int32 flag = swe_fixstar2_mag(
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_fixstar2_ut(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double xx [6];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
char star [AS_MAXCH];
|
|
18
18
|
strcpy(star, info[0].As<Napi::String>().Utf8Value().c_str());
|
|
19
19
|
int32 flag = swe_fixstar2_ut(
|
|
@@ -11,7 +11,7 @@ Napi::Value sweph_fixstar_mag(const Napi::CallbackInfo& info) {
|
|
|
11
11
|
return env.Null();
|
|
12
12
|
}
|
|
13
13
|
double mag;
|
|
14
|
-
char serr [AS_MAXCH];
|
|
14
|
+
char serr [AS_MAXCH] = "";
|
|
15
15
|
char star [AS_MAXCH];
|
|
16
16
|
strcpy(star, info[0].As<Napi::String>().Utf8Value().c_str());
|
|
17
17
|
int32 flag = swe_fixstar_mag(
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_fixstar_ut(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double xx [6];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
char star [AS_MAXCH];
|
|
18
18
|
strcpy(star, info[0].As<Napi::String>().Utf8Value().c_str());
|
|
19
19
|
int32 flag = swe_fixstar_ut(
|
|
@@ -23,7 +23,7 @@ Napi::Value sweph_gauquelin_sector(const Napi::CallbackInfo& info) {
|
|
|
23
23
|
return env.Null();
|
|
24
24
|
}
|
|
25
25
|
double sect;
|
|
26
|
-
char serr [AS_MAXCH];
|
|
26
|
+
char serr [AS_MAXCH] = "";
|
|
27
27
|
int32 flag = swe_gauquelin_sector(
|
|
28
28
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
29
29
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -12,7 +12,7 @@ Napi::Value sweph_get_ayanamsa_ex(const Napi::CallbackInfo& info) {
|
|
|
12
12
|
return env.Null();
|
|
13
13
|
}
|
|
14
14
|
double aya;
|
|
15
|
-
char serr [AS_MAXCH];
|
|
15
|
+
char serr [AS_MAXCH] = "";
|
|
16
16
|
int32 flag = swe_get_ayanamsa_ex(
|
|
17
17
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
18
18
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -12,7 +12,7 @@ Napi::Value sweph_get_ayanamsa_ex_ut(const Napi::CallbackInfo& info) {
|
|
|
12
12
|
return env.Null();
|
|
13
13
|
}
|
|
14
14
|
double aya;
|
|
15
|
-
char serr [AS_MAXCH];
|
|
15
|
+
char serr [AS_MAXCH] = "";
|
|
16
16
|
int32 flag = swe_get_ayanamsa_ex_ut(
|
|
17
17
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
18
18
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_get_orbital_elements(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double ret [50];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
int32 flag = swe_get_orbital_elements(
|
|
18
18
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
19
19
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -31,7 +31,7 @@ Napi::Value sweph_heliacal_pheno_ut(const Napi::CallbackInfo& info) {
|
|
|
31
31
|
Napi::TypeError::New(env, args[4].second).ThrowAsJavaScriptException();
|
|
32
32
|
return env.Null();
|
|
33
33
|
}
|
|
34
|
-
char serr [AS_MAXCH];
|
|
34
|
+
char serr [AS_MAXCH] = "";
|
|
35
35
|
double ret [50];
|
|
36
36
|
int32 flag = swe_heliacal_pheno_ut(
|
|
37
37
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
@@ -31,7 +31,7 @@ Napi::Value sweph_heliacal_ut(const Napi::CallbackInfo& info) {
|
|
|
31
31
|
Napi::TypeError::New(env, args[4].second).ThrowAsJavaScriptException();
|
|
32
32
|
return env.Null();
|
|
33
33
|
}
|
|
34
|
-
char serr [AS_MAXCH];
|
|
34
|
+
char serr [AS_MAXCH] = "";
|
|
35
35
|
double ret [50];
|
|
36
36
|
int32 flag = swe_heliacal_ut(
|
|
37
37
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
@@ -19,7 +19,7 @@ Napi::Value sweph_house_pos(const Napi::CallbackInfo& info) {
|
|
|
19
19
|
Napi::TypeError::New(env, args[5].second).ThrowAsJavaScriptException();
|
|
20
20
|
return env.Null();
|
|
21
21
|
}
|
|
22
|
-
char serr [AS_MAXCH];
|
|
22
|
+
char serr [AS_MAXCH] = "";
|
|
23
23
|
char sys = info[3].As<Napi::String>().Utf8Value()[0];
|
|
24
24
|
double house = swe_house_pos(
|
|
25
25
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
@@ -20,7 +20,7 @@ Napi::Value sweph_houses_armc_ex2(const Napi::CallbackInfo& info) {
|
|
|
20
20
|
}
|
|
21
21
|
double cspeed [37];
|
|
22
22
|
double pspeed [10];
|
|
23
|
-
char serr [AS_MAXCH];
|
|
23
|
+
char serr [AS_MAXCH] = "";
|
|
24
24
|
char sys = info[3].As<Napi::String>().Utf8Value()[0];
|
|
25
25
|
int g = sys == 'G' ? 37 : 13;
|
|
26
26
|
int flag = swe_houses_armc_ex2(
|
|
@@ -18,7 +18,7 @@ Napi::Value sweph_houses_ex2(const Napi::CallbackInfo& info) {
|
|
|
18
18
|
double points [10];
|
|
19
19
|
double cspeed [37];
|
|
20
20
|
double pspeed [10];
|
|
21
|
-
char serr [AS_MAXCH];
|
|
21
|
+
char serr [AS_MAXCH] = "";
|
|
22
22
|
char sys = info[4].As<Napi::String>().Utf8Value()[0];
|
|
23
23
|
int g = sys == 'G' ? 37 : 13;
|
|
24
24
|
int flag = swe_houses_ex2(
|
|
@@ -12,7 +12,7 @@ Napi::Value sweph_lat_to_lmt(const Napi::CallbackInfo& info) {
|
|
|
12
12
|
return env.Null();
|
|
13
13
|
}
|
|
14
14
|
double conv;
|
|
15
|
-
char serr [AS_MAXCH];
|
|
15
|
+
char serr [AS_MAXCH] = "";
|
|
16
16
|
int32 flag = swe_lat_to_lmt(
|
|
17
17
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
18
18
|
info[1].As<Napi::Number>().DoubleValue(),
|
|
@@ -12,7 +12,7 @@ Napi::Value sweph_lmt_to_lat(const Napi::CallbackInfo& info) {
|
|
|
12
12
|
return env.Null();
|
|
13
13
|
}
|
|
14
14
|
double conv;
|
|
15
|
-
char serr [AS_MAXCH];
|
|
15
|
+
char serr [AS_MAXCH] = "";
|
|
16
16
|
int32 flag = swe_lmt_to_lat(
|
|
17
17
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
18
18
|
info[1].As<Napi::Number>().DoubleValue(),
|
|
@@ -18,7 +18,7 @@ Napi::Value sweph_lun_eclipse_how(const Napi::CallbackInfo& info) {
|
|
|
18
18
|
return env.Null();
|
|
19
19
|
}
|
|
20
20
|
double attr [20];
|
|
21
|
-
char serr [AS_MAXCH];
|
|
21
|
+
char serr [AS_MAXCH] = "";
|
|
22
22
|
int32 flag = swe_lun_eclipse_how(
|
|
23
23
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
24
24
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -14,7 +14,7 @@ Napi::Value sweph_lun_eclipse_when(const Napi::CallbackInfo& info) {
|
|
|
14
14
|
return env.Null();
|
|
15
15
|
}
|
|
16
16
|
double ret [10];
|
|
17
|
-
char serr [AS_MAXCH];
|
|
17
|
+
char serr [AS_MAXCH] = "";
|
|
18
18
|
int32 flag = swe_lun_eclipse_when(
|
|
19
19
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
20
20
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -20,7 +20,7 @@ Napi::Value sweph_lun_eclipse_when_loc(const Napi::CallbackInfo& info) {
|
|
|
20
20
|
}
|
|
21
21
|
double ret [10];
|
|
22
22
|
double attr [20];
|
|
23
|
-
char serr [AS_MAXCH];
|
|
23
|
+
char serr [AS_MAXCH] = "";
|
|
24
24
|
int32 flag = swe_lun_eclipse_when_loc(
|
|
25
25
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
26
26
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -16,7 +16,7 @@ Napi::Value sweph_lun_occult_when_glob(const Napi::CallbackInfo& info) {
|
|
|
16
16
|
return env.Null();
|
|
17
17
|
}
|
|
18
18
|
double ret [10];
|
|
19
|
-
char serr [AS_MAXCH];
|
|
19
|
+
char serr [AS_MAXCH] = "";
|
|
20
20
|
int32 flag = swe_lun_occult_when_glob(
|
|
21
21
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
22
22
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -22,7 +22,7 @@ Napi::Value sweph_lun_occult_when_loc(const Napi::CallbackInfo& info) {
|
|
|
22
22
|
}
|
|
23
23
|
double ret [10];
|
|
24
24
|
double attr [20];
|
|
25
|
-
char serr [AS_MAXCH];
|
|
25
|
+
char serr [AS_MAXCH] = "";
|
|
26
26
|
int32 flag = swe_lun_occult_when_loc(
|
|
27
27
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
28
28
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -15,7 +15,7 @@ Napi::Value sweph_lun_occult_where(const Napi::CallbackInfo& info) {
|
|
|
15
15
|
}
|
|
16
16
|
double geopos [10];
|
|
17
17
|
double attr [20];
|
|
18
|
-
char serr [AS_MAXCH];
|
|
18
|
+
char serr [AS_MAXCH] = "";
|
|
19
19
|
int32 flag = swe_lun_occult_where(
|
|
20
20
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
21
21
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -17,7 +17,7 @@ Napi::Value sweph_nod_aps(const Napi::CallbackInfo& info) {
|
|
|
17
17
|
double dsc [6];
|
|
18
18
|
double per [6];
|
|
19
19
|
double aph [6];
|
|
20
|
-
char serr [AS_MAXCH];
|
|
20
|
+
char serr [AS_MAXCH] = "";
|
|
21
21
|
int32 flag = swe_nod_aps(
|
|
22
22
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
23
23
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -17,7 +17,7 @@ Napi::Value sweph_nod_aps_ut(const Napi::CallbackInfo& info) {
|
|
|
17
17
|
double dsc [6];
|
|
18
18
|
double per [6];
|
|
19
19
|
double aph [6];
|
|
20
|
-
char serr [AS_MAXCH];
|
|
20
|
+
char serr [AS_MAXCH] = "";
|
|
21
21
|
int32 flag = swe_nod_aps_ut(
|
|
22
22
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
23
23
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -15,7 +15,7 @@ Napi::Value sweph_orbit_max_min_true_distance(const Napi::CallbackInfo& info) {
|
|
|
15
15
|
double dmax;
|
|
16
16
|
double dmin;
|
|
17
17
|
double dtrue;
|
|
18
|
-
char serr [AS_MAXCH];
|
|
18
|
+
char serr [AS_MAXCH] = "";
|
|
19
19
|
int32 flag = swe_orbit_max_min_true_distance(
|
|
20
20
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
21
21
|
info[1].As<Napi::Number>().Int32Value(),
|
package/src/functions/pheno.cpp
CHANGED
|
@@ -13,7 +13,7 @@ Napi::Value sweph_pheno(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double attr [20];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
int32 flag = swe_pheno(
|
|
18
18
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
19
19
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_pheno_ut(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
15
|
double attr [20];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
int32 flag = swe_pheno_ut(
|
|
18
18
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
19
19
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -23,7 +23,7 @@ Napi::Value sweph_rise_trans(const Napi::CallbackInfo& info) {
|
|
|
23
23
|
return env.Null();
|
|
24
24
|
}
|
|
25
25
|
double ret;
|
|
26
|
-
char serr [AS_MAXCH];
|
|
26
|
+
char serr [AS_MAXCH] = "";
|
|
27
27
|
int32 flag = swe_rise_trans(
|
|
28
28
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
29
29
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -24,7 +24,7 @@ Napi::Value sweph_rise_trans_true_hor(const Napi::CallbackInfo& info) {
|
|
|
24
24
|
return env.Null();
|
|
25
25
|
}
|
|
26
26
|
double ret;
|
|
27
|
-
char serr [AS_MAXCH];
|
|
27
|
+
char serr [AS_MAXCH] = "";
|
|
28
28
|
int32 flag = swe_rise_trans_true_hor(
|
|
29
29
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
30
30
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -18,7 +18,7 @@ Napi::Value sweph_sol_eclipse_how(const Napi::CallbackInfo& info) {
|
|
|
18
18
|
return env.Null();
|
|
19
19
|
}
|
|
20
20
|
double attr [20];
|
|
21
|
-
char serr [AS_MAXCH];
|
|
21
|
+
char serr [AS_MAXCH] = "";
|
|
22
22
|
int32 flag = swe_sol_eclipse_how(
|
|
23
23
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
24
24
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -14,7 +14,7 @@ Napi::Value sweph_sol_eclipse_when_glob(const Napi::CallbackInfo& info) {
|
|
|
14
14
|
return env.Null();
|
|
15
15
|
}
|
|
16
16
|
double ret [10];
|
|
17
|
-
char serr [AS_MAXCH];
|
|
17
|
+
char serr [AS_MAXCH] = "";
|
|
18
18
|
int32 flag = swe_sol_eclipse_when_glob(
|
|
19
19
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
20
20
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -20,7 +20,7 @@ Napi::Value sweph_sol_eclipse_when_loc(const Napi::CallbackInfo& info) {
|
|
|
20
20
|
}
|
|
21
21
|
double ret [10];
|
|
22
22
|
double attr [20];
|
|
23
|
-
char serr [AS_MAXCH];
|
|
23
|
+
char serr [AS_MAXCH] = "";
|
|
24
24
|
int32 flag = swe_sol_eclipse_when_loc(
|
|
25
25
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
26
26
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -13,7 +13,7 @@ Napi::Value sweph_sol_eclipse_where(const Napi::CallbackInfo& info) {
|
|
|
13
13
|
}
|
|
14
14
|
double geopos [10];
|
|
15
15
|
double attr [20];
|
|
16
|
-
char serr [AS_MAXCH];
|
|
16
|
+
char serr [AS_MAXCH] = "";
|
|
17
17
|
int32 flag = swe_sol_eclipse_where(
|
|
18
18
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
19
19
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -17,7 +17,7 @@ Napi::Value sweph_utc_to_jd(const Napi::CallbackInfo& info) {
|
|
|
17
17
|
return env.Null();
|
|
18
18
|
}
|
|
19
19
|
double ret [2];
|
|
20
|
-
char serr [AS_MAXCH];
|
|
20
|
+
char serr [AS_MAXCH] = "";
|
|
21
21
|
int32 flag = swe_utc_to_jd(
|
|
22
22
|
info[0].As<Napi::Number>().Int32Value(),
|
|
23
23
|
info[1].As<Napi::Number>().Int32Value(),
|
|
@@ -30,7 +30,7 @@ Napi::Value sweph_vis_limit_mag(const Napi::CallbackInfo& info) {
|
|
|
30
30
|
Napi::TypeError::New(env, args[4].second).ThrowAsJavaScriptException();
|
|
31
31
|
return env.Null();
|
|
32
32
|
}
|
|
33
|
-
char serr [AS_MAXCH];
|
|
33
|
+
char serr [AS_MAXCH] = "";
|
|
34
34
|
double ret [8];
|
|
35
35
|
int32 flag = swe_vis_limit_mag(
|
|
36
36
|
info[0].As<Napi::Number>().DoubleValue(),
|