Ignore:
Timestamp:
Nov 15, 2018, 11:16:46 AM (5 years ago)
Author:
stuerze
Message:

minor changes to consider a satellite clock drift that is introduced via RTNET format

File:
1 edited

Legend:

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

    r8510 r8542  
    507507        }
    508508        else {
    509           in >> numVal;
    510           for (int ii = 0; ii < numVal; ii++) {
    511             double dummy;
    512             in >> dummy;
    513           }
     509          emit(newMessage("                      RTNET format error: "
     510                          +  lines[ii].toLatin1(), false));
     511          qDebug() << "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str())
     512                      + " " + QByteArray(epoTime.timestr().c_str()) + " "
     513                      + _casterID.toLatin1();
     514          qDebug() << "                      RTNET format error: " + lines[ii].toLatin1();
    514515        }
    515516      }
     
    549550      if (sd) {
    550551        QString outLine;
    551         processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, rtnUra,
    552             rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
     552        t_irc irc = processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC,
     553                                     rtnUra, rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
     554        if (irc != success) {
     555          continue;
     556        }
    553557      }
    554558
     
    22642268//
    22652269////////////////////////////////////////////////////////////////////////////
    2266 void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
     2270t_irc bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
    22672271    double GPSweeks, const QString& prn, const ColumnVector& rtnAPC,
    22682272    double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel,
     
    22722276  // Broadcast Position and Velocity
    22732277  // -------------------------------
    2274   ColumnVector xB(7);
     2278  ColumnVector xB(6);
    22752279  ColumnVector vB(3);
    2276   eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
     2280  t_irc irc = eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
     2281
     2282  if (irc != success) {
     2283    return irc;
     2284  }
    22772285
    22782286  // Precise Position
    22792287  // ----------------
    22802288  ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
     2289
     2290  if (xP.size() == 0) {
     2291    return failure;
     2292  }
    22812293
    22822294  double dc = 0.0;
     
    23012313  // ----------------
    23022314  double dClkA0 = rtnClk(1) - (xB(4) - dc) * t_CST::c;
    2303   double dClkA1 = 0.0;
    2304   double dClkA2 = 0.0;
    2305   if (rtnClk(2)) {
    2306     dClkA0 = rtnClk(1) - (xB(5) - dc) * t_CST::c;
    2307     dClkA1 = rtnClk(2) -  xB(6) * t_CST::c;
    2308   }
    2309   if (rtnClk(3)) {
    2310     dClkA2 = rtnClk(3) - xB(7) * t_CST::c;
    2311   }
     2315  double dClkA1 = rtnClk(2) -  xB(5) * t_CST::c;
     2316  double dClkA2 = rtnClk(3) -  xB(6) * t_CST::c;
    23122317
    23132318  if (sd) {
     
    23632368    _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate);
    23642369  }
     2370  return success;
    23652371}
    23662372
Note: See TracChangeset for help on using the changeset viewer.