sweph 2.10.3-4 → 2.10.3-6
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 +7 -4
- package/binding.gyp +2 -1
- package/index.d.ts +163 -87
- package/index.js +16 -7
- package/index.mjs +113 -102
- package/package.json +11 -7
- package/prebuilds/darwin-arm64/sweph.node +0 -0
- package/prebuilds/linux-arm64/sweph.node +0 -0
- package/prebuilds/linux-x64/sweph.node +0 -0
- package/prebuilds/win32-x64/sweph.node +0 -0
- package/src/functions/deg_midp.cpp +19 -0
- package/src/functions/difrad2n.cpp +19 -0
- package/src/functions/rad_midp.cpp +19 -0
- package/src/functions/set_lapse_rate.cpp +14 -0
- package/src/sweph.cpp +4 -0
- package/src/sweph.h +5 -1
- package/swisseph/swecl.c +19 -21
- package/swisseph/swehel.c +5 -16
- package/swisseph/swehouse.c +6 -3
- package/swisseph/swejpl.c +7 -1
- package/swisseph/swemmoon.c +6 -6
- package/swisseph/sweodef.h +0 -19
- package/swisseph/sweph.c +7 -7
- package/swisseph/sweph.h +14 -14
- package/swisseph/swephexp.h +3 -8
- package/swisseph/swephlib.c +16 -8
package/swisseph/swephexp.h
CHANGED
|
@@ -400,15 +400,10 @@ extern "C" {
|
|
|
400
400
|
#if MSDOS
|
|
401
401
|
# define SE_EPHE_PATH "\\sweph\\ephe\\"
|
|
402
402
|
#else
|
|
403
|
-
# ifdef MACOS
|
|
404
|
-
# define SE_EPHE_PATH ":ephe:"
|
|
405
|
-
# else
|
|
406
403
|
# define SE_EPHE_PATH ".:/users/ephe2/:/users/ephe/"
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
the long file in /users/ephe2/ast*. */
|
|
411
|
-
# endif
|
|
404
|
+
/* At Astrodienst, we maintain two ephemeris areas for the 600'000+ asteroid files:
|
|
405
|
+
the short files in /users/ephe/ast*, the long file in /users/ephe2/ast*.
|
|
406
|
+
/users is a synonym for /home on many systems */
|
|
412
407
|
#endif
|
|
413
408
|
#endif /* SE_EPHE_PATH */
|
|
414
409
|
|
package/swisseph/swephlib.c
CHANGED
|
@@ -3151,7 +3151,7 @@ static double adjust_for_tidacc(double ans, double Y, double tid_acc, double tid
|
|
|
3151
3151
|
}
|
|
3152
3152
|
|
|
3153
3153
|
/* returns tidal acceleration used in swe_deltat() and swe_deltat_ex() */
|
|
3154
|
-
double CALL_CONV swe_get_tid_acc()
|
|
3154
|
+
double CALL_CONV swe_get_tid_acc(void)
|
|
3155
3155
|
{
|
|
3156
3156
|
return swed.tid_acc;
|
|
3157
3157
|
}
|
|
@@ -3183,7 +3183,7 @@ void CALL_CONV swe_set_delta_t_userdef(double dt)
|
|
|
3183
3183
|
}
|
|
3184
3184
|
}
|
|
3185
3185
|
|
|
3186
|
-
int32 swi_guess_ephe_flag()
|
|
3186
|
+
int32 swi_guess_ephe_flag(void)
|
|
3187
3187
|
{
|
|
3188
3188
|
int32 iflag = SEFLG_SWIEPH;
|
|
3189
3189
|
/* if jpl file is open, assume SEFLG_JPLEPH */
|
|
@@ -3933,9 +3933,9 @@ char *CALL_CONV swe_cs2degstr(CSEC t, char *a)
|
|
|
3933
3933
|
* for definition of input see function swe_split_deg().
|
|
3934
3934
|
* output:
|
|
3935
3935
|
* ideg degrees,
|
|
3936
|
-
* imin minutes,
|
|
3937
|
-
* isec seconds,
|
|
3938
|
-
* dsecfr fraction of seconds
|
|
3936
|
+
* imin minutes, (zero if rounding to degree)
|
|
3937
|
+
* isec seconds, (zero if rounding to minute)
|
|
3938
|
+
* dsecfr fraction of seconds (zero if rounding used)
|
|
3939
3939
|
* inak nakshatra number;
|
|
3940
3940
|
******************************************************************/
|
|
3941
3941
|
static void split_deg_nakshatra(double ddeg, int32 roundflag, int32 *ideg, int32 *imin, int32 *isec, double *dsecfr, int32 *inak)
|
|
@@ -3977,8 +3977,12 @@ static void split_deg_nakshatra(double ddeg, int32 roundflag, int32 *ideg, int32
|
|
|
3977
3977
|
if (!(roundflag & (SE_SPLIT_DEG_ROUND_DEG | SE_SPLIT_DEG_ROUND_MIN | SE_SPLIT_DEG_ROUND_SEC))) {
|
|
3978
3978
|
*dsecfr = ddeg * 3600 - *isec;
|
|
3979
3979
|
} else {
|
|
3980
|
-
*dsecfr =
|
|
3980
|
+
*dsecfr = 0;
|
|
3981
3981
|
}
|
|
3982
|
+
if (roundflag & (SE_SPLIT_DEG_ROUND_DEG))
|
|
3983
|
+
*imin = 0;
|
|
3984
|
+
if (roundflag & (SE_SPLIT_DEG_ROUND_DEG | SE_SPLIT_DEG_ROUND_MIN))
|
|
3985
|
+
*isec = 0;
|
|
3982
3986
|
} /* end split_deg_nakshtra */
|
|
3983
3987
|
|
|
3984
3988
|
/************************************************************
|
|
@@ -4003,8 +4007,8 @@ static void split_deg_nakshatra(double ddeg, int32 roundflag, int32 *ideg, int32
|
|
|
4003
4007
|
* to 10d59'59" (or 10d59' or 10d) *
|
|
4004
4008
|
* output:
|
|
4005
4009
|
* ideg degrees,
|
|
4006
|
-
* imin minutes,
|
|
4007
|
-
* isec seconds,
|
|
4010
|
+
* imin minutes, (zero if rounding to degree)
|
|
4011
|
+
* isec seconds, (zero if rounding to minute or degree)
|
|
4008
4012
|
* dsecfr fraction of seconds (zero if rounding used)
|
|
4009
4013
|
* isgn zodiac sign number;
|
|
4010
4014
|
* or +/- sign
|
|
@@ -4052,6 +4056,10 @@ void CALL_CONV swe_split_deg(double ddeg, int32 roundflag, int32 *ideg, int32 *i
|
|
|
4052
4056
|
} else {
|
|
4053
4057
|
*dsecfr = 0;
|
|
4054
4058
|
}
|
|
4059
|
+
if (roundflag & (SE_SPLIT_DEG_ROUND_DEG))
|
|
4060
|
+
*imin = 0;
|
|
4061
|
+
if (roundflag & (SE_SPLIT_DEG_ROUND_DEG | SE_SPLIT_DEG_ROUND_MIN))
|
|
4062
|
+
*isec = 0;
|
|
4055
4063
|
} /* end split_deg */
|
|
4056
4064
|
|
|
4057
4065
|
double swi_kepler(double E, double M, double ecce)
|