26 #include <QtCore/QFile>
27 #include <QtCore/QStringList>
28 #include <QtCore/QTextStream>
47 return "SgModelEop_JMG_96_hf";
62 ": the file [" + fileName +
"] with a priori data does not exist");
77 if (f.open(QFile::ReadOnly))
88 QStringList l = str.simplified().split(
' ', QString::SkipEmptyParts);
92 ": the file [" + fileName +
"]: cannot guess numbers of arrays from the string: [" +
101 ": the file [" + fileName +
"]: failed to get the array size for UT1, the string: [" +
111 ": the file [" + fileName +
"]: failed to get the array size for PM, the string: [" +
120 ": the file [" + fileName +
"]: allocated " + QString(
"").setNum(
numUt_) +
121 " records for UT1 and " + QString(
"").setNum(
numPm_) +
" records for PM");
127 QStringList l = str.simplified().split(
' ', QString::SkipEmptyParts);
131 ": the file [" + fileName +
"]: cannot guess format of the string: [" +
135 for (
int i=0; i<6; i++)
137 n[i] = l.at(i).toInt(&
isOk);
141 ": the file [" + fileName +
"]: failed to acquire info (n_" + QString(
"").setNum(i) +
142 "), the string: [" + str +
"]");
146 a_c = l.at(6).toDouble(&
isOk);
150 ": the file [" + fileName +
"]: failed to acquire info (a_c), the string: [" + str +
"]");
153 a_s = l.at(7).toDouble(&
isOk);
157 ": the file [" + fileName +
"]: failed to acquire info (a_s), the string: [" + str +
"]");
160 for (
int i=0; i<6; i++)
190 double arg, sarg, carg;
193 fundArgs[0] = fundArgs[1] = fundArgs[2] = fundArgs[3] = fundArgs[4] = fundArgs[5] = 0.0;
194 dUt1 = dPx = dPy = 0.0;
200 fundArgs[5] = t.
gmst() + M_PI;
201 if (2.0*M_PI < fundArgs[5])
202 fundArgs[5] -= 2.0*M_PI;
206 for (
int i=0; i<
numUt_; i++)
209 for (
int j=0; j<6; j++)
210 arg +=
utModel_[i].n_[j]*fundArgs[j];
211 sincos(arg, &sarg, &carg);
217 for (
int i=0; i<
numPm_; i++)
220 for (
int j=0; j<6; j++)
221 arg +=
pmModel_[i].n_[j]*fundArgs[j];
222 sincos(arg, &sarg, &carg);
void calcNutationFundArgs_IersConv2003(const SgMJD &tEpoch, double args[5])
virtual void write(LogLevel, quint32, const QString &, bool=false)
bool readFile(const QString &)
void calcCorrections(const SgMJD &, double &dUt1, double &dPx, double &dPy)
static const QString className()