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); } }
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); } }
public static void TestMoonEvents() { TRiseSet kind; GPJulianTime dp = new GPJulianTime(); dp.setLocalJulianDay(defJulian); GPLocation obs = new GPLocation(); obs.setLatitudeNorthPositive(defLatitude).setLongitudeEastPositive(defLongitude).SetAltitude(0.2); GPLocationProvider prov = new GPLocationProvider(obs); for (int k = 0; k < 26; k++) { dp = GPAstroEngine.GetNextMoonEvent(dp, prov, out kind); Log("next event = {0}, {1}\n", dp, kind); dp.AddHours(1); } }