Changeset 8484 in ntrip for branches/BNC_2.12


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

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

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

Legend:

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

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

    r6139 r8484  
    1010
    1111void resolveEpoch (double secsHour,
    12                    int  refWeek,   double  refSecs, 
     12                   int  refWeek,   double  refSecs,
    1313                   int& epochWeek, double& epochSecs) {
    1414
    15   const double secsPerWeek = 604800.0;                           
     15  const double secsPerWeek = 604800.0;
    1616
    1717  epochWeek = refWeek;
    1818  epochSecs = secsHour + 3600.0*(floor((refSecs-secsHour)/3600.0+0.5));
    19  
     19
    2020  if (epochSecs<0          ) { epochWeek--; epochSecs+=secsPerWeek; };
    2121  if (epochSecs>secsPerWeek) { epochWeek++; epochSecs-=secsPerWeek; };
     
    2929           double& xSat, double& ySat, double& zSat, double& clkSat) {
    3030
    31   const double omega_earth = 7292115.1467e-11; 
    32   const double secsPerWeek = 604800.0;                           
     31  const double omega_earth = 7292115.1467e-11;
     32  const double secsPerWeek = 604800.0;
    3333
    3434  // Initial values
    3535  // --------------
    3636  rho = 0.0;
    37   ColumnVector xc(4);
     37  ColumnVector xc(7);
    3838  ColumnVector vv(3);
    3939  eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false);
     
    4545  ////cout << "----- cmpRho -----\n";
    4646  ////eph->print(cout);
    47   ////cout << "  pos " << setw(4)  << GPSWeek 
     47  ////cout << "  pos " << setw(4)  << GPSWeek
    4848  ////     << " "      << setw(14) << setprecision(6) << GPSWeeks
    4949  ////     << " "      << setw(13) << setprecision(3) << xSat
     
    5757  do {
    5858    rhoLast = rho;
    59    
     59
    6060    // Correction station position due to Earth Rotation
    6161    // -------------------------------------------------
    6262    double dPhi = omega_earth * rho / c_light;
    63     double xRec = stax * cos(dPhi) - stay * sin(dPhi); 
    64     double yRec = stay * cos(dPhi) + stax * sin(dPhi); 
     63    double xRec = stax * cos(dPhi) - stay * sin(dPhi);
     64    double yRec = stay * cos(dPhi) + stax * sin(dPhi);
    6565    double zRec = staz;
    6666
     
    8181      GPSWeek_tot  += 1;
    8282    }
    83      
     83
    8484    eph->getCrd(bncTime(GPSWeek_tot, GPSWeeks_tot), xc, vv, false);
    8585    xSat   = xc(1);
     
    9494    rho = sqrt(dx*dx + dy*dy + dz*dz);
    9595
    96     ////cout << "  scrd "   << setw(4)  << GPSWeek_tot 
     96    ////cout << "  scrd "   << setw(4)  << GPSWeek_tot
    9797    ////         << " "         << setw(15) << setprecision(8) << GPSWeeks_tot
    9898    ////         << " "         << setw(13) << setprecision(3) << xSat
     
    108108    ////         << " rho "     << setw(13) << setprecision(3) << rho
    109109    ////         << endl;
    110    
     110
    111111
    112112    ////cout.setf(ios::fixed);
    113113    ////
    114     ////cout << "niter " << setw(3) << ++niter 
     114    ////cout << "niter " << setw(3) << ++niter
    115115    ////         << " " << setw(14) << setprecision(3) << rhoLast
    116116    ////         << " " << setw(14) << setprecision(3) << rho
  • branches/BNC_2.12/src/bncclockrinex.cpp

    r8089 r8484  
    4141////////////////////////////////////////////////////////////////////////////
    4242t_irc bncClockRinex::write(int GPSweek, double GPSweeks, const QString& prn,
    43                            double sp3Clk) {
     43                           double clkRnx, double clkRnxRate, double clkRnxAcc,
     44                           double clkRnxSig, double clkRnxRateSig, double clkRnxAccSig) {
    4445
    4546  if (reopen(GPSweek, GPSweeks) == success) {
     
    4849      double sec = fmod(GPSweeks, 60.0);
    4950
    50       _out << "AS " << prn.toAscii().data()
    51            << datTim.toString("  yyyy MM dd hh mm").toAscii().data()
     51      int numValues = 1;
     52      if (clkRnxSig && clkRnxRate && clkRnxRateSig) {
     53        numValues += 3;
     54      }
     55      if (clkRnxAcc && clkRnxAccSig) {
     56        numValues += 2;
     57      }
     58
     59      _out << "AS " << prn.toLatin1().data()
     60           << datTim.toString("  yyyy MM dd hh mm").toLatin1().data()
    5261           << fixed      << setw(10) << setprecision(6)  << sec
    53            << "  1   "   << fortranFormat(sp3Clk, 19, 12).toAscii().data() << endl;
     62           << "  " << numValues << "   "
     63           << fortranFormat(clkRnx, 19, 12).toLatin1().data();
    5464
     65      if (numValues >=2) {
     66        _out << " " << fortranFormat(clkRnxSig, 19, 12).toLatin1().data() << endl;
     67      }
     68      if (numValues == 4) {
     69        _out << fortranFormat(clkRnxRate, 19, 12).toLatin1().data() << " ";
     70        _out << fortranFormat(clkRnxRateSig, 19, 12).toLatin1().data() << " ";
     71      }
     72      if (numValues == 6) {
     73        _out << fortranFormat(clkRnxAcc, 19, 12).toLatin1().data() << " ";
     74        _out << " " << fortranFormat(clkRnxAccSig, 19, 12).toLatin1().data();
     75      }
     76      _out << endl;
    5577    return success;
    5678  }
  • branches/BNC_2.12/src/bncclockrinex.h

    r4991 r8484  
    1212  bncClockRinex(const QString& sklFileName, const QString& intr, int sampl);
    1313  virtual ~bncClockRinex();
    14   virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn,
    15                       double sp3Clk);
     14  virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn,
     15      double clkRnx, double clkRnxRate, double clkRnxAcc,
     16      double clkRnxSig, double clkRnxRateSig, double clkRnxAccSig);
    1617
    1718 private:
  • branches/BNC_2.12/src/bncephuser.cpp

    r8370 r8484  
    188188  // Simple Check - check satellite radial distance
    189189  // ----------------------------------------------
    190   ColumnVector xc(4);
     190  ColumnVector xc(7);
    191191  ColumnVector vv(3);
    192192  if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
     
    241241    }
    242242  }
    243  
     243
    244244  // Check consistency with older ephemerides
    245245  // ----------------------------------------
  • branches/BNC_2.12/src/bnchelp.html

    r8469 r8484  
    39033903The following satellite specific keys and values are currently specified for that in BNC:<br><br>
    39043904<table>
    3905 <tr><td><i>Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i></td><td><i>Values</i></td></tr>
    3906 <tr><td>APC</td><td>Satellite Antenna Phase Center coordinates in meters</td></tr>
    3907 <tr><td>Clk</td><td>Satellite clock correction in meters, relativistic correction applied like in broadcast clocks</td></tr>
    3908 <tr><td>Vel</td><td>Satellite velocity in meters per second</td></tr>
    3909 <tr><td>CoM</td><td>Satellite Center of Mass coordinates in meters</td></tr>
    3910 <tr><td>CodeBias</td><td>Satellite Code Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3 and preceded by total number of biases</td></tr>
    3911 <tr><td>YawAngle</td><td>Satellite Yaw Angle in radian, restricted to be in [0, 2&#960] which shall be used for the computation of phase wind-up correction</td></tr>
    3912 <tr><td>YawRate</td><td>Satellite Yaw Rate in radian per second which is the rate of Yaw Angle</td></tr>
    3913 <tr><td>PhaseBias</td><td>Satellite Phase Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3, preceded by total number of biases and followed by Signal Integer Indicator, Signals Wilde-Lane Integer Indicator as well as Signal Discontinuity Counter</td></tr>
     3905  <tr><td><i>Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i></td><td><i>Values</i></td></tr>
     3906  <tr><td>APC</td><td>Satellite Antenna Phase Center coordinate components in meters</td></tr>
     3907  <tr><td>Clk</td><td>Satellite clock correction components in meters, meters per seconds and meters per sec&#178 (relativistic correction applied like in broadcast clocks)</td></tr>
     3908  <tr><td>ClkSig</td><td>Standard deviation for satellite clock correction components in meters, meters per seconds and meters per sec&#178 (required for Clock RINEX file only) /td></tr>
     3909  <tr><td>Vel</td><td>Satellite velocity components in meters per second</td></tr>
     3910  <tr><td>CoM</td><td>Satellite Center of Mass coordinate components in meters</td></tr>
     3911  <tr><td>Ura</td><td>User range accuracy value in meters</td></tr>
     3912  <tr><td>CodeBias</td><td>Satellite Code Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3 and preceded by total number of biases</td></tr>
     3913  <tr><td>PhaseBias</td><td>Satellite Phase Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3, preceded by total number of biases and followed by Signal Integer Indicator, Signals Wilde-Lane Integer Indicator as well as Signal Discontinuity Counter</td></tr>
     3914  <tr><td>YawAngle</td><td>Satellite Yaw Angle in radian, restricted to be in [0, 2&#960], which shall be used for the computation of phase wind-up correction</td></tr>
     3915  <tr><td>YawRate</td><td>Satellite Yaw Rate in radian per second which is the rate of Yaw Angle</td></tr>
    39143916</table>
    39153917<p>
  • branches/BNC_2.12/src/bncsp3.cpp

    r8089 r8484  
    6464////////////////////////////////////////////////////////////////////////////
    6565t_irc bncSP3::write(int GPSweek, double GPSweeks, const QString& prn,
    66                     const ColumnVector& xCoM, double sp3Clk) {
     66                    const ColumnVector& xCoM, double sp3Clk,
     67                    const ColumnVector& v, double sp3ClkRate) {
    6768
    6869  if (reopen(GPSweek, GPSweeks) == success) {
     
    8788    }
    8889
    89     _out << "P" << prn.toAscii().data()
    90          << setw(14) << setprecision(6) << xCoM(1) / 1000.0
    91          << setw(14) << setprecision(6) << xCoM(2) / 1000.0
    92          << setw(14) << setprecision(6) << xCoM(3) / 1000.0
    93          << setw(14) << setprecision(6) << sp3Clk * 1e6 << endl;
    94 
     90    _out << "P" << prn.toLatin1().data()
     91         << setw(14) << setprecision(6) << xCoM(1) / 1000.0 // [km]
     92         << setw(14) << setprecision(6) << xCoM(2) / 1000.0 // [km]
     93         << setw(14) << setprecision(6) << xCoM(3) / 1000.0 // [km]
     94         << setw(14) << setprecision(6) << sp3Clk * 1e6     // microseconds
     95         << endl;
     96
     97    if (sp3ClkRate) {
     98      _out << "V" << prn.toLatin1().data()
     99           << setw(14) << setprecision(6) << v(1) * 10.0      // [dm/s]
     100           << setw(14) << setprecision(6) << v(2) * 10.0      // [dm/s]
     101           << setw(14) << setprecision(6) << v(3) * 10.0      // [dm/s]
     102           << setw(14) << setprecision(6) << sp3ClkRate * 1e2 // 10^⁻4 microseconds/sec
     103           << endl;
     104    }
    95105    return success;
    96106  }
  • branches/BNC_2.12/src/bncsp3.h

    r6351 r8484  
    4444  virtual ~bncSP3();
    4545  t_irc write(int GPSweek, double GPSweeks, const QString& prn,
    46               const ColumnVector& xCoM, double sp3Clk);
     46              const ColumnVector& xCoM, double sp3Clk,
     47              const ColumnVector& v, double sp3ClkRate);
    4748  const t_sp3Epoch* nextEpoch();
    4849  const t_sp3Epoch* currEpoch() const {return _currEpoch;}
  • branches/BNC_2.12/src/combination/bnccomb.cpp

    r8448 r8484  
    356356      continue;
    357357    }
    358    
     358
    359359    // Check Modulo Time
    360360    // -----------------
     
    449449  }
    450450
    451   ColumnVector oldXC(4);
     451  ColumnVector oldXC(7);
    452452  ColumnVector oldVV(3);
    453453  corr->_eph->getCrd(corr->_time, oldXC, oldVV, false);
    454454
    455   ColumnVector newXC(4);
     455  ColumnVector newXC(7);
    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(4);
     690      ColumnVector xc(7);
    691691      ColumnVector vv(3);
    692692      eph->getCrd(_resTime, xc, vv, false);
     
    740740    clkCorrections.push_back(clkCorr);
    741741
    742     ColumnVector xc(4);
     742    ColumnVector xc(7);
    743743    ColumnVector vv(3);
    744744    corr->_eph->setClkCorr(dynamic_cast<const t_clkCorr*>(&clkCorr));
  • branches/BNC_2.12/src/ephemeris.cpp

    r8455 r8484  
    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;
    370374
    371375  // Velocity
     
    651655  xc[3] = -_tau + _gamma * dtClk;
    652656
     657  xc[4] = -_tau;
     658  xc[5] = _gamma;
     659  xc[6] = 0.0;
     660
    653661  return success;
    654662}
     
    963971  xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
    964972
     973  xc[4] = _clock_bias;
     974  xc[5] = _clock_drift;
     975  xc[6] = _clock_driftrate;
     976
    965977  // Velocity
    966978  // --------
     
    13041316
    13051317  xc[3] = _agf0 + _agf1 * dt;
     1318
     1319  xc[4] = _agf0;
     1320  xc[5] = _agf1;
     1321  xc[6] = 0.0;
    13061322
    13071323  return success;
     
    16821698  xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
    16831699
     1700  xc[4] = _clock_bias;
     1701  xc[5] = _clock_drift;
     1702  xc[6] = _clock_driftrate;
     1703
    16841704  // dotC  = _clock_drift + _clock_driftrate*tc
    16851705  //       - 4.442807633e-10*_e*sqrt(a0)*cos(E) * dEdM * n;
  • branches/BNC_2.12/src/rinex/reqcanalyze.cpp

    r8398 r8484  
    351351  }
    352352  if (eph) {
    353     ColumnVector xc(4);
     353    ColumnVector xc(7);
    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(4);
     1103        ColumnVector xc(7);
    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/satObs.cpp

    r7058 r8484  
    140140      corr._prn.setFlags(1);// I/NAV
    141141    }
     142    corrList.push_back(corr);
     143  }
     144}
     145
     146// Constructor
     147////////////////////////////////////////////////////////////////////////////
     148t_URA::t_URA() {
     149  _updateInt  = 0;
     150  _iod        = 0;
     151  _ura        = 0.0;
     152}
     153
     154//
     155////////////////////////////////////////////////////////////////////////////
     156void t_URA::writeEpoch(ostream* out, const QList<t_URA>& corrList) {
     157  if (!out || corrList.size() == 0) {
     158    return;
     159  }
     160  out->setf(ios::fixed);
     161  bncTime epoTime;
     162  QListIterator<t_URA> it(corrList);
     163  while (it.hasNext()) {
     164    const t_URA& corr = it.next();
     165    if (!epoTime.valid()) {
     166      epoTime = corr._time;
     167      *out << "> URA " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " "
     168          <<  corr._updateInt <<  " "
     169           << corrList.size() << ' ' << corr._staID << endl;
     170    }
     171    *out << corr._prn.toString() << ' ' << setw(11) << corr._iod << ' '
     172         << setw(10) << setprecision(4) << corr._ura << endl;
     173  }
     174  out->flush();
     175}
     176
     177//
     178////////////////////////////////////////////////////////////////////////////
     179void t_URA::readEpoch(const string& epoLine, istream& inStream, QList<t_URA>& corrList) {
     180  bncTime      epoTime;
     181  unsigned int updateInt;
     182  int          numCorr;
     183  string       staID;
     184  if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numCorr, staID) != t_corrSSR::URA) {
     185    return;
     186  }
     187  for (int ii = 0; ii < numCorr; ii++) {
     188    t_URA corr;
     189    corr._time      = epoTime;
     190    corr._updateInt = updateInt;
     191    corr._staID     = staID;
     192
     193    string line;
     194    getline(inStream, line);
     195    istringstream in(line.c_str());
     196
     197    in >> corr._prn >> corr._iod >> corr._ura;
     198
    142199    corrList.push_back(corr);
    143200  }
     
    390447      return vTec;
    391448    }
     449    else if (typeString == "URA") {
     450      return URA;
     451    }
    392452  }
    393453
  • branches/BNC_2.12/src/satObs.h

    r7611 r8484  
    110110};
    111111
     112class t_URA {
     113 public:
     114  t_URA();
     115  static void writeEpoch(std::ostream* out, const QList<t_URA>& corrList);
     116  static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_URA>& corrList);
     117  std::string    _staID;
     118  t_prn          _prn;
     119  unsigned int   _iod;
     120  bncTime        _time;
     121  unsigned int   _updateInt;
     122  double         _ura;
     123};
     124
    112125class t_frqCodeBias {
    113126 public:
     
    189202class t_corrSSR {
    190203 public:
    191   enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, unknown};
     204  enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
    192205  static e_type readEpoLine(const std::string& line, bncTime& epoTime,
    193206                            unsigned int& updateInt, int& numEntries, std::string& staID);
  • 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  // -------------------------------------------------------------------
  • branches/BNC_2.12/src/upload/bncrtnetuploadcaster.h

    r8415 r8484  
    3232                        double GPSweeks, const QString& prn,
    3333                        const ColumnVector& rtnAPC,
    34                         double rtnClk,
     34                        double ura,
     35                        const ColumnVector& rtnClk,
    3536                        const ColumnVector& rtnVel,
    3637                        const ColumnVector& rtnCoM,
     38                        const ColumnVector& rtnClkSig,
    3739                        struct ClockOrbit::SatData* sd,
    3840                        QString& outLine);
Note: See TracChangeset for help on using the changeset viewer.