LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
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.