Changeset 9474 in ntrip
- Timestamp:
- Jul 13, 2021, 10:59:04 PM (3 years ago)
- Location:
- branches/BNC_2.12/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/PPP_SSR_I/pppFilter.cpp
r9471 r9474 376 376 377 377 if (_antex) { 378 379 // Satellite correction 380 // --------------------- 381 double elTx,azTx; 382 383 // LOS unit vector satellite --> receiver 384 ColumnVector rho = xRec - satData->xx; 385 rho /= rho.norm_Frobenius(); 386 387 // Sun unit vector 388 ColumnVector xSun = t_astro::Sun(satData->tt.mjd()); 389 xSun /= xSun.norm_Frobenius(); 390 391 // Satellite unit vectors sz, sy, sx 392 ColumnVector sz = -satData->xx / satData->xx.norm_Frobenius(); 393 ColumnVector sy = crossproduct(sz, xSun); 394 ColumnVector sx = crossproduct(sy, sz); 395 396 sx /= sx.norm_Frobenius(); 397 sy /= sy.norm_Frobenius(); 398 399 // LOS vector in satellite frame 400 ColumnVector u(3); 401 u(1) = dotproduct(sx, rho); 402 u(2) = dotproduct(sy, rho); 403 u(3) = dotproduct(sz, rho); 404 405 // Azimuth and elevation in satellite antenna frame 406 elTx = atan2(u(3),sqrt(pow(u(2),2)+pow(u(1),2))); 407 azTx = atan2(u(2),u(1)); 408 378 409 bool found; 379 phaseCenter = satData->lkA * _antex->rcvCorr(OPT->_antNameRover, frqA,380 satData->eleSat, satData->azSat,381 found)382 + satData->lkB * _antex->rcvCorr(OPT->_antNameRover, frqB,383 satData->eleSat, satData->azSat,384 found);410 if (OPT->_isAPC) { 411 phaseCenter += satData->lkB * _antex->satCorr(satData->prn, frqA, elTx, azTx, found); 412 } 413 else { 414 phaseCenter += satData->lkA * _antex->satCorr(satData->prn, frqA, elTx, azTx, found); 415 } 385 416 if (!found) { 386 LOG << "ANTEX: antenna >" << OPT->_antNameRover << "< not found\n"; 417 LOG << "ANTEX: antenna >" << satData->prn.mid(0,3).toStdString() << " " << frqA << "< not found\n"; 418 } 419 420 phaseCenter += satData->lkB * _antex->satCorr(satData->prn, frqB, elTx, azTx, found); 421 if (!found) { 422 LOG << "ANTEX: antenna >" << satData->prn.mid(0,3).toStdString() << " " << frqB << "< not found\n"; 423 } 424 425 /* 426 LOG << "ANTEX: " << satData->prn.mid(0,3).toStdString() << " " 427 << fixed 428 << setprecision(3) 429 << " xyz " 430 << setw(7) << u(1) 431 << setw(7) << u(2) 432 << setw(7) << u(3) 433 << setprecision(1) 434 << " elTx " << setw(5) << elTx * 180.0/M_PI 435 << " azTx " << setw(7) << azTx * 180.0/M_PI 436 << " elRx " << setw(5) << satData->eleSat * 180.0/M_PI 437 << setprecision(3) 438 << " pcc " << setw(6) << phaseCenter 439 << endl; 440 */ 441 442 // Receiver correction 443 // ------------------- 444 445 phaseCenter += satData->lkA * _antex->rcvCorr(OPT->_antNameRover, frqA, 446 satData->eleSat, satData->azSat, found); 447 if (!found) { 448 phaseCenter += satData->lkA * _antex->rcvCorr(OPT->_antNameRover, t_frequency::G1, 449 satData->eleSat, satData->azSat, found); 450 } 451 if (!found) { 452 LOG << "ANTEX: antenna >" << OPT->_antNameRover << " " << frqA << "< not found\n"; 453 } 454 455 phaseCenter += satData->lkB * _antex->rcvCorr(OPT->_antNameRover, frqB, 456 satData->eleSat, satData->azSat, found); 457 if (!found) { 458 phaseCenter += satData->lkB * _antex->rcvCorr(OPT->_antNameRover, t_frequency::G2, 459 satData->eleSat, satData->azSat, found); 460 } 461 if (!found) { 462 LOG << "ANTEX: antenna >" << OPT->_antNameRover << " " << frqB << "< not found\n"; 387 463 } 388 464 } … … 1022 1098 << " RES " << satData->prn.mid(0,3).toAscii().data() 1023 1099 << (iPhase ? " L3 " : " P3 ") 1024 << setw(9) << setprecision(4) << vv(satData->obsIndex) << endl; 1100 << setw(9) << setprecision(4) << vv(satData->obsIndex) << " " 1101 /* 1102 << setprecision(3) 1103 << setw(7) << (iPhase? satData->L3sig : satData->P3sig) << " " 1104 << setprecision(1) 1105 << setw(5) <<satData->eleSat * 180 / M_PI 1106 */ 1107 << endl; 1025 1108 } 1026 1109 } -
branches/BNC_2.12/src/bncantex.cpp
r8631 r9474 196 196 } 197 197 198 // End of Frequency198 // End of Frequency 199 199 // ---------------- 200 200 else if (line.indexOf("END OF FREQUENCY") == 60) { … … 351 351 352 352 return failure; 353 } 354 355 // 356 //////////////////////////////////////////////////////////////////////////// 357 double bncAntex::satCorr(const QString& prn, t_frequency::type frqType, 358 double elTx, double azTx, bool& found) const { 359 360 if (_maps.find(prn.mid(0,3)) == _maps.end()) { 361 found = false; 362 return 0.0; 363 }; 364 365 t_antMap* map = _maps[prn.mid(0,3)]; 366 367 if (map->frqMap.find(frqType) == map->frqMap.end()) { 368 found = false; 369 return 0.0; 370 }; 371 372 t_frqMap* frqMap = map->frqMap[frqType]; 373 374 double var = 0.0; 375 if (frqMap->pattern.ncols() > 0) { 376 double zenDiff = 999.999; 377 double zenTx = 90.0 - elTx * 180.0 / M_PI; 378 unsigned iZen = 0; 379 for (double zen = map->zen1; zen <= map->zen2; zen += map->dZen) { 380 iZen += 1; 381 double newZenDiff = fabs(zen - zenTx); 382 if (newZenDiff < zenDiff) { 383 zenDiff = newZenDiff; 384 var = frqMap->pattern(iZen); 385 } 386 } 387 } 388 389 found = true; 390 return var - frqMap->neu[0] * cos(azTx)*cos(elTx) 391 - frqMap->neu[1] * sin(azTx)*cos(elTx) 392 - frqMap->neu[2] * sin(elTx); 393 353 394 } 354 395 -
branches/BNC_2.12/src/bncantex.h
r8079 r9474 40 40 void print() const; 41 41 QString pcoSinexString(const std::string& antName, t_frequency::type frqType); 42 double satCorr(const QString& prn, t_frequency::type frqType, 43 double eleSat, double azSat, bool& found) const; 42 44 double rcvCorr(const std::string& antName, t_frequency::type frqType, 43 45 double eleSat, double azSat, bool& found) const; -
branches/BNC_2.12/src/pppMain.cpp
r9251 r9474 163 163 if (_realTime) { 164 164 opt->_corrMount.assign(settings.value("PPP/corrMount").toString().toStdString()); 165 opt->_isAPC = (opt->_corrMount.substr(0,4)=="SSRA"); 165 166 } 166 167 else { … … 168 169 opt->_rinexNav.assign(settings.value("PPP/rinexNav").toString().toStdString()); 169 170 opt->_corrFile.assign(settings.value("PPP/corrFile").toString().toStdString()); 171 QFileInfo tmp = QFileInfo(QString::fromStdString(opt->_corrFile)); 172 opt->_isAPC = (tmp.baseName().mid(0,4)=="SSRA"); 170 173 } 171 174 -
branches/BNC_2.12/src/pppOptions.h
r7521 r9474 28 28 std::string _crdFile; 29 29 std::string _corrMount; 30 bool _isAPC; 30 31 std::string _rinexObs; 31 32 std::string _rinexNav;
Note:
See TracChangeset
for help on using the changeset viewer.