26 #include <QtCore/QDataStream>
27 #include <QtCore/QFile>
48 return "SgKombHeaderRecord";
56 std::cout <<
" HDentry #" <<
idx_
59 std::cout <<
" @ " <<
bandId_ <<
"-band\n";
69 s >> (qint16 &)record.
idx_
90 return "SgKombHeader";
98 std::cout <<
"HD #" <<
idx_
106 for (
int i=0; i<
entries_.size(); i++)
118 s >> (qint8 &)c1 >> (qint8 &)c2 >> (qint8 &)c3;
150 for (
int i=0; i<25; i++)
154 if (rec->prefix_[0] != 0)
181 return "SgKombOb01Record";
212 std::cout <<
" Stn1Coords: R=" <<
213 qPrintable(QString(
"").sprintf(
"(%12.3f, %12.3f, %12.3f)",
215 std::cout <<
" Stn2Coords: R=" <<
216 qPrintable(QString(
"").sprintf(
"(%12.3f, %12.3f, %12.3f)",
320 return "SgKombOb02Record";
328 std::cout <<
" OB02: prefix= " <<
prefix_
330 <<
", index table:\n";
332 for (
int i=0; i<16; i++)
334 for (
int j=0; j<2; j++)
349 s.skipRawData(4 + 8 + 8 + 32);
351 for (
int i=0; i<16; i++)
352 for (
int j=0; j<2; j++)
377 return "SgKombOb03Record";
385 std::cout <<
" OB03: prefix= " <<
prefix_ <<
"\n";
386 for (
int i=0; i<16; i++)
388 std::cout <<
" #" << i
403 for (
int i=0; i<16; i++)
405 for (
int i=0; i<16; i++)
430 return "SgKombBd01Record";
438 std::cout <<
" BD01: prefix= " <<
prefix_
452 for (
int i=0; i<16; i++)
454 std::cout <<
" #" << i
481 for (
int i=0; i<16; i++)
482 for (
int j=0; j<2; j++)
488 for (
int i=0; i<16; i++)
526 return "SgKombBd02Record";
534 std::cout <<
" BD02: prefix= " <<
prefix_
543 for (
int i=0; i<20; i++)
545 std::cout <<
" #" << i
558 std::cout <<
" searchWndCoarseDelay= ("
560 <<
" searchWndFineDelay= ("
562 <<
" searchWndFineDelayRate= ("
569 for (
int i=0; i<16; i++)
571 std::cout <<
" #" << i
588 for (
int i=0; i<20; i++)
594 for (
int i=0; i<16; i++)
595 for (
int j=0; j<2; j++)
638 return "SgKombBd03Record";
646 std::cout <<
" BD03: prefix= " <<
prefix_
653 << qPrintable(QString(
"").sprintf(
" phaseCalRate@1=%.28g phaseCalRate@2= %.28g",
657 for (
int i=0; i<16; i++)
659 std::cout <<
" #" << i
660 <<
" phaseCal: Amp&Phase @1: "
677 for (
int i=0; i<16; i++)
678 for (
int j=0; j<2; j++)
704 return "SgKombBd04Record";
712 std::cout <<
" BD04: prefix= " <<
prefix_
716 for (
int i=0; i<16; i++)
718 std::cout <<
" #" << i
719 <<
" phaseCal: Amp&Phase @2: "
736 for (
int i=0; i<16; i++)
737 for (
int j=0; j<2; j++)
763 return "SgKombBd05Record";
771 std::cout <<
" BD05: prefix= " <<
prefix_
799 for (
int i=0; i<16; i++)
801 std::cout <<
" #" << i
802 <<
" fringe Amp&Phase: "
828 for (
int i=0; i<16; i++)
829 for (
int j=0; j<2; j++)
855 return "SgKombReader";
870 for (
int i=0; i<
headers_.size(); i++)
901 f.open(QIODevice::ReadOnly);
903 s.setByteOrder(QDataStream::BigEndian);
904 #if QT_VERSION >= 0x040500
905 s.setVersion (QDataStream::Qt_4_5);
921 for (
int j=0; j<hd->
entries().size(); j++)
923 for (
int i=1; i<numOfHdRecs; i++)
930 for (
int j=0; j<hd->entries().size(); j++)
934 for (
int i=numOfHdRecs; i<
headRecs_.size() && !s.atEnd(); i++)
937 if (strcmp(entry->
prefix(),
"OB01")==0)
943 else if (strcmp(entry->
prefix(),
"OB02")==0)
949 else if (strcmp(entry->
prefix(),
"OB03")==0)
955 else if (strcmp(entry->
prefix(),
"BD01")==0)
965 "::readFile(): the BD01 record has been replaced with the new one");
973 else if (strcmp(entry->
prefix(),
"BD02")==0)
983 "::readFile(): the BD02 record has been replaced with the new one");
991 else if (strcmp(entry->
prefix(),
"BD03")==0)
1001 "::readFile(): the BD03 record has been replaced with the new one");
1009 else if (strcmp(entry->
prefix(),
"BD04")==0)
1019 "::readFile(): the BD04 record has been replaced with the new one");
1027 else if (strcmp(entry->
prefix(),
"BD05")==0)
1037 "::readFile(): the BD05 record has been replaced with the new one");
1056 "::readFile(): the OB01 record has wrong source name");
1062 "::readFile(): the OB01 record has wrong station1 name");
1068 "::readFile(): the OB01 record has wrong station1 name");
1074 "::readFile(): the OB02 record has zero number of channels");
1081 "::readFile(): the number of registered bands, " + QString(
"").setNum(
mapOfBands_.size()) +
1082 ", is not equal to the number of bands of BD01 records, " +
1089 "::readFile(): the number of registered bands, " + QString(
"").setNum(
mapOfBands_.size()) +
1090 ", is not equal to the number of bands of BD02 records, " +
1097 "::readFile(): the number of registered bands, " + QString(
"").setNum(
mapOfBands_.size()) +
1098 ", is not equal to the number of bands of BD03 records, " +
1105 "::readFile(): the number of registered bands, " + QString(
"").setNum(
mapOfBands_.size()) +
1106 ", is not equal to the number of bands of BD04 records, " +
1113 "::readFile(): the number of registered bands, " + QString(
"").setNum(
mapOfBands_.size()) +
1114 ", is not equal to the number of bands of BD05 records, " +
1123 "::readFile(): the " + it.key() +
"-band is missed in the set of bands of BD01 records");
1129 "::readFile(): the " + it.key() +
"-band is missed in the set of bands of BD02 records");
1135 "::readFile(): the " + it.key() +
"-band is missed in the set of bands of BD03 records");
1141 "::readFile(): the " + it.key() +
"-band is missed in the set of bands of BD04 records");
1147 "::readFile(): the " + it.key() +
"-band is missed in the set of bands of BD05 records");
#define RAD2DEG
< radians to degrees:
double at(DIRECTION i) const
short totalNumOfProcChannels_
const char * bandId() const
short idxNumTable_[16][2]
static const QString className()
double obsDelayAtCentrlEpoch_
float obsTotalPhaseAtReferEpoch_
const char * bandId() const
float obsTotalPhaseAtEarthCenterEpoch_
float effectiveIntegrationPeriod_
float searchWndFineDelayRate_[2]
char errorStatusMaskCode_[20][5]
float obsResidPhaseAtEarthCenterEpoch_
float searchWndCoarseDelay_[2]
short procPpNumTable_[16][2]
static const QString className()
float obsTotalPhaseAtCentrlEpoch_
short epochObsCentral_[6]
double obsDelayRateAtCentrlEpoch_
const char * errorStatusMaskCode(int i) const
float searchWndFineDelay_[2]
static const QString className()
float phaseCalAmpPhase1_[16][2]
const char * bandId() const
const char * bandId() const
static const QString className()
float phaseCalAmpPhase2_[16][2]
double obsCoarseDelayAtReferEpoch_
double obsDelayAtReferEpoch_
double phaseDelayAtReferEpochMinus_1sec_
float coarseSearchFringeAmplitude_
float fineSearchFringeAmplitude_
float obsCoarseDelaySigma_
float incohFringeAmplitude_
double phaseDelayAtReferEpochPlus_1sec_
double obsDelayRateAtReferEpoch_
static const QString className()
double obsCoarseDelayResid_
float falseDetectionProbability_
double obsDelayRateResid_
float fringeAmpPhase_[16][2]
double obsCoarseDelayRateResid_
double phaseDelayAtReferEpoch_
const char * bandId() const
char correlatorFileName_[7]
double instrumentalDelay_
const char * station1Name() const
double aPrioriClockError_
const char * station2Name() const
const char * sourceName() const
static const QString className()
double aPrioriClockOffset_
short idxNumTable_[16][2]
static const QString className()
short numOfChannels() const
static const QString className()
QMap< QString, SgKombBd04Record * > bd04ByBand_
QMap< QString, SgKombBd05Record * > bd05ByBand_
static const QString className()
const SgKombBd03Record * bd03(const QString &bandKey) const
QMap< QString, SgKombBd02Record * > bd02ByBand_
const SgKombBd04Record * bd04(const QString &bandKey) const
const SgKombBd05Record * bd05(const QString &bandKey) const
QMap< QString, SgKombBd03Record * > bd03ByBand_
const SgKombBd01Record * bd01(const QString &bandKey) const
const SgKombBd02Record * bd02(const QString &bandKey) const
QMap< QString, QString > mapOfBands_
void readFile(const QString &fileName)
QList< SgKombHeaderRecord * > headRecs_
QList< SgKombHeader * > headers_
QMap< QString, SgKombBd01Record * > bd01ByBand_
virtual void write(LogLevel, quint32, const QString &, bool=false)
QString toString(Format format=F_Verbose) const
void setUpEpoch(int year, int month, int day, int hour, int min, double sec)
static QString dn2String(double dn, bool mandatorySign=false)
static QString ra2String(double ra)