mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-28 23:09:32 -05:00
Rause code for the conversion for ra and dec
* float -> double * Add error handling
This commit is contained in:
@@ -38,15 +38,16 @@ namespace openspace {
|
||||
* \return A position in galactic cartesian coordinates, given in the same unit as the
|
||||
* distance parameter.
|
||||
*/
|
||||
glm::dvec3 icrsToGalacticCartesian(float ra, float dec, double distance);
|
||||
glm::dvec3 icrsToGalacticCartesian(double ra, double dec, double distance);
|
||||
|
||||
/**
|
||||
* Converts from ICRS (hms and dms) coordinates to decimal degrees.
|
||||
* \param ra Right ascension, given as a string in format "XXhYYmZZs"
|
||||
* \param dec Declination, given as a string in format "+XXdYYmZZs" or "-XXdYYmZZs"
|
||||
* \param dec Declination, given as a string in format "XXdYYmZZs", "-XXdYYmZZs",
|
||||
* "XdYmZs" or "-XdYmZs"
|
||||
* \return The decimal degrees coordinate
|
||||
*/
|
||||
glm::dvec2 icrsToDecimalDegrees(std::string ra, std::string dec);
|
||||
glm::dvec2 icrsToDecimalDegrees(const std::string& ra, const std::string& dec);
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user