Changeset 6027 in ntrip


Ignore:
Timestamp:
Aug 21, 2014, 11:07:22 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP
Files:
2 edited

Legend:

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

    r6026 r6027  
    209209////////////////////////////////////////////////////////////////////////////
    210210bool t_pppSatObs::isValid(t_lc::type tLC) const {
     211  bool valid = true;
     212  obsValue(tLC, &valid);
     213  return valid;
     214}
     215//
     216////////////////////////////////////////////////////////////////////////////
     217double t_pppSatObs::obsValue(t_lc::type tLC, bool* valid) const {
    211218
    212219  map<t_frequency::type, double> codeCoeff;
    213220  map<t_frequency::type, double> phaseCoeff;
    214221  lcCoeff(tLC, codeCoeff, phaseCoeff);
     222
     223  double retVal = 0.0;
     224  if (valid) *valid = true;
    215225
    216226  map<t_frequency::type, double>::const_iterator it;
     
    218228    t_frequency::type tFreq = it->first;
    219229    if (_obs[tFreq] == 0) {
    220       return false;
     230      if (valid) *valid = false;
     231      return 0.0;
     232    }
     233    else {
     234      retVal += _obs[tFreq]->_code * it->second;
    221235    }
    222236  }
     
    224238    t_frequency::type tFreq = it->first;
    225239    if (_obs[tFreq] == 0) {
    226       return false;
    227     }
    228   }
    229  
    230   return true; 
    231 }
    232 
    233 //
    234 ////////////////////////////////////////////////////////////////////////////
    235 double t_pppSatObs::obsValue(t_lc::type tLC) const {
    236 
    237   if (!_validObs2 && t_lc::need2ndFreq(tLC)) {
    238     return 0.0;
    239   }
    240 
    241   return this->lc(tLC, _rawL1, _rawL2, _rawC1, _rawC2);
     240      if (valid) *valid = false;
     241      return 0.0;
     242    }
     243    else {
     244      retVal += _obs[tFreq]->_phase * it->second;
     245    }
     246  }
     247
     248  return retVal;
    242249}
    243250
  • trunk/BNC/src/PPP/pppSatObs.h

    r6026 r6027  
    2222  const bncTime&      time() const {return _time;}
    2323  t_irc               cmpModel(const t_pppStation* station);
    24   double              obsValue(t_lc::type tLC) const;
     24  double              obsValue(t_lc::type tLC, bool* valid = 0) const;
    2525  double              cmpValue(t_lc::type tLC) const;
    2626  double              cmpValueForBanc(t_lc::type tLC) const;
Note: See TracChangeset for help on using the changeset viewer.