Changeset 77 in ntrip
- Timestamp:
- Aug 27, 2006, 10:45:36 AM (19 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncrinex.cpp
r76 r77 27 27 //////////////////////////////////////////////////////////////////////////// 28 28 bncRinex::bncRinex(const char* StatID) { 29 _statID = StatID; 29 _statID = StatID; 30 _headerWritten = false; 30 31 } 31 32 … … 33 34 //////////////////////////////////////////////////////////////////////////// 34 35 bncRinex::~bncRinex() { 36 _out.close(); 37 } 38 39 // Write RINEX Header 40 //////////////////////////////////////////////////////////////////////////// 41 void bncRinex::writeHeader() { 42 43 // Open the Output File 44 // -------------------- 45 QByteArray fname = _statID + ".RXO"; 46 _out.open(fname.data()); 47 48 49 _headerWritten = true; 35 50 } 36 51 … … 53 68 } 54 69 70 // Write RINEX Header 71 // ------------------ 72 if (!_headerWritten) { 73 writeHeader(); 74 } 75 55 76 // Time of Epoch 56 77 // ------------- … … 59 80 converttime(&cti, firstObs->GPSWeek, firstObs->GPSWeeks); 60 81 61 cout.setf(std::ios::fixed);82 _out.setf(std::ios::fixed); 62 83 63 cout << setw(3) << cti.year%10084 _out << setw(3) << cti.year%100 64 85 << setw(3) << cti.month 65 86 << setw(3) << cti.day … … 74 95 iSat++; 75 96 Observation* ob = it.next(); 76 cout << " " << setw(2) << int(ob->SVPRN);97 _out << " " << setw(2) << int(ob->SVPRN); 77 98 if (iSat == 12 && it.hasNext()) { 78 cout << endl << " ";99 _out << endl << " "; 79 100 iSat = 0; 80 101 } 81 102 } 82 cout << endl; 83 84 cout.precision(3); 103 _out << endl; 85 104 86 105 it.toFront(); 87 106 while (it.hasNext()) { 88 107 Observation* ob = it.next(); 89 cout << setw(14) << ob->C1 90 << setw(14) << ob->P2 91 << setw(14) << ob->L1 92 << setw(14) << ob->L2 << endl; 108 109 char lli = ' '; 110 char snr = ' '; 111 _out << setw(14) << setprecision(3) << ob->C1 << lli << snr; 112 _out << setw(14) << setprecision(3) << ob->P2 << lli << snr; 113 _out << setw(14) << setprecision(3) << ob->L1 << lli << snr; 114 _out << setw(14) << setprecision(3) << ob->L2 << lli << snr; 115 _out << endl; 116 93 117 delete ob; 94 118 } 95 119 120 _out.flush(); 96 121 _obs.clear(); 97 122 } -
trunk/BNC/bncrinex.h
r74 r77 5 5 #include <QByteArray> 6 6 #include <QList> 7 8 #include <fstream> 7 9 8 10 #include "RTCM/GPSDecoder.h" … … 16 18 17 19 private: 20 void writeHeader(); 21 18 22 QByteArray _statID; 19 23 QList<Observation*> _obs; 24 ofstream _out; 25 bool _headerWritten; 20 26 }; 21 27
Note:
See TracChangeset
for help on using the changeset viewer.