Changeset 3578 in ntrip


Ignore:
Timestamp:
Dec 26, 2011, 10:24:30 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/GPSS/hassDecoder.cpp

    r3520 r3578  
    2020#include "bnctime.h"
    2121#include "bncutils.h"
     22#include "RTCM3/RTCM3coDecoder.h"
    2223
    2324using namespace std;
     
    2526// Constructor
    2627////////////////////////////////////////////////////////////////////////////
    27 hassDecoder::hassDecoder(const QString& staID) : RTCM3coDecoder(staID) {
     28hassDecoder::hassDecoder(const QString& staID) {
    2829  _GPSweeks = -1.0;
    2930}
     
    128129                     0.0, dotRao[0], dotRao[1], dotRao[2], 0.0);
    129130
    130     reopen(_fileNameSkl, _fileName, _out);   
    131     printLine(corrLine, coTime);
     131    RTCM3coDecoder::reopen(_fileNameSkl, _fileName, _out);   
     132    if (_out) {
     133      *_out << corrLine.toAscii().data() << endl;
     134      _out->flush();
     135    }
     136    emit newCorrLine(corrLine, _staID, coTime);
    132137  }
    133138
  • trunk/BNC/GPSS/hassDecoder.h

    r3505 r3578  
    55#include <QtCore>
    66
    7 #include "RTCM3/RTCM3coDecoder.h"
     7#include "bncephuser.h"
     8#include "RTCM/GPSDecoder.h"
    89
    9 class hassDecoder : public RTCM3coDecoder {
     10class hassDecoder : public bncEphUser, public GPSDecoder {
    1011Q_OBJECT
    11 
    1212 public:
    1313  hassDecoder(const QString& staID);
     
    1515  virtual t_irc Decode(char* data, int dataLen, std::vector<std::string>& errmsg);
    1616
     17 signals:
     18  void newCorrLine(QString line, QString staID, long coTime);
     19
    1720 private:
     21  std::ofstream* _out;
     22  QString        _staID;
     23  QString        _fileNameSkl;
     24  QString        _fileName;
     25  QByteArray     _buffer;
     26  double         _GPSweeks;
    1827} ;
    1928
  • trunk/BNC/RTCM3/RTCM3Decoder.cpp

    r3255 r3578  
    433433}
    434434
    435 // Store ephemerides
    436 //////////////////////////////////////////////////////////////////////////////
    437 bool RTCM3Decoder::storeEph(const gpsephemeris& gpseph) {
    438   t_ephGPS eph; eph.set(&gpseph);
    439 
    440   return storeEph(eph);
    441 }
    442 
    443 
    444 bool RTCM3Decoder::storeEph(const t_ephGPS& gpseph) {
    445   const double secPerWeek = 7.0 * 24.0 * 3600.0;
    446   double weekold = 0.0;
    447   double weeknew = gpseph.GPSweek() + gpseph.GPSweeks() / secPerWeek;
    448   string prn = gpseph.prn().toAscii().data();
    449   if ( _ephList.find(prn) != _ephList.end() ) {
    450     weekold = _ephList.find(prn)->second.GPSweek()
    451             + _ephList.find(prn)->second.GPSweeks() / secPerWeek;
    452   }
    453 
    454   if ( weeknew - weekold > 1.0/secPerWeek ) {
    455     _ephList[prn] = gpseph;
    456 
    457     return true;
    458   }
    459 
    460   return false;
    461 }
    462 
    463435// Time of Corrections
    464436//////////////////////////////////////////////////////////////////////////////
  • trunk/BNC/RTCM3/RTCM3Decoder.h

    r3001 r3578  
    3232#include "../RTCM/GPSDecoder.h"
    3333#include "RTCM3coDecoder.h"
    34 #include "ephemeris.h"
    3534#include "bncrawfile.h"
    3635
     
    4645  virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg);
    4746  virtual int corrGPSEpochTime() const;
    48 
    49   bool  storeEph(const gpsephemeris& gpseph);
    50   bool  storeEph(const t_ephGPS&     gpseph);
    5147
    5248 signals:
     
    6561  t_mode                 _mode;
    6662
    67   std::map<std::string, t_ephGPS> _ephList;
    6863  double                 _antXYZ[3];
    6964  bncRawFile*            _rawFile;
  • trunk/BNC/RTCM3/RTCM3coDecoder.h

    r3520 r3578  
    3131#include <QtNetwork>
    3232
    33 #include "bncephuser.h"
    3433#include "RTCM/GPSDecoder.h"
    3534
     
    3837}
    3938
    40 class RTCM3coDecoder : public bncEphUser, public GPSDecoder {
     39class RTCM3coDecoder : public QObject, public GPSDecoder {
    4140Q_OBJECT
    4241 public:
     
    5352  void newCorrLine(QString line, QString staID, long coTime);
    5453
    55  protected:
     54 private:
    5655  void printLine(const QString& line, long coTime);
    5756  std::ofstream* _out;
     
    6160  QByteArray     _buffer;
    6261  double         _GPSweeks;
    63 
    64  private:
    6562  ClockOrbit     _co;
    6663  Bias           _bias;
Note: See TracChangeset for help on using the changeset viewer.