Changeset 1698 in ntrip for trunk


Ignore:
Timestamp:
Mar 4, 2009, 11:15:46 AM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/todo.txt

    r1683 r1698  
    33BNS
    44=========================
    5 (1) Check transformation from earth-centered-earth-fixed to
    6 radial-tangential-normal frame in bnsutils.cpp. Should follow
    7 Gerhards paper 012-2009-SC104-528.
    8 
    9 (2) Zero Clock Corrections
    10 Loukis wishes to have one stream (for combination purposes)
    11 which provides the original clocks from the BE (no corrections).
    12 We also may need such a stream as soon as we start with the
    13 absolute clocks. Reason: At some point in time we may want
    14 to compare our clocks with the IGS clocks. If we have
    15 "BE clocks" (2nd order relativistic effect taken out) we could
    16 add our absolute clocks and end up with clocks we can compare
    17 with IGS clocks.
    18 I remember that we once implemented a hard-coded option
    19 for that in bns.cpp for Gerhard Wuebbena. I have added the solution
    20 for Gerhard as comment lines to bns.cpp, see lines 385 ff.
    21 To send zero clock corrections (BE clocks) I have added options
    22 "beClocks1" and "beClocks2" (for Broadcast Clocks) to BNS.
    23 Shall we discuss this on the phone if you are not convinced?
    24 
    25 
    26 BNC & BNS & RTNet
    27 =========================
    28 (1) Update to new version of clock_orbit_rtcm.c
    29 done in BNC and BNS. However, both run in
    30 "OLD" mode, see  DEFINES += OLD in bnc.pro and bns.pro.
    31 Main issue: Introduction of new messages for
    32 URA and high-rate clocks.
    33 
    345
    356BNC
  • trunk/BNS/bns.cpp

    r1682 r1698  
    7575  // -------------------------------------------
    7676  for (int ic = 1; ic <= 2; ic++) {
    77 
    7877    QString mountpoint  = settings.value(QString("mountpoint_%1").arg(ic)).toString();
    7978    QString outFileName = settings.value(QString("outFile_%1").arg(ic)).toString();
    8079    if (!mountpoint.isEmpty() || !outFileName.isEmpty()) {
    81       QString refSys      = settings.value(QString("refSys_%1").arg(ic)).toString();
    82 
    83       _caster.push_back(new t_bnscaster(mountpoint, outFileName, refSys, ic));
     80      _caster.push_back(new t_bnscaster(mountpoint, outFileName, ic));
    8481      connect(_caster.back(), SIGNAL(error(const QByteArray)),
    8582              this, SLOT(slotError(const QByteArray)));
     
    373370            prns << prn;
    374371            if ( _ephList.contains(prn) ) {
    375               in >> xx(1) >> xx(2) >> xx(3) >> xx(4);
     372              in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5);
    376373              xx(1) *= 1e3;
    377374              xx(2) *= 1e3;
     
    379376              xx(4) *= 1e-6;
    380377
    381     //// in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5); xx(4) *= 1e-6;
    382     ////
    383     //// beg test (zero clock correction for Gerhard Wuebbena)
    384     ////            xx(4) -= xx(5) / 299792458.0;
    385     //// end test
    386     ////
    387     //// Falls Clocks aus den Broadcast Ephemeris gewuenscht:
    388     //// (2nd order relativistic effect taken out for
    389     //// compatibility with IGS products?)
    390     ////
    391     //// if ( Qt::CheckState(settings.value("beClocks1 oder beClocks2").toInt()) == Qt::Checked) {
    392     ////  .....
    393     //// }
     378              // Clocks without corrections
     379              // --------------------------
     380              if ( _caster.at(ic)->beClocks() ) {
     381                xx(4) -= xx(5) / 299792458.0;
     382              }
    394383     
    395384              t_ephPair* pair = _ephList[prn];
  • trunk/BNS/bnscaster.cpp

    r1668 r1698  
    2424////////////////////////////////////////////////////////////////////////////
    2525t_bnscaster::t_bnscaster(const QString& mountpoint, const QString& outFileName,
    26                          const QString& refSys, const int ic) {
    27 
    28   _mountpoint         = mountpoint;
    29   _outSocket          = 0;
    30   _outSocketOpenTrial = 0;
    31   _ic = ic;
     26                         int ic) {
    3227
    3328  bnsSettings settings;
    3429
    35   QIODevice::OpenMode oMode;
    36   if (Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) {
    37     oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append;
    38   }
    39   else {
    40     oMode = QIODevice::WriteOnly | QIODevice::Unbuffered;
    41   }
     30  _mountpoint = mountpoint;
     31  _ic         = ic;
     32  _outSocket  = 0;
     33  _sOpenTrial = 0;
    4234
    4335  if (outFileName.isEmpty()) {
     
    4739  else {
    4840    _outFile = new QFile(outFileName);
     41
     42    QIODevice::OpenMode oMode;
     43    if (Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) {
     44      oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append;
     45    }
     46    else {
     47      oMode = QIODevice::WriteOnly | QIODevice::Unbuffered;
     48    }
     49
    4950    if (_outFile->open(oMode)) {
    5051      _outStream = new QTextStream(_outFile);
     
    5455  // Reference frame
    5556  // ---------------
    56   _crdTrafo = false;
    57   if (refSys == "ETRF2000") {
     57  if (settings.value(QString("refSys_%1").arg(_ic)).toString() == "ETRF2000") {
    5858    _crdTrafo = true;
     59  }
     60  else {
     61    _crdTrafo = false;
     62  }
     63
     64  if ( Qt::CheckState(settings.value(QString("beClocks%1").arg(_ic)).toInt())
     65       == Qt::Checked ) {
     66    _beClocks = true;
     67  }
     68  else {
     69    _beClocks = false;
    5970  }
    6071}
     
    8394  delete _outSocket; _outSocket = 0;
    8495
    85   double minDt = pow(2.0,_outSocketOpenTrial);
    86   if (++_outSocketOpenTrial > 8) {
    87     _outSocketOpenTrial = 8;
     96  double minDt = pow(2.0,_sOpenTrial);
     97  if (++_sOpenTrial > 8) {
     98    _sOpenTrial = 8;
    8899  }
    89100  if (_outSocketOpenTime.isValid() &&
     
    130141    delete _outSocket;
    131142    _outSocket = 0;
    132 //  emit(newMessage("t_bnscaster::open  socket deleted"));
    133     emit(newMessage("Broadcaster: Connection broken")); // weber
     143    emit(newMessage("Broadcaster: Connection broken"));
    134144  }
    135145  else {
    136 //  emit(newMessage("t_bnscaster::open  socket OK"));
    137     emit(newMessage("Broadcaster: Connection opened")); // weber
    138     _outSocketOpenTrial = 0;
     146    emit(newMessage("Broadcaster: Connection opened"));
     147    _sOpenTrial = 0;
    139148  }
    140149}
  • trunk/BNS/bnscaster.h

    r1262 r1698  
    77 Q_OBJECT
    88 public:
    9   t_bnscaster(const QString& mountpoint, const QString& outFileName,
    10               const QString& refSys, int ic);
     9  t_bnscaster(const QString& mountpoint, const QString& outFileName, int ic);
    1110  virtual ~t_bnscaster();
    1211  void open();
     
    1514  bool usedSocket() const {return _outSocket;}
    1615  bool crdTrafo() const {return _crdTrafo;}
     16  bool beClocks() const {return _beClocks;}
    1717  int  ic() const {return _ic;}
    1818
     
    2424  QString      _mountpoint;
    2525  QTcpSocket*  _outSocket;
    26   int          _outSocketOpenTrial;
     26  int          _sOpenTrial;
    2727  QDateTime    _outSocketOpenTime;
    2828  QFile*       _outFile;
    2929  QTextStream* _outStream;
    3030  bool         _crdTrafo;
     31  bool         _beClocks;
    3132  int          _ic;
    3233};
Note: See TracChangeset for help on using the changeset viewer.