static public Coordinates AltAzm2RaDec(AltAzm altAzm, LatLon location, DateTime time, double elevation) { var JDdate = JDtime(time); var tfm = new ASCOM.Astrometry.Transform.Transform(); var jdtt = tfm.JulianDateTT; //tfm.JulianDateTT = JDdate; 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); // var res = new Coordinates(tfm.RAApparent, tfm.DECApparent); var res = new Coordinates(tfm.RATopocentric, tfm.DECTopocentric); return(res); }
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); }
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; }
public static Coordinates AltAzm2RaDec(AltAzm altAzm, LatLon location, DateTime time, double elevation) { var JDdate = JDtime(time); var tfm = new ASCOM.Astrometry.Transform.Transform(); var jdtt = tfm.JulianDateTT; //tfm.JulianDateTT = JDdate; 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); // var res = new Coordinates(tfm.RAApparent, tfm.DECApparent); var res = new Coordinates(tfm.RATopocentric, tfm.DECTopocentric); return res; }