Commit 49173616c17617c5a690a14d95e88e56c4f17964
1 parent
e43f05ad
Correct inconsistent parameter names (use mjd... instead of mrd...)
Showing
1 changed file
with
14 additions
and
14 deletions
src/obs/GTime.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GTime.cpp - Time class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2011 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -100,7 +100,7 @@ GTime::GTime(const GTime& time) |
| 100 | 100 | * reference day is specified as floating point value. |
| 101 | 101 | ***************************************************************************/ |
| 102 | 102 | GTime::GTime(const double& time, |
| 103 | - const double& mrdref, | |
| 103 | + const double& mjdref, | |
| 104 | 104 | const std::string& timeunit, |
| 105 | 105 | const std::string& timesys, |
| 106 | 106 | const std::string& timeref) |
| ... | ... | @@ -109,7 +109,7 @@ GTime::GTime(const double& time, |
| 109 | 109 | init_members(); |
| 110 | 110 | |
| 111 | 111 | // Set time |
| 112 | - this->time(time, mrdref, timeunit, timesys, timeref); | |
| 112 | + this->time(time, mjdref, timeunit, timesys, timeref); | |
| 113 | 113 | |
| 114 | 114 | // Return |
| 115 | 115 | return; |
| ... | ... | @@ -131,7 +131,7 @@ GTime::GTime(const double& time, |
| 131 | 131 | ***************************************************************************/ |
| 132 | 132 | GTime::GTime(const double& time, |
| 133 | 133 | const int& mjdrefi, |
| 134 | - const double& mrdreff, | |
| 134 | + const double& mjdreff, | |
| 135 | 135 | const std::string& timeunit, |
| 136 | 136 | const std::string& timesys, |
| 137 | 137 | const std::string& timeref) |
| ... | ... | @@ -140,7 +140,7 @@ GTime::GTime(const double& time, |
| 140 | 140 | init_members(); |
| 141 | 141 | |
| 142 | 142 | // Set time |
| 143 | - this->time(time, mjdrefi, mrdreff, timeunit, timesys, timeref); | |
| 143 | + this->time(time, mjdrefi, mjdreff, timeunit, timesys, timeref); | |
| 144 | 144 | |
| 145 | 145 | // Return |
| 146 | 146 | return; |
| ... | ... | @@ -312,7 +312,7 @@ void GTime::met(const double& time) |
| 312 | 312 | * @todo Implement interpretation of "timesys" and "timeref" parameters. |
| 313 | 313 | ***************************************************************************/ |
| 314 | 314 | void GTime::time(const double& time, |
| 315 | - const double& mrdref, | |
| 315 | + const double& mjdref, | |
| 316 | 316 | const std::string& timeunit, |
| 317 | 317 | const std::string& timesys, |
| 318 | 318 | const std::string& timeref) |
| ... | ... | @@ -333,7 +333,7 @@ void GTime::time(const double& time, |
| 333 | 333 | |
| 334 | 334 | // Store time and reference |
| 335 | 335 | m_time = time_in_seconds; |
| 336 | - m_mjdref = mrdref; | |
| 336 | + m_mjdref = mjdref; | |
| 337 | 337 | |
| 338 | 338 | // Return |
| 339 | 339 | return; |
| ... | ... | @@ -355,13 +355,13 @@ void GTime::time(const double& time, |
| 355 | 355 | ***************************************************************************/ |
| 356 | 356 | void GTime::time(const double& time, |
| 357 | 357 | const int& mjdrefi, |
| 358 | - const double& mrdreff, | |
| 358 | + const double& mjdreff, | |
| 359 | 359 | const std::string& timeunit, |
| 360 | 360 | const std::string& timesys, |
| 361 | 361 | const std::string& timeref) |
| 362 | 362 | { |
| 363 | 363 | // Compute reference MJD |
| 364 | - double mjdref = double(mjdrefi) + mrdreff; | |
| 364 | + double mjdref = double(mjdrefi) + mjdreff; | |
| 365 | 365 | |
| 366 | 366 | // Set time |
| 367 | 367 | this->time(time, mjdref, timeunit, timesys, timeref); |
| ... | ... | @@ -390,16 +390,16 @@ double GTime::time(void) const |
| 390 | 390 | * |
| 391 | 391 | * Returns time in seconds in the specified MJD reference. |
| 392 | 392 | ***************************************************************************/ |
| 393 | -double GTime::time(const double& mrdref) const | |
| 393 | +double GTime::time(const double& mjdref) const | |
| 394 | 394 | { |
| 395 | 395 | // Retrieve time in seconds |
| 396 | 396 | double time = m_time; |
| 397 | 397 | |
| 398 | 398 | // Add offset due to MJD differences |
| 399 | - if (m_mjdref != mrdref) { | |
| 399 | + if (m_mjdref != mjdref) { | |
| 400 | 400 | |
| 401 | 401 | // Compute time offset |
| 402 | - double offset = (m_mjdref - mrdref) * sec_in_day; | |
| 402 | + double offset = (m_mjdref - mjdref) * sec_in_day; | |
| 403 | 403 | |
| 404 | 404 | // Add offset |
| 405 | 405 | time += offset; |
| ... | ... | @@ -419,10 +419,10 @@ double GTime::time(const double& mrdref) const |
| 419 | 419 | * |
| 420 | 420 | * Returns time in seconds in the specified MJD reference. |
| 421 | 421 | ***************************************************************************/ |
| 422 | -double GTime::time(const int& mjdrefi, const double& mrdreff) const | |
| 422 | +double GTime::time(const int& mjdrefi, const double& mjdreff) const | |
| 423 | 423 | { |
| 424 | 424 | // Compute reference MJD |
| 425 | - double mjdref = double(mjdrefi) + mrdreff; | |
| 425 | + double mjdref = double(mjdrefi) + mjdreff; | |
| 426 | 426 | |
| 427 | 427 | // Return time |
| 428 | 428 | return (time(mjdref)); | ... | ... |