Changeset 7271 in ntrip


Ignore:
Timestamp:
Sep 9, 2015, 3:01:54 PM (9 years ago)
Author:
stuerze
Message:

minor changes to consider BDS ephemeris messages in PPP mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppClient.cpp

    r7254 r7271  
    1111 * Created:    29-Jul-2014
    1212 *
    13  * Changes:   
     13 * Changes:
    1414 *
    1515 * -----------------------------------------------------------------------*/
     
    8181}
    8282
    83 // 
     83//
    8484//////////////////////////////////////////////////////////////////////////////
    8585void t_pppClient::putEphemeris(const t_eph* eph) {
     
    8787  const t_ephGlo* ephGlo = dynamic_cast<const t_ephGlo*>(eph);
    8888  const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph);
     89  const t_ephBDS* ephBDS = dynamic_cast<const t_ephBDS*>(eph);
    8990  if      (ephGPS) {
    9091    _ephPool->putEphemeris(new t_ephGPS(*ephGPS));
     
    9697    _ephPool->putEphemeris(new t_ephGal(*ephGal));
    9798  }
     99  else if (ephBDS) {
     100    _ephPool->putEphemeris(new t_ephBDS(*ephBDS));
     101  }
    98102}
    99103
     
    104108}
    105109
    106 // 
     110//
    107111//////////////////////////////////////////////////////////////////////////////
    108112void t_pppClient::putOrbCorrections(const vector<t_orbCorr*>& corr) {
     
    112116}
    113117
    114 // 
     118//
    115119//////////////////////////////////////////////////////////////////////////////
    116120void t_pppClient::putClkCorrections(const vector<t_clkCorr*>& corr) {
     
    120124}
    121125
    122 // 
     126//
    123127//////////////////////////////////////////////////////////////////////////////
    124128void t_pppClient::putCodeBiases(const vector<t_satCodeBias*>& biases) {
     
    132136t_irc t_pppClient::prepareObs(const vector<t_satObs*>& satObs,
    133137                              vector<t_pppSatObs*>& obsVector, bncTime& epoTime) {
    134   // Default 
     138  // Default
    135139  // -------
    136140  epoTime.reset();
     
    179183// Compute the Bancroft position, check for blunders
    180184//////////////////////////////////////////////////////////////////////////////
    181 t_irc t_pppClient::cmpBancroft(const bncTime& epoTime, 
     185t_irc t_pppClient::cmpBancroft(const bncTime& epoTime,
    182186                                  vector<t_pppSatObs*>& obsVector,
    183187                                  ColumnVector& xyzc, bool print) {
     
    195199        }
    196200        if ( satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
    197           ++iObs;   
     201          ++iObs;
    198202          BB[iObs][0] = satObs->xc()[0];
    199203          BB[iObs][1] = satObs->xc()[1];
     
    222226           (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
    223227        ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3);
    224         double res = rr.norm_Frobenius() - satObs->obsValue(tLC) 
     228        double res = rr.norm_Frobenius() - satObs->obsValue(tLC)
    225229          - (satObs->xc()[3] - xyzc[3]) * t_CST::c;
    226230        if (fabs(res) > maxRes) {
     
    307311}
    308312
    309 // 
     313//
    310314//////////////////////////////////////////////////////////////////////////////
    311315void t_pppClient::initOutput(t_output* output) {
     
    316320}
    317321
    318 // 
     322//
    319323//////////////////////////////////////////////////////////////////////////////
    320324void t_pppClient::clearObs() {
     
    325329}
    326330
    327 // 
     331//
    328332//////////////////////////////////////////////////////////////////////////////
    329333void t_pppClient::finish(t_irc irc) {
     
    357361}
    358362
    359 // 
     363//
    360364//////////////////////////////////////////////////////////////////////////////
    361365t_irc t_pppClient::cmpModel(t_pppStation* station, const ColumnVector& xyzc,
     
    381385  // -----
    382386  station->setTideDspl( _tides->displacement(time, station->xyzApr()) );
    383  
     387
    384388  // Ionosphere
    385389  // ----------
     
    409413}
    410414
    411 // 
     415//
    412416//////////////////////////////////////////////////////////////////////////////
    413417void t_pppClient::processEpoch(const vector<t_satObs*>& satObs, t_output* output) {
     
    417421
    418422    // Prepare Observations of the Rover
    419     // ---------------------------------   
     423    // ---------------------------------
    420424    if (prepareObs(satObs, _obsRover, _epoTimeRover) != success) {
    421425      return finish(failure);
     
    425429    if (!_epoTimeRover.undef()) LOG << string(_epoTimeRover);
    426430    LOG << "\n--------------------------------------\n";
    427  
     431
    428432    for (int iter = 1; iter <= 2; iter++) {
    429433      ColumnVector xyzc(4); xyzc = 0.0;
     
    440444
    441445    // Store last epoch of data
    442     // ------------------------   
     446    // ------------------------
    443447    _obsPool->putEpoch(_epoTimeRover, _obsRover);
    444448
     
    469473}
    470474
    471 // 
     475//
    472476////////////////////////////////////////////////////////////////////////////
    473477double lorentz(const ColumnVector& aa, const ColumnVector& bb) {
     
    475479}
    476480
    477 // 
     481//
    478482////////////////////////////////////////////////////////////////////////////
    479483void t_pppClient::bancroft(const Matrix& BBpass, ColumnVector& pos) {
     
    493497      if (iter > 1) {
    494498        double zz  = BB(ii,3);
    495         double rho = sqrt( (xx-pos(1)) * (xx-pos(1)) + 
    496                            (yy-pos(2)) * (yy-pos(2)) + 
     499        double rho = sqrt( (xx-pos(1)) * (xx-pos(1)) +
     500                           (yy-pos(2)) * (yy-pos(2)) +
    497501                           (zz-pos(3)) * (zz-pos(3)) );
    498502        traveltime = rho / t_CST::c;
     
    504508      BB(ii,2) = -sina * xx + cosa * yy;
    505509    }
    506    
     510
    507511    Matrix BBB;
    508512    if (mm > 4) {
     
    516520    ColumnVector alpha(mm); alpha = 0.0;
    517521    for (int ii = 1; ii <= mm; ii++) {
    518       alpha(ii) = lorentz(BB.Row(ii).t(),BB.Row(ii).t())/2.0; 
     522      alpha(ii) = lorentz(BB.Row(ii).t(),BB.Row(ii).t())/2.0;
    519523    }
    520524    ColumnVector BBBe     = BBB * ee;
     
    525529    double root = sqrt(bb*bb-aa*cc);
    526530
    527     Matrix hlpPos(4,2); 
     531    Matrix hlpPos(4,2);
    528532    hlpPos.Column(1) = (-bb-root)/aa * BBBe + BBBalpha;
    529533    hlpPos.Column(2) = (-bb+root)/aa * BBBe + BBBalpha;
     
    532536    for (int pp = 1; pp <= 2; pp++) {
    533537      hlpPos(4,pp)      = -hlpPos(4,pp);
    534       omc(pp) = BB(1,4) - 
     538      omc(pp) = BB(1,4) -
    535539                sqrt( (BB(1,1)-hlpPos(1,pp)) * (BB(1,1)-hlpPos(1,pp)) +
    536540                      (BB(1,2)-hlpPos(2,pp)) * (BB(1,2)-hlpPos(2,pp)) +
    537                       (BB(1,3)-hlpPos(3,pp)) * (BB(1,3)-hlpPos(3,pp)) ) - 
     541                      (BB(1,3)-hlpPos(3,pp)) * (BB(1,3)-hlpPos(3,pp)) ) -
    538542                hlpPos(4,pp);
    539543    }
Note: See TracChangeset for help on using the changeset viewer.