Changeset 5830 in ntrip


Ignore:
Timestamp:
Aug 6, 2014, 2:43:05 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP
Files:
2 edited

Legend:

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

    r5829 r5830  
    6363  _outlier    = false;
    6464  for (unsigned ii = 0; ii < pppSatObs._obs.size(); ii++) {
    65     const t_frqObs* obs = pppSatObs._obs[ii];
    66     t_obsType obsType = string(obs->_rnxType2ch).substr(0,2);
    67     _allObs[obsType] = new t_frqObs(*obs);
     65    _allObs.push_back(new t_frqObs(*pppSatObs._obs[ii]));
    6866  }
    6967  prepareObs();
     
    7371////////////////////////////////////////////////////////////////////////////
    7472t_pppSatObs::~t_pppSatObs() {
    75   map<t_obsType, t_frqObs*>::const_iterator it;
    76   for (it = _allObs.begin(); it != _allObs.end(); it++) {
    77     delete it->second;
     73  for (unsigned ii = 0; ii < _allObs.size(); ii++) {
     74    delete _allObs[ii];
    7875  }
    7976}
     
    9390  const string preferredAttrib = "CWP";
    9491  for (unsigned iPref = 0; iPref < preferredAttrib.length(); iPref++) {
    95     t_obsType obsType1 = "1?";
    96     obsType1[1] = preferredAttrib[iPref];
    97     if (_validObs1 == 0 && _allObs.find(obsType1) != _allObs.end()) {
    98       t_frqObs* obs = _allObs[obsType1];
    99       if (obs->_codeValid && obs->_phaseValid) {
    100         _validObs1 = obs;
     92    string obsType1 = "1?"; obsType1[1] = preferredAttrib[iPref];
     93    if (_validObs1 == 0) {
     94      for (unsigned ii = 0; ii < _allObs.size(); ii++) {
     95        t_frqObs* obs = _allObs[ii];
     96        if (obs->_rnxType2ch == obsType1 && obs->_codeValid && obs->_phaseValid) {
     97          _validObs1 = obs;
     98        }
    10199      }
    102100    }
    103101    if (dualFreq) {
    104       t_obsType obsType2 = "2?";
    105       obsType2[1] = preferredAttrib[iPref];
    106       if (_validObs2 == 0 && _allObs.find(obsType2) != _allObs.end()) {
    107         t_frqObs* obs = _allObs[obsType2];
    108         if (obs->_codeValid && obs->_phaseValid) {
    109           _validObs2 = obs;
     102      string obsType2 = "2?"; obsType2[1] = preferredAttrib[iPref];
     103      if (_validObs2 == 0) {
     104        for (unsigned ii = 0; ii < _allObs.size(); ii++) {
     105          t_frqObs* obs = _allObs[ii];
     106          if (obs->_rnxType2ch == obsType2 && obs->_codeValid && obs->_phaseValid) {
     107            _validObs2 = obs;
     108          }
    110109        }
    111110      }
  • trunk/BNC/src/PPP/pppSatObs.h

    r5823 r5830  
    99
    1010namespace BNC_PPP {
    11 
    12 typedef std::string t_obsType;
    1311
    1412class t_pppStation;
     
    4442
    4543  bool slip() const {
    46     std::map<t_obsType, t_frqObs*>::const_iterator it;
    47     for (it = _allObs.begin(); it != _allObs.end(); it++) {
    48       if (it->second->_slip) {
     44    for (unsigned ii = 0; ii < _allObs.size(); ii++) {
     45      if (_allObs[ii]->_slip) {
    4946        return true;
    5047      }
     
    5552  int slipCounter() const {
    5653    int cnt = -1;
    57     std::map<t_obsType, t_frqObs*>::const_iterator it;
    58     for (it = _allObs.begin(); it != _allObs.end(); it++) {
    59       if (it->second->_slipCounter > cnt) {
    60         cnt = it->second->_slipCounter;
     54    for (unsigned ii = 0; ii < _allObs.size(); ii++) {
     55      if (_allObs[ii]->_slipCounter > cnt) {
     56        cnt = _allObs[ii]->_slipCounter;
    6157      }
    6258    }
     
    6662  int biasJumpCounter() const {
    6763    int jmp = -1;
    68     std::map<t_obsType, t_frqObs*>::const_iterator it;
    69     for (it = _allObs.begin(); it != _allObs.end(); it++) {
    70       if (it->second->_biasJumpCounter > jmp) {
    71         jmp = it->second->_biasJumpCounter;
     64    for (unsigned ii = 0; ii < _allObs.size(); ii++) {
     65      if (_allObs[ii]->_biasJumpCounter > jmp) {
     66        jmp = _allObs[ii]->_biasJumpCounter;
    7267      }
    7368    }
     
    118113  };
    119114
    120   t_prn                          _prn;
    121   bncTime                        _time;
    122   int                            _channel;
    123   std::map<t_obsType, t_frqObs*> _allObs;
    124   bool                           _valid;
    125   t_frqObs*                      _validObs1;
    126   t_frqObs*                      _validObs2;
    127   double                         _f1;
    128   double                         _f2;
    129   double                         _rawC1;
    130   double                         _rawC2;
    131   double                         _rawL1;
    132   double                         _rawL2;
    133   ColumnVector                   _xcSat;
    134   ColumnVector                   _vvSat;
    135   t_model                        _model;
    136   bool                           _outlier;
    137   std::map<t_lc::type, double>   _res;
     115  t_prn                        _prn;
     116  bncTime                      _time;
     117  int                          _channel;
     118  std::vector<t_frqObs*>      _allObs;
     119  bool                         _valid;
     120  t_frqObs*                    _validObs1;
     121  t_frqObs*                    _validObs2;
     122  double                       _f1;
     123  double                       _f2;
     124  double                       _rawC1;
     125  double                       _rawC2;
     126  double                       _rawL1;
     127  double                       _rawL2;
     128  ColumnVector                 _xcSat;
     129  ColumnVector                 _vvSat;
     130  t_model                      _model;
     131  bool                         _outlier;
     132  std::map<t_lc::type, double> _res;
    138133};
    139134
Note: See TracChangeset for help on using the changeset viewer.