public double swe_difrad2n(double p1, double p2) { return(SwephLib.swe_difrad2n(p1, p2)); }
/// <summary> /// round second, but at 29.5959 always down /// </summary> public Int32 swe_csroundsec(Int32 x) { return(SwephLib.swe_csroundsec(x)); }
/******************************************************* * other functions from swephlib.c; * they are not needed for Swiss Ephemeris, * but may be useful to former Placalc users. ********************************************************/ /// <summary> /// normalize argument into interval [0..DEG360] /// </summary> public Int32 swe_csnorm(Int32 p) { return(SwephLib.swe_csnorm(p)); }
/// <summary> /// distance in centisecs p1 - p2 normalized to [-180..180[ /// </summary> public Int32 swe_difcs2n(Int32 p1, Int32 p2) { return(SwephLib.swe_difcs2n(p1, p2)); }
public string swe_cs2degstr(Int32 t) { return(SwephLib.swe_cs2degstr(t)); }
public void swe_split_deg(double ddeg, Int32 roundflag, out Int32 ideg, out Int32 imin, out Int32 isec, out double dsecfr, out Int32 isgn) { SwephLib.swe_split_deg(ddeg, roundflag, out ideg, out imin, out isec, out dsecfr, out isgn); }
public void swe_set_tid_acc(double tidacc) { SwephLib.swe_set_tid_acc(tidacc); }
public string swe_cs2timestr(Int32 t, char sep, bool suppressZero) { return(SwephLib.swe_cs2timestr(t, sep, suppressZero)); }
public void swe_cotrans_sp(CPointer <double> xpo, CPointer <double> xpn, double eps) { SwephLib.swe_cotrans_sp(xpo, xpn, eps); }
/// <summary> /// tidal acceleration to be used in swe_deltat() /// </summary> public double swe_get_tid_acc() { return(SwephLib.swe_get_tid_acc()); }
public double swe_sidtime(double tjd_ut) { return(SwephLib.swe_sidtime(tjd_ut)); }
/// <summary> /// sidereal time /// </summary> public double swe_sidtime0(double tjd_ut, double ecl, double nut) { return(SwephLib.swe_sidtime0(tjd_ut, ecl, nut)); }
/**************************** * exports from swephlib.c ****************************/ /// <summary> /// delta t /// </summary> public double swe_deltat(double tjd) { return(SwephLib.swe_deltat(tjd)); }
/// <summary> /// double to int32 with rounding, no overflow check /// </summary> public Int32 swe_d2l(double x) { return(SwephLib.swe_d2l(x)); }
public double swe_radnorm(double x) { return(SwephLib.swe_radnorm(x)); }
/// <summary> /// monday = 0, ... sunday = 6 /// </summary> public int swe_day_of_week(double jd) { return(SwephLib.swe_day_of_week(jd)); }
public double swe_deg_midp(double x1, double x0) { return(SwephLib.swe_deg_midp(x1, x0)); }
/// <summary> /// Format to Degrees Minutes Seconds like dms() function in swewin.exe and swetest.exe. /// </summary> public String DMS(double value, int iFlag, bool outputExtraPrecision = false) { if (double.IsNaN(value)) { return("nan"); } int izod; Int32 k, kdeg, kmin, ksec; string c = SwissEph.ODEGREE_STRING; string s1 = string.Empty; string s = string.Empty; int sgn; if ((iFlag & SwissEph.SEFLG_EQUATORIAL) != 0) { c = "h"; } if (value < 0) { value = -value; sgn = -1; } else { sgn = 1; } if ((iFlag & BIT_ROUND_MIN) != 0) { value = SwephLib.swe_degnorm(value + 0.5 / 60); } if ((iFlag & BIT_ROUND_SEC) != 0) { value = SwephLib.swe_degnorm(value + 0.5 / 3600); } if ((iFlag & BIT_ZODIAC) != 0) { izod = (int)(value / 30); value = (value % 30.0); kdeg = (Int32)value; s = C.sprintf(" %2d %s ", kdeg, ZodiacShortNames[izod]); } else { kdeg = (Int32)value; s = C.sprintf(" %3d%s", kdeg, c); } value -= kdeg; value *= 60; kmin = (Int32)value; if ((iFlag & BIT_ZODIAC) != 0 && (iFlag & BIT_ROUND_MIN) != 0) { s1 = C.sprintf("%2d", kmin); } else { s1 = C.sprintf("%2d'", kmin); } s += s1; if ((iFlag & BIT_ROUND_MIN) != 0) { goto return_dms; } value -= kmin; value *= 60; ksec = (Int32)value; if ((iFlag & BIT_ROUND_SEC) != 0) { s1 = C.sprintf("%2d\"", ksec); } else { s1 = C.sprintf("%2d", ksec); } s += s1; if ((iFlag & BIT_ROUND_SEC) != 0) { goto return_dms; } value -= ksec; if (outputExtraPrecision) { k = (Int32)(value * 100000 + 0.5); s1 = C.sprintf(".%05d", k); } else { k = (Int32)(value * 10000 + 0.5); s1 = C.sprintf(".%04d", k); } s += s1; return_dms: int spi; if (sgn < 0) { spi = s.IndexOfAny("0123456789".ToCharArray()); s = String.Concat(s.Substring(0, spi - 1), '-', s.Substring(spi)); } if ((iFlag & BIT_LZEROES) != 0) { s = s.Substring(0, 2) + s.Substring(2).Replace(' ', '0'); } return(s); }
public string swe_cs2lonlatstr(Int32 t, char pchar, char mchar) { return(SwephLib.swe_cs2lonlatstr(t, pchar, mchar)); }