Changeset 6021 in ntrip


Ignore:
Timestamp:
Aug 21, 2014, 9:45:53 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppInclude.h

    r6019 r6021  
    131131
    132132  static bool includesPhase(type tt) {
    133     if (tt == l1 || tt == l2 || tt == lIF || tt == MW || tt == CL) return true;
     133    switch (tt) {
     134    case l1:
     135    case l2:
     136    case lIF:
     137    case MW:
     138    case CL:
     139      return true;
     140    case c1:
     141    case c2:
     142    case cIF:
     143      return false;
     144    case dummy: case maxLc: return false;
     145    }
    134146    return false;
    135147  }
    136148
    137149  static bool includesCode(type tt) {
    138     if (tt == c1 || tt == c2 || tt == cIF || tt == MW || tt == CL) return true;
     150    switch (tt) {
     151    case c1:
     152    case c2:
     153    case cIF:
     154    case MW:
     155    case CL:
     156      return true;
     157    case l1:
     158    case l2:
     159    case lIF:
     160      return false;
     161    case dummy: case maxLc: return false;
     162    }
    139163    return false;
    140164  }
    141165
     166  static t_frequency::type toFreq(char sys, type tt) {
     167    switch (tt) {
     168    case l1: case c1:
     169      if      (sys == 'G') return t_frequency::G1;
     170      else if (sys == 'R') return t_frequency::R1;
     171      else if (sys == 'E') return t_frequency::E1;
     172      else                 return t_frequency::dummy;
     173    case l2: case c2:
     174      if      (sys == 'G') return t_frequency::G2;
     175      else if (sys == 'R') return t_frequency::R2;
     176      else                 return t_frequency::dummy;
     177    case lIF: case cIF: case MW: case CL:
     178      return t_frequency::dummy;
     179    case dummy: case maxLc: return t_frequency::dummy;
     180    }
     181    return t_frequency::dummy;
     182  }
     183
    142184  static std::string toString(type tt) {
    143     if      (tt == l1)  return "l1";
    144     else if (tt == l2)  return "l2";
    145     else if (tt == c1)  return "c1";
    146     else if (tt == c2)  return "c2";
    147     else if (tt == lIF) return "lIF";
    148     else if (tt == cIF) return "cIF";
    149     else if (tt == MW)  return "MW";
    150     else if (tt == CL)  return "CL";
    151     return std::string();
     185    switch (tt) {
     186    case l1:  return "l1";
     187    case l2:  return "l2";
     188    case lIF: return "lIF";
     189    case MW:  return "MW";
     190    case CL:  return "CL";
     191    case c1:  return "c1";
     192    case c2:  return "c2";
     193    case cIF: return "cIF";
     194    case dummy: case maxLc: return "";
     195    }
     196    return "";
    152197  }
    153198};
  • trunk/BNC/src/PPP/pppParlist.cpp

    r5979 r6021  
    162162      }
    163163      else {
    164         ColumnVector coeff(4);
    165         obs->lc(tLC, 0.0, 0.0, 0.0, 0.0, &coeff);
     164        map<t_frequency::type, double> codeCoeff;
     165        map<t_frequency::type, double> phaseCoeff;
     166        obs->lcCoeff(tLC, codeCoeff, phaseCoeff);
    166167        if      (_tLC == t_lc::l1) {
    167           return obs->lambda(t_lc::l1) * coeff(1);
     168          return obs->lambda(t_lc::l1) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
    168169        }
    169170        else if (_tLC == t_lc::l2) {
    170           return obs->lambda(t_lc::l2) * coeff(2);
     171          return obs->lambda(t_lc::l2) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
    171172        }
    172173      }
  • trunk/BNC/src/PPP/pppSatObs.h

    r6020 r6021  
    3030  bool                modelSet() const {return _model._set;}
    3131  void                printModel() const;
     32  void                lcCoeff(t_lc::type tLC,
     33                              std::map<t_frequency::type, double>& codeCoeff,
     34                              std::map<t_frequency::type, double>& phaseCoeff) const;
    3235  double              lc(t_lc::type tLC);
    3336  double              lambda(t_lc::type tLC) const;
Note: See TracChangeset for help on using the changeset viewer.