Esempio n. 1
0
        private static void TestHouses(StringBuilder sb)
        {
            GregorianDateTime g = new GregorianDateTime(2016, 9, 1);

            g.shour         = 0.0;
            g.TimezoneHours = 0.0;

            GCEarthData earth = GCGlobal.myLocation.GetEarthData();
            GCEarth     e     = new GCEarth();

            sb.AppendLine(string.Format("{0,12} {1,8} {2,-15}  ", "Date", "Time", "Julian"));
            sb.AppendLine("---------------------------------------------------------------------------------------");
            for (int i = 0; i < 400; i++)
            {
                double jd = g.GetJulianComplete();
                double t = (jd - 2451545) / 365250;
                double sl1 = GCCoreAstronomy.GetSunLongitude(g, earth);
                double el, eb, er;
                GCEarth.Calculate(jd, out el, out eb, out er);
                double rl, rb, rr;
                GCRahu.Calculate(jd, out rl, out rb, out rr);
                double ml, mb, mr;
                GCMoonData.Calculate(jd, out ml, out mb, out mr);
                double ay = GCAyanamsha.GetAyanamsa(jd);
                sb.AppendLine(string.Format("{0,12} {1,8} {2,-15:F6}", g.ToString(), g.LongTime, jd));
                sb.AppendLine();
                for (int j = 5; j < 6; j++)
                {
                    GCVSOPAstronomy.GetGeocentricCoordinates(j, jd, out rl, out rb, out rr);
                    sb.AppendLine(string.Format("    {0,14} {1:F6}", GCStrings.GetPlanetNameEn(j), rl));
                }
                sb.AppendLine();

                g.AddHours(24);
            }


            File.WriteAllText("d:\\Temp\\gcaltest.txt", sb.ToString());
        }