Changeset 875 in ntrip for trunk


Ignore:
Timestamp:
May 6, 2008, 10:49:30 AM (17 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/RTCM3coDecoder.cpp

    r871 r875  
    4747// Constructor
    4848////////////////////////////////////////////////////////////////////////////
    49 RTCM3coDecoder::RTCM3coDecoder() : GPSDecoder() {
     49RTCM3coDecoder::RTCM3coDecoder(const QString& fileName)
     50  : bncZeroDecoder(fileName) {
    5051}
    5152
     
    5960t_irc RTCM3coDecoder::Decode(char* buffer, int bufLen) {
    6061
     62  reopen();
     63 
    6164  _buffer.append(buffer, bufLen);
    62   printf("BUFFER: %d %d\n", bufLen, _buffer.size());
    6365
    6466  while (true) {
     
    7476    else if (irc == 0) {
    7577      for(int ii = 0; ii < _co.NumberOfGPSSat; ++ii) {
    76         printf("%d G%d %d %f %f %f %f\n", _co.GPSEpochTime,
     78        QString line;
     79        line.sprintf("%d G%d %d %f %f %f %f\n", _co.GPSEpochTime,
    7780               _co.Sat[ii].ID, _co.Sat[ii].IOD, _co.Sat[ii].Clock.DeltaA0,
    7881               _co.Sat[ii].Orbit.DeltaRadial, _co.Sat[ii].Orbit.DeltaAlongTrack,
    7982               _co.Sat[ii].Orbit.DeltaCrossTrack);
     83        _out->write(line.toAscii().data(), line.length());
     84        _out->flush();
    8085      }
    8186      char obuffer[CLOCKORBIT_BUFFERSIZE];
    8287      int len = MakeClockOrbit(&_co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
    83       printf("LEN: %d\n", len);
    8488      if (len > 0) {
    8589        _buffer = _buffer.substr(len);
  • trunk/BNC/RTCM3/RTCM3coDecoder.h

    r869 r875  
    2626#define RTCM3CODECODER_H
    2727
    28 #include "../RTCM/GPSDecoder.h"
     28#include "bnczerodecoder.h"
    2929
    3030extern "C" {
     
    3232}
    3333
    34 class RTCM3coDecoder : public GPSDecoder {
     34class RTCM3coDecoder : public bncZeroDecoder {
    3535public:
    36   RTCM3coDecoder();
     36  RTCM3coDecoder(const QString& fileName);
    3737  virtual ~RTCM3coDecoder();
    3838  virtual t_irc Decode(char* buffer = 0, int bufLen = 0);
  • trunk/BNC/bncgetthread.cpp

    r867 r875  
    377377    else if (_format.indexOf("SP3") != -1) {
    378378      emit(newMessage("Get Corrections: " + _staID + " in RTCM 3.x format"));
    379       _decoder = new RTCM3coDecoder();
     379      _decoder = new RTCM3coDecoder(_staID);
    380380    }
    381381    else if (_format.indexOf("ZERO") != -1) {
  • trunk/BNC/bnczerodecoder.h

    r649 r875  
    3131
    3232class bncZeroDecoder: public GPSDecoder {
    33   public:
    34     bncZeroDecoder(const QString& fileName);
    35     ~bncZeroDecoder();
    36     virtual t_irc Decode(char* buffer, int bufLen);
    37   private:
    38     void reopen();
    39     QString        _fileName;
    40     std::ofstream* _out;
    41     QDate          _fileDate;
     33 public:
     34  bncZeroDecoder(const QString& fileName);
     35  ~bncZeroDecoder();
     36  virtual t_irc Decode(char* buffer, int bufLen);
     37 protected:
     38  void reopen();
     39  QString        _fileName;
     40  std::ofstream* _out;
     41 private:
     42  QDate          _fileDate;
    4243};
    4344
Note: See TracChangeset for help on using the changeset viewer.