28 #include <QtCore/QDataStream>
29 #include <QtCore/QDir>
30 #include <QtCore/QFile>
31 #include <QtCore/QRegExp>
32 #include <QtCore/QStringList>
33 #include <QtCore/QTextStream>
56 return "SgVlbiStationInfo";
115 "::int2mntType(): got unknown value of the axis type (" + QString(
"").setNum(iMnt) +
")");
124 #pragma GCC push_options
125 #pragma GCC optimize ("O0")
153 useOldEllipsoid =
false;
154 useOldEllipsoid =
true;
158 dF = 0.00335281068118;
163 dF = 0.0033528918690;
167 double dAEPS2, dE2, dE4T, dEP2, dEP, dAEP;
169 dAEPS2 = dE2 = dE4T = dEP2 = dEP = dAEP = 0.0;
172 dAEPS2 = dA*dA*1.0e-32;
192 longitude += M_PI*2.0;
198 double dABSZ, dP, dS0, dPN, dZP, dC0, dC02, dC03, dS02, dS03, dA02;
199 double dA0, dA03, dD0, dF0, dB0, dS1, dCP, dS12, dCP2;
201 dABSZ = dP = dS0 = dPN = dZP = dC0 = dC02 = dC03 = dS02 = dS03 = dA02 = 0.0;
202 dA0 = dA03 = dD0 = dF0 = dB0 = dS1 = dCP = dS12 = dCP2 = 0.0;
224 dD0 = dZP*dA03 + dE2*dS03;
225 dF0 = dPN*dA03 - dE2*dC03;
227 dB0 = dE4T*dS02*dC02*dPN*(dA0 - dEP);
228 dS1 = dD0*dF0 - dB0*dS0;
229 dCP = dEP*(dF0*dF0 - dB0*dC0);
231 latitude = atan(dS1/dCP);
234 height = (dP*dCP + dABSZ*dS1 - dA*sqrt(dEP2*dS12 + dCP2))/sqrt(dS12 + dCP2);
240 height = dABSZ - dAEP;
245 latitude = -latitude;
354 #pragma GCC pop_options
365 auxObservationByScan_(),
366 cableCalsOriginTxt_(
""),
367 meteoDataOriginTxt_(
""),
375 tsysIfPolarizations_(),
412 for (
int iWave=0; iWave<11; iWave++)
413 for (
int iCoord=0; iCoord<3; iCoord++)
418 for (
int i=0; i<6; i++)
447 QMap<QString, SgVlbiAuxObservation*>::iterator it;
469 QString prefix =
"Stn " +
getKey().leftJustified(8,
' ') +
": ";
537 if (!auxObsByScan.size())
540 ": calcCBEpochs4Export(): cannot determine the epoch, the size of auxObs map is zero");
547 QMap<QString, SgVlbiAuxObservation*>::const_iterator it;
548 for (it=auxObsByScan.begin(); it!=auxObsByScan.end(); ++it)
554 if (*obs<*pb && tLeft<*obs)
556 if (*pb<*obs && *obs<tRight)
563 SgMJD exportEpoch(tLeft);
564 exportEpoch += 0.5*(tRight - tLeft);
566 double d=exportEpoch.
getTime();
567 d = round(d*24.0*60.0)/24.0/60.0;
572 ": calcCBEpochs4Export(): station " +
name() +
": set up clock break epoch for export: " +
579 ": calcCBEpochs4Export(): cannot determine clock break epoch for export: tLeft: " +
620 ": checkAuxObs(): station " +
name() +
": the size of aux.obs's container is zero");
623 QMap<SgMJD, QString> scanByTime;
624 QMap<QString, SgVlbiAuxObservation*>::iterator
631 if (!scanByTime.contains(*auxObs))
632 scanByTime.insert(*auxObs, it.key());
635 QString scanName=scanByTime.value(*auxObs);
637 ": WARNING: the station " +
name() +
": contains different observations at the same epoch: " +
638 auxObs->
toString() +
"; the scans: " + scanName +
" and " + it.key(),
true);
641 if (!scanNameById.contains(it.key()))
644 ": the scan " + it.key() +
" was removed from the list of known scans of the station " +
678 if (s.status() != QDataStream::Ok)
681 ": saveIntermediateResults(): error writting data");
686 if (s.status() == QDataStream::Ok)
691 ": saveIntermediateResults(): error writting data idx#" + QString(
"").setNum(i));
695 if (s.status() == QDataStream::Ok)
701 ": saveIntermediateResults(): error writting data for the local clock parameter setup");
707 ": saveIntermediateResults(): error writting data for the local zenith parameter setup");
711 return s.status() == QDataStream::Ok;
720 double v, e, a_0, a_1;
725 s >> n >> v >> e >> a_0 >> a_1 >> is;
727 if (s.status() != QDataStream::Ok)
730 ": loadIntermediateResults(): error reading data: " +
731 (s.status()==QDataStream::ReadPastEnd?
"read past end of the file":
"read corrupt data"));
746 if (s.status() == QDataStream::Ok)
754 ": loadIntermediateResults(): error reading data idx#" + QString(
"").setNum(i) +
": " +
755 (s.status()==QDataStream::ReadPastEnd?
"read past end of the file":
"read corrupt data"));
761 if (s.status() != QDataStream::Ok)
764 ": loadIntermediateResults(): error reading clock breaks data: " +
765 (s.status()==QDataStream::ReadPastEnd?
"read past end of the file":
"read corrupt data"));
770 if (s.status() != QDataStream::Ok)
773 ": loadIntermediateResults(): error reading local clock parameter setup: " +
774 (s.status()==QDataStream::ReadPastEnd?
"read past end of the file":
"read corrupt data"));
779 if (s.status() != QDataStream::Ok)
782 ": loadIntermediateResults(): error reading local zenith parameter setup: " +
783 (s.status()==QDataStream::ReadPastEnd?
"read past end of the file":
"read corrupt data"));
787 return s.status()==QDataStream::Ok;
797 it.value()->resetCable();
809 it.value()->resetMeteo();
821 it.value()->resetTsys();
const Sg3dVector v3Zero(0.0, 0.0, 0.0)
const SgMJD tZero(1957, 10, 4)
const SgMJD tInf(2100, 1, 1)
#define MAX_NUMBER_OF_POLYNOMIALS
double at(DIRECTION i) const
bool isAttr(uint a) const
void createParameters(const QString &prefix)
bool loadIntermediateResults(QDataStream &)
bool saveIntermediateResults(QDataStream &) const
EccType getEccType() const
const Sg3dVector & getDR() const
virtual void write(LogLevel, quint32, const QString &, bool=false)
void setTime(double dTime)
@ F_YYYYMMDDHHMMSSSS
Long verbose: Fri, the 2nd of Apr, 2010; 17hr 02min 43.6400sec.
QString toString(Format format=F_Verbose) const
bool loadIntermediateResults(QDataStream &)
const QString & getKey() const
bool saveIntermediateResults(QDataStream &) const
@ Attr_PROCESSED
the observation has been processed;
void setEpoch4Export(const SgMJD &)
bool saveIntermediateResults(QDataStream &) const
bool loadIntermediateResults(QDataStream &)
double aPrioriClockTerm_0_
static const QString className()
void calcCBEpochs4Export(const QMap< QString, SgVlbiAuxObservation * > &)
double estWetZenithDelay_
static const int maxNumOfPolynomials_
double estWetZenithDelaySigma_
bool saveIntermediateResults(QDataStream &) const
SgParameter * pAxisOffset_
SgBreakModel clockBreaks_
QVector< QString > tsysIfIds_
bool need2useAPrioriClocks_
QString tectonicPlateName_
double oLoadAmplitudes_[11][3]
CableCalsOrigin cableCalsOrigin_
@ Attr_ESTIMATE_AXO
estimate axis offset;
@ Attr_HAS_CABLE_CAL
a station has cable calibration readings;
@ Attr_ESTIMATE_COO
estimate station position;
@ Attr_HAS_METEO
a station has meteo parameters;
SgParameter * pClocks_[MAX_NUMBER_OF_POLYNOMIALS]
MeteoDataOrigin meteoDataOrigin_
static int mntType2int(MountingType)
QVector< double > tsysIfFreqs_
double estClockModel_[MAX_NUMBER_OF_POLYNOMIALS]
bool loadIntermediateResults(QDataStream &)
double cableCalMultiplierDBCal_
QVector< QString > tsysIfSideBands_
double cableCalMultiplier_
static MountingType int2mntType(int)
double estClockModelSigmas_[MAX_NUMBER_OF_POLYNOMIALS]
SgParameter * pZenithDelay_
void checkAuxObs(const QMap< QString, QString > &scanNameById)
static void calcRLF(double &latitude, double &longitude, double &height, const Sg3dVector &r, bool useOldEllipsoid)
QVector< QString > tsysIfPolarizations_
double aPrioriClockTerm_1_
double oLoadPhases_[11][3]
SgVlbiStationInfo(int idx=-1, const QString &key="Unknown", const QString &aka="Unknown too")
QMap< QString, SgVlbiAuxObservation * > auxObservationByScan_