LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Routines for converting right ascension and declination from degrees or radians into strings and back again. More...
Functions | |
double | radToDeg (long double angleInRadians) |
double | degToRad (long double angleInDegrees) |
std::string | lsst.utils::raRadToStr (double raRad) |
std::string | lsst.utils::raDegToStr (double raDeg) |
std::string | lsst.utils::decRadToStr (double decRad) |
std::string | lsst.utils::decDegToStr (double decDeg) |
std::string | lsst.utils::raDecRadToStr (double raRad, double decRad) |
std::string | lsst.utils::raDecDegToStr (double raDeg, double decDeg) |
double | lsst.utils::raStrToRad (std::string raStr, std::string delimiter=":") |
double | lsst.utils::raStrToDeg (std::string raStr, std::string delimiter=":") |
double | lsst.utils::decStrToRad (std::string decStr, std::string delimiter=":") |
double | lsst.utils::decStrToDeg (std::string decStr, std::string delimiter=":") |
Routines for converting right ascension and declination from degrees or radians into strings and back again.
Right ascensions and declinations (raDecs) are easiest read as strings in the form hh:mm:ss.ss +dd:mm::ss.s, but for calculations, they need to be in degrees or radians. These functions perform those calculations. The function names themselves use the following abbreviations
So, for example raStrToRad() converts a right ascension in the form of a string to radians.
The ouput strings are in fixed length Ra = hh:mm:ss.ss and Dec= +dd:mm::ss.s with all zeros present (not replaced with whitespace).
Input strings must be of a similar format, although some variation is allowed. The default delimiter (the colon) can be supplied as an optional argument
string lsst::utils::decDegToStr | ( | double | decDeg | ) |
Definition at line 102 of file RaDecStr.cc.
string lsst::utils::decRadToStr | ( | double | decRad | ) |
Definition at line 97 of file RaDecStr.cc.
double lsst::utils::decStrToDeg | ( | std::string | decStr, |
std::string | delimiter = ":" |
||
) |
Definition at line 195 of file RaDecStr.cc.
double lsst::utils::decStrToRad | ( | std::string | decStr, |
std::string | delimiter = ":" |
||
) |
Definition at line 190 of file RaDecStr.cc.
double degToRad | ( | long double | angleInDegrees | ) |
Definition at line 67 of file RaDecStr.cc.
string lsst::utils::raDecDegToStr | ( | double | raDeg, |
double | decDeg | ||
) |
Definition at line 134 of file RaDecStr.cc.
string lsst::utils::raDecRadToStr | ( | double | raRad, |
double | decRad | ||
) |
Definition at line 127 of file RaDecStr.cc.
string lsst::utils::raDegToStr | ( | double | raDeg | ) |
Definition at line 79 of file RaDecStr.cc.
double radToDeg | ( | long double | angleInRadians | ) |
Definition at line 61 of file RaDecStr.cc.
string lsst::utils::raRadToStr | ( | double | raRad | ) |
Convert a right ascension in radians to a string format
raRad | Ra in radians |
Definition at line 75 of file RaDecStr.cc.
double lsst::utils::raStrToDeg | ( | std::string | raStr, |
std::string | delimiter = ":" |
||
) |
Definition at line 155 of file RaDecStr.cc.
double lsst::utils::raStrToRad | ( | std::string | raStr, |
std::string | delimiter = ":" |
||
) |
Definition at line 150 of file RaDecStr.cc.