Go to the documentation of this file.
212 std::vector<std::string>* elems)
214 std::stringstream ss(s);
215 std::string item=std::string();
216 while (std::getline(ss, item, delim)) {
217 elems->push_back(item);
228 std::vector<std::string> elems;
229 split(s, delim, &elems);
240 template <
typename T>
245 std::ostringstream ss;
246 if (values.size() > 0) {
251 for (
int i=1; i<values.size(); i++) {
252 ss << delim << values[i];
258 template std::string CppEphem::StrOpt::join<std::string>(
259 const std::vector<std::string>&,
const char&);
260 template std::string CppEphem::StrOpt::join<double>(
261 const std::vector<double>&,
const char&);
272 double sec = values[2];
273 if (values.size() == 4) {
278 std::ostringstream ss;
279 ss << std::setfill(
'0') << std::setw(2) << int(values[0]);
281 ss << std::setfill(
'0') << std::setw(2) << int(values[1]);
283 ss << std::setfill(
'0') << std::setw(11) << std::fixed
284 << std::setprecision(8) << sec;
286 return std::string(ss.str());
void SetNutationFile(const std::string &filename)
Set the name of the file to use for defining the nutation corrections.
std::string NutationFile(void)
Return the name of the file used for defining the corrections.
std::string join(const std::vector< T > &values, const char &delim)
Method for joining a vector of values based on some delimiter into a string.
double dut1(const double &mjd) const
Return the DUT1 correction parameter (represents UT1 - UTC in seconds)
void SetTtUt1PredFile(const std::string &filename)
Sets the name of the predicted values TT-UT1 corrections file.
double yp(const double &mjd)
Polar motion (x) for a given modified julian date (radians)
double deps(const double &mjd)
Earth obliquity correction for a given modified julian date (radians)
double deps(const double &mjd) const
Return the offset in obliquity correction parameter (radians)
void SetInterp(bool set_interp)
Defines that the correction values should be interpolated.
std::string TtUt1HistFile(void)
Return the name of the file used for defining the corrections.
std::string join_angle(const std::vector< double > &values, const char &delim)
Method for splitting a string based on some delimiter into a vector of strings.
double dpsi(const double &mjd)
Earth longitude correction for a given modified julian date (radians)
double xpolar(const double &mjd) const
Return the x-polar motion correction parameter (radians)
double ttut1(const double &mjd) const
Return the TT-UT1 correction at a given date (in seconds)
void SetTtUt1PredFile(const std::string &filename)
Set the name of the file to use for defining the predicted TT-UT1 corrections.
double dut1Calc(const double &mjd)
Set the time from a vector representing Greenwich Apparent Sidereal Time.
void SetTtUt1HistFile(const std::string &filename)
Sets the name of the historic values TT-UT1 corrections file.
double dut1Error(const double &mjd=51544.5)
std::string TtUt1PredFile(void)
Return the name of the file used for defining the corrections.
std::string NutationFile(void) const
Returns the name of the nutation corrections file.
double ypolar(const double &mjd) const
Return the y-polar motion correction parameter (radians)
void SetNutationFile(const std::string &filename)
Sets the name of the nutation corrections file.
double dpsi(const double &mjd) const
Return the offset in longitude correction parameter (radians)
void CorrectionsInterp(bool set_interp)
Set the corrections object to use interpolation.
std::string TtUt1HistFile(void) const
Returns the name of the historic TT-UT1 corrections file.
double dut1(const double &mjd)
Return dut1 based on a given modified julian date (seconds)
std::string TtUt1PredFile(void) const
Returns the name of the precited TT-UT1 corrections file.
void split(const std::string &s, const char &delim, std::vector< std::string > *elems)
Method for splitting a string based on some delimiter into a vector of strings.
double ttut1(const double &mjd)
TT-UT1 correction for a given MJD (seconds)
void SetTtUt1HistFile(const std::string &filename)
Set the name of the file to use for defining the historic TT-UT1 corrections.
double xp(const double &mjd)
Polar motion (x) for a given modified julian date (radians)
static CECorrections corrections