Open bliss95 opened 3 months ago
CAA2DCoordinate CAACoordinateTransformation::Equatorial2Horizontal(double LocalHourAngle, double Delta, double Latitude) noexcept { LocalHourAngle = HoursToRadians(LocalHourAngle); Delta = DegreesToRadians(Delta); Latitude = DegreesToRadians(Latitude);
CAA2DCoordinate Horizontal; Horizontal.X = RadiansToDegrees(atan2(-cos(Delta)sin(LocalHourAngle), sin(Delta)cos(Latitude) - cos(Delta)cos(LocalHourAngle)sin(Latitude))); if (Horizontal.X < 0) Horizontal.X += 360; Horizontal.Y = RadiansToDegrees(asin(sin(Latitude)sin(Delta) + cos(Latitude)cos(Delta)*cos(LocalHourAngle)));
return Horizontal; }
CAA2DCoordinate CAACoordinateTransformation::Equatorial2Horizontal(double LocalHourAngle, double Delta, double Latitude) noexcept { LocalHourAngle = HoursToRadians(LocalHourAngle); Delta = DegreesToRadians(Delta); Latitude = DegreesToRadians(Latitude);
CAA2DCoordinate Horizontal; Horizontal.X = RadiansToDegrees(atan2(-cos(Delta)sin(LocalHourAngle), sin(Delta)cos(Latitude) - cos(Delta)cos(LocalHourAngle)sin(Latitude))); if (Horizontal.X < 0) Horizontal.X += 360; Horizontal.Y = RadiansToDegrees(asin(sin(Latitude)sin(Delta) + cos(Latitude)cos(Delta)*cos(LocalHourAngle)));
return Horizontal; }