Changeset 5666 in ntrip


Ignore:
Timestamp:
May 26, 2014, 5:10:21 PM (10 years ago)
Author:
stoecker
Message:

update due to RTCM-SSR fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r5662 r5666  
    281281  struct ClockOrbit co;
    282282  memset(&co, 0, sizeof(co));
    283   co.GPSEpochTime      = static_cast<int>(epoTime.gpssec());
    284   co.GLONASSEpochTime = static_cast<int>(fmod(epoTime.gpssec(), 86400.0))
     283  co.EpochTime[CLOCKORBIT_SATGPS]     = static_cast<int>(epoTime.gpssec());
     284  co.EpochTime[CLOCKORBIT_SATGLONASS] = static_cast<int>(fmod(epoTime.gpssec(), 86400.0))
    285285                       + 3 * 3600 - gnumleap(year, month, day);
    286   co.ClockDataSupplied = 1;
    287   co.OrbitDataSupplied = 1;
     286  co.Supplied[COBOFS_CLOCK] = 1;
     287  co.Supplied[COBOFS_ORBIT] = 1;
    288288  co.SatRefDatum       = DATUM_ITRF;
    289289  co.SSRIOD            = _IOD;
     
    291291  co.SSRSolutionID     = _SID;
    292292
    293   struct Bias bias;
     293  struct CodeBias bias;
    294294  memset(&bias, 0, sizeof(bias));
    295   bias.GPSEpochTime     = co.GPSEpochTime;
    296   bias.GLONASSEpochTime = co.GLONASSEpochTime;
     295  bias.EpochTime[CLOCKORBIT_SATGPS]     = co.EpochTime[CLOCKORBIT_SATGPS];
     296  bias.EpochTime[CLOCKORBIT_SATGLONASS] = co.EpochTime[CLOCKORBIT_SATGLONASS];
    297297
    298298  // Default Update Interval
     
    421421      struct ClockOrbit::SatData* sd = 0;
    422422      if      (prn[0] == 'G') {
    423         sd = co.Sat + co.NumberOfGPSSat;
    424         ++co.NumberOfGPSSat;
     423        sd = co.Sat + co.NumberOfSat[CLOCKORBIT_SATGPS];
     424        ++co.NumberOfSat[CLOCKORBIT_SATGPS];
    425425      }
    426426      else if (prn[0] == 'R') {
    427         sd = co.Sat + CLOCKORBIT_NUMGPS + co.NumberOfGLONASSSat;
    428         ++co.NumberOfGLONASSSat;
     427        sd = co.Sat + CLOCKORBIT_NUMGPS + co.NumberOfSat[CLOCKORBIT_SATGLONASS];
     428        ++co.NumberOfSat[CLOCKORBIT_SATGLONASS];
    429429      }
    430430      if (sd) {
     
    434434      }
    435435
    436       struct Bias::BiasSat* biasSat = 0;
     436      struct CodeBias::BiasSat* biasSat = 0;
    437437      if      (prn[0] == 'G') {
    438         biasSat = bias.Sat + bias.NumberOfGPSSat;
    439         ++bias.NumberOfGPSSat;
     438        biasSat = bias.Sat + bias.NumberOfSat[CLOCKORBIT_SATGPS];
     439        ++bias.NumberOfSat[CLOCKORBIT_SATGPS];
    440440      }
    441441      else if (prn[0] == 'R') {
    442         biasSat = bias.Sat + CLOCKORBIT_NUMGPS + bias.NumberOfGLONASSSat;
    443         ++bias.NumberOfGLONASSSat;
     442        biasSat = bias.Sat + CLOCKORBIT_NUMGPS + bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
     443        ++bias.NumberOfSat[CLOCKORBIT_SATGLONASS];
    444444      }
    445445
     
    572572  // ------------------------------------
    573573  if (_samplRtcmEphCorr == 0.0) {
    574     if (co.NumberOfGPSSat > 0 || co.NumberOfGLONASSSat > 0) {
     574    if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0 || co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) {
    575575      char obuffer[CLOCKORBIT_BUFFERSIZE];
    576576      int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
     
    584584  // --------------------------------------
    585585  else {
    586     if (co.NumberOfGPSSat > 0) {
     586    if (co.NumberOfSat[CLOCKORBIT_SATGPS] > 0) {
    587587      char obuffer[CLOCKORBIT_BUFFERSIZE];
    588588      if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
     
    594594        }
    595595      }
    596       int mmsg = (co.NumberOfGLONASSSat > 0) ? 1 : 0;
     596      int mmsg = (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) ? 1 : 0;
    597597      int len2 = MakeClockOrbit(&co, COTYPE_GPSCLOCK, mmsg, obuffer, sizeof(obuffer));
    598598      if (len2 > 0) {
     
    600600      }
    601601    }
    602     if (co.NumberOfGLONASSSat > 0) {
     602    if (co.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) {
    603603      char obuffer[CLOCKORBIT_BUFFERSIZE];
    604604      if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
     
    620620  // ------
    621621  QByteArray hlpBufferBias;
    622   if (bias.NumberOfGPSSat > 0 || bias.NumberOfGLONASSSat > 0) {
     622  if (bias.NumberOfSat[CLOCKORBIT_SATGPS] > 0 || bias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) {
    623623    char obuffer[CLOCKORBIT_BUFFERSIZE];
    624     int len = MakeBias(&bias, BTYPE_AUTO, 0, obuffer, sizeof(obuffer));
     624    int len = MakeCodeBias(&bias, BTYPE_AUTO, 0, obuffer, sizeof(obuffer));
    625625    if (len > 0) {
    626626      hlpBufferBias = QByteArray(obuffer, len);
Note: See TracChangeset for help on using the changeset viewer.