Changeset 366 in ntrip for trunk/BNC/bncgetthread.cpp


Ignore:
Timestamp:
Jan 17, 2007, 4:17:20 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r358 r366  
    6161////////////////////////////////////////////////////////////////////////////
    6262bncGetThread::bncGetThread(const QUrl& mountPoint,
    63                            const QByteArray& format, int iMount) {
     63                           const QByteArray& format,
     64                           const QByteArray& latitude,
     65                           const QByteArray& longitude,
     66                           const QByteArray& nmea, int iMount) {
    6467  _decoder    = 0;
    6568  _mountPoint = mountPoint;
     
    6770  _staID_orig = _staID;
    6871  _format     = format;
     72  _latitude   = latitude;
     73  _longitude  = longitude;
     74  _nmea       = nmea;
    6975  _socket     = 0;
    7076  _timeOut    = 20*1000;  // 20 seconds
     
    105111// Connect to Caster, send the Request (static)
    106112////////////////////////////////////////////////////////////////////////////
    107 QTcpSocket* bncGetThread::request(const QUrl& mountPoint, int timeOut,
     113QTcpSocket* bncGetThread::request(const QUrl& mountPoint,
     114                                  QByteArray& latitude, QByteArray& longitude,
     115                                  QByteArray& nmea, int timeOut,
    108116                                  QString& msg) {
    109117
     
    160168
    161169  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) && (hlp.path().length() > 2) && (hlp.path().indexOf(".skl") < 0)) {
     170
     171  lat = strtod(latitude,NULL);
     172  lon = strtod(longitude,NULL);
     173
     174  if ((nmea == "VRS") && (hlp.path().length() > 2) && (hlp.path().indexOf(".skl") < 0)) {
    165175    const char* flagN="N";
    166176    const char* flagE="E";
     
    221231  QString msg;
    222232
    223   _socket = bncGetThread::request(_mountPoint, _timeOut, msg);
     233  _socket = bncGetThread::request(_mountPoint, _latitude, _longitude, _nmea, _timeOut, msg);
    224234
    225235  ////  emit(newMessage(msg.toAscii()));
     
    361371          emit newObs(_staID, *it);
    362372          bool firstObs = (it == _decoder->_obsList.begin());
    363           _global_caster->newObs(_staID, _mountPoint, firstObs, *it, _format);
     373          _global_caster->newObs(_staID, _mountPoint, firstObs, *it, _format, _latitude, _longitude, _nmea);
    364374        }
    365375        _decoder->_obsList.clear();
Note: See TracChangeset for help on using the changeset viewer.