Example #1
0
        /// <summary>
        /// Calculates Greenwich Mean Sidereal time
        /// </summary>
        /// <returns>HourDouble format</returns>
        static public double NowLMST()
        {
            var nov = new ASCOM.Astrometry.NOVAS.NOVAS31();
            var ast = new ASCOM.Astrometry.AstroUtils.AstroUtils();

            var currJD = ast.JulianDateUT1(0);

            double gstNow = 0;
            var    res    = nov.SiderealTime(
                currJD, 0d, 0, GstType.GreenwichMeanSiderealTime, Method.EquinoxBased, Accuracy.Full, ref gstNow);

            if (res != 0)
            {
                throw new InvalidValueException("Error getting Greenwich Mean Sidereal time");
            }

            double lstNow = gstNow + Longitude / 15;

            lstNow = lstNow - (lstNow >= 24 ? 24 : 0);

            return(lstNow);
        }
Example #2
0
 /// <summary>
 /// Atuo constructor
 /// </summary>
 static AstroUtilsASCOM()
 {
     ASCOMUtils  = new Util();
     ASCOMAUtils = new ASCOM.Astrometry.AstroUtils.AstroUtils();
 }