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.
@@ -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
- /* At Astrodienst, we maintain two ephemeris areas for
408
- the thousands of asteroid files:
409
- the short files in /users/ephe/ast*,
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
 
@@ -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 = *isec; // is rounded, no fractional seconds
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)