Public Member Functions
DownloadGpsRaw Class Reference

Brief description of class still missing. More...

#include <DownloadGpsRaw.h>

Inheritance diagram for DownloadGpsRaw:
QGpGuiTools::Dialog QGpGuiTools::FrameGrabber

List of all members.

Public Member Functions

void addStation (Station *s)
 DownloadGpsRaw (QWidget *parent=0)
void terminate ()
void toRinex ()
 ~DownloadGpsRaw ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

DownloadGpsRaw::DownloadGpsRaw ( QWidget *  parent = 0)

Description of constructor still missing

References TRACE.

  : Dialog(parent)
{
  TRACE;
  setupUi(this);
}

Description of destructor still missing

References TRACE.

{
  TRACE;
}

Member Function Documentation

References Station::name(), and TRACE.

{
  TRACE;
  int i=_stations.count();
  _stations.insert(s, i);
  stations->setRowCount(i+1);
  stations->setItem(i, 0, new QTableWidgetItem(s->name()));
  stations->setItem(i, 1, new QTableWidgetItem("waiting"));
  stations->setItem(i, 2, new QTableWidgetItem("0"));
  connect(s, SIGNAL(rawFileReady()), this, SLOT(rawFileReady()));
  connect(s, SIGNAL(rawFileError()), this, SLOT(rawFileError()));
  connect(s, SIGNAL(rawFileSize(int)), this, SLOT(rawFileSize(int)));
}

References TRACE.

{
  TRACE;
  for(QMap<Station *, int>::iterator it=_stations.begin(); it!=_stations.end(); it++) {
    it.key()->abortDownloadGps();
  }
}

References Station::currentGpsFileName(), QGpCoreTools::endl(), MSG_ID, Station::name(), QGpCoreTools::tr(), and TRACE.

{
  TRACE;
  MessageContext mc;
  for(QMap<Station *, int>::iterator it=_stations.begin(); it!=_stations.end(); it++) {
    if(stations->item(it.value(), 1)->text()=="finished") {
      Station * s=it.key();
      QString gpsName=s->name();
      gpsName.replace("WAU", "WA");
      QProcess p;
      p.setProcessChannelMode(QProcess::MergedChannels);
      QString cmd("teqc -ublox ubx -O.mo ");
      cmd+=gpsName;
      cmd+=" -O.rn ";
      cmd+=gpsName;
      cmd+=" -O.int 1 +nav ";
      cmd+=s->currentGpsFileName()+"n";
      cmd+=" +obs ";
      cmd+=s->currentGpsFileName()+"o";
      cmd+=" ";
      cmd+=s->currentGpsFileName()+"ubx";
      App::stream() << cmd << endl;
      p.start(cmd);
      p.waitForFinished(100); // wait 60 s
      p.waitForFinished(60000); // wait 60 s
      if(p.state()==QProcess::Running) {
        p.kill();
        Message::warning(MSG_ID, tr("Rinex conversion"), tr("Time out running teqc for station '%1'").arg(s->name()), Message::ok(), true);
      } else {
        switch(p.exitStatus()) {
        case QProcess::NormalExit:
          switch(p.exitCode()) {
          case 0:
            break;
          default:
            Message::warning(MSG_ID, tr("Rinex conversion"),
                             tr("teqc returned code %1 for station '%2'").arg(p.exitCode()).arg(s->name()),
                             Message::ok(), true);
            break;
          }
          break;
        default:
          Message::warning(MSG_ID, tr("Rinex conversion"),
                           tr("teqc crashed for station '%1'").arg(s->name()),
                           Message::ok(), true);
          break;
        }
      }
    }
  }
  Message::information(MSG_ID, tr("Rinex conversion"),
                       tr("All ubx file are now converted to Rinex in /tmp/waran. You can post-process them."),
                       Message::ok());
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines