Changeset 7521 in ntrip
- Timestamp:
- Oct 19, 2015, 12:53:07 PM (9 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncantex.cpp
r7145 r7521 35 35 * Created: 26-Jan-2011 36 36 * 37 * Changes: 37 * Changes: 38 38 * 39 39 * -----------------------------------------------------------------------*/ … … 68 68 } 69 69 70 // Print 70 // Print 71 71 //////////////////////////////////////////////////////////////////////////// 72 72 void bncAntex::print() const { … … 90 90 } 91 91 92 // Print 93 //////////////////////////////////////////////////////////////////////////// 94 QString bncAntex::pcoSinexString(const std::string& antName, t_frequency::type frqType) { 95 96 if (antName.find("NULLANTENNA") != string::npos) { 97 QString(); 98 } 99 100 QString antNameQ = antName.c_str(); 101 102 if (_maps.find(antNameQ) == _maps.end()) { 103 QString(); 104 } 105 106 t_antMap* map = _maps[antNameQ]; 107 if (map->frqMap.find(frqType) == map->frqMap.end()) { 108 return QString(); 109 } 110 111 t_frqMap* frqMap = map->frqMap[frqType]; 112 113 return QString("%1 %2 %3").arg(frqMap->neu[2], 6, 'f', 4) 114 .arg(frqMap->neu[0], 6, 'f', 4) 115 .arg(frqMap->neu[1], 6, 'f', 4); 116 } 117 92 118 // Read ANTEX File 93 119 //////////////////////////////////////////////////////////////////////////// … … 104 130 while ( !in.atEnd() ) { 105 131 QString line = in.readLine(); 106 132 107 133 // Start of Antenna 108 134 // ---------------- … … 116 142 newAntMap = new t_antMap(); 117 143 } 118 } 144 } 119 145 120 146 // End of Antenna … … 152 178 else if (line.indexOf("ZEN1 / ZEN2 / DZEN") == 60) { 153 179 QTextStream inLine(&line, QIODevice::ReadOnly); 154 inLine >> newAntMap->zen1 >> newAntMap->zen2 >> newAntMap->dZen; 180 inLine >> newAntMap->zen1 >> newAntMap->zen2 >> newAntMap->dZen; 155 181 } 156 182 … … 271 297 // Satellite Antenna Offset 272 298 //////////////////////////////////////////////////////////////////////////// 273 t_irc bncAntex::satCoMcorrection(const QString& prn, double Mjd, 299 t_irc bncAntex::satCoMcorrection(const QString& prn, double Mjd, 274 300 const ColumnVector& xSat, ColumnVector& dx) { 275 301 … … 297 323 ColumnVector xSun = BNC_PPP::t_astro::Sun(Mjd); 298 324 xSun /= sqrt(DotProduct(xSun,xSun)); 299 325 300 326 ColumnVector sy = crossproduct(sz, xSun); 301 327 sy /= sqrt(DotProduct(sy,sy)); 302 328 303 329 ColumnVector sx = crossproduct(sy, sz); 304 330 … … 314 340 } 315 341 316 // 342 // 317 343 //////////////////////////////////////////////////////////////////////////// 318 344 double bncAntex::rcvCorr(const string& antName, t_frequency::type frqType, -
trunk/BNC/src/bncantex.h
r6405 r7521 37 37 bncAntex(); 38 38 ~bncAntex(); 39 t_irc readFile(const QString& fileName); 40 void print() const; 41 double rcvCorr(const std::string& antName, t_frequency::type frqType, 42 double eleSat, double azSat, bool& found) const; 43 t_irc satCoMcorrection(const QString& prn, double Mjd, 44 const ColumnVector& xSat, ColumnVector& dx); 39 t_irc readFile(const QString& fileName); 40 void print() const; 41 QString pcoSinexString(const std::string& antName, t_frequency::type frqType); 42 double rcvCorr(const std::string& antName, t_frequency::type frqType, 43 double eleSat, double azSat, bool& found) const; 44 t_irc satCoMcorrection(const QString& prn, double Mjd, 45 const ColumnVector& xSat, ColumnVector& dx); 45 46 46 47 private: -
trunk/BNC/src/bncsinextro.cpp
r6658 r7521 30 30 int sampl) 31 31 : bncoutf(sklFileName, intr, sampl) { 32 32 33 _opt = opt; 33 34 (!sampl) ? _sampl = 1 : _sampl = sampl; 35 36 if (!_opt->_antexFileName.empty()) { 37 _antex = new bncAntex(_opt->_antexFileName.c_str()); 38 } 39 else { 40 _antex = 0; 41 } 34 42 } 35 43 … … 38 46 bncSinexTro::~bncSinexTro() { 39 47 closeFile(); 48 if (_antex) 49 delete _antex; 40 50 } 41 51 … … 45 55 int GPSWeek; 46 56 double GPSWeeks; 57 bncSettings settings; 47 58 GPSweekFromDateAndTime(datTim, GPSWeek, GPSWeeks); 48 59 int daysec = int(fmod(GPSWeeks, 86400.0)); … … 58 69 .arg(84600 , 5, 10); 59 70 60 61 _out << "%=TRO 0.01 BNC " << creationTime.toStdString() << " BNC " 71 QString intStr = settings.value("PPP/snxtroIntr").toString(); 72 int intr, indHlp = 0; 73 if ((indHlp = intStr.indexOf("min")) != -1) { 74 intr = intStr.left(indHlp-1).toInt(); 75 intr *= 60; 76 } 77 else if ((indHlp = intStr.indexOf("hour")) != -1) { 78 intr = intStr.left(indHlp-1).toInt(); 79 intr *= 3600; 80 } 81 else if ((indHlp = intStr.indexOf("day")) != -1) { 82 intr = intStr.left(indHlp-1).toInt(); 83 intr *= 86400; 84 } 85 86 87 QString numberOfEpochs = QString("%1").arg(intr/_sampl, 5, 10, QLatin1Char('0')); 88 _out << "%=TRO 2.00 BNC " << creationTime.toStdString() << " BNC " 62 89 << startTime.toStdString() << " " << endTime.toStdString() << " P " 63 << _opt->_roverName.substr(0,4)<< endl;90 << numberOfEpochs.toStdString() << " 0 " << " T " << endl; 64 91 65 92 … … 68 95 _out << " OUTPUT " << "Total Troposphere Zenith Path Delay Product" << endl; 69 96 _out << " SOFTWARE " << BNCPGMNAME << endl; 70 _out << " HARDWARE " << BNC_OS << endl;71 97 _out << " INPUT " << "Orbit and Clock information used from BRDC and RTCM-SSR streams" << endl; 72 98 _out << "-FILE/REFERENCE" << endl << endl; 99 100 101 _out << "+SITE/ID" << endl; 102 _out << "-SITE/ID" << endl << endl; 103 104 105 _out << "+SITE/RECEIVER" << endl; 106 _out << "*SITE PT SOLN T DATA_START__ DATA_END____ DESCRIPTION_________ S/N__ FIRMWARE___" << endl; 107 _out << " " << _opt->_roverName.substr(0,4) << " A 1 P " 108 << startTime.toStdString() << " " << endTime.toStdString() << " " << _opt->_recNameRover << endl; 109 _out << "-SITE/RECEIVER" << endl << endl; 110 111 112 _out << "+SITE/ANTENNA" << endl; 113 _out << "*SITE PT SOLN T DATA_START__ DATA_END____ DESCRIPTION_________ S/N__" << endl; 114 _out << " " << _opt->_roverName.substr(0,4) << " A 1 P " 115 << startTime.toStdString() << " " << endTime.toStdString() << " " << _opt->_antNameRover << endl; 116 _out << "-SITE/ANTENNA" << endl << endl; 117 118 if (_antex) { 119 if (_opt->_LCsGPS.size()) { 120 _out << "+SITE/GPS_PHASE_CENTER" << endl; 121 _out << "* UP____ NORTH_ EAST__ UP____ NORTH_ EAST__ " << endl; 122 _out << "*DESCRIPTION_________ S/N__ L1->ARP(M)__________ __L2->ARP(M)________ AZ_EL_____" << endl; 123 _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString() 124 << " " 125 << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::G1).toStdString() 126 << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::G2).toStdString() 127 << endl; 128 _out << "-SITE/GPS_PHASE_CENTER" << endl << endl; 129 } 130 if (_opt->_LCsGLONASS.size()) { 131 _out << "+SITE/GLONASS_PHASE_CENTER" << endl; 132 _out << "* UP____ NORTH_ EAST__ UP____ NORTH_ EAST__ " << endl; 133 _out << "*DESCRIPTION_________ S/N__ L1->ARP(M)__________ __L2->ARP(M)________ AZ_EL_____" << endl; 134 _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString() 135 << " " 136 << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::R1).toStdString() 137 << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::R2).toStdString() 138 << endl; 139 _out << "-SITE/GLONASS_PHASE_CENTER" << endl << endl; 140 } 141 if (_opt->_LCsGalileo.size()) { 142 _out << "+SITE/GALILEO_PHASE_CENTER" << endl; 143 _out << "* UP____ NORTH_ EAST__ UP____ NORTH_ EAST__ " << endl; 144 _out << "*DESCRIPTION_________ S/N__ L1->ARP(M)__________ __L2->ARP(M)________ AZ_EL_____" << endl; 145 _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString() 146 << " " 147 << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::E1).toStdString() 148 << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::E5).toStdString() 149 << endl; 150 _out << "-SITE/GALILEO_PHASE_CENTER" << endl << endl; 151 } 152 if (_opt->_LCsBDS.size()) { 153 _out << "+SITE/BEIDOU_PHASE_CENTER" << endl; 154 _out << "* UP____ NORTH_ EAST__ UP____ NORTH_ EAST__ " << endl; 155 _out << "*DESCRIPTION_________ S/N__ L1->ARP(M)__________ __L2->ARP(M)________ AZ_EL_____" << endl; 156 _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString() 157 << " " 158 << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::C2).toStdString() 159 << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::C7).toStdString() 160 << endl; 161 _out << "-SITE/BEIDOU_PHASE_CENTER" << endl << endl; 162 } 163 } 164 165 _out << "+SITE/ECCENTRICITY" << endl; 166 _out << "* UP______ NORTH___ EAST____" << endl; 167 _out << "*SITE PT SOLN T DATA_START__ DATA_END____ AXE ARP->BENCHMARK(M)_________" << endl; 168 _out << " " << _opt->_roverName.substr(0,4) << " A 1 P " 169 << startTime.toStdString() << " " << endTime.toStdString() << " " << " UNE" 170 << QString("%1").arg(_opt->_neuEccRover(3), 9, 'f', 4, QLatin1Char(' ')).toStdString() 171 << QString("%1").arg(_opt->_neuEccRover(1), 9, 'f', 4, QLatin1Char(' ')).toStdString() 172 << QString("%1").arg(_opt->_neuEccRover(2), 9, 'f', 4, QLatin1Char(' ')).toStdString() << endl; 173 _out << "-SITE/ANTENNA" << endl << endl; 174 175 176 _out << "+TROP/COORDINATES" << endl; 177 _out << "*SITE PT SOLN T __STA_X_____ __STA_Y_____ __STA_Z_____ SYSTEM REMRK" << endl; 178 _out << " " << _opt->_roverName.substr(0,4) << " A 1 P" 179 << QString("%1").arg(_opt->_xyzAprRover(1), 13, 'f', 3, QLatin1Char(' ')).toStdString() 180 << QString("%1").arg(_opt->_xyzAprRover(2), 13, 'f', 3, QLatin1Char(' ')).toStdString() 181 << QString("%1").arg(_opt->_xyzAprRover(3), 13, 'f', 3, QLatin1Char(' ')).toStdString() 182 << " ITRF08"<< endl; 183 _out << "-TROP/COORDINATES"<< endl << endl; 73 184 74 185 … … 86 197 87 198 88 _out << "+TROP/STA_COORDINATES" << endl;89 _out << "*SITE PT SOLN T STA_X_______ STA_Y_______ STA_Z_______ SYSTEM REMARK" << endl;90 _out << " " << _opt->_roverName.substr(0,4) << " A 1 P "91 << setw(12) << setprecision(3) << _opt->_xyzAprRover(1) << " "92 << setw(12) << setprecision(3) << _opt->_xyzAprRover(2) << " "93 << setw(12) << setprecision(3) << _opt->_xyzAprRover(3) << " ITRF08" << endl;94 _out << "-TROP/STA_COORDINATES" << endl << endl;95 96 97 199 _out << "+TROP/SOLUTION" << endl; 98 200 _out << "*SITE EPOCH_______ TROTOT STDEV" << endl; -
trunk/BNC/src/bncsinextro.h
r6653 r7521 10 10 #include "bncversion.h" 11 11 #include "pppOptions.h" 12 #include "bncsettings.h" 13 #include "bncantex.h" 12 14 13 15 using namespace BNC_PPP; … … 26 28 virtual void closeFile(); 27 29 QString _roverName; 28 int 30 int _sampl; 29 31 const t_pppOptions* _opt; 32 bncAntex* _antex; 33 double _antPCO[t_frequency::max]; 30 34 }; 31 35 -
trunk/BNC/src/pppOptions.h
r7048 r7521 32 32 std::string _corrFile; 33 33 double _corrWaitTime; 34 std::string _roverName; 34 std::string _roverName; 35 35 ColumnVector _xyzAprRover; 36 36 ColumnVector _neuEccRover; 37 std::string _antNameRover; 38 std::string _antexFileName; 37 std::string _recNameRover; 38 std::string _antNameRover; 39 std::string _antexFileName; 39 40 double _sigmaC1; 40 41 double _sigmaL1;
Note:
See TracChangeset
for help on using the changeset viewer.