public void Phase_PhaseAngle_Elongation() { CrdsEquatorial eqSun = new CrdsEquatorial(20.6579, 8.6964); CrdsEquatorial eqMoon = new CrdsEquatorial(134.6855, 13.7684); const double epslion = 23.440636; CrdsEcliptical sun = eqSun.ToEcliptical(epslion); sun.Distance = 149971520; CrdsEcliptical moon = eqMoon.ToEcliptical(epslion); moon.Distance = 368410; double psi = BasicEphem.Elongation(sun, moon); Assert.AreEqual(110.79, psi, 1e-2); double phaseAngle = BasicEphem.PhaseAngle(psi, sun.Distance, moon.Distance); Assert.AreEqual(69.08, phaseAngle, 1e-2); double phase = BasicEphem.Phase(phaseAngle); Assert.AreEqual(0.68, phase, 1e-2); }
public void EquatorialToEcliptical() { CrdsEquatorial eq = new CrdsEquatorial(new HMS("7h 45m 18.946s"), new DMS("+28* 01' 34.26''")); CrdsEcliptical ecl = eq.ToEcliptical(23.4392911); Assert.AreEqual(113.215630, ecl.Lambda, errorInDMS); Assert.AreEqual(6.684170, ecl.Beta, errorInDMS); }