Ignore:
Timestamp:
Jul 13, 2021, 10:59:04 PM (3 years ago)
Author:
stuerze
Message:

satellite antenna phase center correction is added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/PPP_SSR_I/pppFilter.cpp

    r9471 r9474  
    376376
    377377  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
    378409    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    }
    385416    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";
    387463    }
    388464  }
     
    10221098          << " RES " << satData->prn.mid(0,3).toAscii().data()
    10231099          << (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;
    10251108    }
    10261109  }
Note: See TracChangeset for help on using the changeset viewer.