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)); }
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); }