Skip to content

Commit

Permalink
Fix incorrect ra/dec
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Oct 4, 2024
1 parent 4df0832 commit f8cc6d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Util/CelestiaUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions Util/CelestiaUtil.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f8cc6d3

Please sign in to comment.