public void RiseSetTranTest() { int month = 7; // month double day = 8.0; // day int year = 2000; // year double L = 95.0950; // longitude double phi = 29.5070; // latitude double JD; // Julian Day double m0; // transit time double m1; // rise time double m2; // set time double[] alpha = new double[3]; // right ascension double[] delta = new double[3]; // declination double A; // azimuth double h; // altitude AstroAlgo target = new AstroAlgo(); TimeSpan ts = TimeSpan.FromDays(day); JD = AstroAlgo.Date2Julian(new DateTime(year, month, ts.Days, ts.Hours, ts.Minutes, ts.Seconds)); AstroAlgo.ApparentSolarCoordinates(JD, out alpha[1], out delta[1]); AstroAlgo.ApparentSolarCoordinates(JD - 1, out alpha[0], out delta[0]); AstroAlgo.ApparentSolarCoordinates(JD + 1, out alpha[2], out delta[2]); double[] m = AstroAlgo.RiseTranSet(L, phi, -0.8333, JD, alpha, delta); TimeSpan tsRise = AstroAlgo.Fraction2Time(m[1]); //AstroAlgo.AzimuthAltitude(JD + m[1], alpha, delta, L, phi, out A, out h); int x = 5; //Assert.IsTrue(actual.Count > 0, "SOmething"); }
public void RiseSetTranTest() { int month = 1; // month double day = 1.5; // day int year = 2020; // year double L = 95.0950; // longitude double phi = 29.5070; // latitude double JD; // Julian Day double[] alpha = new double[3]; // right ascension double[] delta = new double[3]; // declination TimeSpan ts = TimeSpan.FromDays(day); JD = new DateTime(year, month, ts.Days, ts.Hours, ts.Minutes, ts.Seconds).Date2Julian(); (double Alpha, double Delta)jd0 = AstroAlgo.ApparentSolarCoordinates(JD); (double Alpha, double Delta)jdm1 = AstroAlgo.ApparentSolarCoordinates(JD - 1); (double Alpha, double Delta)jd1 = AstroAlgo.ApparentSolarCoordinates(JD + 1); double[] m = AstroAlgo.RiseTranSet(L, phi, -0.8333, JD, new double[] { jdm1.Alpha, jd0.Alpha, jd1.Alpha }, new double[] { jdm1.Delta, jd0.Delta, jd1.Delta }); TimeSpan tsRise = AstroAlgo.Fraction2Time(m[1]); TimeSpan tsSet = AstroAlgo.Fraction2Time(m[2]); //AstroAlgo.AzimuthAltitude(JD + m[1], alpha, delta, L, phi, out A, out h); int x = 5; Assert.IsTrue(m[1] > 0); }