Changeset 8541 in ntrip


Ignore:
Timestamp:
Nov 15, 2018, 11:14:49 AM (5 weeks ago)
Author:
stuerze
Message:

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

Location:
branches/BNC_2.12/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/PPP_SSR_I/pppClient.cpp

    r8484 r8541  
    408408    bncTime ToT = satData->tt - prange / t_CST::c - clkSat;
    409409
    410     ColumnVector xc(7);
     410    ColumnVector xc(6);
    411411    ColumnVector vv(3);
    412412    if (getSatPos(ToT, satData->prn, xc, vv) != success) {
  • branches/BNC_2.12/src/RTCM/rtcm_utils.cpp

    r8484 r8541  
    3535  // --------------
    3636  rho = 0.0;
    37   ColumnVector xc(7);
     37  ColumnVector xc(6);
    3838  ColumnVector vv(3);
    3939  eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false);
  • branches/BNC_2.12/src/bncephuser.cpp

    r8506 r8541  
    189189  // Simple Check - check satellite radial distance
    190190  // ----------------------------------------------
    191   ColumnVector xc(7);
     191  ColumnVector xc(6);
    192192  ColumnVector vv(3);
    193193  if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
  • branches/BNC_2.12/src/combination/bnccomb.cpp

    r8484 r8541  
    449449  }
    450450
    451   ColumnVector oldXC(7);
     451  ColumnVector oldXC(6);
    452452  ColumnVector oldVV(3);
    453453  corr->_eph->getCrd(corr->_time, oldXC, oldVV, false);
    454454
    455   ColumnVector newXC(7);
     455  ColumnVector newXC(6);
    456456  ColumnVector newVV(3);
    457457  lastEph->getCrd(corr->_time, newXC, newVV, false);
     
    688688    const t_eph* eph = corr->_eph;
    689689    if (eph) {
    690       ColumnVector xc(7);
     690      ColumnVector xc(6);
    691691      ColumnVector vv(3);
    692692      eph->getCrd(_resTime, xc, vv, false);
     
    740740    clkCorrections.push_back(clkCorr);
    741741
    742     ColumnVector xc(7);
     742    ColumnVector xc(6);
    743743    ColumnVector vv(3);
    744744    corr->_eph->setClkCorr(dynamic_cast<const t_clkCorr*>(&clkCorr));
  • branches/BNC_2.12/src/ephemeris.cpp

    r8497 r8541  
    6565                                                 << 900 << 1800 << 3600 << 7200
    6666                                                 << 10800;
    67   xc.ReSize(7);
     67  xc.ReSize(6);
    6868  vv.ReSize(3);
    6969  if (position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data()) != success) {
     
    320320  static const double gmGRS      = 398.6005e12;
    321321
    322   memset(xc, 0, 7*sizeof(double));
     322  memset(xc, 0, 6*sizeof(double));
    323323  memset(vv, 0, 3*sizeof(double));
    324324
     
    368368  double tc = tt - _TOC;
    369369  xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
    370 
    371   xc[4] = _clock_bias;
    372   xc[5] = _clock_drift;
    373   xc[6] = _clock_driftrate;
    374370
    375371  // Velocity
     
    402398  xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
    403399
     400  xc[4] = _clock_drift + _clock_driftrate*tc;
     401  xc[5] = _clock_driftrate;
     402
    404403  return success;
    405404}
     
    618617  static const double nominalStep = 10.0;
    619618
    620   memset(xc, 0, 7*sizeof(double));
     619  memset(xc, 0, 6*sizeof(double));
    621620  memset(vv, 0, 3*sizeof(double));
    622621
     
    655654  xc[3] = -_tau + _gamma * dtClk;
    656655
    657   xc[4] = -_tau;
    658   xc[5] = _gamma;
    659   xc[6] = 0.0;
     656  xc[4] = _gamma;
     657  xc[5] = 0.0;
    660658
    661659  return success;
     
    922920  static const double gmWGS = 398.6004418e12;
    923921
    924   memset(xc, 0, 7*sizeof(double));
     922  memset(xc, 0, 6*sizeof(double));
    925923  memset(vv, 0, 3*sizeof(double));
    926924
     
    970968  double tc = tt - _TOC;
    971969  xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
    972 
    973   xc[4] = _clock_bias;
    974   xc[5] = _clock_drift;
    975   xc[6] = _clock_driftrate;
    976970
    977971  // Velocity
     
    10061000  //xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
    10071001
     1002  xc[4] = _clock_drift + _clock_driftrate*tc;
     1003  xc[5] = _clock_driftrate;
     1004
    10081005  return success;
    10091006}
     
    13171314  xc[3] = _agf0 + _agf1 * dt;
    13181315
    1319   xc[4] = _agf0;
    1320   xc[5] = _agf1;
    1321   xc[6] = 0.0;
     1316  xc[4] = _agf1;
     1317  xc[5] = 0.0;
    13221318
    13231319  return success;
     
    16981694  xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
    16991695
    1700   xc[4] = _clock_bias;
    1701   xc[5] = _clock_drift;
    1702   xc[6] = _clock_driftrate;
    1703 
    17041696  // dotC  = _clock_drift + _clock_driftrate*tc
    17051697  //       - 4.442807633e-10*_e*sqrt(a0)*cos(E) * dEdM * n;
     
    17081700  // -----------------------
    17091701  // correspondent to BDS ICD and to SSR standard
    1710     xc[3] -= 4.442807633e-10 * _e * sqrt(a0) *sin(E);
     1702  xc[3] -= 4.442807633e-10 * _e * sqrt(a0) *sin(E);
    17111703  // correspondent to IGS convention
    17121704  // xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
     1705
     1706  xc[4] = _clock_drift + _clock_driftrate*tc;
     1707  xc[5] = _clock_driftrate;
    17131708
    17141709  return success;
  • branches/BNC_2.12/src/rinex/reqcanalyze.cpp

    r8496 r8541  
    288288    }
    289289    if (eph) {
    290       ColumnVector xSat(7);
     290      ColumnVector xSat(6);
    291291      ColumnVector vv(3);
    292292      if (eph->getCrd(_currEpo->tt, xSat, vv, false) == success) {
     
    351351  }
    352352  if (eph) {
    353     ColumnVector xc(7);
     353    ColumnVector xc(6);
    354354    ColumnVector vv(3);
    355355    if ( xyzSta.size() == 3 && (xyzSta[0] != 0.0 || xyzSta[1] != 0.0 || xyzSta[2] != 0.0) &&
     
    11011101      for (epoTime = startTime - interval; epoTime < endTime;
    11021102           epoTime = epoTime + interval) {
    1103         ColumnVector xc(7);
     1103        ColumnVector xc(6);
    11041104        ColumnVector vv(3);
    11051105        if ( xyzSta.size() == 3 && (xyzSta[0] != 0.0 || xyzSta[1] != 0.0 || xyzSta[2] != 0.0) &&
  • 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
  • branches/BNC_2.12/src/upload/bncrtnetuploadcaster.h

    r8484 r8541  
    2929  virtual ~bncRtnetUploadCaster();
    3030 private:
    31   void processSatellite(const t_eph* eph, int GPSweek,
     31  t_irc processSatellite(const t_eph* eph, int GPSweek,
    3232                        double GPSweeks, const QString& prn,
    3333                        const ColumnVector& rtnAPC,
Note: See TracChangeset for help on using the changeset viewer.