Changeset 9600 in ntrip for trunk/BNC/src/PPP/pppClient.cpp


Ignore:
Timestamp:
Jan 14, 2022, 5:31:00 PM (2 years ago)
Author:
stuerze
Message:
 
File:
1 edited

Legend:

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

    r9595 r9600  
    294294        }
    295295      }
    296       if ( satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
     296      if ( satObs->isValid(tLC) &&
     297          (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
    297298        ++iObs;
    298299        BB[iObs][0] = satObs->xc()[0];
     
    307308    }
    308309    BB = BB.Rows(1,iObs+1);
    309     bancroft(BB, xyzc);
     310    if (bancroft(BB, xyzc) != success) {
     311      return failure;
     312    }
    310313
    311314    xyzc[3] /= t_CST::c;
     
    319322      const t_pppSatObs* satObs = obsVector.at(ii);
    320323      if (satObs->isValid() &&
    321           satObs->prn().system() == 'G' &&
    322324          (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
    323325        ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3);
    324326        double res = rr.NormFrobenius() - satObs->obsValue(tLC)
    325327                   - (satObs->xc()[3] - xyzc[3]) * t_CST::c;
    326         if (std::isnan(res) || fabs(res) > maxRes) {
    327           std::isnan(res) ?
    328           maxRes      = res :
    329           maxRes      = fabs(res);
     328        if (fabs(res) > maxRes) {
     329          maxRes = fabs(res);
    330330          maxResIndex = ii;
    331331        }
    332332      }
    333333    }
    334     if (!std::isnan(maxRes) && maxRes < BLUNDER) {
     334    if (maxRes < BLUNDER) {
    335335      if (print && _numEpoProcessing == 1) {
    336336        LOG.setf(ios::fixed);
     
    594594//
    595595////////////////////////////////////////////////////////////////////////////
    596 void t_pppClient::bancroft(const Matrix& BBpass, ColumnVector& pos) {
     596t_irc t_pppClient::bancroft(const Matrix& BBpass, ColumnVector& pos) {
    597597
    598598  if (pos.Nrows() != 4) {
     
    662662    }
    663663  }
     664  if (pos.size() != 4 ||
     665      std::isnan(pos(1)) ||
     666      std::isnan(pos(2)) ||
     667      std::isnan(pos(3)) ||
     668      std::isnan(pos(4)))  {
     669    return failure;
     670  }
     671
     672  return success;
    664673}
    665674
Note: See TracChangeset for help on using the changeset viewer.