public static void TestSunEclipse() { Log("=== start sun eclipse ===="); GPObserver obs = new GPObserver(); double srt; obs.setLongitudeEastPositive(-25.858).setLatitudeNorthPositive(-23.983); srt = 2452081.000000; GPAstroEngine.FindNextEclipse(ref srt, true); Log("Next eclipse = {0}", srt); double[] times = null; GPAstroEngine.CalculateTimesSunEclipse(srt, obs, out times); for (int i = 0; i < times.Length; i++) { Log("times[{0}] = {1}", times[i]); } Log("=== end sun eclipse ===="); }
public static void TestMoonEclipse() { Log("=== start moon eclipse ===="); GPObserver obs = new GPObserver(); double srt; obs.setLongitudeEastPositive(-25.858).setLatitudeNorthPositive(-23.983); srt = 2451919.500000; //GPMeeusEngine.NextEclipse(ref srt, false); Log("Next eclipse = {0}", srt); double[] times = null; GPAstroEngine.CalculateTimesMoonEclipse(srt, obs, out times); for (int i = 0; i < times.Length; i++) { Log("times[{0}] = {1}", i, times[i]); } Log("=== end moon eclipse ===="); }