Example #1
0
 /// <summary>
 /// Create a new Ephemeris Time
 /// </summary>
 /// <param name="day">The Julian Day</param>
 /// <param name="deltaT">The DeltaT value</param>
 public EphemerisTime(JulianDay day, Double deltaT)
     : this()
 {
     this.JulianDay = day;
     this.DeltaT    = deltaT;
     this.Value     = this.JulianDay.Value + this.DeltaT;
 }
        /// <summary>
        /// Temps sidéral corrigé avec la longitude
        /// </summary>
        public static SideralTime ToSideralTime(this IEphemerisProvider provider, JulianDay jDay, Longitude longitude)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }
            SideralTime sid = provider.ToSideralTime(jDay) + (longitude / 15.0);

            if (sid >= 24.0)
            {
                sid -= 24.0;
            }
            if (sid < 0.0)
            {
                sid += 24.0;
            }
            return(sid);
        }