Changeset 3717 in ntrip


Ignore:
Timestamp:
Feb 23, 2012, 5:59:52 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpostprocess.cpp

    r3710 r3717  
    4545#include "pppopt.h"
    4646#include "bncpppclient.h"
    47 #include "rnxobsfile.h"
     47#include "rinex/rnxobsfile.h"
    4848#include "rnxnavfile.h"
    4949#include "corrfile.h"
     
    136136  // -------------------------
    137137  int   nEpo = 0;
    138   const t_rnxObsFile::t_epo* epo = 0;
     138  const t_rnxObsFile::t_rnxEpo* epo = 0;
    139139  while ( (epo = _rnxObsFile->nextEpoch()) != 0 ) {
    140140    ++nEpo;
     
    144144    }
    145145
    146     for (int iObs = 0; iObs < epo->satObs.size(); iObs++) {
    147       const t_rnxObsFile::t_satObs& satObs = epo->satObs[iObs];
     146    for (unsigned iObs = 0; iObs < epo->rnxSat.size(); iObs++) {
     147      const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iObs];
    148148      t_obs obs;
    149149      strncpy(obs.StatID, _rnxObsFile->markerName().toAscii().constData(),
    150150              sizeof(obs.StatID));
    151       obs.satSys   = satObs.prn.toAscii().data()[0];
    152       obs.satNum   = satObs.prn.mid(1).toInt();
     151      obs.satSys   = rnxSat.satSys;
     152      obs.satNum   = rnxSat.satNum;
    153153      obs.GPSWeek  = epo->tt.gpsw();
    154154      obs.GPSWeeks = epo->tt.gpssec();
     
    156156        QByteArray type = _rnxObsFile->obsType(obs.satSys,iType).toAscii();
    157157        if      (type.indexOf("C1") == 0 && obs.C1  == 0.0) {
    158           obs.C1 = satObs[iType];
     158          obs.C1 = rnxSat.obs[iType];
    159159        }
    160160        else if (type.indexOf("P1") == 0 && obs.P1  == 0.0) {
    161           obs.P1 = satObs[iType];
     161          obs.P1 = rnxSat.obs[iType];
    162162        }
    163163        else if (type.indexOf("L1") == 0 && obs.L1C == 0.0) {
    164           obs.L1C = satObs[iType];
     164          obs.L1C = rnxSat.obs[iType];
    165165        }
    166166        else if (type.indexOf("C2") == 0 && obs.C2  == 0.0) {
    167           obs.C2 = satObs[iType];
     167          obs.C2 = rnxSat.obs[iType];
    168168        }
    169169        else if (type.indexOf("P2") == 0 && obs.P2  == 0.0) {
    170           obs.P2 = satObs[iType];
     170          obs.P2 = rnxSat.obs[iType];
    171171        }
    172172        else if (type.indexOf("L2") == 0 && obs.L2C == 0.0) {
    173           obs.L2C = satObs[iType];
     173          obs.L2C = rnxSat.obs[iType];
    174174        }
    175175      }
  • trunk/BNC/rinex/rnxobsfile.h

    r3716 r3717  
    2626#define RNXOBSFILE_H
    2727
     28#include <QString>
     29
    2830#include <fstream>
    29 #include <string>
    3031#include <vector>
    3132#include <map>
     
    5859  };
    5960
    60   t_rnxObsFile(const std::string& fileName);
     61  t_rnxObsFile(const QString& fileName);
    6162  ~t_rnxObsFile();
    6263 
     
    6465  double              interval() const {return _header._interval;}
    6566  int                 nTypes(char sys) const {return _header.nTypes(sys);}
    66   const std::string&  fileName() const {return _fileName;}
    67   const std::string&  obsType(char sys, int index) const {return _header.obsType(sys, index);}
    68   const std::string&  antennaName() const {return _header._antennaName;}
    69   const std::string&  markerName() const {return _header._markerName;}
     67  const QString&      fileName() const {return _fileName;}
     68  const QString&      obsType(char sys, int index) const {return _header.obsType(sys, index);}
     69  const QString&      antennaName() const {return _header._antennaName;}
     70  const QString&      markerName() const {return _header._markerName;}
    7071  const ColumnVector& xyz() const {return _header._xyz;}
    7172  const ColumnVector& antNEU() const {return _header._antNEU;}
     
    8283 protected:
    8384  t_rnxObsFile() {};
    84   void open(const std::string& fileName);
     85  void open(const QString& fileName);
    8586  void close();
    8687
     
    9192    ~t_rnxObsHeader();
    9293
    93     t_irc               read(std::ifstream* stream, int maxLines = 0);
    94     int                 nTypes(char sys) const;
    95     const std::string&  obsType(char sys, int index) const;
     94    t_irc           read(std::ifstream* stream, int maxLines = 0);
     95    int             nTypes(char sys) const;
     96    const QString&  obsType(char sys, int index) const;
    9697 
    97     static const std::string                  _emptyStr;
    98     float                                     _version;
    99     double                                    _interval;
    100     std::string                               _antennaName;
    101     std::string                               _markerName;
    102     ColumnVector                              _antNEU;
    103     ColumnVector                              _antXYZ;
    104     ColumnVector                              _antBSG;
    105     ColumnVector                              _xyz;
    106     std::vector<std::string>                  _obsTypesV2;
    107     std::map<char, std::vector<std::string> > _obsTypesV3;
    108     int                                       _wlFactorsL1[MAXPRN_GPS+1];
    109     int                                       _wlFactorsL2[MAXPRN_GPS+1];
     98    static const QString                  _emptyStr;
     99    float                                 _version;
     100    double                                _interval;
     101    QString                               _antennaName;
     102    QString                               _markerName;
     103    ColumnVector                          _antNEU;
     104    ColumnVector                          _antXYZ;
     105    ColumnVector                          _antBSG;
     106    ColumnVector                          _xyz;
     107    std::vector<QString>                  _obsTypesV2;
     108    std::map<char, std::vector<QString> > _obsTypesV3;
     109    int                                   _wlFactorsL1[MAXPRN_GPS+1];
     110    int                                   _wlFactorsL2[MAXPRN_GPS+1];
    110111  };
    111112
    112113  const t_rnxEpo* nextEpochV2();
    113114  const t_rnxEpo* nextEpochV3();
    114   void handleEpochFlag(int flag, const std::string& line);
     115  void handleEpochFlag(int flag, const QString& line);
    115116
    116   std::string    _fileName;
     117  QString        _fileName;
    117118  t_rnxObsHeader _header;
    118119  std::ifstream* _stream;
Note: See TracChangeset for help on using the changeset viewer.