Ejemplo 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);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets phase angle for the planet
 /// </summary>
 public double Planet_PhaseAngle(SkyContext c, int p)
 {
     return(BasicEphem.PhaseAngle(c.Get(Planet_Elongation, p), c.Get(Sun_Ecliptical).Distance, c.Get(Planet_DistanceFromEarth, p)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets phase angle for the Moon
 /// </summary>
 private double PhaseAngle(SkyContext c)
 {
     return(BasicEphem.PhaseAngle(c.Get(Elongation), c.Get(SunEcliptical).Distance * 149597871.0, c.Get(Ecliptical0).Distance));
 }