Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets phase for the planet
 /// </summary>
 private double Planet_Phase(SkyContext c, int p)
 {
     return(BasicEphem.Phase(c.Get(Planet_PhaseAngle, p)));
 }
Exemplo n.º 3
0
 protected double Phase(SkyContext c, T body)
 {
     return(BasicEphem.Phase(c.Get(PhaseAngle, body)));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Gets phase of the Moon
 /// </summary>
 public double Phase(SkyContext c)
 {
     return(BasicEphem.Phase(c.Get(PhaseAngle)));
 }