Changeset 3035 in ntrip for trunk/BNC/combination/bnccomb.cpp


Ignore:
Timestamp:
Feb 25, 2011, 1:35:15 PM (13 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/combination/bnccomb.cpp

    r3034 r3035  
    158158    _QQ(iPar,iPar) = pp->sig_0 * pp->sig_0;
    159159  }
     160
     161  // Output File (skeleton name)
     162  // ---------------------------
     163  QString path = settings.value("cmbOutPath").toString();
     164  if (!path.isEmpty() && !_caster->mountpoint().isEmpty()) {
     165    expandEnvVar(path);
     166    if ( path.length() > 0 && path[path.length()-1] != QDir::separator() ) {
     167      path += QDir::separator();
     168    }
     169    _outNameSkl = path + _caster->mountpoint();
     170  }
     171  _out = 0;
    160172}
    161173
     
    169181  }
    170182  delete _caster;
     183  delete _out;
    171184}
    172185
     
    341354  }
    342355
    343   // Optionall send new Corrections to PPP client
    344   // --------------------------------------------
     356  // Optionall send new Corrections to PPP client and/or write into file
     357  // -------------------------------------------------------------------
     358  RTCM3coDecoder::reopen(_outNameSkl, _outName, _out);
    345359  bncApp* app = (bncApp*) qApp;
    346   if (app->_bncPPPclient) {
     360  if (app->_bncPPPclient || _out) {
    347361    QStringList corrLines;
    348362    co.messageType = COTYPE_GPSCOMBINED;
     
    350364                                                  resTime.gpssec(), co, 0));
    351365    while (il.hasNext()) {
    352       QString line = il.next() + " " + _caster->mountpoint();
     366      QString line = il.next();
     367      if (_out) {
     368        *_out << line.toAscii().data() << endl;
     369        _out->flush();
     370      }
     371      line += " " + _caster->mountpoint();
    353372      corrLines << line;
    354373    }
    355 
    356     app->_bncPPPclient->slotNewCorrections(corrLines);
     374   
     375    if (app->_bncPPPclient) {
     376      app->_bncPPPclient->slotNewCorrections(corrLines);
     377    }
    357378  }
    358379}
Note: See TracChangeset for help on using the changeset viewer.