Changeset 3999 in ntrip
- Timestamp:
- Apr 22, 2012, 11:14:15 AM (13 years ago)
- Location:
- trunk/BNC/rinex
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/rinex/bncpostprocess.cpp
r3973 r3999 111 111 else { 112 112 _rnxObsFile = new t_rnxObsFile(_opt->obsFileName, t_rnxObsFile::input); 113 _rnxNavFile = new t_rnxNavFile(_opt->navFileName );113 _rnxNavFile = new t_rnxNavFile(_opt->navFileName, t_rnxNavFile::input); 114 114 _pppClient = new bncPPPclient("POST", _opt, false); 115 115 -
trunk/BNC/rinex/reqcedit.cpp
r3998 r3999 43 43 #include "bncapp.h" 44 44 #include "bncsettings.h" 45 #include "rnxnavfile.h" 45 46 46 47 using namespace std; … … 54 55 _obsFileNames = settings.value("reqcObsFile").toString().split(",", QString::SkipEmptyParts); 55 56 _outObsFileName = settings.value("reqcOutObsFile").toString(); 57 _navFileNames = settings.value("reqcNavFile").toString().split(",", QString::SkipEmptyParts); 58 _outNavFileName = settings.value("reqcOutNavFile").toString(); 56 59 _rnxVersion = settings.value("reqcRnxVersion").toDouble(); 57 60 _samplingRate = settings.value("reqcSampling").toInt(); … … 219 222 void t_reqcEdit::editEphemerides() { 220 223 221 } 224 QStringListIterator it(_navFileNames); 225 while (it.hasNext()) { 226 QString fileName = it.next(); 227 t_rnxNavFile rnxNavFile(fileName, t_rnxNavFile::input); 228 } 229 230 } -
trunk/BNC/rinex/reqcedit.h
r3998 r3999 56 56 QVector<t_rnxObsFile*> _rnxObsFiles; 57 57 QString _outObsFileName; 58 QStringList _navFileNames; 59 QString _outNavFileName; 58 60 double _rnxVersion; 59 61 int _samplingRate; -
trunk/BNC/rinex/rnxnavfile.cpp
r3764 r3999 86 86 // Constructor 87 87 //////////////////////////////////////////////////////////////////////////// 88 t_rnxNavFile::t_rnxNavFile(QString fileName) { 89 expandEnvVar(fileName); 90 QFile* file = new QFile(fileName); 91 file->open(QIODevice::ReadOnly | QIODevice::Text); 92 QTextStream* stream = new QTextStream(); 93 stream->setDevice(file); 94 _header.read(stream); 95 this->read(stream); 96 delete stream; 97 delete file; 88 t_rnxNavFile::t_rnxNavFile(const QString& fileName, e_inpOut inpOut) { 89 _inpOut = inpOut; 90 _stream = 0; 91 _file = 0; 92 if (_inpOut == input) { 93 openRead(fileName); 94 } 95 else { 96 openWrite(fileName); 97 } 98 } 99 100 // Open for input 101 //////////////////////////////////////////////////////////////////////////// 102 void t_rnxNavFile::openRead(const QString& fileName) { 103 104 _fileName = fileName; expandEnvVar(_fileName); 105 _file = new QFile(_fileName); 106 _file->open(QIODevice::ReadOnly | QIODevice::Text); 107 _stream = new QTextStream(); 108 _stream->setDevice(_file); 109 110 _header.read(_stream); 111 this->read(_stream); 112 } 113 114 // Open for output 115 //////////////////////////////////////////////////////////////////////////// 116 void t_rnxNavFile::openWrite(const QString& fileName) { 117 118 _fileName = fileName; expandEnvVar(_fileName); 119 _file = new QFile(_fileName); 120 _file->open(QIODevice::WriteOnly | QIODevice::Text); 121 _stream = new QTextStream(); 122 _stream->setDevice(_file); 98 123 } 99 124 … … 101 126 //////////////////////////////////////////////////////////////////////////// 102 127 t_rnxNavFile::~t_rnxNavFile() { 128 close(); 103 129 for (unsigned ii = 0; ii < _ephs.size(); ii++) { 104 130 delete _ephs[ii]; 105 } 131 } 132 } 133 134 // Close 135 //////////////////////////////////////////////////////////////////////////// 136 void t_rnxNavFile::close() { 137 delete _stream; _stream = 0; 138 delete _file; _file = 0; 106 139 } 107 140 -
trunk/BNC/rinex/rnxnavfile.h
r3758 r3999 37 37 class t_rnxNavFile { 38 38 39 public: 40 enum e_inpOut {input, output}; 41 42 private: 39 43 class t_rnxNavHeader { 40 44 public: … … 50 54 51 55 public: 52 t_rnxNavFile( QString fileName);56 t_rnxNavFile(const QString& fileName, e_inpOut inpOut); 53 57 ~t_rnxNavFile(); 54 58 t_eph* getNextEph(const bncTime& tt, const QMap<QString, int>* corrIODs); … … 56 60 bool glonass() const {return _header.glonass();} 57 61 62 protected: 63 t_rnxNavFile() {}; 64 void openRead(const QString& fileName); 65 void openWrite(const QString& fileName); 66 void close(); 67 58 68 private: 59 69 void read(QTextStream* stream); 60 70 71 e_inpOut _inpOut; 72 QFile* _file; 73 QString _fileName; 74 QTextStream* _stream; 61 75 std::vector<t_eph*> _ephs; 62 76 t_rnxNavHeader _header;
Note:
See TracChangeset
for help on using the changeset viewer.