Changeset 5912 in ntrip for trunk/BNC/src/PPP/pppOptions.cpp


Ignore:
Timestamp:
Aug 12, 2014, 4:21:23 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r5843 r5912  
    4949t_pppOptions::t_pppOptions() {
    5050  _xyzAprRover.ReSize(3); _xyzAprRover = 0.0;
    51   _ellAprRover.ReSize(3); _ellAprRover = 0.0;
    5251  _neuEccRover.ReSize(3); _neuEccRover = 0.0;
     52  _aprSigCrd.ReSize(3);   _aprSigCrd   = 0.0;
     53  _noiseCrd.ReSize(3);    _noiseCrd    = 0.0;
    5354}
    5455
     
    5859}
    5960
    60 //
    61 //////////////////////////////////////////////////////////////////////////////
    62 bool t_pppOptions::dualFreqRequired() const {
    63   return true;
    64 }
    6561
    6662//
    6763//////////////////////////////////////////////////////////////////////////////
    68 bool t_pppOptions::biasRequired() const {
    69   return false;
    70 }
    71 
    72 //
    73 //////////////////////////////////////////////////////////////////////////////
    74 bool t_pppOptions::corrRequired() const {
    75   if (_corrMount.empty()) {
    76     return false;
     64const std::vector<t_lc::type>& t_pppOptions::LCs(char system) const {
     65  if      (system == 'R') {
     66    return _LCsGLONASS;
     67  }
     68  else if (system == 'E') {
     69    return _LCsGalileo;
    7770  }
    7871  else {
    79     return true;
     72    return _LCsGPS;
    8073  }
    8174}
     
    8376//
    8477//////////////////////////////////////////////////////////////////////////////
    85 bool t_pppOptions::useGlonass() const  {
    86   return (_lcGLONASS.size() > 0);
     78bool t_pppOptions::dualFreqRequired(char system) const {
     79  const std::vector<t_lc::type>& lcs = LCs(system);
     80  for (unsigned ii = 0; ii < lcs.size(); ii++) {
     81    if (t_lc::need2ndFreq(lcs[ii])) {
     82      return true;
     83    }
     84  }
     85  return false;
     86
     87
     88//
     89//////////////////////////////////////////////////////////////////////////////
     90bool t_pppOptions::useOrbClkCorr() const {
     91  if (_realTime) {
     92    return !_corrMount.empty();
     93  }
     94  else {
     95    return !_corrFile.empty();
     96  }
     97}
     98
     99// Processed satellite systems
     100/////////////////////////////////////////////////////////////////////////////
     101vector<char> t_pppOptions::systems() const {
     102  vector<char> answ;
     103  if (_LCsGPS.size()     > 0) answ.push_back('G');
     104  if (_LCsGLONASS.size() > 0) answ.push_back('R');
     105  return answ;
    87106}
    88107
    89108//
    90 //////////////////////////////////////////////////////////////////////////////
    91 bool t_pppOptions::xyzAprRoverSet() const {
    92   return (_xyzAprRover[0] != 0.0 || _xyzAprRover[1] != 0.0 || _xyzAprRover[2] != 0.0);
    93 }
    94 
    95 //
    96 //////////////////////////////////////////////////////////////////////////////
    97 bool t_pppOptions::estTropo() const  {
    98   return (_sigTropo > 0.0 || _noiseTropo > 0.0);
    99 }
    100 
    101 //
    102 //////////////////////////////////////////////////////////////////////////////
    103 vector<t_lc::type> t_pppOptions::LCs() const {
    104 
    105   vector<t_lc::type> allLCs = _lcGPS;
    106 
    107   for (unsigned ii = 0; ii < _lcGLONASS.size(); ii++) {
    108     bool found = false;
    109     for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) {
    110       if (allLCs[iAll] == _lcGLONASS[ii]) {
    111         found = true;
    112         break;
    113       }
    114     }
    115     if (!found) {
    116       allLCs.push_back(_lcGLONASS[ii]);
     109/////////////////////////////////////////////////////////////////////////////
     110vector<t_lc::type> t_pppOptions::ambLCs(char system) const {
     111 
     112  const vector<t_lc::type>& allLCs = LCs(system);
     113  vector<t_lc::type>        phaseLCs;
     114  for (unsigned ii = 0; ii < allLCs.size(); ii++) {
     115    if (t_lc::includesPhase(allLCs[ii])) {
     116      phaseLCs.push_back(allLCs[ii]);
    117117    }
    118118  }
    119119
    120   for (unsigned ii = 0; ii < _lcGalileo.size(); ii++) {
    121     bool found = false;
    122     for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) {
    123       if (allLCs[iAll] == _lcGalileo[ii]) {
    124         found = true;
    125         break;
    126       }
    127     }
    128     if (!found) {
    129       allLCs.push_back(_lcGalileo[ii]);
    130     }
     120  vector<t_lc::type> answ;
     121  if      (phaseLCs.size() == 1) {
     122    answ.push_back(phaseLCs[0]);
     123  }
     124  else if (phaseLCs.size() >  1) {
     125    answ.push_back(t_lc::l1);
     126    answ.push_back(t_lc::l2);
    131127  }
    132128
    133   return allLCs; 
     129  return answ;
    134130}
    135 
    136 //
    137 //////////////////////////////////////////////////////////////////////////////
    138 double t_pppOptions::maxRes(t_lc::type tLC) const {
    139 
    140   if (t_lc::includesCode(tLC)) {
    141     return _maxResC1;
    142   }
    143   else {
    144     return _maxResL1;
    145   }
    146 }
Note: See TracChangeset for help on using the changeset viewer.