sweph 2.10.2-4 → 2.10.3-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/README.md +12 -11
- package/deps/swisseph/swecl.c +32 -42
- package/deps/swisseph/swehouse.c +5 -1
- package/deps/swisseph/sweph.c +194 -288
- package/deps/swisseph/sweph.h +3 -6
- package/deps/swisseph/swephexp.h +3 -3
- package/deps/swisseph/swephlib.c +11 -12
- package/deps/swisseph/swephlib.h +0 -2
- package/index.d.ts +7 -7
- package/package.json +2 -2
- 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/helio_cross.cpp +1 -1
- package/src/functions/helio_cross_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/mooncross.cpp +1 -1
- package/src/functions/mooncross_node.cpp +1 -1
- package/src/functions/mooncross_node_ut.cpp +1 -1
- package/src/functions/mooncross_ut.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/set_ephe_path.cpp +1 -1
- package/src/functions/set_jpl_file.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/solcross.cpp +1 -1
- package/src/functions/solcross_ut.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/deps/swisseph/sweph.h
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* move over from swephexp.h
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
|
-
#define SE_VERSION "2.10.
|
|
65
|
+
#define SE_VERSION "2.10.03"
|
|
66
66
|
|
|
67
67
|
#define J2000 2451545.0 /* 2000 January 1.5 */
|
|
68
68
|
#define B1950 2433282.42345905 /* 1950 January 0.923 */
|
|
@@ -348,7 +348,7 @@ struct aya_init {double t0;
|
|
|
348
348
|
double ayan_t0;
|
|
349
349
|
AS_BOOL t0_is_UT;
|
|
350
350
|
int prec_offset;};
|
|
351
|
-
static const struct aya_init ayanamsa[] = {
|
|
351
|
+
static const struct aya_init ayanamsa[SE_NSIDM_PREDEF] = {
|
|
352
352
|
/* 0: Fagan/Bradley (Default)
|
|
353
353
|
"The American Sidereal Ephemeris, 1976-2000" (Astro Computing Services, 1981)
|
|
354
354
|
states on S.V.P. ("Synetic Vernal Point"):
|
|
@@ -591,11 +591,8 @@ static const struct aya_init ayanamsa[] = {
|
|
|
591
591
|
true ayanamshas. A deviation of around 0.1" remains,
|
|
592
592
|
for unknown reasons. The difference between Lahiri (1) and
|
|
593
593
|
Lahiri ICRC (45) amounts to 1.1". */
|
|
594
|
-
{2435553.5, 23.25 - 0.00464207, FALSE, SEMOD_PREC_NEWCOMB},
|
|
594
|
+
{2435553.5, 23.25 - 0.00464207, FALSE, SEMOD_PREC_NEWCOMB}, // 46: SE_SIDM_LAHIRI_ICRC
|
|
595
595
|
/*************************/
|
|
596
|
-
/*{2061539.789532065, 6.83333333, TRUE, -1}, *41: Manjula's Laghumanasa, 10 March 932, 12 PM LMT Ujjain (75.7684565 E), ayanamsha = 6°50' */
|
|
597
|
-
/* */
|
|
598
|
-
{J1900, 0, FALSE, -1}, /*46: - */
|
|
599
596
|
};
|
|
600
597
|
|
|
601
598
|
#define PLAN_DATA struct plan_data
|
package/deps/swisseph/swephexp.h
CHANGED
|
@@ -743,10 +743,10 @@ ext_def(int32) swe_fixstar2_mag(char *star, double *mag, char *serr);
|
|
|
743
743
|
ext_def( void ) swe_close(void);
|
|
744
744
|
|
|
745
745
|
/* set directory path of ephemeris files */
|
|
746
|
-
ext_def( void ) swe_set_ephe_path(char *path);
|
|
746
|
+
ext_def( void ) swe_set_ephe_path(const char *path);
|
|
747
747
|
|
|
748
748
|
/* set file name of JPL file */
|
|
749
|
-
ext_def( void ) swe_set_jpl_file(char *fname);
|
|
749
|
+
ext_def( void ) swe_set_jpl_file(const char *fname);
|
|
750
750
|
|
|
751
751
|
/* get planet name */
|
|
752
752
|
ext_def( char *) swe_get_planet_name(int ipl, char *spname);
|
|
@@ -837,7 +837,7 @@ ext_def( int ) swe_houses_armc_ex2(
|
|
|
837
837
|
ext_def(double) swe_house_pos(
|
|
838
838
|
double armc, double geolat, double eps, int hsys, double *xpin, char *serr);
|
|
839
839
|
|
|
840
|
-
ext_def(char *) swe_house_name(int hsys);
|
|
840
|
+
ext_def(const char *) swe_house_name(int hsys);
|
|
841
841
|
|
|
842
842
|
|
|
843
843
|
|
package/deps/swisseph/swephlib.c
CHANGED
|
@@ -2487,11 +2487,11 @@ static TLS double dt[TABSIZ_SPACE] = {
|
|
|
2487
2487
|
63.8285, 64.0908, 64.2998, 64.4734, 64.5736, 64.6876, 64.8452, 65.1464, 65.4574, 65.7768,
|
|
2488
2488
|
/* 2010.0 - 2018.0 */
|
|
2489
2489
|
66.0699, 66.3246, 66.6030, 66.9069, 67.2810, 67.6439, 68.1024, 68.5927, 68.9676, 69.2202,
|
|
2490
|
-
/* 2020.0 - */
|
|
2491
|
-
69.3612, 69.3593,
|
|
2490
|
+
/* 2020.0 - 2023.0 */
|
|
2491
|
+
69.3612, 69.3593, 69.2945, 69.1833,
|
|
2492
2492
|
/* Extrapolated values:
|
|
2493
|
-
*
|
|
2494
|
-
|
|
2493
|
+
* 2024 - 2028 */
|
|
2494
|
+
69.10, 69.00, 68.90, 68.80, 68.80,
|
|
2495
2495
|
};
|
|
2496
2496
|
|
|
2497
2497
|
#define TAB2_SIZ 27
|
|
@@ -3730,11 +3730,6 @@ char *swi_right_trim(char *s)
|
|
|
3730
3730
|
return s;
|
|
3731
3731
|
}
|
|
3732
3732
|
|
|
3733
|
-
size_t swi_strnlen(const char *str, size_t n) {
|
|
3734
|
-
const char * stop = (char *)memchr(str, '\0', n);
|
|
3735
|
-
return stop ? stop - str : n;
|
|
3736
|
-
}
|
|
3737
|
-
|
|
3738
3733
|
/*
|
|
3739
3734
|
* The following C code (by Rob Warnock rpw3@sgi.com) does CRC-32 in
|
|
3740
3735
|
* BigEndian/BigEndian byte/bit order. That is, the data is sent most
|
|
@@ -3769,8 +3764,8 @@ uint32 swi_crc32(unsigned char *buf, int len)
|
|
|
3769
3764
|
|
|
3770
3765
|
static void init_crc32(void)
|
|
3771
3766
|
{
|
|
3772
|
-
int32
|
|
3773
|
-
uint32 c;
|
|
3767
|
+
int32 j;
|
|
3768
|
+
uint32 c, i;
|
|
3774
3769
|
for (i = 0; i < 256; ++i) {
|
|
3775
3770
|
for (c = i << 24, j = 8; j > 0; --j)
|
|
3776
3771
|
c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1);
|
|
@@ -3981,6 +3976,8 @@ static void split_deg_nakshatra(double ddeg, int32 roundflag, int32 *ideg, int32
|
|
|
3981
3976
|
*isec = (int32) (ddeg * 3600);
|
|
3982
3977
|
if (!(roundflag & (SE_SPLIT_DEG_ROUND_DEG | SE_SPLIT_DEG_ROUND_MIN | SE_SPLIT_DEG_ROUND_SEC))) {
|
|
3983
3978
|
*dsecfr = ddeg * 3600 - *isec;
|
|
3979
|
+
} else {
|
|
3980
|
+
*dsecfr = *isec; // is rounded, no fractional seconds
|
|
3984
3981
|
}
|
|
3985
3982
|
} /* end split_deg_nakshtra */
|
|
3986
3983
|
|
|
@@ -4008,7 +4005,7 @@ static void split_deg_nakshatra(double ddeg, int32 roundflag, int32 *ideg, int32
|
|
|
4008
4005
|
* ideg degrees,
|
|
4009
4006
|
* imin minutes,
|
|
4010
4007
|
* isec seconds,
|
|
4011
|
-
* dsecfr fraction of seconds
|
|
4008
|
+
* dsecfr fraction of seconds (zero if rounding used)
|
|
4012
4009
|
* isgn zodiac sign number;
|
|
4013
4010
|
* or +/- sign
|
|
4014
4011
|
*
|
|
@@ -4052,6 +4049,8 @@ void CALL_CONV swe_split_deg(double ddeg, int32 roundflag, int32 *ideg, int32 *i
|
|
|
4052
4049
|
*isec = (int32) (ddeg * 3600);
|
|
4053
4050
|
if (!(roundflag & (SE_SPLIT_DEG_ROUND_DEG | SE_SPLIT_DEG_ROUND_MIN | SE_SPLIT_DEG_ROUND_SEC))) {
|
|
4054
4051
|
*dsecfr = ddeg * 3600 - *isec;
|
|
4052
|
+
} else {
|
|
4053
|
+
*dsecfr = 0;
|
|
4055
4054
|
}
|
|
4056
4055
|
} /* end split_deg */
|
|
4057
4056
|
|
package/deps/swisseph/swephlib.h
CHANGED
|
@@ -161,8 +161,6 @@ extern void swi_gen_filename(double tjd, int ipli, char *fname);
|
|
|
161
161
|
/* cyclic redundancy checksum (CRC), 32 bit */
|
|
162
162
|
extern uint32 swi_crc32(unsigned char *buf, int len);
|
|
163
163
|
|
|
164
|
-
extern size_t swi_strnlen(const char *str, size_t n);
|
|
165
|
-
|
|
166
164
|
extern int swi_cutstr(char *s, char *cutlist, char *cpos[], int nmax);
|
|
167
165
|
extern char *swi_right_trim(char *s);
|
|
168
166
|
|
package/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* ## Sweph
|
|
3
3
|
* Definitive Swiss Ephemeris bindings for Node.js
|
|
4
4
|
*
|
|
5
|
-
* [Official
|
|
5
|
+
* [Official programmer's documentation for the Swiss Ephemeris](https://www.astro.com/swisseph/swephprg.htm)
|
|
6
6
|
* [Official guide for the Swiss Ephemeris](https://www.astro.com/ftp/swisseph/doc/swisseph.htm)
|
|
7
|
-
* [Sweph on
|
|
7
|
+
* [Sweph on GitHub](https://github.com/timotejroiko/sweph)
|
|
8
8
|
* [Sweph on NPM](http://npmjs.com/package/sweph)
|
|
9
9
|
*
|
|
10
10
|
* ### Usage
|
|
@@ -2092,7 +2092,7 @@ declare module "sweph" {
|
|
|
2092
2092
|
* ```
|
|
2093
2093
|
* • csec: number // Centiseconds value
|
|
2094
2094
|
* • sep: string // Separator character
|
|
2095
|
-
* •
|
|
2095
|
+
* • suppresszero: boolean // Omit seconds if they are zero
|
|
2096
2096
|
* ```
|
|
2097
2097
|
* ### Returns
|
|
2098
2098
|
* ```
|
|
@@ -2104,7 +2104,7 @@ declare module "sweph" {
|
|
|
2104
2104
|
* ```
|
|
2105
2105
|
*
|
|
2106
2106
|
*/
|
|
2107
|
-
export function cs2timestr(csec: number, sep: string,
|
|
2107
|
+
export function cs2timestr(csec: number, sep: string, suppresszero: boolean): string;
|
|
2108
2108
|
|
|
2109
2109
|
/**
|
|
2110
2110
|
* ### Description
|
|
@@ -2189,7 +2189,7 @@ declare module "sweph" {
|
|
|
2189
2189
|
* ```
|
|
2190
2190
|
*
|
|
2191
2191
|
*/
|
|
2192
|
-
export function date_conversion(year: number, month: number, day: number, hour: number, calendar: string): DateConversion;
|
|
2192
|
+
export function date_conversion(year: number, month: number, day: number, hour: number, calendar: "g" | "j" | (string & {})): DateConversion;
|
|
2193
2193
|
|
|
2194
2194
|
/**
|
|
2195
2195
|
* ### Description
|
|
@@ -2600,7 +2600,7 @@ declare module "sweph" {
|
|
|
2600
2600
|
* ```
|
|
2601
2601
|
*
|
|
2602
2602
|
*/
|
|
2603
|
-
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;
|
|
2603
|
+
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;
|
|
2604
2604
|
|
|
2605
2605
|
/**
|
|
2606
2606
|
* ### Description
|
|
@@ -4114,7 +4114,7 @@ declare module "sweph" {
|
|
|
4114
4114
|
* ### Params
|
|
4115
4115
|
* ```
|
|
4116
4116
|
* • tjd: number // Julian day in universal time
|
|
4117
|
-
* • gregflag: number // Calendar
|
|
4117
|
+
* • gregflag: number // Calendar system, SE_GREG_CAL for gregorian calendar, SE_JUL_CAL for julian calendar
|
|
4118
4118
|
* ```
|
|
4119
4119
|
* ### Returns
|
|
4120
4120
|
* ```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sweph",
|
|
3
|
-
"version": "2.10.2
|
|
3
|
+
"version": "2.10.3-2",
|
|
4
4
|
"description": "The definitive Swiss Ephemeris bindings for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"author": "Timotej Valentin Rojko",
|
|
35
35
|
"license": "(AGPL-3.0-or-later OR LGPL-3.0-or-later)",
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"eslint": "^8.
|
|
37
|
+
"eslint": "^8.28.0"
|
|
38
38
|
}
|
|
39
39
|
}
|
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(),
|
|
@@ -14,7 +14,7 @@ Napi::Value sweph_helio_cross(const Napi::CallbackInfo& info) {
|
|
|
14
14
|
if(!sweph_type_check(args, info)) {
|
|
15
15
|
return env.Null();
|
|
16
16
|
}
|
|
17
|
-
char serr [AS_MAXCH];
|
|
17
|
+
char serr [AS_MAXCH] = "";
|
|
18
18
|
double jd_cross;
|
|
19
19
|
int32 flag = swe_helio_cross(
|
|
20
20
|
info[0].As<Napi::Number>().Int32Value(),
|
|
@@ -14,7 +14,7 @@ Napi::Value sweph_helio_cross_ut(const Napi::CallbackInfo& info) {
|
|
|
14
14
|
if(!sweph_type_check(args, info)) {
|
|
15
15
|
return env.Null();
|
|
16
16
|
}
|
|
17
|
-
char serr [AS_MAXCH];
|
|
17
|
+
char serr [AS_MAXCH] = "";
|
|
18
18
|
double jd_cross;
|
|
19
19
|
int32 flag = swe_helio_cross_ut(
|
|
20
20
|
info[0].As<Napi::Number>().Int32Value(),
|
|
@@ -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 flag = swe_houses_ex2(
|
|
24
24
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
@@ -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(),
|
|
@@ -12,7 +12,7 @@ Napi::Value sweph_mooncross(const Napi::CallbackInfo& info) {
|
|
|
12
12
|
if(!sweph_type_check(args, info)) {
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
|
-
char serr [AS_MAXCH];
|
|
15
|
+
char serr [AS_MAXCH] = "";
|
|
16
16
|
double jd_et = swe_mooncross(
|
|
17
17
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
18
18
|
info[1].As<Napi::Number>().DoubleValue(),
|
|
@@ -11,7 +11,7 @@ Napi::Value sweph_mooncross_node_ut(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 xlon;
|
|
16
16
|
double xlat;
|
|
17
17
|
double jd_ut = swe_mooncross_node_ut(
|
|
@@ -12,7 +12,7 @@ Napi::Value sweph_mooncross_ut(const Napi::CallbackInfo& info) {
|
|
|
12
12
|
if(!sweph_type_check(args, info)) {
|
|
13
13
|
return env.Null();
|
|
14
14
|
}
|
|
15
|
-
char serr [AS_MAXCH];
|
|
15
|
+
char serr [AS_MAXCH] = "";
|
|
16
16
|
double jd_ut = swe_mooncross_ut(
|
|
17
17
|
info[0].As<Napi::Number>().DoubleValue(),
|
|
18
18
|
info[1].As<Napi::Number>().DoubleValue(),
|
|
@@ -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(),
|
|
@@ -9,6 +9,6 @@ void sweph_set_ephe_path(const Napi::CallbackInfo& info) {
|
|
|
9
9
|
if(!sweph_type_check(args, info)) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
-
swe_set_ephe_path(info[0].IsString() ?
|
|
12
|
+
swe_set_ephe_path(info[0].IsString() ? info[0].As<Napi::String>().Utf8Value().c_str() : NULL);
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
@@ -9,6 +9,6 @@ void sweph_set_jpl_file(const Napi::CallbackInfo& info) {
|
|
|
9
9
|
if(!sweph_type_check(args, info)) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
-
swe_set_jpl_file(
|
|
12
|
+
swe_set_jpl_file(info[0].As<Napi::String>().Utf8Value().c_str());
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
@@ -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(),
|