- Timestamp:
- Feb 13, 2025, 9:50:06 AM (3 days ago)
- Location:
- trunk/BNC/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncclockrinex.cpp
r9908 r10608 47 47 if (reopen(GPSweek, GPSweeks) == success) { 48 48 49 QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks); 50 double sec = fmod(GPSweeks, 60.0); 49 bncTime epoTime(GPSweek, GPSweeks); 51 50 52 int numValues = 1; 53 if (clkRnxSig && clkRnxRate && clkRnxRateSig) { 54 numValues += 3; 55 } 56 if (clkRnxAcc && clkRnxAccSig) { 57 numValues += 2; 51 if (epoTime != _lastEpoTime) { 52 53 // print out epoch before 54 if (_lastEpoTime.valid()) { 55 _out << _oStr.str(); 56 if (_lastEpoTime.daysec() != 0.0) { 57 _oStr.str(std::string()); 58 } 58 59 } 59 60 60 _out << "AS " << prn.toLatin1().data() 61 << datTim.toString(" yyyy MM dd hh mm").toLatin1().data() 62 << fixed << setw(10) << setprecision(6) << sec 63 << " " << numValues << " " 64 << fortranFormat(clkRnx, 19, 12).toLatin1().data(); 61 _lastEpoTime = epoTime; 62 } 65 63 66 if (numValues >=2) { 67 _out << " " << fortranFormat(clkRnxSig, 19, 12).toLatin1().data() << endl; 68 } 69 if (numValues == 4) { 70 _out << fortranFormat(clkRnxRate, 19, 12).toLatin1().data() << " "; 71 _out << fortranFormat(clkRnxRateSig, 19, 12).toLatin1().data() << " "; 72 } 73 if (numValues == 6) { 74 _out << fortranFormat(clkRnxAcc, 19, 12).toLatin1().data() << " "; 75 _out << " " << fortranFormat(clkRnxAccSig, 19, 12).toLatin1().data(); 76 } 77 _out << endl; 64 int numValues = 1; 65 if (clkRnxSig && clkRnxRate && clkRnxRateSig) { 66 numValues += 3; 67 } 68 if (clkRnxAcc && clkRnxAccSig) { 69 numValues += 2; 70 } 71 72 _oStr << "AS " << prn.toLatin1().data() 73 << " " << epoTime.datestr(' ') << ' ' << epoTime.timestr(6, ' ') 74 << " " << numValues << " " 75 << fortranFormat(clkRnx, 19, 12).toLatin1().data(); 76 77 if (numValues >=2) { 78 _oStr << " " << fortranFormat(clkRnxSig, 19, 12).toLatin1().data() << endl; 79 } 80 if (numValues == 4) { 81 _oStr << fortranFormat(clkRnxRate, 19, 12).toLatin1().data() << " "; 82 _oStr << fortranFormat(clkRnxRateSig, 19, 12).toLatin1().data() << " "; 83 } 84 if (numValues == 6) { 85 _oStr << fortranFormat(clkRnxAcc, 19, 12).toLatin1().data() << " "; 86 _oStr << " " << fortranFormat(clkRnxAccSig, 19, 12).toLatin1().data(); 87 } 88 _oStr << endl; 78 89 79 90 return success; -
trunk/BNC/src/bncclockrinex.h
r9651 r10608 18 18 private: 19 19 virtual void writeHeader(const QDateTime& datTim); 20 std::ostringstream _oStr; 21 bncTime _lastEpoTime; 20 22 }; 21 23 -
trunk/BNC/src/bncoutf.cpp
r10375 r10608 187 187 QString newFileName = resolveFileName(GPSweek, datTim); 188 188 189 bool wait = false; 190 if (isProductFile() && 191 datTim.time().hour() == 0 && 192 datTim.time().minute() == 0 && 193 (datTim.time().second() == 0.0 || datTim.time().second() == _sampl)) { 194 wait = true; 195 } 196 189 197 // Close the file 190 198 // -------------- 191 if (newFileName != _fName ) {199 if (newFileName != _fName && !wait) { 192 200 closeFile(); 193 201 _headerWritten = false; … … 226 234 return QString("%1").arg(_sklBaseName.left(3)); 227 235 } 236 237 // Files with epoch 00:00:00 at begin and end 238 //////////////////////////////////////////////////////////////////////////// 239 bool bncoutf::isProductFile() { 240 bool isProduct = false; 241 242 if (_extension.contains("SP3")) { 243 isProduct = true; 244 } 245 if (_extension.contains("CLK")) { 246 isProduct = true; 247 } 248 249 return isProduct; 250 } 251 252 -
trunk/BNC/src/bncoutf.h
r9783 r10608 15 15 t_irc write(int GPSweek, double GPSweeks, const QString& str); 16 16 QString agencyFromFileName(); 17 bool isProductFile(); 17 18 protected: 18 19 virtual t_irc reopen(int GPSweek, double GPSweeks); -
trunk/BNC/src/bncsp3.cpp
r10578 r10608 74 74 if (epoTime != _lastEpoTime) { 75 75 76 // Check the sampling interval (print empty epochs) 77 // ------------------------------------------------ 78 if (_lastEpoTime.valid() && _sampl > 0) { 79 for (bncTime ep = _lastEpoTime +_sampl; ep < epoTime; ep = ep +_sampl) { 80 _out << "\n* " << ep.datestr(' ') << ' ' << ep.timestr(8, ' '); 76 // print out epoch before 77 if (_lastEpoTime.valid()) { 78 _out << _oStr.str(); 79 if (_lastEpoTime.daysec() != 0.0) { 80 _oStr.str(std::string()); 81 } 82 // Check the sampling interval (print empty epochs) 83 // ------------------------------------------------ 84 if (_sampl > 0) { 85 for (bncTime ep = _lastEpoTime +_sampl; ep < epoTime; ep = ep +_sampl) { 86 _oStr << "\n* " << ep.datestr(' ') << ' ' << ep.timestr(8, ' '); 87 } 81 88 } 82 89 } … … 84 91 // Print the new epoch 85 92 // ------------------- 86 _o ut<< "\n* " << epoTime.datestr(' ') << ' ' << epoTime.timestr(8, ' ');93 _oStr << "\n* " << epoTime.datestr(' ') << ' ' << epoTime.timestr(8, ' '); 87 94 88 95 _lastEpoTime = epoTime; 89 96 } 90 97 91 _o ut<< "\nP" << prn.toLatin1().data()98 _oStr << "\nP" << prn.toLatin1().data() 92 99 << setw(14) << setprecision(6) << xCoM(1) / 1000.0 // [km] 93 100 << setw(14) << setprecision(6) << xCoM(2) / 1000.0 // [km] … … 96 103 97 104 if (sp3ClkRate) { 98 _o ut<< "\nV" << prn.toLatin1().data()105 _oStr << "\nV" << prn.toLatin1().data() 99 106 << setw(14) << setprecision(6) << v(1) * 10.0 // [dm/s] 100 107 << setw(14) << setprecision(6) << v(2) * 10.0 // [dm/s] … … 177 184 << "/* \n" 178 185 << "/* \n" 179 << "/* \n";186 << "/* "; 180 187 } 181 188 -
trunk/BNC/src/bncsp3.h
r8483 r10608 56 56 virtual void closeFile(); 57 57 58 e_inpOut _inpOut; 59 bncTime _lastEpoTime; 60 std::ifstream _stream; 61 std::string _lastLine; 62 t_sp3Epoch* _currEpoch; 63 t_sp3Epoch* _prevEpoch; 58 e_inpOut _inpOut; 59 bncTime _lastEpoTime; 60 std::ifstream _stream; 61 std::string _lastLine; 62 t_sp3Epoch* _currEpoch; 63 t_sp3Epoch* _prevEpoch; 64 std::ostringstream _oStr; 64 65 }; 65 66
Note:
See TracChangeset
for help on using the changeset viewer.