Ignore:
Timestamp:
Sep 18, 2018, 12:50:00 PM (3 years ago)
Author:
stuerze
Message:

SSR parameter clock rate, clock drift and URA are added within RTNET format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp

    r8411 r8484  
    330330  for (int ii = 1; ii < lines.size(); ii++) {
    331331    QString key;  // prn or key VTEC, IND (phase bias indicators)
    332     ColumnVector rtnAPC;
    333     ColumnVector rtnVel;
    334     ColumnVector rtnCoM;
    335     double rtnClk;
     332    double rtnUra;          // [m]
     333    ColumnVector rtnAPC;    // [m, m, m]
     334    ColumnVector rtnVel;    // [m/s, m/s, m/s]]
     335    ColumnVector rtnCoM;    // [m, m, m]
     336    ColumnVector rtnClk;    // [m, m/s, m/s²]
     337    ColumnVector rtnClkSig; // [m, m/s, m/s²]
    336338    t_prn prn;
    337339
     
    432434          }
    433435        }
    434         else if (key == "Clk") {
     436        else if (key == "Ura") {
    435437          in >> numVal;
    436438          if (numVal == 1)
    437             in >> rtnClk;
     439            in >> rtnUra;
     440        }
     441        else if (key == "Clk") {
     442          rtnClk.ReSize(3);
     443          for (int ii = 0; ii < 3; ii++) {
     444            rtnClk[ii] = 0.0;
     445          }
     446          in >> numVal;
     447          for (int ii = 0; ii < numVal; ii++) {
     448            in >> rtnClk[ii];
     449          }
     450        }
     451        else if (key == "ClkSig") {
     452          rtnClkSig.ReSize(3);
     453          for (int ii = 0; ii < 3; ii++) {
     454            rtnClkSig[ii] = 0.0;
     455          }
     456          in >> numVal;
     457          for (int ii = 0; ii < numVal; ii++) {
     458            in >> rtnClkSig[ii];
     459          }
    438460        }
    439461        else if (key == "Vel") {
     
    523545      if (sd) {
    524546        QString outLine;
    525         processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC,
    526             rtnClk, rtnVel, rtnCoM, sd, outLine);
     547        processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, rtnUra,
     548            rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
    527549      }
    528550
     
    22402262void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
    22412263    double GPSweeks, const QString& prn, const ColumnVector& rtnAPC,
    2242     double rtnClk, const ColumnVector& rtnVel, const ColumnVector& rtnCoM,
     2264    double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel,
     2265    const ColumnVector& rtnCoM, const ColumnVector& rtnClkSig,
    22432266    struct ClockOrbit::SatData* sd, QString& outLine) {
    22442267
    22452268  // Broadcast Position and Velocity
    22462269  // -------------------------------
    2247   ColumnVector xB(4);
     2270  ColumnVector xB(7);
    22482271  ColumnVector vB(3);
    22492272  eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
     
    22732296  // Clock Correction
    22742297  // ----------------
    2275   double dClk = rtnClk - (xB(4) - dc) * t_CST::c;
     2298  double dClkA0 = rtnClk(1) - (xB(5) - dc) * t_CST::c;
     2299  double dClkA1 = rtnClk(2) - xB(6) * t_CST::c;
     2300  double dClkA2 = rtnClk(3) - xB(7) * t_CST::c;
    22762301
    22772302  if (sd) {
    22782303    sd->ID = prn.mid(1).toInt();
    22792304    sd->IOD = eph->IOD();
    2280     sd->Clock.DeltaA0 = dClk;
    2281     sd->Clock.DeltaA1 = 0.0; // TODO
    2282     sd->Clock.DeltaA2 = 0.0; // TODO
    2283     sd->Orbit.DeltaRadial = rsw(1);
     2305    sd->Clock.DeltaA0 = dClkA0;
     2306    sd->Clock.DeltaA1 = dClkA1;
     2307    sd->Clock.DeltaA2 = dClkA2;
     2308    sd->UserRangeAccuracy = rtnUra;
     2309    sd->Orbit.DeltaRadial     = rsw(1);
    22842310    sd->Orbit.DeltaAlongTrack = rsw(2);
    22852311    sd->Orbit.DeltaCrossTrack = rsw(3);
    2286     sd->Orbit.DotDeltaRadial = dotRsw(1);
     2312    sd->Orbit.DotDeltaRadial     = dotRsw(1);
    22872313    sd->Orbit.DotDeltaAlongTrack = dotRsw(2);
    22882314    sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
    22892315  }
    22902316
    2291   outLine.sprintf("%d %.1f %s  %u  %10.3f %8.3f %8.3f %8.3f\n", GPSweek,
    2292       GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClk, rsw(1), rsw(2),
    2293       rsw(3));
     2317  outLine.sprintf("%d %.1f %s  %u  %10.3f %8.3f %8.3f %8.3f %8.3f %8.3f\n", GPSweek,
     2318      GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClkA0, dClkA1, dClkA2,
     2319      rsw(1), rsw(2), rsw(3));
    22942320
    22952321  double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c;
    2296   double sp3Clk = (rtnClk - relativity) / t_CST::c;  // in seconds
     2322  double clkRnx     = (rtnClk[0] - relativity) / t_CST::c;  // in seconds
     2323  double clkRnxRate = rtnClk[1] / t_CST::c;                 // [s/s = -]
     2324  double clkRnxAcc  = rtnClk[2] / t_CST::c;                 // [s/s² ) -/s]
    22972325
    22982326  if (_rnx) {
    2299     _rnx->write(GPSweek, GPSweeks, prn, sp3Clk);
     2327    double clkRnxSig     = rtnClkSig[0] / t_CST::c;           // in seconds
     2328    double clkRnxRateSig = rtnClkSig[1] / t_CST::c;           // [s/s = -]
     2329    double clkRnxAccSig  = rtnClkSig[2] / t_CST::c;           // [s/s² ) -/s]
     2330    _rnx->write(GPSweek, GPSweeks, prn, clkRnx, clkRnxRate, clkRnxAcc,
     2331                clkRnxSig, clkRnxRateSig, clkRnxAccSig);
    23002332  }
    23012333  if (_sp3) {
    2302     _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk);
     2334    _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate);
    23032335  }
    23042336}
     
    23562388    meanSta(3) = 0.0; // TODO
    23572389  }
    2358  
     2390
    23592391  // Clock correction proportional to topocentric distance to satellites
    23602392  // -------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.