Changeset 5576 in ntrip for trunk/BNC/src/RTCM3


Ignore:
Timestamp:
Nov 25, 2013, 5:47:57 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/RTCM3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp

    r5563 r5576  
    8282  memset(&_co, 0, sizeof(_co));
    8383  memset(&_bias, 0, sizeof(_bias));
     84
     85  _providerID[0] = -1;
     86  _providerID[1] = -1;
     87  _providerID[2] = -1;
    8488}
    8589
     
    220224        }
    221225
     226        checkProviderID();
     227
    222228        QStringList asciiLines = corrsToASCIIlines(GPSweek, _GPSweeks,
    223229                                                   _co, &_bias);
     
    309315                     "   %8.3f %8.3f %8.3f %8.3f"
    310316                     "   %10.5f %10.5f %10.5f %10.5f"
    311                      "   %10.5f"
    312                      "   %5d %2d %2d",
     317                     "   %10.5f",
    313318                     co.Sat[ii].IOD,
    314319                     co.Sat[ii].Clock.DeltaA0,
     
    320325                     co.Sat[ii].Orbit.DotDeltaAlongTrack,
    321326                     co.Sat[ii].Orbit.DotDeltaCrossTrack,
    322                      co.Sat[ii].Clock.DeltaA2,
    323                      co.SSRProviderID, co.SSRSolutionID, co.SSRIOD);
     327                     co.Sat[ii].Clock.DeltaA2);
    324328        retLines << linePart+line;
    325329      }
     
    332336        line.sprintf("   %3d"
    333337                     "   %8.3f %8.3f %8.3f"
    334                      "   %10.5f %10.5f %10.5f"
    335                      "   %5d %2d %2d",
     338                     "   %10.5f %10.5f %10.5f",
    336339                     co.Sat[ii].IOD,
    337340                     co.Sat[ii].Orbit.DeltaRadial,
     
    340343                     co.Sat[ii].Orbit.DotDeltaRadial,
    341344                     co.Sat[ii].Orbit.DotDeltaAlongTrack,
    342                      co.Sat[ii].Orbit.DotDeltaCrossTrack,
    343                      co.SSRProviderID, co.SSRSolutionID, co.SSRIOD);
     345                     co.Sat[ii].Orbit.DotDeltaCrossTrack);
    344346        retLines << linePart+line;
    345347      }
     
    416418  return retLines;
    417419}
     420
     421//
     422////////////////////////////////////////////////////////////////////////////
     423void RTCM3coDecoder::checkProviderID() {
     424
     425  if (_co.SSRProviderID == 0 && _co.SSRSolutionID == 0 && _co.SSRIOD == 0) {
     426    return;
     427  }
     428
     429  int newProviderID[3];
     430  newProviderID[0] = _co.SSRProviderID;
     431  newProviderID[1] = _co.SSRSolutionID;
     432  newProviderID[2] = _co.SSRIOD;
     433
     434  bool alreadySet = false;
     435  bool different  = false;
     436
     437  for (unsigned ii = 0; ii < 3; ii++) {
     438    if (_providerID[ii] != -1) {
     439      alreadySet = true;
     440    }
     441    if (_providerID[ii] != newProviderID[ii]) {
     442      different = true;
     443    }
     444    _providerID[ii] = newProviderID[ii];
     445  }
     446   
     447  if (alreadySet && different) {
     448    emit newMessage("RTCM3coDecoder: Provider Changed\n", true);
     449  }
     450}
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.h

    r5120 r5576  
    5555 private:
    5656  void printLine(const QString& line, int GPSweek, double GPSweeks);
     57  void checkProviderID();
    5758  std::ofstream* _out;
    5859  QString        _staID;
     
    6364  ClockOrbit     _co;
    6465  Bias           _bias;
     66  int            _providerID[3];
    6567};
    6668
Note: See TracChangeset for help on using the changeset viewer.