Beispiel #1
0
        static public double JDtime(DateTime time)
        {
            var utils   = new ASCOM.Astrometry.AstroUtils.AstroUtils();
            var MJDdate = utils.CalendarToMJD(time.Day, time.Month, time.Year);

            MJDdate += time.TimeOfDay.TotalDays + 2400000.5;
            return(MJDdate);
        }
Beispiel #2
0
        static public RaDec AltAz2RaDec(AltAz altAzm, LatLon location, DateTime time, double elevation)
        {
            var utils   = new ASCOM.Astrometry.AstroUtils.AstroUtils();
            var MJDdate = utils.CalendarToMJD(time.Day, time.Month, time.Year);

            MJDdate += time.TimeOfDay.TotalDays;

            var tfm = new ASCOM.Astrometry.Transform.Transform();

            tfm.JulianDateTT    = MJDdate;
            tfm.SiteElevation   = elevation * 1000;
            tfm.SiteLatitude    = location.Lat;
            tfm.SiteLongitude   = location.Lon;
            tfm.SiteTemperature = 0;
            tfm.SetAzimuthElevation(altAzm.Az, altAzm.Alt);
            tfm.Refresh();
            var res = new RaDec(tfm.RAJ2000, tfm.DecJ2000);

            return(res);
        }
Beispiel #3
0
        static public AltAz RaDec2AltAz(RaDec coord, LatLon location, DateTime time, double elevation)
        {
            var utils   = new ASCOM.Astrometry.AstroUtils.AstroUtils();
            var MJDdate = utils.CalendarToMJD(time.Day, time.Month, time.Year);

            MJDdate += time.TimeOfDay.TotalDays;

            var tfm = new ASCOM.Astrometry.Transform.Transform();

            tfm.JulianDateTT    = MJDdate;
            tfm.SiteElevation   = elevation * 1000;
            tfm.SiteLatitude    = location.Lat;
            tfm.SiteLongitude   = location.Lon;
            tfm.SiteTemperature = 0;
            tfm.SetJ2000(coord.Ra, coord.Dec);
            tfm.Refresh();

            var res = new AltAz(tfm.ElevationTopocentric, tfm.AzimuthTopocentric);

            return(res);
        }
        public static AltAzm RaDec2AltAzm(Coordinates coord, LatLon location, DateTime time, double elevation)
        {
            var utils = new ASCOM.Astrometry.AstroUtils.AstroUtils();
            var MJDdate = utils.CalendarToMJD(time.Day, time.Month, time.Year);
            MJDdate += time.TimeOfDay.TotalDays;

            var tfm = new ASCOM.Astrometry.Transform.Transform();
            tfm.JulianDateTT = MJDdate;
            tfm.SiteElevation = elevation * 1000;
            tfm.SiteLatitude = location.Lat;
            tfm.SiteLongitude = location.Lon;
            tfm.SiteTemperature = 0;
            tfm.SetJ2000(coord.Ra, coord.Dec);
            tfm.Refresh();

            var res = new AltAzm(tfm.ElevationTopocentric, tfm.AzimuthTopocentric);
            return res;
        }
        public static Coordinates AltAzm2RaDec(AltAzm altAzm, LatLon location, DateTime time, double elevation)
        {
            var utils = new ASCOM.Astrometry.AstroUtils.AstroUtils();
            var MJDdate = utils.CalendarToMJD(time.Day, time.Month, time.Year);
            MJDdate += time.TimeOfDay.TotalDays;

            var tfm = new ASCOM.Astrometry.Transform.Transform();
            tfm.JulianDateTT = MJDdate;
            tfm.SiteElevation = elevation * 1000;
            tfm.SiteLatitude = location.Lat;
            tfm.SiteLongitude = location.Lon;
            tfm.SiteTemperature = 0;
            tfm.SetAzimuthElevation(altAzm.Azm, altAzm.Alt);
            tfm.Refresh();
            var res = new Coordinates(tfm.RAJ2000, tfm.DecJ2000);
            return res;
        }
Beispiel #6
0
 public static double JDtime(DateTime time)
 {
     var utils = new ASCOM.Astrometry.AstroUtils.AstroUtils();
     var MJDdate = utils.CalendarToMJD(time.Day, time.Month, time.Year);
     MJDdate += time.TimeOfDay.TotalDays + 2400000.5;
     return MJDdate;
 }