source: ntrip/trunk/BNC/src/bncrinex.cpp@ 4532

Last change on this file since 4532 was 4532, checked in by mervart, 12 years ago
File size: 20.8 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25/* -------------------------------------------------------------------------
26 * BKG NTRIP Client
27 * -------------------------------------------------------------------------
28 *
29 * Class: bncRinex
30 *
31 * Purpose: writes RINEX files
32 *
33 * Author: L. Mervart
34 *
35 * Created: 27-Aug-2006
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
41#include <stdlib.h>
42#include <iostream>
43#include <iomanip>
44#include <math.h>
45#include <sstream>
46
47#include <QtCore>
48#include <QUrl>
49#include <QString>
50
51#include "bncrinex.h"
52#include "bncapp.h"
53#include "bncutils.h"
54#include "bncconst.h"
55#include "bnctabledlg.h"
56#include "bncgetthread.h"
57#include "bncnetqueryv1.h"
58#include "bncnetqueryv2.h"
59#include "bncsettings.h"
60#include "bncversion.h"
61#include "rtcm3torinex.h"
62
63using namespace std;
64
65// Constructor
66////////////////////////////////////////////////////////////////////////////
67bncRinex::bncRinex(const QByteArray& statID, const QUrl& mountPoint,
68 const QByteArray& latitude, const QByteArray& longitude,
69 const QByteArray& nmea, const QByteArray& ntripVersion) {
70
71 _statID = statID;
72 _mountPoint = mountPoint;
73 _latitude = latitude;
74 _longitude = longitude;
75 _nmea = nmea;
76 _ntripVersion = ntripVersion;
77 _headerWritten = false;
78 _reconnectFlag = false;
79
80 bncSettings settings;
81 _rnxScriptName = settings.value("rnxScript").toString();
82 expandEnvVar(_rnxScriptName);
83
84 _pgmName = QString(BNCPGMNAME).leftJustified(20, ' ', true);
85#ifdef WIN32
86 _userName = QString("${USERNAME}");
87#else
88 _userName = QString("${USER}");
89#endif
90 expandEnvVar(_userName);
91 _userName = _userName.leftJustified(20, ' ', true);
92
93 _samplingRate = settings.value("rnxSampl").toInt();
94}
95
96// Destructor
97////////////////////////////////////////////////////////////////////////////
98bncRinex::~bncRinex() {
99 bncSettings settings;
100 if ((_header._version >= 3.0) && ( Qt::CheckState(settings.value("rnxAppend").toInt()) != Qt::Checked) ) {
101 _out << "> 4 1" << endl;
102 _out << "END OF FILE" << endl;
103 }
104 _out.close();
105}
106
107// Download Skeleton Header File
108////////////////////////////////////////////////////////////////////////////
109t_irc bncRinex::downloadSkeleton() {
110
111 t_irc irc = failure;
112
113 QStringList table;
114 bncTableDlg::getFullTable(_ntripVersion, _mountPoint.host(),
115 _mountPoint.port(), table, true);
116 QString net;
117 QStringListIterator it(table);
118 while (it.hasNext()) {
119 QString line = it.next();
120 if (line.indexOf("STR") == 0) {
121 QStringList tags = line.split(";");
122 if (tags.size() > 7) {
123 if (tags.at(1) == _mountPoint.path().mid(1).toAscii()) {
124 net = tags.at(7);
125 break;
126 }
127 }
128 }
129 }
130 QString sklDir;
131 if (!net.isEmpty()) {
132 it.toFront();
133 while (it.hasNext()) {
134 QString line = it.next();
135 if (line.indexOf("NET") == 0) {
136 QStringList tags = line.split(";");
137 if (tags.size() > 6) {
138 if (tags.at(1) == net) {
139 sklDir = tags.at(6).trimmed();
140 break;
141 }
142 }
143 }
144 }
145 }
146 if (!sklDir.isEmpty() && sklDir != "none") {
147 QUrl url(sklDir + "/" + _mountPoint.path().mid(1,4).toLower() + ".skl");
148 if (url.port() == -1) {
149 url.setPort(80);
150 }
151
152 bncNetQuery* query;
153 if (_ntripVersion == "2s") {
154 query = new bncNetQueryV2(true);
155 }
156 else if (_ntripVersion == "2") {
157 query = new bncNetQueryV2(false);
158 }
159 else {
160 query = new bncNetQueryV1;
161 }
162
163 QByteArray outData;
164 query->waitForRequestResult(url, outData);
165 if (query->status() == bncNetQuery::finished) {
166 irc = success;
167 QTextStream in(outData);
168 _header.read(&in);
169 }
170
171 delete query;
172 }
173
174 return irc;
175}
176
177// Read Skeleton Header File
178////////////////////////////////////////////////////////////////////////////
179bool bncRinex::readSkeleton() {
180
181 bool readDone = false;
182
183 // Read the local file
184 // -------------------
185 QFile skl(_sklName);
186 if ( skl.exists() && skl.open(QIODevice::ReadOnly) ) {
187 readDone = true;
188 QTextStream in(&skl);
189 _header.read(&in);
190 }
191
192 // Read downloaded file
193 // --------------------
194 else if ( _ntripVersion != "N" && _ntripVersion != "UN" &&
195 _ntripVersion != "S" ) {
196 QDate currDate = currentDateAndTimeGPS().date();
197 if ( !_skeletonDate.isValid() || _skeletonDate != currDate ) {
198 if (downloadSkeleton() == success) {
199 readDone = true;
200 }
201 _skeletonDate = currDate;
202 }
203 }
204
205 return readDone;
206}
207
208// Next File Epoch (static)
209////////////////////////////////////////////////////////////////////////////
210QString bncRinex::nextEpochStr(const QDateTime& datTim,
211 const QString& intStr, QDateTime* nextEpoch) {
212
213 QString epoStr;
214
215 QTime nextTime;
216 QDate nextDate;
217
218 int indHlp = intStr.indexOf("min");
219
220 if ( indHlp != -1) {
221 int step = intStr.left(indHlp-1).toInt();
222 char ch = 'A' + datTim.time().hour();
223 epoStr = ch;
224 if (datTim.time().minute() >= 60-step) {
225 epoStr += QString("%1").arg(60-step, 2, 10, QChar('0'));
226 if (datTim.time().hour() < 23) {
227 nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
228 nextDate = datTim.date();
229 }
230 else {
231 nextTime.setHMS(0, 0, 0);
232 nextDate = datTim.date().addDays(1);
233 }
234 }
235 else {
236 for (int limit = step; limit <= 60-step; limit += step) {
237 if (datTim.time().minute() < limit) {
238 epoStr += QString("%1").arg(limit-step, 2, 10, QChar('0'));
239 nextTime.setHMS(datTim.time().hour(), limit, 0);
240 nextDate = datTim.date();
241 break;
242 }
243 }
244 }
245 }
246 else if (intStr == "1 hour") {
247 char ch = 'A' + datTim.time().hour();
248 epoStr = ch;
249 if (datTim.time().hour() < 23) {
250 nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
251 nextDate = datTim.date();
252 }
253 else {
254 nextTime.setHMS(0, 0, 0);
255 nextDate = datTim.date().addDays(1);
256 }
257 }
258 else {
259 epoStr = "0";
260 nextTime.setHMS(0, 0, 0);
261 nextDate = datTim.date().addDays(1);
262 }
263
264 if (nextEpoch) {
265 *nextEpoch = QDateTime(nextDate, nextTime);
266 }
267
268 return epoStr;
269}
270
271// File Name according to RINEX Standards
272////////////////////////////////////////////////////////////////////////////
273void bncRinex::resolveFileName(const QDateTime& datTim) {
274
275 bncSettings settings;
276 QString path = settings.value("rnxPath").toString();
277 expandEnvVar(path);
278
279 if ( path.length() > 0 && path[path.length()-1] != QDir::separator() ) {
280 path += QDir::separator();
281 }
282
283 QString hlpStr = nextEpochStr(datTim, settings.value("rnxIntr").toString(),
284 &_nextCloseEpoch);
285
286 QString ID4 = _statID.left(4);
287
288 // Check name conflict
289 // -------------------
290 QString distStr;
291 int num = 0;
292 QListIterator<QString> it(settings.value("mountPoints").toStringList());
293 while (it.hasNext()) {
294 QString mp = it.next();
295 if (mp.indexOf(ID4) != -1) {
296 ++num;
297 }
298 }
299 if (num > 1) {
300 distStr = "_" + _statID.mid(4);
301 }
302
303 QString sklExt = settings.value("rnxSkel").toString();
304 if (!sklExt.isEmpty()) {
305 _sklName = path + ID4 + distStr + "." + sklExt;
306 }
307
308 path += ID4 +
309 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
310 hlpStr + distStr + datTim.toString(".yyO");
311
312 _fName = path.toAscii();
313}
314
315// Write RINEX Header
316////////////////////////////////////////////////////////////////////////////
317void bncRinex::writeHeader(const QByteArray& format,
318 const QDateTime& datTimNom) {
319
320 bncSettings settings;
321
322 // Open the Output File
323 // --------------------
324 resolveFileName(datTimNom);
325
326 // Append to existing file and return
327 // ----------------------------------
328 if ( QFile::exists(_fName) ) {
329 if (_reconnectFlag ||
330 Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) {
331 _out.open(_fName.data(), ios::app);
332 _out.setf(ios::showpoint | ios::fixed);
333 _headerWritten = true;
334 _reconnectFlag = false;
335 return;
336 }
337 }
338
339 _out.open(_fName.data());
340 _out.setf(ios::showpoint | ios::fixed);
341
342 // Read Skeleton Header
343 // --------------------
344 bool skelRead = readSkeleton();
345
346 // Set RINEX Version
347 // -----------------
348 if ( Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) {
349 _header._version = 3.01;
350 }
351 else {
352 _header._version = 2.12;
353 }
354
355 // A Few Additional Comments
356 // -------------------------
357 if (skelRead || _addComments.size() == 0) {
358 _addComments.clear();
359 _addComments << format.left(6) + " "
360 + _mountPoint.host() + _mountPoint.path();
361 if (_nmea == "yes") {
362 _addComments << "NMEA LAT=" + _latitude + " " + "LONG=" + _longitude;
363 }
364 }
365
366 // Set Marker Name
367 // ---------------
368 if (_header._markerName.isEmpty()) {
369 _header._markerName = _statID;
370 }
371
372 // Set Default RINEX v2 Types
373 // --------------------------
374 if (_header._obsTypesV2.size() == 0) {
375 _header._obsTypesV2 << "C1" << "P1" << "L1" << "S1"
376 << "C2" << "P2" << "L2" << "S2";
377 }
378
379 // Set Default RINEX v3 Types
380 // ---------------------------
381 if (_header._obsTypesV3.size() == 0) {
382 if (skelRead && _header._version >= 3.0) {
383 _addComments << "Default set of observation types used";
384 }
385 _header._obsTypesV3['G'] << "C1C" << "L1C" << "D1C" << "S1C"
386 << "C1P" << "L1P" << "D1P" << "S1P"
387 << "C2C" << "L2C" << "D2C" << "S2C"
388 << "C2P" << "L2P" << "D2P" << "S2P"
389 << "C5" << "D5" << "L5" << "S5";
390
391 _header._obsTypesV3['R'] << "C1C" << "L1C" << "D1C" << "S1C"
392 << "C1P" << "L1P" << "D1P" << "S1P"
393 << "C2C" << "L2C" << "D2C" << "S2C"
394 << "C2P" << "L2P" << "D2P" << "S2P";
395
396 _header._obsTypesV3['E'] << "C1" << "L1" << "D1" << "S1"
397 << "C5" << "L5" << "D5" << "S5"
398 << "C6" << "L6" << "D6" << "S6"
399 << "C7" << "L7" << "D7" << "S7"
400 << "C8" << "L8" << "D8" << "S8";
401
402 _header._obsTypesV3['J'] << "C1" << "L1" << "D1" << "S1"
403 << "C2" << "L2" << "D2" << "S2"
404 << "C5" << "L5" << "D5" << "S5"
405 << "C6" << "D6" << "L6" << "S6";
406
407 _header._obsTypesV3['S'] << "C1" << "L1" << "D1" << "S1"
408 << "C5" << "L5" << "D5" << "S5";
409
410 _header._obsTypesV3['C'] << "C2" << "L2" << "D2" << "S2"
411 << "C6" << "L6" << "D6" << "S6"
412 << "C7" << "L7" << "D7" << "S7";
413 }
414
415 // Write the Header
416 // ----------------
417 QByteArray headerLines;
418 QTextStream outHlp(&headerLines);
419
420 QMap<QString, QString> txtMap;
421 txtMap["COMMENT"] = _addComments.join("\\n");
422
423 _header.write(&outHlp, &txtMap);
424
425 outHlp.flush();
426 _out << headerLines.data();
427
428 _headerWritten = true;
429}
430
431// Stores Observation into Internal Array
432////////////////////////////////////////////////////////////////////////////
433void bncRinex::deepCopy(t_obs obs) {
434 _obs.push_back(obs);
435}
436
437// Write One Epoch into the RINEX File
438////////////////////////////////////////////////////////////////////////////
439void bncRinex::dumpEpoch(const QByteArray& format, long maxTime) {
440
441 // Select observations older than maxTime
442 // --------------------------------------
443 QList<t_obs> dumpList;
444 QMutableListIterator<t_obs> mIt(_obs);
445 while (mIt.hasNext()) {
446 t_obs obs = mIt.next();
447 if (obs.GPSWeek * 7*24*3600 + obs.GPSWeeks < maxTime - 0.05) {
448 dumpList.push_back(obs);
449 mIt.remove();
450 }
451 }
452
453 // Easy Return
454 // -----------
455 if (dumpList.isEmpty()) {
456 return;
457 }
458
459 // Time of Epoch
460 // -------------
461 const t_obs& fObs = dumpList.first();
462 QDateTime datTim = dateAndTimeFromGPSweek(fObs.GPSWeek, fObs.GPSWeeks);
463 QDateTime datTimNom = dateAndTimeFromGPSweek(fObs.GPSWeek,
464 floor(fObs.GPSWeeks+0.5));
465
466 // Close the file
467 // --------------
468 if (_nextCloseEpoch.isValid() && datTimNom >= _nextCloseEpoch) {
469 closeFile();
470 _headerWritten = false;
471 }
472
473 // Write RINEX Header
474 // ------------------
475 if (!_headerWritten) {
476 _header._startTime.set(fObs.GPSWeek, fObs.GPSWeeks);
477 writeHeader(format, datTimNom);
478 }
479
480 double sec = double(datTim.time().second()) + fmod(fObs.GPSWeeks,1.0);
481
482 // Epoch header line: RINEX Version 3
483 // ----------------------------------
484 if (_header._version >= 3.0) {
485 _out << datTim.toString("> yyyy MM dd hh mm ").toAscii().data()
486 << setw(10) << setprecision(7) << sec
487 << " " << 0 << setw(3) << dumpList.size() << endl;
488 }
489 // Epoch header line: RINEX Version 2
490 // ----------------------------------
491 else {
492 _out << datTim.toString(" yy MM dd hh mm ").toAscii().data()
493 << setw(10) << setprecision(7) << sec
494 << " " << 0 << setw(3) << dumpList.size();
495
496 QListIterator<t_obs> it(dumpList); int iSat = 0;
497 while (it.hasNext()) {
498 iSat++;
499 const t_obs& obs = it.next();
500 _out << obs.satSys << setw(2) << obs.satNum;
501 if (iSat == 12 && it.hasNext()) {
502 _out << endl << " ";
503 iSat = 0;
504 }
505 }
506 _out << endl;
507 }
508
509 QListIterator<t_obs> it(dumpList);
510 while (it.hasNext()) {
511 const t_obs& obs = it.next();
512
513 // Cycle slips detection
514 // ---------------------
515 QString prn = QString("%1%2").arg(obs.satSys)
516 .arg(obs.satNum, 2, 10, QChar('0'));
517
518 char lli1 = ' ';
519 char lli2 = ' ';
520 char lli5 = ' ';
521 if ( obs.slip_cnt_L1 >= 0 ) {
522 if ( _slip_cnt_L1.find(prn) != _slip_cnt_L1.end() &&
523 _slip_cnt_L1.find(prn).value() != obs.slip_cnt_L1 ) {
524 lli1 = '1';
525 }
526 }
527
528 if ( obs.slip_cnt_L2 >= 0 ) {
529 if ( _slip_cnt_L2.find(prn) != _slip_cnt_L2.end() &&
530 _slip_cnt_L2.find(prn).value() != obs.slip_cnt_L2 ) {
531 lli2 = '1';
532 }
533 }
534
535 if ( obs.slip_cnt_L5 >= 0 ) {
536 if ( _slip_cnt_L5.find(prn) != _slip_cnt_L5.end() &&
537 _slip_cnt_L5.find(prn).value() != obs.slip_cnt_L5 ) {
538 lli5 = '1';
539 }
540 }
541
542 _slip_cnt_L1[prn] = obs.slip_cnt_L1;
543 _slip_cnt_L2[prn] = obs.slip_cnt_L2;
544 _slip_cnt_L5[prn] = obs.slip_cnt_L5;
545
546 // Write the data
547 // --------------
548 _out << rinexSatLine(obs, lli1, lli2, lli5) << endl;
549 }
550
551 _out.flush();
552}
553
554// Close the Old RINEX File
555////////////////////////////////////////////////////////////////////////////
556void bncRinex::closeFile() {
557 if (_header._version == 3) {
558 _out << "> 4 1" << endl;
559 _out << "END OF FILE" << endl;
560 }
561 _out.close();
562 if (!_rnxScriptName.isEmpty()) {
563 qApp->thread()->wait(100);
564#ifdef WIN32
565 QProcess::startDetached(_rnxScriptName, QStringList() << _fName) ;
566#else
567 QProcess::startDetached("nohup", QStringList() << _rnxScriptName << _fName) ;
568#endif
569
570 }
571}
572
573// One Line in RINEX v2 or v3
574////////////////////////////////////////////////////////////////////////////
575string bncRinex::rinexSatLine(const t_obs& obs, char lli1, char lli2,
576 char lli5) {
577 ostringstream str;
578 str.setf(ios::showpoint | ios::fixed);
579
580 if (_header._version >= 3.0) {
581 str << obs.satSys
582 << setw(2) << setfill('0') << obs.satNum << setfill(' ');
583 }
584
585 const QVector<QString>& types = (_header._version > 3.0) ?
586 _header._obsTypesV3[obs.satSys] : _header._obsTypesV2;
587 for (int ii = 0; ii < types.size(); ii++) {
588 double value = obs.measdata(types[ii], _header._version);
589 str << setw(14) << setprecision(3) << value;
590 if (value != 0.0 && types[ii].indexOf("L1") == 0) {
591 str << lli1 << ' ';
592 }
593 else if (value != 0.0 && types[ii].indexOf("L2") == 0) {
594 str << lli2 << ' ';
595 }
596 else if (value != 0.0 && types[ii].indexOf("L5") == 0) {
597 str << lli5 << ' ';
598 }
599 else {
600 str << " ";
601 }
602 }
603
604 return str.str();
605}
606
607//
608////////////////////////////////////////////////////////////////////////////
609string bncRinex::obsToStr(double val, int width, int precision) {
610 if (val != 0.0) {
611 ostringstream str;
612 str.setf(ios::showpoint | ios::fixed);
613 str << setw(width) << setprecision(precision) << val;
614 return str.str();
615 }
616 else {
617 return "0.0";
618 }
619}
620
621// One Line in ASCII (Internal) Format
622////////////////////////////////////////////////////////////////////////////
623string bncRinex::asciiSatLine(const t_obs& obs) {
624
625 ostringstream str;
626 str.setf(ios::showpoint | ios::fixed);
627
628 str << obs.satSys << setw(2) << setfill('0') << obs.satNum << setfill(' ');
629
630 if (obs.satSys == 'R') { // Glonass
631 str << ' ' << setw(2) << obs.slotNum;
632 }
633 else {
634 str << " ";
635 }
636
637 float rnxVers = 3.0;
638
639 if (obs.satSys == 'G') { // GPS
640 str << " 1C "
641 << obsToStr(obs.measdata("C1C", rnxVers)) << ' '
642 << obsToStr(obs.measdata("L1C", rnxVers)) << ' '
643 << obsToStr(obs.measdata("D1C", rnxVers)) << ' '
644 << obsToStr(obs.measdata("S1C", rnxVers), 8, 3) << ' '
645 << setw(2) << obs.slip_cnt_L1;
646 str << " 1P "
647 << obsToStr(obs.measdata("C1P", rnxVers)) << ' '
648 << obsToStr(obs.measdata("L1P", rnxVers)) << ' '
649 << obsToStr(obs.measdata("D1P", rnxVers)) << ' '
650 << obsToStr(obs.measdata("S1P", rnxVers), 8, 3) << ' '
651 << setw(2) << obs.slip_cnt_L1;
652 str << " 2P "
653 << obsToStr(obs.measdata("C2P", rnxVers)) << ' '
654 << obsToStr(obs.measdata("L2P", rnxVers)) << ' '
655 << obsToStr(obs.measdata("D2P", rnxVers)) << ' '
656 << obsToStr(obs.measdata("S2P", rnxVers), 8, 3) << ' '
657 << setw(2) << obs.slip_cnt_L2;
658 str << " 5C "
659 << obsToStr(obs.measdata("C5", rnxVers)) << ' '
660 << obsToStr(obs.measdata("L5", rnxVers)) << ' '
661 << obsToStr(obs.measdata("D5", rnxVers)) << ' '
662 << obsToStr(obs.measdata("S5", rnxVers), 8, 3) << ' '
663 << setw(2) << obs.slip_cnt_L5;
664 }
665 else if (obs.satSys == 'R') { // Glonass
666 str << " 1C "
667 << obsToStr(obs.measdata("C1C", rnxVers)) << ' '
668 << obsToStr(obs.measdata("L1C", rnxVers)) << ' '
669 << obsToStr(obs.measdata("D1C", rnxVers)) << ' '
670 << obsToStr(obs.measdata("S1C", rnxVers), 8, 3) << ' '
671 << setw(2) << obs.slip_cnt_L1;
672 str << " 1P "
673 << obsToStr(obs.measdata("C1P", rnxVers)) << ' '
674 << obsToStr(obs.measdata("L1P", rnxVers)) << ' '
675 << obsToStr(obs.measdata("D1P", rnxVers)) << ' '
676 << obsToStr(obs.measdata("S1P", rnxVers), 8, 3) << ' '
677 << setw(2) << obs.slip_cnt_L1;
678 str << " 2P "
679 << obsToStr(obs.measdata("C2P", rnxVers)) << ' '
680 << obsToStr(obs.measdata("L2P", rnxVers)) << ' '
681 << obsToStr(obs.measdata("D2P", rnxVers)) << ' '
682 << obsToStr(obs.measdata("S2P", rnxVers), 8, 3) << ' '
683 << setw(2) << obs.slip_cnt_L2;
684 str << " 2C "
685 << obsToStr(obs.measdata("C2C", rnxVers)) << ' '
686 << obsToStr(obs.measdata("L2C", rnxVers)) << ' '
687 << obsToStr(obs.measdata("D2C", rnxVers)) << ' '
688 << obsToStr(obs.measdata("S2C", rnxVers), 8, 3) << ' '
689 << setw(2) << obs.slip_cnt_L2;
690 }
691 else if (obs.satSys == 'E') { // Galileo
692 str << " 1C "
693 << obsToStr(obs.measdata("C1", rnxVers)) << ' '
694 << obsToStr(obs.measdata("L1", rnxVers)) << ' '
695 << obsToStr(obs.measdata("D1", rnxVers)) << ' '
696 << obsToStr(obs.measdata("S1", rnxVers), 8, 3) << ' '
697 << setw(2) << obs.slip_cnt_L1;
698
699 str << " 5C "
700 << obsToStr(obs.measdata("C5", rnxVers)) << ' '
701 << obsToStr(obs.measdata("L5", rnxVers)) << ' '
702 << obsToStr(obs.measdata("D5", rnxVers)) << ' '
703 << obsToStr(obs.measdata("S5", rnxVers), 8, 3) << ' '
704 << setw(2) << obs.slip_cnt_L5;
705 }
706 return str.str();
707}
Note: See TracBrowser for help on using the repository browser.