Changeset 356 in ntrip for trunk/BNC


Ignore:
Timestamp:
Dec 21, 2006, 3:38:51 PM (18 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM/RTCM2.cpp

    r354 r356  
    880880    t = 0.6*P.modZCount()
    881881        + P.getUnsignedBits(4,20)*1.0e-6;
     882    t = floor(t*1000.+0.5)/1000.; //weber
    882883   
    883884    // Frequency (exit if neither L1 nor L2)
     
    969970    t = 0.6*P.modZCount()
    970971        + P.getUnsignedBits(4,20)*1.0e-6;
     972    t = floor(t*1000.+0.5)/1000.; //weber
    971973   
    972974    // Frequency (exit if neither L1 nor L2)
  • trunk/BNC/bncgetthread.cpp

    r354 r356  
    4545#include <QTextStream>
    4646#include <QtNetwork>
     47#include <QTime>
    4748
    4849#include "bncgetthread.h"
     
    9293    _staID = _staID.left(_staID.length()-1) + QString("%1").arg(num).toAscii();
    9394  }   
    94 // Start Ergaenzung Perlt
    9595  msleep(100); //sleep 0.1 sec
    96 //Ende Ergaenzung Perlt
    9796}
    9897
     
    154153            userAndPwd.toBase64() + "\r\n\r\n";
    155154  }
     155
     156//////////////////////////////////////////////////////////////////
     157// Additional NMEA String in request to handle VRS data streams //
     158// will be ignored from standard casters                        //
     159//////////////////////////////////////////////////////////////////
     160
     161  double lat, lon;
     162  lat = settings.value("approxLat", 0).toDouble();
     163  lon = settings.value("approxLon", 0).toDouble();
     164  if ((lat != 0.0) && (lon != 0.0)) {
     165    const char* flagN="N";
     166    const char* flagE="E";
     167    if (lon >180.) {lon=(lon-360.)*(-1.); flagE="W";}
     168    if ((lon < 0.) && (lon >= -180.))  {lon=lon*(-1.); flagE="W";}
     169    if (lon < -180.)  {lon=(lon+360.); flagE="E";}
     170    if (lat < 0.)  {lat=lat*(-1.); flagN="S";}
     171    QTime ttime(QTime::currentTime());
     172    int lat_deg = (int)lat; 
     173    double lat_min=(lat-lat_deg)*60.;
     174    int lon_deg = (int)lon; 
     175    double lon_min=(lon-lon_deg)*60.;
     176    int hh = 0 , mm = 0;
     177    double ss = 0.0;
     178    hh=ttime.hour();
     179    mm=ttime.minute();
     180    ss=(double)ttime.second()+0.001*ttime.msec();
     181    QString gga;
     182    gga += "GPGGA,";
     183    gga += QString("%1%2%3,").arg((int)hh, 2, 10, QLatin1Char('0')).arg((int)mm, 2, 10, QLatin1Char('0')).arg((int)ss, 2, 10, QLatin1Char('0'));
     184    gga += QString("%1%2,").arg((int)lat_deg,2, 10, QLatin1Char('0')).arg(lat_min, 7, 'f', 4, QLatin1Char('0'));
     185    gga += flagN;
     186    gga += QString(",%1%2,").arg((int)lon_deg,3, 10, QLatin1Char('0')).arg(lon_min, 7, 'f', 4, QLatin1Char('0'));
     187    gga += flagE + QString(",1,05,1.00,+00100,M,10.000,M,,");
     188    int xori;
     189    char XOR = 0;
     190    char *Buff =gga.toAscii().data();
     191    int iLen = strlen(Buff);
     192    for (xori = 0; xori < iLen; xori++) {
     193      XOR ^= (char)Buff[xori];
     194    }
     195    gga += QString("*%1").arg(XOR, 2, 16, QLatin1Char('0'));
     196    reqStr += "$";
     197    reqStr += gga;
     198    reqStr += "\r\n";
     199  }
     200////////////////////////////////////////////////////////////////
    156201
    157202  msg += reqStr;
  • trunk/BNC/bncmain.cpp

    r319 r356  
    126126
    127127      getThread->start();
    128 //Start Ergaenzung Perlt
    129 //#ifndef WIN32
    130 //      usleep(100000);  // sleep 0.1 sec
    131 //#endif
    132 // verschoben nach bncgetthread.cpp
    133 //Ende Ergaenzung Perlt
    134128    }
    135129    if (_global_caster->numStations() == 0) {
  • trunk/BNC/bncrinex.cpp

    r355 r356  
    7373
    7474  _pgmName  = ((bncApp*)qApp)->bncVersion().leftJustified(20, ' ', true);
    75 // Start Ergaenzung Perlt
    7675#ifdef WIN32
    7776  _userName = QString("${USERNAME}");
     
    7978  _userName = QString("${USER}");
    8079#endif
    81 //Ende Ergaenzung Perlt
    8280  expandEnvVar(_userName);
    8381  _userName = _userName.leftJustified(20, ' ', true);
     
    295293                           const QDateTime& datTimNom) {
    296294
     295  QSettings settings;
     296//  double lat, lon;
     297//  int vrsstream = 0;
     298//  lat = settings.value("approxLat", 0).toDouble();
     299//  lon = settings.value("approxLon", 0).toDouble();
     300//  if ((lat != 0.0) && (lon != 0.0)) {vrsstream=1;}
     301
    297302  // Open the Output File
    298303  // --------------------
     
    302307  // ----------------------------------
    303308  if ( QFile::exists(_fName) ) {
    304     QSettings settings;
     309//    QSettings settings;
    305310    if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) {
    306311      _out.open(_fName.data(), ios::app);
     
    337342                      _mountPoint.path())).leftJustified(60, ' ', true);
    338343        _out << hlp.toAscii().data() << "COMMENT" << endl;
     344//        hlp = QString("Approx VRS Position %1%2").arg(lat, -20, 'f', 4).arg(lon, -20, 'f', 4);
     345//        _out << hlp.toAscii().data() << "COMMENT" << endl;
    339346      }
    340347      else {
     
    380387          _mountPoint.path())).leftJustified(60, ' ', true);
    381388    _out << hlp.toAscii().data() << "COMMENT" << endl;
     389//    hlp = QString("Approx VRS Position %1%2").arg(lat, -20, 'f', 4).arg(lon, -20, 'f', 4);
     390//    _out << hlp.toAscii().data() << "COMMENT" << endl;
    382391    _out << "                                                            END OF HEADER"        << endl;
    383392  }
  • trunk/BNC/bncwindow.cpp

    r354 r356  
    163163  _rnxSamplSpinBox->setSuffix(" sec");
    164164  _logFileLineEdit    = new QLineEdit(settings.value("logFile").toString());
     165  _LatLineEdit     = new QLineEdit(settings.value("approxLat").toString());
     166  _LatLineEdit->setMaximumWidth(9*ww);
     167  _LonLineEdit     = new QLineEdit(settings.value("approxLon").toString());
     168  _LonLineEdit->setMaximumWidth(9*ww);
    165169  _mountPointsTable   = new QTableWidget(0,4);
    166170  _mountPointsTable->horizontalHeader()->resizeSection(1,25*ww);
     
    248252
    249253  layout->addWidget(new QLabel("Mountpoints"),                   8, 0, 1, 2);
     254
     255  layout->addWidget(new QLabel(tr("Approx. Lat./Lon.")),         8, 2);
     256  layout->addWidget(_LatLineEdit,                                8, 3);
     257  layout->addWidget(_LonLineEdit,                                8, 4);
     258
    250259  layout->addWidget(_mountPointsTable,                           9, 0, 1, 5);
    251260
     
    368377  settings.setValue("rnxAppend",   _rnxAppendCheckBox->checkState());
    369378  settings.setValue("logFile",     _logFileLineEdit->text());
    370 
    371   QStringList mountPoints;
     379  settings.setValue("approxLat",   _LatLineEdit->text());
     380  settings.setValue("approxLon",   _LonLineEdit->text());
     381 
     382QStringList mountPoints;
    372383
    373384  for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
     
    434445
    435446    getThread->start();
    436 //Start Ergaenzung Perlt
    437 //#ifndef WIN32
    438 //    usleep(100000);  // sleep 0.1 sec
    439 //#endif
    440 // verschoben nach bncgetthread.cpp
    441 // Ende Ergaenzung Perlt
    442447  }
    443448}
  • trunk/BNC/bncwindow.h

    r280 r356  
    8585    QTableWidget* _mountPointsTable;
    8686
     87    QLineEdit*   _LatLineEdit;
     88    QLineEdit*   _LonLineEdit;
     89
    8790    QTextEdit*  _log;
    8891
Note: See TracChangeset for help on using the changeset viewer.