Changeset 4991 in ntrip
- Timestamp:
- Mar 20, 2013, 11:18:10 AM (12 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncclockrinex.cpp
r4278 r4991 40 40 //////////////////////////////////////////////////////////////////////////// 41 41 t_irc bncClockRinex::write(int GPSweek, double GPSweeks, const QString& prn, 42 const ColumnVector& xx) {42 double sp3Clk) { 43 43 44 44 if (reopen(GPSweek, GPSweeks) == success) { … … 51 51 << fixed << setw(10) << setprecision(6) << sec 52 52 << " 1 " 53 << scientific << setw(19) << setprecision(12) << xx(4)<< endl;53 << scientific << setw(19) << setprecision(12) << sp3Clk << endl; 54 54 55 55 return success; -
trunk/BNC/src/bncclockrinex.h
r4278 r4991 13 13 virtual ~bncClockRinex(); 14 14 virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 15 const ColumnVector& xx);15 double sp3Clk); 16 16 17 17 private: -
trunk/BNC/src/bncsp3.cpp
r4382 r4991 38 38 //////////////////////////////////////////////////////////////////////////// 39 39 t_irc bncSP3::write(int GPSweek, double GPSweeks, const QString& prn, 40 const ColumnVector& x x) {40 const ColumnVector& xCoM, double sp3Clk) { 41 41 42 42 if (reopen(GPSweek, GPSweeks) == success) { … … 62 62 63 63 _out << "P" << prn.toAscii().data() 64 << setw(14) << setprecision(6) << x x(1) / 1000.065 << setw(14) << setprecision(6) << x x(2) / 1000.066 << setw(14) << setprecision(6) << x x(3) / 1000.067 << setw(14) << setprecision(6) << xx(4)* 1e6 << endl;64 << setw(14) << setprecision(6) << xCoM(1) / 1000.0 65 << setw(14) << setprecision(6) << xCoM(2) / 1000.0 66 << setw(14) << setprecision(6) << xCoM(3) / 1000.0 67 << setw(14) << setprecision(6) << sp3Clk * 1e6 << endl; 68 68 69 69 return success; -
trunk/BNC/src/bncsp3.h
r4296 r4991 14 14 virtual ~bncSP3(); 15 15 t_irc write(int GPSweek, double GPSweeks, const QString& prn, 16 const ColumnVector& x x);16 const ColumnVector& xCoM, double sp3Clk); 17 17 18 18 private: -
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r4973 r4991 301 301 302 302 QString prn; 303 ColumnVector xx(14); xx = 0.0; 303 ColumnVector rtnAPC; 304 ColumnVector rtnVel; 305 ColumnVector rtnCoM; 306 double rtnClk; 304 307 305 308 QTextStream in(lines[ii].toAscii()); 306 309 307 310 in >> prn; 308 if (prn[0] == 'P') {309 prn.remove(0,1);310 }311 311 312 312 t_eph* eph = 0; … … 347 347 if (eph) { 348 348 349 in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5) 350 >> xx(6) >> xx(7) >> xx(8) >> xx(9) >> xx(10) 351 >> xx(11) >> xx(12) >> xx(13) >> xx(14); 352 xx(1) *= 1e3; // x-crd 353 xx(2) *= 1e3; // y-crd 354 xx(3) *= 1e3; // z-crd 355 xx(4) *= 1e-6; // clk 356 xx(5) *= 1e-6; // rel. corr. 357 // xx(6), xx(7), xx(8) ... PhaseCent - CoM 358 // xx(9) ... P1-C1 DCB in meters 359 // xx(10) ... P1-P2 DCB in meters 360 // xx(11) ... dT 361 xx(12) *= 1e3; // x-crd at time + dT 362 xx(13) *= 1e3; // y-crd at time + dT 363 xx(14) *= 1e3; // z-crd at time + dT 364 349 while (true) { 350 QString key; 351 int numVal = 0; 352 in >> key >> numVal; 353 if (in.status() != QTextStream::Ok) { 354 break; 355 } 356 if (key == "APC") { 357 rtnAPC.ReSize(3); 358 in >> rtnAPC[0] >> rtnAPC[1] >> rtnAPC[2]; 359 } 360 else if (key == "Clk") { 361 in >> rtnClk; 362 } 363 else if (key == "Vel") { 364 rtnVel.ReSize(3); 365 in >> rtnVel[0] >> rtnVel[1] >> rtnVel[2]; 366 } 367 else if (key == "CoM") { 368 rtnCoM.ReSize(3); 369 in >> rtnCoM[0] >> rtnCoM[1] >> rtnCoM[2]; 370 } 371 else { 372 for (int ii = 0; ii < numVal; ii++) { 373 double dummy; 374 in >> dummy; 375 } 376 } 377 } 365 378 struct ClockOrbit::SatData* sd = 0; 366 379 if (prn[0] == 'G') { … … 375 388 QString outLine; 376 389 processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prn, 377 xx, sd, outLine);390 rtnAPC, rtnClk, rtnVel, rtnCoM, sd, outLine); 378 391 } 379 392 … … 390 403 // Coefficient of Ionosphere-Free LC 391 404 // --------------------------------- 392 const static double a_L1_GPS = 2.54572778;393 const static double a_L2_GPS = -1.54572778;394 const static double a_L1_Glo = 2.53125000;395 const static double a_L2_Glo = -1.53125000;405 // const static double a_L1_GPS = 2.54572778; 406 // const static double a_L2_GPS = -1.54572778; 407 // const static double a_L1_Glo = 2.53125000; 408 // const static double a_L2_Glo = -1.53125000; 396 409 397 410 if (biasSat) { … … 400 413 if (prn[0] == 'G') { 401 414 biasSat->Biases[0].Type = CODETYPEGPS_L1_Z; 402 biasSat->Biases[0].Bias = - a_L2_GPS * xx(10); 415 // biasSat->Biases[0].Bias = - a_L2_GPS * xx(10); 416 biasSat->Biases[0].Bias = 0.0; 403 417 biasSat->Biases[1].Type = CODETYPEGPS_L1_CA; 404 biasSat->Biases[1].Bias = - a_L2_GPS * xx(10) + xx(9); 418 // biasSat->Biases[1].Bias = - a_L2_GPS * xx(10) + xx(9); 419 biasSat->Biases[1].Bias = 0.0; 405 420 biasSat->Biases[2].Type = CODETYPEGPS_L2_Z; 406 biasSat->Biases[2].Bias = a_L1_GPS * xx(10); 421 // biasSat->Biases[2].Bias = a_L1_GPS * xx(10); 422 biasSat->Biases[2].Bias = 0.0; 407 423 } 408 424 else if (prn[0] == 'R') { 409 425 biasSat->Biases[0].Type = CODETYPEGLONASS_L1_P; 410 biasSat->Biases[0].Bias = - a_L2_Glo * xx(10); 426 // biasSat->Biases[0].Bias = - a_L2_Glo * xx(10); 427 biasSat->Biases[0].Bias = 0.0; 411 428 biasSat->Biases[1].Type = CODETYPEGLONASS_L1_CA; 412 biasSat->Biases[1].Bias = - a_L2_Glo * xx(10) + xx(9); 429 // biasSat->Biases[1].Bias = - a_L2_Glo * xx(10) + xx(9); 430 biasSat->Biases[1].Bias = 0.0; 413 431 biasSat->Biases[2].Type = CODETYPEGLONASS_L2_P; 414 biasSat->Biases[2].Bias = a_L1_Glo * xx(10); 432 // biasSat->Biases[2].Bias = a_L1_Glo * xx(10); 433 biasSat->Biases[2].Bias = 0.0; 415 434 } 416 435 } … … 485 504 //////////////////////////////////////////////////////////////////////////// 486 505 void bncRtnetUploadCaster::processSatellite(t_eph* eph, int GPSweek, 487 double GPSweeks, const QString& prn, 488 const ColumnVector& xx, 489 struct ClockOrbit::SatData* sd, 490 QString& outLine) { 506 double GPSweeks, const QString& prn, 507 const ColumnVector& rtnAPC, 508 double rtnClk, 509 const ColumnVector& rtnVel, 510 const ColumnVector& rtnCoM, 511 struct ClockOrbit::SatData* sd, 512 QString& outLine) { 491 513 492 514 // Broadcast Position and Velocity … … 496 518 eph->position(GPSweek, GPSweeks, xB.data(), vB.data()); 497 519 498 // Precise Position and Velocity 499 // ----------------------------- 500 ColumnVector xP = xx.Rows(1,3); 501 ColumnVector vP = (xx.Rows(12,14) - xx.Rows(1,3)) / xx(11); 502 503 // Correction Center of Mass -> Antenna Phase Center 504 // ------------------------------------------------- 505 if (! _CoM) { 506 xP(1) += xx(6); 507 xP(2) += xx(7); 508 xP(3) += xx(8); 509 } 520 // Precise Position 521 // ---------------- 522 ColumnVector xP = _CoM ? rtnCoM : rtnAPC; 510 523 511 524 double dc = 0.0; … … 517 530 // ----------------- 518 531 ColumnVector dx = xB.Rows(1,3) - xP; 519 ColumnVector dv = vB - vP;532 ColumnVector dv = vB - rtnVel; 520 533 521 534 // Difference in RSW … … 529 542 // Clock Correction 530 543 // ---------------- 531 double dClk = (xx(4) + xx(5) - xB(4) +dc) * t_CST::c;544 double dClk = rtnClk - (xB(4) - dc) * t_CST::c; 532 545 533 546 if (sd) { … … 547 560 eph->IOD(), dClk, rsw(1), rsw(2), rsw(3)); 548 561 562 double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c; 563 double sp3Clk = (rtnClk - relativity) / t_CST::c; // in seconds 564 549 565 if (_rnx) { 550 _rnx->write(GPSweek, GPSweeks, prn, xx);566 _rnx->write(GPSweek, GPSweeks, prn, sp3Clk); 551 567 } 552 568 if (_sp3) { 553 _sp3->write(GPSweek, GPSweeks, prn, xx);569 _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk); 554 570 } 555 571 } -
trunk/BNC/src/upload/bncrtnetuploadcaster.h
r4803 r4991 31 31 void processSatellite(t_eph* eph, int GPSweek, 32 32 double GPSweeks, const QString& prn, 33 const ColumnVector& xx, 33 const ColumnVector& rtnAPC, 34 double rtnClk, 35 const ColumnVector& rtnVel, 36 const ColumnVector& rtnCoM, 34 37 struct ClockOrbit::SatData* sd, 35 38 QString& outLine);
Note:
See TracChangeset
for help on using the changeset viewer.