Beispiel #1
0
        /// <summary>
        /// Calculates the sidereal time of the planet.
        /// </summary>
        /// <returns>
        /// The sidereal time of the planet.
        /// </returns>
        /// <param name="planetName">Solar System planet name.</param>
        /// <param name="date">Date.</param>
        /// <param name="lw">Longtitude of the location.</param>
        public static double GetSiderealTime(PlanetName planetName, DateTime date, double lw)
        {
            Planet planet = getPlanet(planetName);

            double calcDate = BaseCalculator.ToDays(date),
                   theta    = planet.Theta0 + planet.Theta1 * calcDate - lw;

            return(Math.Round(theta % 360, 4));
        }
Beispiel #2
0
        /// <summary>
        /// Calculates the mean anomaly of the planet.
        /// </summary>
        /// <returns>
        /// The mean anomaly of the planet.
        /// </returns>
        /// <param name="planetName">Solar System planet name.</param>
        /// <param name="date">Date.</param>
        public static double GetMeanAnomaly(PlanetName planetName, DateTime date)
        {
            Planet planet = getPlanet(planetName);

            double calcDate = BaseCalculator.ToDays(date),
                   M        = planet.M0 + planet.M1 * calcDate;

            return(Math.Round(M % 360, 4));
        }