Changeset 8483 in ntrip
- Timestamp:
- Sep 17, 2018, 2:53:30 PM (6 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_SSR_I/pppClient.cpp
r8368 r8483 408 408 bncTime ToT = satData->tt - prange / t_CST::c - clkSat; 409 409 410 ColumnVector xc( 4);410 ColumnVector xc(7); 411 411 ColumnVector vv(3); 412 412 if (getSatPos(ToT, satData->prn, xc, vv) != success) { -
trunk/BNC/src/RTCM/rtcm_utils.cpp
r6139 r8483 10 10 11 11 void resolveEpoch (double secsHour, 12 int refWeek, double refSecs, 12 int refWeek, double refSecs, 13 13 int& epochWeek, double& epochSecs) { 14 14 15 const double secsPerWeek = 604800.0; 15 const double secsPerWeek = 604800.0; 16 16 17 17 epochWeek = refWeek; 18 18 epochSecs = secsHour + 3600.0*(floor((refSecs-secsHour)/3600.0+0.5)); 19 19 20 20 if (epochSecs<0 ) { epochWeek--; epochSecs+=secsPerWeek; }; 21 21 if (epochSecs>secsPerWeek) { epochWeek++; epochSecs-=secsPerWeek; }; … … 29 29 double& xSat, double& ySat, double& zSat, double& clkSat) { 30 30 31 const double omega_earth = 7292115.1467e-11; 32 const double secsPerWeek = 604800.0; 31 const double omega_earth = 7292115.1467e-11; 32 const double secsPerWeek = 604800.0; 33 33 34 34 // Initial values 35 35 // -------------- 36 36 rho = 0.0; 37 ColumnVector xc( 4);37 ColumnVector xc(7); 38 38 ColumnVector vv(3); 39 39 eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false); … … 45 45 ////cout << "----- cmpRho -----\n"; 46 46 ////eph->print(cout); 47 ////cout << " pos " << setw(4) << GPSWeek 47 ////cout << " pos " << setw(4) << GPSWeek 48 48 //// << " " << setw(14) << setprecision(6) << GPSWeeks 49 49 //// << " " << setw(13) << setprecision(3) << xSat … … 57 57 do { 58 58 rhoLast = rho; 59 59 60 60 // Correction station position due to Earth Rotation 61 61 // ------------------------------------------------- 62 62 double dPhi = omega_earth * rho / c_light; 63 double xRec = stax * cos(dPhi) - stay * sin(dPhi); 64 double yRec = stay * cos(dPhi) + stax * sin(dPhi); 63 double xRec = stax * cos(dPhi) - stay * sin(dPhi); 64 double yRec = stay * cos(dPhi) + stax * sin(dPhi); 65 65 double zRec = staz; 66 66 … … 81 81 GPSWeek_tot += 1; 82 82 } 83 83 84 84 eph->getCrd(bncTime(GPSWeek_tot, GPSWeeks_tot), xc, vv, false); 85 85 xSat = xc(1); … … 94 94 rho = sqrt(dx*dx + dy*dy + dz*dz); 95 95 96 ////cout << " scrd " << setw(4) << GPSWeek_tot 96 ////cout << " scrd " << setw(4) << GPSWeek_tot 97 97 //// << " " << setw(15) << setprecision(8) << GPSWeeks_tot 98 98 //// << " " << setw(13) << setprecision(3) << xSat … … 108 108 //// << " rho " << setw(13) << setprecision(3) << rho 109 109 //// << endl; 110 110 111 111 112 112 ////cout.setf(ios::fixed); 113 113 //// 114 ////cout << "niter " << setw(3) << ++niter 114 ////cout << "niter " << setw(3) << ++niter 115 115 //// << " " << setw(14) << setprecision(3) << rhoLast 116 116 //// << " " << setw(14) << setprecision(3) << rho -
trunk/BNC/src/bncclockrinex.cpp
r8204 r8483 41 41 //////////////////////////////////////////////////////////////////////////// 42 42 t_irc bncClockRinex::write(int GPSweek, double GPSweeks, const QString& prn, 43 double sp3Clk) { 43 double clkRnx, double clkRnxRate, double clkRnxAcc, 44 double clkRnxSig, double clkRnxRateSig, double clkRnxAccSig) { 44 45 45 46 if (reopen(GPSweek, GPSweeks) == success) { … … 48 49 double sec = fmod(GPSweeks, 60.0); 49 50 51 int numValues = 1; 52 if (clkRnxSig && clkRnxRate && clkRnxRateSig) { 53 numValues += 3; 54 } 55 if (clkRnxAcc && clkRnxAccSig) { 56 numValues += 2; 57 } 58 50 59 _out << "AS " << prn.toLatin1().data() 51 60 << datTim.toString(" yyyy MM dd hh mm").toLatin1().data() 52 61 << fixed << setw(10) << setprecision(6) << sec 53 << " 1 " << fortranFormat(sp3Clk, 19, 12).toLatin1().data() << endl; 62 << " " << numValues << " " 63 << fortranFormat(clkRnx, 19, 12).toLatin1().data(); 64 65 if (numValues >=2) { 66 _out << " " << fortranFormat(clkRnxSig, 19, 12).toLatin1().data() << endl; 67 } 68 if (numValues == 4) { 69 _out << fortranFormat(clkRnxRate, 19, 12).toLatin1().data() << " "; 70 _out << fortranFormat(clkRnxRateSig, 19, 12).toLatin1().data() << " "; 71 } 72 if (numValues == 6) { 73 _out << fortranFormat(clkRnxAcc, 19, 12).toLatin1().data() << " "; 74 _out << " " << fortranFormat(clkRnxAccSig, 19, 12).toLatin1().data(); 75 } 76 _out << endl; 54 77 55 78 return success; -
trunk/BNC/src/bncclockrinex.h
r8252 r8483 4 4 #include <fstream> 5 5 #include <newmat.h> 6 7 #include <QDateTime> 6 #include <QtCore> 8 7 9 8 #include "bncoutf.h" … … 13 12 bncClockRinex(const QString& sklFileName, const QString& intr, int sampl); 14 13 virtual ~bncClockRinex(); 15 virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 16 double sp3Clk); 14 virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 15 double clkRnx, double clkRnxRate, double clkRnxAcc, 16 double clkRnxSig, double clkRnxRateSig, double clkRnxAccSig); 17 17 18 18 private: -
trunk/BNC/src/bncephuser.cpp
r8368 r8483 187 187 // Simple Check - check satellite radial distance 188 188 // ---------------------------------------------- 189 ColumnVector xc( 4);189 ColumnVector xc(7); 190 190 ColumnVector vv(3); 191 191 if (eph->getCrd(eph->TOC(), xc, vv, false) != success) { -
trunk/BNC/src/bnchelp.html
r8468 r8483 4016 4016 <table> 4017 4017 <tr><td><i>Key </i></td><td><i>Values</i></td></tr> 4018 <tr><td>APC</td><td>Satellite Antenna Phase Center coordinates in meters</td></tr> 4019 <tr><td>Clk</td><td>Satellite clock correction in meters, relativistic correction applied like in broadcast clocks</td></tr> 4020 <tr><td>Vel</td><td>Satellite velocity in meters per second</td></tr> 4021 <tr><td>CoM</td><td>Satellite Center of Mass coordinates in meters</td></tr> 4018 <tr><td>APC</td><td>Satellite Antenna Phase Center coordinate components in meters</td></tr> 4019 <tr><td>Clk</td><td>Satellite clock correction components in meters, meters per seconds and meters per sec² (relativistic correction applied like in broadcast clocks)</td></tr> 4020 <tr><td>ClkSig</td><td>Standard deviation for satellite clock correction components in meters, meters per seconds and meters per sec² (required for Clock RINEX file only) /td></tr> 4021 <tr><td>Vel</td><td>Satellite velocity components in meters per second</td></tr> 4022 <tr><td>CoM</td><td>Satellite Center of Mass coordinate components in meters</td></tr> 4023 <tr><td>Ura</td><td>User range accuracy value in meters</td></tr> 4022 4024 <tr><td>CodeBias</td><td>Satellite Code Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3 and preceded by total number of biases</td></tr> 4023 <tr><td>YawAngle</td><td>Satellite Yaw Angle in radian, restricted to be in [0, 2π] which shall be used for the computation of phase wind-up correction</td></tr> 4025 <tr><td>PhaseBias</td><td>Satellite Phase Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3, preceded by total number of biases and followed by Signal Integer Indicator, Signals Wilde-Lane Integer Indicator as well as Signal Discontinuity Counter</td></tr> 4026 <tr><td>YawAngle</td><td>Satellite Yaw Angle in radian, restricted to be in [0, 2π], which shall be used for the computation of phase wind-up correction</td></tr> 4024 4027 <tr><td>YawRate</td><td>Satellite Yaw Rate in radian per second which is the rate of Yaw Angle</td></tr> 4025 <tr><td>PhaseBias</td><td>Satellite Phase Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3, preceded by total number of biases and followed by Signal Integer Indicator, Signals Wilde-Lane Integer Indicator as well as Signal Discontinuity Counter</td></tr>4026 4028 </table> 4027 4029 <p> -
trunk/BNC/src/bncsp3.cpp
r8204 r8483 64 64 //////////////////////////////////////////////////////////////////////////// 65 65 t_irc bncSP3::write(int GPSweek, double GPSweeks, const QString& prn, 66 const ColumnVector& xCoM, double sp3Clk) { 66 const ColumnVector& xCoM, double sp3Clk, 67 const ColumnVector& v, double sp3ClkRate) { 67 68 68 69 if (reopen(GPSweek, GPSweeks) == success) { … … 88 89 89 90 _out << "P" << prn.toLatin1().data() 90 << setw(14) << setprecision(6) << xCoM(1) / 1000.0 91 << setw(14) << setprecision(6) << xCoM(2) / 1000.0 92 << setw(14) << setprecision(6) << xCoM(3) / 1000.0 93 << setw(14) << setprecision(6) << sp3Clk * 1e6 << endl; 94 91 << setw(14) << setprecision(6) << xCoM(1) / 1000.0 // [km] 92 << setw(14) << setprecision(6) << xCoM(2) / 1000.0 // [km] 93 << setw(14) << setprecision(6) << xCoM(3) / 1000.0 // [km] 94 << setw(14) << setprecision(6) << sp3Clk * 1e6 // microseconds 95 << endl; 96 97 if (sp3ClkRate) { 98 _out << "V" << prn.toLatin1().data() 99 << setw(14) << setprecision(6) << v(1) * 10.0 // [dm/s] 100 << setw(14) << setprecision(6) << v(2) * 10.0 // [dm/s] 101 << setw(14) << setprecision(6) << v(3) * 10.0 // [dm/s] 102 << setw(14) << setprecision(6) << sp3ClkRate * 1e2 // 10^⁻4 microseconds/sec 103 << endl; 104 } 95 105 return success; 96 106 } -
trunk/BNC/src/bncsp3.h
r6351 r8483 16 16 public: 17 17 t_sp3Sat() { 18 _xyz.ReSize(3); 18 _xyz.ReSize(3); 19 19 _xyz = 0.0; 20 20 _clk = 0.0; … … 43 43 bncSP3(const QString& sklFileName, const QString& intr, int sampl); // output 44 44 virtual ~bncSP3(); 45 t_irc write(int GPSweek, double GPSweeks, const QString& prn, 46 const ColumnVector& xCoM, double sp3Clk); 45 t_irc write(int GPSweek, double GPSweeks, const QString& prn, 46 const ColumnVector& xCoM, double sp3Clk, 47 const ColumnVector& v, double sp3ClkRate); 47 48 const t_sp3Epoch* nextEpoch(); 48 49 const t_sp3Epoch* currEpoch() const {return _currEpoch;} -
trunk/BNC/src/combination/bnccomb.cpp
r8447 r8483 449 449 } 450 450 451 ColumnVector oldXC( 4);451 ColumnVector oldXC(7); 452 452 ColumnVector oldVV(3); 453 453 corr->_eph->getCrd(corr->_time, oldXC, oldVV, false); 454 454 455 ColumnVector newXC( 4);455 ColumnVector newXC(7); 456 456 ColumnVector newVV(3); 457 457 lastEph->getCrd(corr->_time, newXC, newVV, false); … … 688 688 const t_eph* eph = corr->_eph; 689 689 if (eph) { 690 ColumnVector xc( 4);690 ColumnVector xc(7); 691 691 ColumnVector vv(3); 692 692 eph->getCrd(_resTime, xc, vv, false); … … 740 740 clkCorrections.push_back(clkCorr); 741 741 742 ColumnVector xc( 4);742 ColumnVector xc(7); 743 743 ColumnVector vv(3); 744 744 corr->_eph->setClkCorr(dynamic_cast<const t_clkCorr*>(&clkCorr)); -
trunk/BNC/src/ephemeris.cpp
r8456 r8483 368 368 double tc = tt - _TOC; 369 369 xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc; 370 371 xc[4] = _clock_bias; 372 xc[5] = _clock_drift; 373 xc[6] = _clock_driftrate; 370 374 371 375 // Velocity … … 651 655 xc[3] = -_tau + _gamma * dtClk; 652 656 657 xc[4] = -_tau; 658 xc[5] = _gamma; 659 xc[6] = 0.0; 660 653 661 return success; 654 662 } … … 964 972 xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc; 965 973 974 xc[4] = _clock_bias; 975 xc[5] = _clock_drift; 976 xc[6] = _clock_driftrate; 977 966 978 // Velocity 967 979 // -------- … … 1306 1318 1307 1319 xc[3] = _agf0 + _agf1 * dt; 1320 1321 xc[4] = _agf0; 1322 xc[5] = _agf1; 1323 xc[6] = 0.0; 1308 1324 1309 1325 return success; … … 1657 1673 xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc; 1658 1674 1675 xc[4] = _clock_bias; 1676 xc[5] = _clock_drift; 1677 xc[6] = _clock_driftrate; 1678 1659 1679 // dotC = _clock_drift + _clock_driftrate*tc 1660 1680 // - 4.442807633e-10*_e*sqrt(a0)*cos(E) * dEdM * n; -
trunk/BNC/src/rinex/reqcanalyze.cpp
r8397 r8483 351 351 } 352 352 if (eph) { 353 ColumnVector xc( 4);353 ColumnVector xc(7); 354 354 ColumnVector vv(3); 355 355 if ( xyzSta.size() == 3 && (xyzSta[0] != 0.0 || xyzSta[1] != 0.0 || xyzSta[2] != 0.0) && … … 1101 1101 for (epoTime = startTime - interval; epoTime < endTime; 1102 1102 epoTime = epoTime + interval) { 1103 ColumnVector xc( 4);1103 ColumnVector xc(7); 1104 1104 ColumnVector vv(3); 1105 1105 if ( xyzSta.size() == 3 && (xyzSta[0] != 0.0 || xyzSta[1] != 0.0 || xyzSta[2] != 0.0) && -
trunk/BNC/src/satObs.cpp
r7058 r8483 18 18 } 19 19 20 // 20 // 21 21 //////////////////////////////////////////////////////////////////////////// 22 22 void t_clkCorr::writeEpoch(ostream* out, const QList<t_clkCorr>& corrList) { … … 43 43 } 44 44 45 // 45 // 46 46 //////////////////////////////////////////////////////////////////////////// 47 47 void t_clkCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_clkCorr>& corrList) { … … 62 62 getline(inStream, line); 63 63 istringstream in(line.c_str()); 64 64 65 65 in >> corr._prn >> corr._iod >> corr._dClk >> corr._dotDClk >> corr._dotDotDClk; 66 66 if (corr._prn.system() == 'E') { … … 85 85 } 86 86 87 // 87 // 88 88 //////////////////////////////////////////////////////////////////////////// 89 89 void t_orbCorr::writeEpoch(ostream* out, const QList<t_orbCorr>& corrList) { … … 113 113 } 114 114 115 // 115 // 116 116 //////////////////////////////////////////////////////////////////////////// 117 117 void t_orbCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_orbCorr>& corrList) { … … 132 132 getline(inStream, line); 133 133 istringstream in(line.c_str()); 134 134 135 135 in >> corr._prn >> corr._iod 136 >> corr._xr[0] >> corr._xr[1] >> corr._xr[2] 136 >> corr._xr[0] >> corr._xr[1] >> corr._xr[2] 137 137 >> corr._dotXr[0] >> corr._dotXr[1] >> corr._dotXr[2]; 138 138 … … 144 144 } 145 145 146 // 146 // Constructor 147 //////////////////////////////////////////////////////////////////////////// 148 t_URA::t_URA() { 149 _updateInt = 0; 150 _iod = 0; 151 _ura = 0.0; 152 } 153 154 // 155 //////////////////////////////////////////////////////////////////////////// 156 void t_URA::writeEpoch(ostream* out, const QList<t_URA>& corrList) { 157 if (!out || corrList.size() == 0) { 158 return; 159 } 160 out->setf(ios::fixed); 161 bncTime epoTime; 162 QListIterator<t_URA> it(corrList); 163 while (it.hasNext()) { 164 const t_URA& corr = it.next(); 165 if (!epoTime.valid()) { 166 epoTime = corr._time; 167 *out << "> URA " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " " 168 << corr._updateInt << " " 169 << corrList.size() << ' ' << corr._staID << endl; 170 } 171 *out << corr._prn.toString() << ' ' << setw(11) << corr._iod << ' ' 172 << setw(10) << setprecision(4) << corr._ura << endl; 173 } 174 out->flush(); 175 } 176 177 // 178 //////////////////////////////////////////////////////////////////////////// 179 void t_URA::readEpoch(const string& epoLine, istream& inStream, QList<t_URA>& corrList) { 180 bncTime epoTime; 181 unsigned int updateInt; 182 int numCorr; 183 string staID; 184 if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numCorr, staID) != t_corrSSR::URA) { 185 return; 186 } 187 for (int ii = 0; ii < numCorr; ii++) { 188 t_URA corr; 189 corr._time = epoTime; 190 corr._updateInt = updateInt; 191 corr._staID = staID; 192 193 string line; 194 getline(inStream, line); 195 istringstream in(line.c_str()); 196 197 in >> corr._prn >> corr._iod >> corr._ura; 198 199 corrList.push_back(corr); 200 } 201 } 202 203 // 147 204 //////////////////////////////////////////////////////////////////////////// 148 205 void t_satCodeBias::writeEpoch(ostream* out, const QList<t_satCodeBias>& biasList) { … … 172 229 } 173 230 174 // 231 // 175 232 //////////////////////////////////////////////////////////////////////////// 176 233 void t_satCodeBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satCodeBias>& biasList) { … … 191 248 getline(inStream, line); 192 249 istringstream in(line.c_str()); 193 250 194 251 int numBias; 195 252 in >> satCodeBias._prn >> numBias; … … 207 264 } 208 265 209 // 266 // 210 267 //////////////////////////////////////////////////////////////////////////// 211 268 void t_satPhaseBias::writeEpoch(ostream* out, const QList<t_satPhaseBias>& biasList) { … … 242 299 out->flush(); 243 300 } 244 245 // 301 302 // 246 303 //////////////////////////////////////////////////////////////////////////// 247 304 void t_satPhaseBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satPhaseBias>& biasList) { … … 290 347 } 291 348 292 // 349 // 293 350 //////////////////////////////////////////////////////////////////////////// 294 351 void t_vTec::write(ostream* out, const t_vTec& vTec) { … … 306 363 << setw(2) << layer._C.Nrows()-1 << ' ' 307 364 << setw(2) << layer._C.Ncols()-1 << ' ' 308 << setw(10) << setprecision(1) << layer._height << endl 309 << setw(10) << setprecision(4) << layer._C 365 << setw(10) << setprecision(1) << layer._height << endl 366 << setw(10) << setprecision(4) << layer._C 310 367 << setw(10) << setprecision(4) << layer._S; 311 368 } … … 313 370 } 314 371 315 // 372 // 316 373 //////////////////////////////////////////////////////////////////////////// 317 374 void t_vTec::read(const string& epoLine, istream& inStream, t_vTec& vTec) { … … 357 414 } 358 415 359 // 360 //////////////////////////////////////////////////////////////////////////// 361 t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime, 416 // 417 //////////////////////////////////////////////////////////////////////////// 418 t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime, 362 419 unsigned int& updateInt, int& numEntries, 363 420 string& staID) { … … 370 427 double sec; 371 428 372 inLine >> epoChar >> typeString 429 inLine >> epoChar >> typeString 373 430 >> year >> month >> day >> hour >> min >> sec >> updateInt >> numEntries >> staID; 374 431 … … 390 447 return vTec; 391 448 } 449 else if (typeString == "URA") { 450 return URA; 451 } 392 452 } 393 453 -
trunk/BNC/src/satObs.h
r7611 r8483 110 110 }; 111 111 112 class t_URA { 113 public: 114 t_URA(); 115 static void writeEpoch(std::ostream* out, const QList<t_URA>& corrList); 116 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_URA>& corrList); 117 std::string _staID; 118 t_prn _prn; 119 unsigned int _iod; 120 bncTime _time; 121 unsigned int _updateInt; 122 double _ura; 123 }; 124 112 125 class t_frqCodeBias { 113 126 public: … … 189 202 class t_corrSSR { 190 203 public: 191 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, unknown};204 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown}; 192 205 static e_type readEpoLine(const std::string& line, bncTime& epoTime, 193 206 unsigned int& updateInt, int& numEntries, std::string& staID); -
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r8405 r8483 333 333 for (int ii = 1; ii < lines.size(); ii++) { 334 334 QString key; // prn or key VTEC, IND (phase bias indicators) 335 ColumnVector rtnAPC; 336 ColumnVector rtnVel; 337 ColumnVector rtnCoM; 338 double rtnClk; 335 double rtnUra; // [m] 336 ColumnVector rtnAPC; // [m, m, m] 337 ColumnVector rtnVel; // [m/s, m/s, m/s]] 338 ColumnVector rtnCoM; // [m, m, m] 339 ColumnVector rtnClk; // [m, m/s, m/s²] 340 ColumnVector rtnClkSig; // [m, m/s, m/s²] 339 341 t_prn prn; 340 342 … … 435 437 } 436 438 } 437 else if (key == " Clk") {439 else if (key == "Ura") { 438 440 in >> numVal; 439 441 if (numVal == 1) 440 in >> rtnClk; 442 in >> rtnUra; 443 } 444 else if (key == "Clk") { 445 rtnClk.ReSize(3); 446 for (int ii = 0; ii < 3; ii++) { 447 rtnClk[ii] = 0.0; 448 } 449 in >> numVal; 450 for (int ii = 0; ii < numVal; ii++) { 451 in >> rtnClk[ii]; 452 } 453 } 454 else if (key == "ClkSig") { 455 rtnClkSig.ReSize(3); 456 for (int ii = 0; ii < 3; ii++) { 457 rtnClkSig[ii] = 0.0; 458 } 459 in >> numVal; 460 for (int ii = 0; ii < numVal; ii++) { 461 in >> rtnClkSig[ii]; 462 } 441 463 } 442 464 else if (key == "Vel") { … … 526 548 if (sd) { 527 549 QString outLine; 528 processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, 529 rtnClk, rtnVel, rtnCoM, sd, outLine);550 processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, rtnUra, 551 rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine); 530 552 } 531 553 … … 2243 2265 void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek, 2244 2266 double GPSweeks, const QString& prn, const ColumnVector& rtnAPC, 2245 double rtnClk, const ColumnVector& rtnVel, const ColumnVector& rtnCoM, 2267 double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel, 2268 const ColumnVector& rtnCoM, const ColumnVector& rtnClkSig, 2246 2269 struct ClockOrbit::SatData* sd, QString& outLine) { 2247 2270 2248 2271 // Broadcast Position and Velocity 2249 2272 // ------------------------------- 2250 ColumnVector xB( 4);2273 ColumnVector xB(7); 2251 2274 ColumnVector vB(3); 2252 2275 eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false); … … 2276 2299 // Clock Correction 2277 2300 // ---------------- 2278 double dClk = rtnClk - (xB(4) - dc) * t_CST::c; 2301 double dClkA0 = rtnClk(1) - (xB(5) - dc) * t_CST::c; 2302 double dClkA1 = rtnClk(2) - xB(6) * t_CST::c; 2303 double dClkA2 = rtnClk(3) - xB(7) * t_CST::c; 2279 2304 2280 2305 if (sd) { 2281 2306 sd->ID = prn.mid(1).toInt(); 2282 2307 sd->IOD = eph->IOD(); 2283 sd->Clock.DeltaA0 = dClk; 2284 sd->Clock.DeltaA1 = 0.0; // TODO 2285 sd->Clock.DeltaA2 = 0.0; // TODO 2286 sd->Orbit.DeltaRadial = rsw(1); 2308 sd->Clock.DeltaA0 = dClkA0; 2309 sd->Clock.DeltaA1 = dClkA1; 2310 sd->Clock.DeltaA2 = dClkA2; 2311 sd->UserRangeAccuracy = rtnUra; 2312 sd->Orbit.DeltaRadial = rsw(1); 2287 2313 sd->Orbit.DeltaAlongTrack = rsw(2); 2288 2314 sd->Orbit.DeltaCrossTrack = rsw(3); 2289 sd->Orbit.DotDeltaRadial = dotRsw(1);2315 sd->Orbit.DotDeltaRadial = dotRsw(1); 2290 2316 sd->Orbit.DotDeltaAlongTrack = dotRsw(2); 2291 2317 sd->Orbit.DotDeltaCrossTrack = dotRsw(3); 2292 2318 } 2293 2319 2294 outLine.sprintf("%d %.1f %s %u %10.3f %8.3f %8.3f %8.3f\n", GPSweek,2295 GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClk , rsw(1), rsw(2),2296 rsw( 3));2320 outLine.sprintf("%d %.1f %s %u %10.3f %8.3f %8.3f %8.3f %8.3f %8.3f\n", GPSweek, 2321 GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClkA0, dClkA1, dClkA2, 2322 rsw(1), rsw(2), rsw(3)); 2297 2323 2298 2324 double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c; 2299 double sp3Clk = (rtnClk - relativity) / t_CST::c; // in seconds 2325 double clkRnx = (rtnClk[0] - relativity) / t_CST::c; // in seconds 2326 double clkRnxRate = rtnClk[1] / t_CST::c; // [s/s = -] 2327 double clkRnxAcc = rtnClk[2] / t_CST::c; // [s/s² ) -/s] 2300 2328 2301 2329 if (_rnx) { 2302 _rnx->write(GPSweek, GPSweeks, prn, sp3Clk); 2330 double clkRnxSig = rtnClkSig[0] / t_CST::c; // in seconds 2331 double clkRnxRateSig = rtnClkSig[1] / t_CST::c; // [s/s = -] 2332 double clkRnxAccSig = rtnClkSig[2] / t_CST::c; // [s/s² ) -/s] 2333 _rnx->write(GPSweek, GPSweeks, prn, clkRnx, clkRnxRate, clkRnxAcc, 2334 clkRnxSig, clkRnxRateSig, clkRnxAccSig); 2303 2335 } 2304 2336 if (_sp3) { 2305 _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk);2337 _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate); 2306 2338 } 2307 2339 } -
trunk/BNC/src/upload/bncrtnetuploadcaster.h
r8414 r8483 33 33 double GPSweeks, const QString& prn, 34 34 const ColumnVector& rtnAPC, 35 double rtnClk, 35 double ura, 36 const ColumnVector& rtnClk, 36 37 const ColumnVector& rtnVel, 37 38 const ColumnVector& rtnCoM, 39 const ColumnVector& rtnClkSig, 38 40 struct ClockOrbit::SatData* sd, 39 41 QString& outLine);
Note:
See TracChangeset
for help on using the changeset viewer.