Changeset 3646 in ntrip


Ignore:
Timestamp:
Jan 24, 2012, 12:38:25 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpostprocess.cpp

    r3644 r3646  
    4444#include "pppopt.h"
    4545#include "bncpppclient.h"
     46#include "rnxobsfile.h"
     47#include "rnxnavfile.h"
    4648
    4749using namespace std;
     
    5052////////////////////////////////////////////////////////////////////////////
    5153t_postProcessing::t_postProcessing(QObject* parent) : QThread(parent) {
    52   _opt = new t_pppOpt();
     54  _opt        = new t_pppOpt();
     55  _rnxObsFile = 0;
     56  _rnxNavFile = 0;
     57  _pppClient  = 0;
    5358}
    5459
     
    5762t_postProcessing::~t_postProcessing() {
    5863  cout << "~t_postProcessing" << endl;
     64  delete _pppClient;
     65  delete _rnxNavFile;
     66  delete _rnxObsFile;
    5967  delete _opt;
    60   delete _pppClient;
    6168}
    6269
     
    7582  }
    7683  else {
    77     _pppClient = new bncPPPclient("POST", _opt, false);
     84    _rnxObsFile = new t_rnxObsFile(_opt->obsFileName);
     85    _rnxNavFile = new t_rnxNavFile(_opt->navFileName);
     86    _pppClient  = new bncPPPclient("POST", _opt, false);
    7887
    7988    connect(this, SIGNAL(newEphGPS(gpsephemeris)),
  • trunk/BNC/bncpostprocess.h

    r3644 r3646  
    3434class t_pppOpt;
    3535class bncPPPclient;
     36class t_rnxObsFile;
     37class t_rnxNavFile;
    3638
    3739class t_postProcessing : public QThread {
     
    6163  t_pppOpt*     _opt;
    6264  bncPPPclient* _pppClient;
     65  t_rnxObsFile* _rnxObsFile;
     66  t_rnxNavFile* _rnxNavFile;
    6367};
    6468
  • trunk/BNC/rnxobsfile.cpp

    r3645 r3646  
    4141#include <iostream>
    4242#include "rnxobsfile.h"
     43#include "bncutils.h"
    4344
    4445using namespace std;
     
    4647// Constructor
    4748////////////////////////////////////////////////////////////////////////////
    48 t_rnxObsFile::t_rnxObsFile(const QString& fileName) {
     49t_rnxObsFile::t_rnxObsHeader::t_rnxObsHeader() {
     50}
     51
     52// Destructor
     53////////////////////////////////////////////////////////////////////////////
     54t_rnxObsFile::t_rnxObsHeader::~t_rnxObsHeader() {
     55}
     56
     57// Read Header
     58////////////////////////////////////////////////////////////////////////////
     59t_irc t_rnxObsFile::t_rnxObsHeader::read(QTextStream* stream) {
     60  while (stream->status() == QTextStream::Ok) {
     61    QString line = stream->readLine();
     62    cout << line.toAscii().data();
     63  }
     64
     65  return success;
     66}
     67
     68// Constructor
     69////////////////////////////////////////////////////////////////////////////
     70t_rnxObsFile::t_rnxObsFile(QString fileName) {
     71  expandEnvVar(fileName);
     72  _file   = new QFile(fileName);
     73  _file->open(QIODevice::ReadOnly | QIODevice::Text);
     74  _stream = new QTextStream();
     75  _stream->setDevice(_file);
     76  _header.read(_stream);
    4977}
    5078
     
    5280////////////////////////////////////////////////////////////////////////////
    5381t_rnxObsFile::~t_rnxObsFile() {
     82  delete _stream;
     83  delete _file;
    5484}
    5585
  • trunk/BNC/rnxobsfile.h

    r3645 r3646  
    3333
    3434class t_rnxObsFile {
     35
     36  class t_rnxObsHeader {
     37   public:
     38    t_rnxObsHeader();
     39    ~t_rnxObsHeader();
     40    t_irc read(QTextStream* stream);
     41   private:
     42  };
    3543 
    3644 public:
    37   t_rnxObsFile(const QString& fileName);
     45  t_rnxObsFile(QString fileName);
    3846  ~t_rnxObsFile();
    3947
     
    4149
    4250 private:
     51  t_rnxObsHeader _header;
     52  QFile*         _file;
     53  QTextStream*   _stream;
    4354};
    4455
Note: See TracChangeset for help on using the changeset viewer.