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

Last change on this file since 4506 was 4506, checked in by weber, 12 years ago

Typo corrected

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