|
LSSTApplications
11.0-13-gbb96280,12.1+18,12.1+7,12.1-1-g14f38d3+72,12.1-1-g16c0db7+5,12.1-1-g5961e7a+84,12.1-1-ge22e12b+23,12.1-11-g06625e2+4,12.1-11-g0d7f63b+4,12.1-19-gd507bfc,12.1-2-g7dda0ab+38,12.1-2-gc0bc6ab+81,12.1-21-g6ffe579+2,12.1-21-gbdb6c2a+4,12.1-24-g941c398+5,12.1-3-g57f6835+7,12.1-3-gf0736f3,12.1-37-g3ddd237,12.1-4-gf46015e+5,12.1-5-g06c326c+20,12.1-5-g648ee80+3,12.1-5-gc2189d7+4,12.1-6-ga608fc0+1,12.1-7-g3349e2a+5,12.1-7-gfd75620+9,12.1-9-g577b946+5,12.1-9-gc4df26a+10
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) |
| double | sexagesimalStrToDecimal (std::string inStr, std::string delimiter) |
| Convert a sexagesimal string to a decimal double. More... | |
| std::string | lsst.utils::raRadToStr (double raRad) |
| Convert a right ascension in radians to a string format. More... | |
| 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
| std::string lsst::utils::decDegToStr | ( | double | decDeg | ) |
Definition at line 101 of file RaDecStr.cc.
| std::string lsst::utils::decRadToStr | ( | double | decRad | ) |
Definition at line 96 of file RaDecStr.cc.
| double lsst::utils::decStrToDeg | ( | std::string | decStr, |
| std::string | delimiter = ":" |
||
| ) |
Definition at line 215 of file RaDecStr.cc.
| double lsst::utils::decStrToRad | ( | std::string | decStr, |
| std::string | delimiter = ":" |
||
| ) |
Definition at line 210 of file RaDecStr.cc.
| double degToRad | ( | long double | angleInDegrees | ) |
Definition at line 66 of file RaDecStr.cc.
| std::string lsst::utils::raDecDegToStr | ( | double | raDeg, |
| double | decDeg | ||
| ) |
Definition at line 133 of file RaDecStr.cc.
| std::string lsst::utils::raDecRadToStr | ( | double | raRad, |
| double | decRad | ||
| ) |
Definition at line 126 of file RaDecStr.cc.
| std::string lsst::utils::raDegToStr | ( | double | raDeg | ) |
Definition at line 78 of file RaDecStr.cc.
| double radToDeg | ( | long double | angleInRadians | ) |
Definition at line 60 of file RaDecStr.cc.
| std::string lsst::utils::raRadToStr | ( | double | raRad | ) |
Convert a right ascension in radians to a string format.
| raRad | Ra in radians |
Definition at line 74 of file RaDecStr.cc.
| double lsst::utils::raStrToDeg | ( | std::string | raStr, |
| std::string | delimiter = ":" |
||
| ) |
Definition at line 199 of file RaDecStr.cc.
| double lsst::utils::raStrToRad | ( | std::string | raStr, |
| std::string | delimiter = ":" |
||
| ) |
Definition at line 194 of file RaDecStr.cc.
| double sexagesimalStrToDecimal | ( | std::string | inStr, |
| std::string | delimiter | ||
| ) |
Convert a sexagesimal string to a decimal double.
Helper function to parse sexagesimal string in either hours:minutes:seconds or degrees:minutes:seconds, and then convert this to a decimal double. Note that no conversion between hours and degrees is performed.
| inStr | String to parse and convert |
| delimiter | Delimiter separating minutes and seconds from hours or degrees. |
Definition at line 156 of file RaDecStr.cc.
1.8.5