public static CroodRaDec FromAzAltToRaDec(CroodLonLat Location, CroodAzAlt AzAlt, Angle LST) { Angle HA = Math.Atan2(Math.Sin(AzAlt.Az + Math.PI), Math.Cos(AzAlt.Az + Math.PI) * Math.Sin(Location.Lat) + Math.Tan(AzAlt.Alt) * Math.Cos(Location.Lat)); Angle DEC = Math.Asin(Math.Sin(Location.Lat) * Math.Sin(AzAlt.Alt) - Math.Cos(Location.Lat) * Math.Cos(AzAlt.Alt) * Math.Cos(AzAlt.Az + Math.PI)); Angle RA = LST - HA; return(new CroodRaDec(RA, DEC)); }
/// Compute Ra Dec public static CroodAzAlt FromRaDecToAzAlt(CroodLonLat Location, CroodRaDec RaDec, Angle LST) { Angle Ha = LST - RaDec.Ra; double Az = Math.Atan2(Math.Sin(Ha), Math.Cos(Ha) * Math.Sin(Location.Lat) - Math.Tan(RaDec.Dec) * Math.Cos(Location.Lat)); double Alt = Math.Asin(Math.Sin(Location.Lat) * Math.Sin(RaDec.Dec) + Math.Cos(Location.Lat) * Math.Cos(RaDec.Dec) * Math.Cos(Ha)); return(new CroodAzAlt(Az + Math.PI, Alt)); }
public static double GetLocalSiderialTime(CroodLonLat Location, DateTime LocalTime, int TimeZoneInHour, bool IsDayLightSaving) { var ST = GetSiderialTime(LocalTime, TimeZoneInHour, IsDayLightSaving); return(ST - Location.Lon); }
public static CroodRaDec FromAzAltToRaDec(CroodLonLat Location, CroodAzAlt AzAlt, Angle LST) { Angle HA = Math.Atan2(Math.Sin(AzAlt.Az + Math.PI), Math.Cos(AzAlt.Az + Math.PI) * Math.Sin(Location.Lat) + Math.Tan(AzAlt.Alt) * Math.Cos(Location.Lat)); Angle DEC = Math.Asin(Math.Sin(Location.Lat) * Math.Sin(AzAlt.Alt) - Math.Cos(Location.Lat) * Math.Cos(AzAlt.Alt) * Math.Cos(AzAlt.Az + Math.PI)); Angle RA = LST - HA; return new CroodRaDec(RA, DEC); }
/// Compute Ra Dec public static CroodAzAlt FromRaDecToAzAlt(CroodLonLat Location, CroodRaDec RaDec, Angle LST) { Angle Ha = LST - RaDec.Ra; double Az = Math.Atan2(Math.Sin(Ha), Math.Cos(Ha) * Math.Sin(Location.Lat) - Math.Tan(RaDec.Dec) * Math.Cos(Location.Lat)); double Alt = Math.Asin(Math.Sin(Location.Lat) * Math.Sin(RaDec.Dec) + Math.Cos(Location.Lat) * Math.Cos(RaDec.Dec) * Math.Cos(Ha)); return new CroodAzAlt(Az + Math.PI, Alt); }
public static double GetLocalSiderialTime(CroodLonLat Location, DateTime LocalTime, int TimeZoneInHour, bool IsDayLightSaving) { var ST = GetSiderialTime(LocalTime, TimeZoneInHour, IsDayLightSaving); return ST - Location.Lon; }