Changeset 5120 in ntrip for trunk


Ignore:
Timestamp:
Apr 14, 2013, 6:26:22 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/GPSS/hassDecoder.cpp

    r5070 r5120  
    4646  _GPSweeks = -1.0;
    4747
    48   connect(this, SIGNAL(newCorrLine(QString, QString, long)),
    49           BNC_CORE, SLOT(slotNewCorrLine(QString, QString, long)));
     48  connect(this, SIGNAL(newCorrLine(QString, QString, bncTime)),
     49          BNC_CORE, SLOT(slotNewCorrLine(QString, QString, bncTime)));
    5050}
    5151
     
    9292    // Correction Time
    9393    // ---------------
    94     bncTime tt;
    95     tt.setmjd(daySec, mjd);
     94    bncTime coTime; coTime.setmjd(daySec, mjd);
    9695
    97     _GPSweeks = tt.gpssec();
    98     long coTime = tt.gpsw() * 7*24*3600 + long(floor(_GPSweeks+0.5));
     96    _GPSweeks = coTime.gpssec();
    9997
    10098    // Transform Correction
     
    118116    ColumnVector xc(4);
    119117    ColumnVector vv(3);
    120     eph->position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data());
     118    eph->position(coTime.gpsw(), coTime.gpssec(), xc.data(), vv.data());
    121119
    122120    ColumnVector rao(3);
     
    146144                     "   %10.5f %10.5f %10.5f %10.5f"
    147145                     "   %10.5f",
    148                      messageType, updateInterval, tt.gpsw(), _GPSweeks,
     146                     messageType, updateInterval, coTime.gpsw(), _GPSweeks,
    149147                     prn.toAscii().data(), IOD,
    150148                     dClk, rao[0], rao[1], rao[2],
  • trunk/BNC/src/GPSS/hassDecoder.h

    r3578 r5120  
    1616
    1717 signals:
    18   void newCorrLine(QString line, QString staID, long coTime);
     18  void newCorrLine(QString line, QString staID, bncTime coTime);
    1919
    2020 private:
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp

    r5070 r5120  
    7272  _GPSweeks = -1.0;
    7373
    74   connect(this, SIGNAL(newCorrLine(QString, QString, long)),
    75           BNC_CORE, SLOT(slotNewCorrLine(QString, QString, long)));
     74  connect(this, SIGNAL(newCorrLine(QString, QString, bncTime)),
     75          BNC_CORE, SLOT(slotNewCorrLine(QString, QString, bncTime)));
    7676
    7777  connect(this, SIGNAL(newMessage(QByteArray,bool)),
     
    254254  bncTime currTime(currWeek, currSec);
    255255
    256   bncTime corrTime(GPSweek, GPSweeks);
    257 
    258   double dt = currTime - corrTime;
     256  bncTime coTime(GPSweek, GPSweeks);
     257
     258  double dt = currTime - coTime;
    259259  const double MAXDT = 10 * 60.0;
    260260  if (fabs(dt) > MAXDT) {
     
    263263  }
    264264  else {
    265     long coTime = GPSweek * 7*24*3600 + long(floor(_GPSweeks+0.5));
    266265    emit newCorrLine(line, _staID, coTime);
    267266  }
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.h

    r4428 r5120  
    5050                     std::ofstream*& out);
    5151 signals:
    52   void newCorrLine(QString line, QString staID, long coTime);
     52  void newCorrLine(QString line, QString staID, bncTime coTime);
    5353  void newMessage(QByteArray msg, bool showOnScreen);
    5454
  • trunk/BNC/src/bnccore.cpp

    r5084 r5120  
    115115  _userName = _userName.leftJustified(20, ' ', true);
    116116
    117   _lastDumpCoSec = 0;
    118 
    119   _corrs = new QMultiMap<long, QString>;
     117  _corrs = new QMultiMap<bncTime, QString>;
    120118
    121119  _currentDateAndTimeGPS = 0;
     
    633631//
    634632////////////////////////////////////////////////////////////////////////////
    635 void t_bncCore::slotNewCorrLine(QString line, QString staID, long coTime) {
     633void t_bncCore::slotNewCorrLine(QString line, QString staID, bncTime coTime) {
    636634
    637635  QMutexLocker locker(&_mutex);
     
    646644
    647645  bncSettings settings;
    648   _waitCoTime = settings.value("corrTime").toInt();
    649   if (_waitCoTime < 0) {
    650     _waitCoTime = 0;
     646  _waitCoTime = settings.value("corrTime").toDouble();
     647  if (_waitCoTime < 0.0) {
     648    _waitCoTime = 0.0;
    651649  }
    652650
    653651  // First time, set the _lastDumpSec immediately
    654652  // --------------------------------------------
    655   if (_lastDumpCoSec == 0) {
    656     _lastDumpCoSec = coTime - 1;
     653  if (!_lastDumpCoSec.valid()) {
     654    _lastDumpCoSec = coTime - 1.0;
    657655  }
    658656
    659657  // An old correction - throw it away
    660658  // ---------------------------------
    661   if (_waitCoTime > 0 && coTime <= _lastDumpCoSec) {
    662     if (!_bncComb) {
     659  if (_waitCoTime > 0.0 && coTime <= _lastDumpCoSec) {
     660    ///    if (!_bncComb) {
    663661      QString line = staID + ": Correction for one sat neglected because overaged by " +
    664                       QString().sprintf(" %ld sec",
     662                      QString().sprintf(" %f sec",
    665663                      _lastDumpCoSec - coTime + _waitCoTime);
    666664      messagePrivate(line.toAscii());
    667665      emit( newMessage(line.toAscii(), true) );
    668     }
     666      ///    }
    669667    return;
    670668  }
     
    674672  // Dump Corrections
    675673  // ----------------
    676   if      (_waitCoTime == 0) {
     674  if      (_waitCoTime == 0.0) {
    677675    dumpCorrs();
    678676  }
     
    685683// Dump Complete Correction Epochs
    686684////////////////////////////////////////////////////////////////////////////
    687 void t_bncCore::dumpCorrs(long minTime, long maxTime) {
    688   for (long sec = minTime; sec <= maxTime; sec++) {
     685void t_bncCore::dumpCorrs(bncTime minTime, bncTime maxTime) {
     686  for (bncTime sec = minTime; sec <= maxTime; sec = sec + 1.0) {
    689687    QList<QString> allCorrs = _corrs->values(sec);
    690688    dumpCorrs(allCorrs);
     
    697695void t_bncCore::dumpCorrs() {
    698696  QList<QString> allCorrs;
    699   QMutableMapIterator<long, QString> it(*_corrs);
     697  QMutableMapIterator<bncTime, QString> it(*_corrs);
    700698  while (it.hasNext()) {
    701699    allCorrs << it.next().value();
  • trunk/BNC/src/bnccore.h

    r5084 r5120  
    7272    void slotNewGlonassEph(glonassephemeris* glonasseph);
    7373    void slotNewGalileoEph(galileoephemeris* galileoeph);
    74     void slotNewCorrLine(QString line, QString staID, long coTime);
     74    void slotNewCorrLine(QString line, QString staID, bncTime coTime);
    7575    void slotQuit();
    7676
     
    9292    void printOutput(bool printFile, QTextStream* stream,
    9393                     const QString& strV2, const QString& strV3);
    94     void dumpCorrs(long minTime, long maxTime);
     94    void dumpCorrs(bncTime minTime, bncTime maxTime);
    9595    void dumpCorrs();
    9696    void dumpCorrs(const QList<QString>& allCorrs);
     
    127127    QList<QTcpSocket*>* _socketsNMEA;
    128128    bncCaster*          _caster;
    129     long                _lastDumpCoSec;
    130     long                _waitCoTime;
    131     QMultiMap<long, QString>* _corrs;
     129    bncTime             _lastDumpCoSec;
     130    double              _waitCoTime;
     131    QMultiMap<bncTime, QString>* _corrs;
    132132    QString             _confFileName;
    133133    QDate               _fileDate;
Note: See TracChangeset for help on using the changeset viewer.