Changeset 5551 in ntrip


Ignore:
Timestamp:
Nov 19, 2013, 11:27:23 AM (11 years ago)
Author:
stoecker
Message:

proper RINEX 2 output for Lx and Sx

Location:
trunk/BNC/src/RTCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM/GPSDecoder.cpp

    r5550 r5551  
    9797//////////////////////////////////////////////////////////////////////////////
    9898void t_obs::setMeasdata(QString rnxStr, float rnxVers, double value) {
    99 
    100   if (rnxVers < 3.0) {
    101     if      (rnxStr == "C1") rnxStr = "C1C";
    102     else if (rnxStr == "P1") rnxStr = "C1P";
    103     else if (rnxStr == "C2") rnxStr = "C2C";
    104     else if (rnxStr == "P2") rnxStr = "C2P";
    105   }
    106 
    107   int ie = iEntry(rnxStr);
     99  int ie = iEntry(rnxStr, rnxVers);
    108100
    109101  if (ie != -1) {
     
    116108//////////////////////////////////////////////////////////////////////////////
    117109double t_obs::measdata(QString rnxStr, float rnxVers) const {
    118  
    119   if (rnxVers < 3.0) {
    120     if      (rnxStr == "C1") rnxStr = "C1C";
    121     else if (rnxStr == "P1") rnxStr = "C1P";
    122     else if (rnxStr == "C2") rnxStr = "C2C";
    123     else if (rnxStr == "P2") rnxStr = "C2P";
    124   }
    125 
    126   int ie = iEntry(rnxStr);
     110  int ie = iEntry(rnxStr, rnxVers);
    127111
    128112  if (ie != -1) {
     
    149133//
    150134//////////////////////////////////////////////////////////////////////////////
    151 int t_obs::iEntry(QString rnxStr) const {
     135int t_obs::iEntry(QString rnxStr, float rnxVers, bool cmode) const {
    152136
    153137  int res = 0;
     138  bool tryagain = false;
     139  QString rnxStrOrig = rnxStr;
     140 
     141  if (rnxVers < 3.0) {
     142    if      (rnxStr == "C1") rnxStr = "C1C";
     143    else if (rnxStr == "P1") rnxStr = "C1P";
     144    else if (rnxStr == "C2") rnxStr = "C2C";
     145    else if (rnxStr == "P2") rnxStr = "C2P";
     146    if(cmode)
     147    {
     148      if      (rnxStr == "S1") rnxStr = "S1C";
     149      else if (rnxStr == "L1") rnxStr = "L1C";
     150      else if (rnxStr == "S2") rnxStr = "S2C";
     151      else if (rnxStr == "L2") rnxStr = "L2C";
     152    }
     153    else
     154    {
     155      if      (rnxStr == "S1") {rnxStr = "S1P"; tryagain = true; }
     156      else if (rnxStr == "L1") {rnxStr = "L1P"; tryagain = true; }
     157      else if (rnxStr == "S2") {rnxStr = "S2P"; tryagain = true; }
     158      else if (rnxStr == "L2") {rnxStr = "L2P"; tryagain = true; }
     159    }
     160  }
    154161
    155162  // Observation Type (Code, Phase, Doppler, SNR)
     
    242249  }
    243250
     251  /* Note: We prefer P over C for Lx or Sx (i.e. we first try for P values) */
     252  if(_codetype[res].isEmpty() && tryagain)
     253    res = iEntry(rnxStrOrig, rnxVers, true);
     254
    244255  return res;
    245256}
  • trunk/BNC/src/RTCM/GPSDecoder.h

    r5550 r5551  
    9696
    9797 private:
    98   int iEntry(QString rnxStr) const;
     98  int iEntry(QString rnxStr, float rnxVers, bool cmode=false) const;
    9999};
    100100
Note: See TracChangeset for help on using the changeset viewer.