Пример #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);
        }
Пример #2
0
 /// <summary>
 /// Gets difference between ecliptical longitudes of the Sun and minor body
 /// </summary>
 public double LongitudeDifference(SkyContext c, T body)
 {
     return(BasicEphem.LongitudeDifference(c.Get(SunEcliptical).Lambda, c.Get(Ecliptical, body).Lambda));
 }
Пример #3
0
 protected double Phase(SkyContext c, T body)
 {
     return(BasicEphem.Phase(c.Get(PhaseAngle, body)));
 }
Пример #4
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)));
 }
Пример #5
0
 /// <summary>
 /// Gets phase for the planet
 /// </summary>
 private double Planet_Phase(SkyContext c, int p)
 {
     return(BasicEphem.Phase(c.Get(Planet_PhaseAngle, p)));
 }
Пример #6
0
 /// <summary>
 /// Gets difference between planet and Sun's ecliptical longitudes
 /// </summary>
 public double Planet_LongitudeDifference(SkyContext c, int p)
 {
     return(BasicEphem.LongitudeDifference(c.Get(Sun_Ecliptical).Lambda, c.Get(Planet_Ecliptical, p).Lambda));
 }
Пример #7
0
 /// <summary>
 /// Gets elongation angle for the planet
 /// </summary>
 public double Planet_Elongation(SkyContext c, int p)
 {
     return(BasicEphem.Elongation(c.Get(Sun_Ecliptical), c.Get(Planet_Ecliptical, p)));
 }
Пример #8
0
 /// <summary>
 /// Gets phase of the Moon
 /// </summary>
 public double Phase(SkyContext c)
 {
     return(BasicEphem.Phase(c.Get(PhaseAngle)));
 }
Пример #9
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));
 }
Пример #10
0
 /// <summary>
 /// Gets geocentric elongation angle of the Moon
 /// </summary>
 private double Elongation(SkyContext c)
 {
     return(BasicEphem.Elongation(c.Get(SunEcliptical), c.Get(Ecliptical0)));
 }