Changeset 8542 in ntrip


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

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

Location:
trunk/BNC/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP_SSR_I/pppClient.cpp

    r8483 r8542  
    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) {
  • trunk/BNC/src/RTCM/rtcm_utils.cpp

    r8483 r8542  
    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);
  • trunk/BNC/src/bncephuser.cpp

    r8505 r8542  
    188188  // Simple Check - check satellite radial distance
    189189  // ----------------------------------------------
    190   ColumnVector xc(7);
     190  ColumnVector xc(6);
    191191  ColumnVector vv(3);
    192192  if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
  • trunk/BNC/src/combination/bnccomb.cpp

    r8483 r8542  
    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));
  • trunk/BNC/src/ephemeris.cpp

    r8489 r8542  
    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;
     
    923921  static const double gmWGS = 398.6004418e12;
    924922
    925   memset(xc, 0, 7*sizeof(double));
     923  memset(xc, 0, 6*sizeof(double));
    926924  memset(vv, 0, 3*sizeof(double));
    927925
     
    971969  double tc = tt - _TOC;
    972970  xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
    973 
    974   xc[4] = _clock_bias;
    975   xc[5] = _clock_drift;
    976   xc[6] = _clock_driftrate;
    977971
    978972  // Velocity
     
    10071001  //xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
    10081002
     1003  xc[4] = _clock_drift + _clock_driftrate*tc;
     1004  xc[5] = _clock_driftrate;
     1005 
    10091006  return success;
    10101007}
     
    13191316  xc[3] = _agf0 + _agf1 * dt;
    13201317
    1321   xc[4] = _agf0;
    1322   xc[5] = _agf1;
    1323   xc[6] = 0.0;
     1318  xc[4] = _agf1;
     1319  xc[5] = 0.0;
    13241320
    13251321  return success;
     
    16731669  xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
    16741670
    1675   xc[4] = _clock_bias;
    1676   xc[5] = _clock_drift;
    1677   xc[6] = _clock_driftrate;
    1678 
    16791671  // dotC  = _clock_drift + _clock_driftrate*tc
    16801672  //       - 4.442807633e-10*_e*sqrt(a0)*cos(E) * dEdM * n;
     
    16871679  // xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
    16881680
     1681  xc[4] = _clock_drift + _clock_driftrate*tc;
     1682  xc[5] = _clock_driftrate;
    16891683  return success;
    16901684}
  • trunk/BNC/src/rinex/reqcanalyze.cpp

    r8495 r8542  
    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) &&
  • 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
  • trunk/BNC/src/upload/bncrtnetuploadcaster.h

    r8483 r8542  
    3030  virtual ~bncRtnetUploadCaster();
    3131 private:
    32   void processSatellite(const t_eph* eph, int GPSweek,
     32  t_irc processSatellite(const t_eph* eph, int GPSweek,
    3333                        double GPSweeks, const QString& prn,
    3434                        const ColumnVector& rtnAPC,
Note: See TracChangeset for help on using the changeset viewer.