Exemplo n.º 1
0
        public static void TestSunCoordinates()
        {
            GPObserver obs = new GPObserver();

            obs.setLatitudeNorthPositive(defLatitude).setLongitudeEastPositive(defLongitude);
            GPJulianTime dp = new GPJulianTime();

            dp.setLocalJulianDay(2456710.500000);
            for (int k = 0; k < 26; k++)
            {
                //dp = MA.GPMeeusEngine.GetNextMoonEvent(dp, obs, out kind);
                GPCelestialBodyCoordinates crd = GPAstroEngine.sun_coordinate(dp.getGreenwichJulianEphemerisDay());
                //srt = MA.GPMeeusEngine.GetSiderealTime(dp.GetJulianDay(), out deltaphi, out epsilon);
                //crd = MA.GPMeeusEngine.moon_coordinate(2448724.5);
                crd.makeTopocentric(obs);
                GPAstroEngine.calcHorizontal(crd, obs);
                //Log("time {0}   deltaphi {1}  epsilon {2} sidereal {3}", dp, deltaphi, epsilon, srt/15);
                //Log("time {0}   altitude {1}  azimuth {2}", dp, crd.elevation, crd.azimuth);
                //Log("time {0}   ra {1}  dec {2}", dp, crd.right_ascession, crd.declination);
                //Log("RA={0} DEC={1}", crd.right_ascession, crd.elevation);
                //Log("AZ={0} EL={1} RA", crd.azimuth, crd.elevation);
                Log("{0}", crd.elevation);
                //                Log("next event = {0}, {1}, {2}\n", dp, kind, crd.elevation);
                dp.AddHours(1);
            }
        }
Exemplo n.º 2
0
        public static void TestSiderealTime()
        {
            GPObserver obs = new GPObserver();

            obs.setLatitudeNorthPositive(defLatitude).setLongitudeEastPositive(defLongitude);
            GPJulianTime dp = new GPJulianTime();

            dp.setLocalJulianDay(2456710.500000);
            for (int k = 0; k < 26; k++)
            {
                GPCelestialBodyCoordinates crd = GPAstroEngine.sun_coordinate(dp.getGreenwichJulianEphemerisDay());
                Log("{0}", crd.apparent_sidereal_time / 15);
                dp.AddHours(1);
            }
        }