From f8cc6d3ee7d35b9d14c490221f3d7729a1152335 Mon Sep 17 00:00:00 2001 From: Levin Li Date: Thu, 3 Oct 2024 18:45:39 -0700 Subject: [PATCH] Fix incorrect ra/dec --- Util/CelestiaUtil.h | 1 + Util/CelestiaUtil.mm | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Util/CelestiaUtil.h b/Util/CelestiaUtil.h index 9a33143..e93c134 100644 --- a/Util/CelestiaUtil.h +++ b/Util/CelestiaUtil.h @@ -76,6 +76,7 @@ NS_SWIFT_NAME(AstroUtils) + (CelestiaVector *)eclipticToEquatorial:(CelestiaVector *)ecliptic; + (CelestiaVector *)equatorialToGalactic:(CelestiaVector *)equatorial; + (CelestiaVector *)rectToSpherical:(CelestiaVector *)rect; ++ (double)degFromRad:(double)rad; @end diff --git a/Util/CelestiaUtil.mm b/Util/CelestiaUtil.mm index 1f33738..ab80c8d 100644 --- a/Util/CelestiaUtil.mm +++ b/Util/CelestiaUtil.mm @@ -256,4 +256,8 @@ + (CelestiaVector *)rectToSpherical:(CelestiaVector *)rect { return [CelestiaVector vectorWithVector3d:Eigen::Vector3d(theta, phi, r)]; } ++ (double)degFromRad:(double)rad { + return celestia::math::radToDeg(rad); +} + @end