Ignore:
Timestamp:
Nov 15, 2018, 11:14:49 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
  • branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp

    r8509 r8541  
    337337    ColumnVector rtnClkSig; // [m, m/s, m/s²]
    338338    t_prn prn;
    339 
     339   
    340340    QTextStream in(lines[ii].toAscii());
    341341
     
    373373    int number = key.mid(1, 2).toInt();
    374374    int flags = 0;
     375
    375376    if (sys == 'E') { // I/NAV
    376377      flags = 1;
     
    503504        }
    504505        else {
    505           in >> numVal;
    506           for (int ii = 0; ii < numVal; ii++) {
    507             double dummy;
    508             in >> dummy;
    509           }
     506          emit(newMessage("                      RTNET format error: "
     507                          +  lines[ii].toAscii(), false));
     508          qDebug() << "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str())
     509                      + " " + QByteArray(epoTime.timestr().c_str()) + " "
     510                      + _casterID.toAscii();
     511          qDebug() << "                      RTNET format error: " + lines[ii].toAscii();
    510512        }
    511513      }
     
    544546      if (sd) {
    545547        QString outLine;
    546         processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, rtnUra,
    547             rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
     548        t_irc irc = processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC,
     549                                     rtnUra, rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
     550        if (irc != success) {
     551          continue;
     552        }
    548553      }
    549554
     
    22592264//
    22602265////////////////////////////////////////////////////////////////////////////
    2261 void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
     2266t_irc bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
    22622267    double GPSweeks, const QString& prn, const ColumnVector& rtnAPC,
    22632268    double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel,
     
    22672272  // Broadcast Position and Velocity
    22682273  // -------------------------------
    2269   ColumnVector xB(7);
     2274  ColumnVector xB(6);
    22702275  ColumnVector vB(3);
    2271   eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
     2276  t_irc irc = eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
     2277
     2278  if (irc != success) {
     2279    return irc;
     2280  }
    22722281
    22732282  // Precise Position
    22742283  // ----------------
    22752284  ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
     2285
     2286  if (xP.size() == 0) {
     2287    return failure;
     2288  }
    22762289
    22772290  double dc = 0.0;
     
    22962309  // ----------------
    22972310  double dClkA0 = rtnClk(1) - (xB(4) - dc) * t_CST::c;
    2298   double dClkA1 = 0.0;
    2299   double dClkA2 = 0.0;
    2300   if (rtnClk(2)) {
    2301     dClkA0 = rtnClk(1) - (xB(5) - dc) * t_CST::c;
    2302     dClkA1 = rtnClk(2) -  xB(6) * t_CST::c;
    2303   }
    2304   if (rtnClk(3)) {
    2305     dClkA2 = rtnClk(3) - xB(7) * t_CST::c;
    2306   }
     2311  double dClkA1 = rtnClk(2) -  xB(5) * t_CST::c;
     2312  double dClkA2 = rtnClk(3) -  xB(6) * t_CST::c;
    23072313
    23082314  if (sd) {
     
    23582364    _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate);
    23592365  }
     2366  return success;
    23602367}
    23612368
Note: See TracChangeset for help on using the changeset viewer.