source: ntrip/trunk/BNC/src/combination/bncbiassnx.cpp@ 10216

Last change on this file since 10216 was 10216, checked in by stuerze, 14 months ago

memory leak fixed in combination

File size: 20.1 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: bncBiasSnx
30 *
31 * Purpose: Biases from Bias SINEX File
32 *
33 * Author: A. Stuerze
34 *
35 * Created: 15-Mar-2022
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
41#include "bncbiassnx.h"
42
43#include <iostream>
44#include <newmatio.h>
45
46using namespace std;
47
48// Constructor
49////////////////////////////////////////////////////////////////////////////
50bncBiasSnx::bncBiasSnx() {
51 bncSettings settings;
52 _useGnss['G'] = (Qt::CheckState(settings.value("cmbGps").toInt()) == Qt::Checked) ? true : false;
53 _useGnss['R'] = (Qt::CheckState(settings.value("cmbGlo").toInt()) == Qt::Checked) ? true : false;
54 _useGnss['E'] = (Qt::CheckState(settings.value("cmbGal").toInt()) == Qt::Checked) ? true : false;
55 _useGnss['C'] = (Qt::CheckState(settings.value("cmbBds").toInt()) == Qt::Checked) ? true : false;
56 _useGnss['J'] = (Qt::CheckState(settings.value("cmbQzss").toInt()) == Qt::Checked) ? true : false;
57 _useGnss['S'] = (Qt::CheckState(settings.value("cmbSbas").toInt()) == Qt::Checked) ? true : false;
58 _useGnss['I'] = (Qt::CheckState(settings.value("cmbIrnss").toInt()) == Qt::Checked) ? true : false;
59}
60
61// Destructor
62////////////////////////////////////////////////////////////////////////////
63bncBiasSnx::~bncBiasSnx() {
64 clear();
65}
66
67// Clear Satellite Map
68////////////////////////////////////////////////////////////////////////////
69void bncBiasSnx::clear() {
70 QMapIterator<QString,snxSatCodeBias*>it(_snxSatCodeBiasMap);
71 while (it.hasNext()) {
72 it.next();
73 delete it.value();
74 }
75}
76
77// Print
78////////////////////////////////////////////////////////////////////////////
79void bncBiasSnx::print() const {
80 QMapIterator<QString,snxSatCodeBias*> it(_snxSatCodeBiasMap);
81 cout << "============= bncBiasSnx::print() ==========" << endl;
82 while (it.hasNext()) {
83 it.next();
84 cout << it.key().toStdString() << " ";
85 snxSatCodeBias* satCbMap = it.value();
86 cout << satCbMap->_startTime.datestr() << "_" << satCbMap->_startTime.timestr() << " ";
87 QMapIterator <QString, double> itB(satCbMap->_biasMap);
88 cout << satCbMap->_biasMap.size() << " ";
89 while (itB.hasNext()) {
90 itB.next();
91 QString osb = itB.key();
92 double value = itB.value();
93 cout << osb.toStdString() << " " << value << " ";
94 }
95 cout << endl;
96 }
97}
98
99
100// Read Bias SINEX File
101////////////////////////////////////////////////////////////////////////////
102t_irc bncBiasSnx::readFile(const QString& fileName) {
103
104 QFile inFile(fileName);
105 inFile.open(QIODevice::ReadOnly | QIODevice::Text);
106
107 QTextStream in(&inFile);
108
109 while ( !in.atEnd() ) {
110 QString biasType, biasAtrib, svn, prn, station, obs1, obs2, startTimeStr, endTimeStr, unit;
111 double value;
112 bncTime startTime;
113
114 QString line = in.readLine();//cout << line.toStdString() << endl;
115 if (line.indexOf("+BIAS/SOLUTION") == 14) {
116 clear();
117 }
118 else if (line.indexOf("BIAS_MODE") == 1) {
119 if (line.contains("ABSOLUTE")) {
120 _type = ABSOLUTE;
121 }
122 else if (line.contains("RELATIVE")) {
123 _type = RELATIVE;
124 }
125 }
126 else if (line.indexOf("OSB") == 1 || line.indexOf("DSB") == 1) {
127 QTextStream inLine(&line, QIODevice::ReadOnly);
128 inLine >> biasType;
129 if (biasType == "OSB") {
130 inLine >> svn >> prn >> obs1 >> startTimeStr >> endTimeStr >> unit >> value;
131 biasAtrib = obs1;
132 }
133 else if (biasType == "DSB") {
134 inLine >> svn;
135 if (svn.size() == 1) { // station data
136 continue;
137 } else {
138 inLine >> prn >> obs1 >> obs2 >> startTimeStr >> endTimeStr >> unit >> value;
139 biasAtrib = QString("%1-%2").arg(obs1).arg(obs2);
140 }
141 }
142 // bncTime from snx time
143 // ---------------------
144 if (bncTimeFromSinex(startTimeStr, startTime) != success) {
145 continue;
146 }
147 // conversion of Code Biases
148 // -------------------------
149 if (unit.contains("ns")) {
150 // from nano seconds into meters
151 value /= 1.e9;
152 value *= t_CST::c;
153
154 }
155
156 // delete existing entries if there are newer once available
157 // ---------------------------------------------------------
158 if (_snxSatCodeBiasMap.contains(prn)) {
159 if (_snxSatCodeBiasMap[prn]->_startTime < startTime) {
160 delete _snxSatCodeBiasMap[prn];
161 _snxSatCodeBiasMap[prn] = new snxSatCodeBias(startTime);
162 }
163 }
164 else {
165 _snxSatCodeBiasMap[prn] = new snxSatCodeBias(startTime);
166 }
167 // save biases
168 // -----------
169 QMap<QString, double>& biasMap = _snxSatCodeBiasMap[prn]->_biasMap;
170 if (!biasMap.contains(biasAtrib)) {
171 biasMap.insert(biasAtrib, value);
172 }
173 }
174 }
175 inFile.close();
176
177 if (_type == ABSOLUTE) {
178 getDsbFromOsb();
179 }
180 cleanDsb();
181 //print();
182 return success;
183}
184
185// bncTime from SINEX Time String
186////////////////////////////////////////////////////////////////////////////
187t_irc bncBiasSnx::bncTimeFromSinex(QString snxStr, bncTime& time) {
188 bool ok = false;
189 QStringList hlp = snxStr.split(":");// yyyy:doy:dssec
190
191 int year = hlp[0].toInt(&ok, 10);
192 if (!ok) {
193 return failure;
194 }
195 time.set(year, 1, 1, 0, 0, 0.0);
196
197 int doy = hlp[1].toInt(&ok, 10);
198 if (!ok) {
199 return failure;
200 }
201 time += (doy * 24.0 * 3600.0);
202
203 int daysec = hlp[2].toInt(&ok, 10);
204 if (!ok) {
205 return failure;
206 }
207
208 time += daysec;
209
210 return success;
211}
212
213
214// get DSBs from OSBs
215////////////////////////////////////////////////////////////////////////////
216t_irc bncBiasSnx::getDsbFromOsb(void) {
217 QMapIterator<QString,snxSatCodeBias*>itSat(_snxSatCodeBiasMap);
218 while (itSat.hasNext()) {
219 itSat.next();
220 char sys = itSat.key().at(0).toLatin1();
221 QMap<QString, double>& cb = itSat.value()->_biasMap;
222 switch (sys) {
223 case 'G':
224 if (cb.contains("C1W") && cb.contains("C2W")) {cb.insert("C1W-C2W", cb["C1W"] - cb["C2W"]);}
225 if (cb.contains("C1C") && cb.contains("C1W")) {cb.insert("C1C-C1W", cb["C1C"] - cb["C1W"]);}
226 if (cb.contains("C2C") && cb.contains("C2W")) {cb.insert("C2C-C2W", cb["C2C"] - cb["C2W"]);}
227 if (cb.contains("C2W") && cb.contains("C2S")) {cb.insert("C2W-C2S", cb["C2W"] - cb["C2S"]);}
228 if (cb.contains("C2W") && cb.contains("C2L")) {cb.insert("C2W-C2L", cb["C2W"] - cb["C2L"]);}
229 if (cb.contains("C2W") && cb.contains("C2X")) {cb.insert("C2W-C2X", cb["C2W"] - cb["C2X"]);}
230 if (cb.contains("C1C") && cb.contains("C2W")) {cb.insert("C1C-C2W", cb["C1C"] - cb["C2W"]);}
231 if (cb.contains("C1C") && cb.contains("C5Q")) {cb.insert("C1C-C5Q", cb["C1C"] - cb["C5Q"]);}
232 if (cb.contains("C1C") && cb.contains("C5X")) {cb.insert("C1C-C5X", cb["C1C"] - cb["C5X"]);}
233 break;
234 case 'R':
235 if (cb.contains("C1P") && cb.contains("C2P")) {cb.insert("C1P-C2P", cb["C1P"] - cb["C2P"]);}
236 if (cb.contains("C1C") && cb.contains("C1P")) {cb.insert("C1C-C1P", cb["C1C"] - cb["C1P"]);}
237 if (cb.contains("C2C") && cb.contains("C2P")) {cb.insert("C2C-C2P", cb["C2C"] - cb["C2P"]);}
238 if (cb.contains("C1C") && cb.contains("C2C")) {cb.insert("C1C-C2C", cb["C1C"] - cb["C2C"]);}
239 if (cb.contains("C1C") && cb.contains("C2P")) {cb.insert("C1C-C2P", cb["C1C"] - cb["C2P"]);}
240 break;
241 case 'E':
242 if (cb.contains("C1C") && cb.contains("C5Q")) {cb.insert("C1C-C5Q", cb["C1C"] - cb["C5Q"]);}
243 if (cb.contains("C1C") && cb.contains("C6C")) {cb.insert("C1C-C6C", cb["C1C"] - cb["C6C"]);}
244 if (cb.contains("C1C") && cb.contains("C7Q")) {cb.insert("C1C-C7Q", cb["C1C"] - cb["C7Q"]);}
245 if (cb.contains("C1C") && cb.contains("C8Q")) {cb.insert("C1C-C8Q", cb["C1C"] - cb["C8Q"]);}
246 break;
247 case 'C':
248 if (cb.contains("C2I") && cb.contains("C6I")) {cb.insert("C2I-C6I", cb["C2I"] - cb["C6I"]);}
249 if (cb.contains("C2I") && cb.contains("C7I")) {cb.insert("C2I-C7I", cb["C2I"] - cb["C7I"]);}
250 if (cb.contains("C1X") && cb.contains("C6I")) {cb.insert("C1X-C6I", cb["C1X"] - cb["C6I"]);}
251 if (cb.contains("C1P") && cb.contains("C6I")) {cb.insert("C1P-C6I", cb["C1P"] - cb["C6I"]);}
252 if (cb.contains("C1D") && cb.contains("C6I")) {cb.insert("C1D-C6I", cb["C1D"] - cb["C6I"]);}
253 if (cb.contains("C1X") && cb.contains("C7Z")) {cb.insert("C1X-C7Z", cb["C1X"] - cb["C7Z"]);}
254 if (cb.contains("C1X") && cb.contains("C8X")) {cb.insert("C1X-C8X", cb["C1X"] - cb["C8X"]);}
255 if (cb.contains("C1X") && cb.contains("C5X")) {cb.insert("C1X-C5X", cb["C1X"] - cb["C5X"]);}
256 if (cb.contains("C1P") && cb.contains("C5P")) {cb.insert("C1P-C5P", cb["C1P"] - cb["C5P"]);}
257 if (cb.contains("C1D") && cb.contains("C5D")) {cb.insert("C1D-C5D", cb["C1D"] - cb["C5D"]);}
258 break;
259 case 'J':
260 if (cb.contains("C1C") && cb.contains("C1X")) {cb.insert("C1C-C1X", cb["C1C"] - cb["C1X"]);}
261 if (cb.contains("C1C") && cb.contains("C2L")) {cb.insert("C1C-C2L", cb["C1C"] - cb["C2L"]);}
262 if (cb.contains("C1C") && cb.contains("C5X")) {cb.insert("C1C-C5X", cb["C1C"] - cb["C5X"]);}
263 if (cb.contains("C1C") && cb.contains("C5Q")) {cb.insert("C1C-C5Q", cb["C1C"] - cb["C5Q"]);}
264 if (cb.contains("C1X") && cb.contains("C2X")) {cb.insert("C1X-C2X", cb["C1X"] - cb["C2X"]);}
265 if (cb.contains("C1X") && cb.contains("C5X")) {cb.insert("C1X-C5X", cb["C1X"] - cb["C5X"]);}
266 default:
267 break;
268 }
269 }
270 return success;
271}
272
273// get DSBs from OSBs
274////////////////////////////////////////////////////////////////////////////
275t_irc bncBiasSnx::cleanDsb() {
276 for (auto itS = _snxSatCodeBiasMap.begin(); itS != _snxSatCodeBiasMap.end();){
277 if (!_useGnss[itS.key().at(0).toLatin1()]) {
278 itS = _snxSatCodeBiasMap.erase(itS);
279 }
280 else {
281 QMap<QString, double>& cb = itS.value()->_biasMap;
282 for (auto itB = cb.begin(); itB != cb.end();){
283 if (itB.key().size() == 3) {
284 itB = cb.erase(itB);
285 }
286 else {
287 ++itB;
288 }
289 }
290 ++itS;
291 }
292 }
293 return success;
294}
295
296//
297////////////////////////////////////////////////////////////////////////////
298void bncBiasSnx::determineSsrSatCodeBiases(QString prn, double aIF1, double aIF2,
299 t_satCodeBias& satCodeBias) {
300 std::string rnxType2ch;
301 double value;
302 if (_snxSatCodeBiasMap.contains(prn)) {
303 char sys = prn.at(0).toLatin1();
304 QMap<QString, double>& cb = _snxSatCodeBiasMap[prn]->_biasMap;
305 switch (sys) {
306 case 'G':
307 if (cb.contains("C1W-C2W")) {
308 double dcb_1W2W = cb.find("C1W-C2W").value();
309 rnxType2ch = "1W";
310 value = aIF2 * dcb_1W2W;
311 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
312 rnxType2ch = "2W";
313 value = -aIF1 * dcb_1W2W;
314 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
315 if (cb.contains("C1C-C1W")) {
316 double dcb_1C1W = cb.find("C1C-C1W").value();
317 rnxType2ch = "1C";
318 value = dcb_1C1W + aIF2 * dcb_1W2W;
319 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
320 if (cb.contains("C1C-C5Q")) {
321 double dcb_1C5Q = cb.find("C1C-C5Q").value();
322 rnxType2ch = "5Q";
323 value = dcb_1C1W + aIF2 * dcb_1W2W - dcb_1C5Q;
324 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
325 }
326 if (cb.contains("C1C-C5X")) {
327 double dcb_1C5X = cb.find("C1C-C5X").value();
328 rnxType2ch = "5X";
329 value = dcb_1C1W + aIF2 * dcb_1W2W - dcb_1C5X;
330 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
331 }
332 }
333 else {
334 if (cb.contains("C1C-C2W")) {
335 double dcb_1C2W = cb.find("C1C-C2W").value();
336 rnxType2ch = "1C";
337 value = dcb_1C2W - aIF1 * dcb_1W2W;
338 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
339 }
340 }
341 if (cb.contains("C2C-C2W")) {
342 double dcb_2C2W = cb.find("C2C-C2W").value();
343 rnxType2ch = "2C";
344 value = dcb_2C2W - aIF1 * dcb_1W2W;
345 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
346 }
347 if (cb.contains("C2W-C2S")) {
348 double dcb_2W2S = cb.find("C2W-C2S").value();
349 rnxType2ch = "2S";
350 value = -aIF1 * dcb_1W2W - dcb_2W2S;
351 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
352 }
353 if (cb.contains("C2W-C2L")) {
354 double dcb_2W2L = cb.find("C2W-C2L").value();
355 rnxType2ch = "2L";
356 value = -aIF1 * dcb_1W2W - dcb_2W2L;
357 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
358 }
359 if (cb.contains("C2W-C2X")) {
360 double dcb_2W2X = cb.find("C2W-C2X").value();
361 rnxType2ch = "2X";
362 value = -aIF1 * dcb_1W2W - dcb_2W2X;
363 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
364 }
365 }
366 break;
367 case 'R':
368 if (cb.contains("C1P-C2P")) {
369 double dcb_1P2P = cb.find("C1P-C2P").value();
370 rnxType2ch = "1P";
371 value = aIF2 * dcb_1P2P;
372 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
373 rnxType2ch = "2P";
374 value = -aIF1 * dcb_1P2P;
375 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
376 if (cb.contains("C1C-C1P")) {
377 double dcb_1C1P = cb.find("C1C-C1P").value();
378 rnxType2ch = "1C";
379 value = dcb_1C1P + aIF2 * dcb_1P2P;
380 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
381 }
382 if (cb.contains("C2C-C2P")) {
383 double dcb_2C2P = cb.find("C2C-C2P").value();
384 rnxType2ch = "2C";
385 value = dcb_2C2P - aIF1 * dcb_1P2P;
386 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
387 }
388 }
389 break;
390 case 'E':
391 if (cb.contains("C1C-C5Q")) {
392 double dcb_1C5Q = cb.find("C1C-C5Q").value();
393 rnxType2ch = "5Q";
394 value = -aIF1 * dcb_1C5Q;
395 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
396 rnxType2ch = "1C";
397 value = aIF2 * dcb_1C5Q;
398 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
399 if (cb.contains("C1C-C6C")) {
400 double dcb_1C6C = cb.find("C1C-C6C").value();
401 rnxType2ch = "6C";
402 value = aIF2 * dcb_1C5Q - dcb_1C6C;
403 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
404 }
405 if (cb.contains("C1C-C7Q")) {
406 double dcb_1C7Q = cb.find("C1C-C7Q").value();
407 rnxType2ch = "7Q";
408 value = aIF2 * dcb_1C5Q - dcb_1C7Q;
409 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
410 }
411 if (cb.contains("C1C-C8Q")) {
412 double dcb_1C8Q = cb.find("C1C-C8Q").value();
413 rnxType2ch = "8Q";
414 value = aIF2 * dcb_1C5Q - dcb_1C8Q;
415 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
416 }
417 }
418 break;
419 case 'C':
420 if (cb.contains("C2I-C6I")) {
421 double dcb_2I6I = cb.find("C2I-C6I").value();
422 rnxType2ch = "2I";
423 value = aIF2 * dcb_2I6I;
424 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
425 rnxType2ch = "6I";
426 value = -aIF1 * dcb_2I6I;
427 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
428 if (cb.contains("C2I-C7I")) {
429 double dcb_2I7I = cb.find("C2I-C7I").value();
430 rnxType2ch = "7I";
431 value = aIF2 * dcb_2I6I - dcb_2I7I;
432 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
433 }
434 if (cb.contains("C1X-C6I")) {
435 double dcb_1X6I = cb.find("C1X-C6I").value();
436 rnxType2ch = "1X";
437 value = dcb_1X6I - aIF1 * dcb_2I6I;
438 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
439 if (cb.contains("C1X-C7Z")) {
440 double dcb_1X7Z = cb.find("C1X-C7Z").value();
441 rnxType2ch = "7Z";
442 value = dcb_1X6I - aIF1 * dcb_2I6I - dcb_1X7Z;
443 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
444 }
445 if (cb.contains("C1X-C8X")) {
446 double dcb_1X8X = cb.find("C1X-C8X").value();
447 rnxType2ch = "8X";
448 value = dcb_1X6I - aIF1 * dcb_2I6I - dcb_1X8X;
449 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
450 }
451 if (cb.contains("C1X-C5X")) {
452 double dcb_1X5X = cb.find("C1X-C5X").value();
453 rnxType2ch = "5X";
454 value = dcb_1X6I - aIF1 * dcb_2I6I - dcb_1X5X;
455 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
456 }
457 }
458 if (cb.contains("C1P-C6I")) {
459 double dcb_1P6I = cb.find("C1P-C6I").value();
460 rnxType2ch = "1P";
461 value = dcb_1P6I - aIF1 * dcb_2I6I;
462 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
463 if (cb.contains("C1P-C5P")) {
464 double dcb_1P5P = cb.find("C1P-C5P").value();
465 rnxType2ch = "5P";
466 value = dcb_1P6I - aIF1 * dcb_2I6I - dcb_1P5P;
467 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
468 }
469 }
470 if (cb.contains("C1D-C6I")) {
471 double dcb_1D6I = cb.find("C1D-C6I").value();
472 rnxType2ch = "1D";
473 value = dcb_1D6I - aIF1 * dcb_2I6I;
474 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
475 if (cb.contains("C1D-C5D")) {
476 double dcb_1D5D = cb.find("C1D-C5D").value();
477 rnxType2ch = "5D";
478 value = dcb_1D6I - aIF1 * dcb_2I6I - dcb_1D5D;
479 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
480 }
481 }
482 }
483 break;
484 case 'J':
485 if (cb.contains("C1C-C2L")) {
486 double dcb_1C2L = cb.find("C1C-C2L").value();
487 rnxType2ch = "1C";
488 value = aIF2 * dcb_1C2L;
489 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
490 rnxType2ch = "2L";
491 value = -aIF1 * dcb_1C2L;
492 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
493 if (cb.contains("C1C-C1X")) {
494 double dcb_1C1X = cb.find("C1C-C1X").value();
495 rnxType2ch = "1X";
496 value = aIF2 * dcb_1C2L - dcb_1C1X;
497 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
498 if (cb.contains("C1X-C2X")) {
499 double dcb_1X2X = cb.find("C1X-C2X").value();
500 rnxType2ch = "2X";
501 value = aIF2 * dcb_1C2L - dcb_1C1X - dcb_1X2X;
502 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
503 }
504 }
505 if (cb.contains("C1C-C5X")) {
506 double dcb_1C5X = cb.find("C1C-C5X").value();
507 rnxType2ch = "5X";
508 value = aIF2 * dcb_1C2L - dcb_1C5X;
509 setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
510 }
511 }
512 break;
513 default:
514 break;
515 }
516 }
517 return;
518}
519
520
521void bncBiasSnx::setSsrSatCodeBias(std::string rnxType2ch, double value,
522 t_satCodeBias& satCodeBias) {
523 t_frqCodeBias frqCodeBias;
524
525 frqCodeBias._rnxType2ch = rnxType2ch;
526 frqCodeBias._value = value;
527
528 satCodeBias._bias.push_back(frqCodeBias);
529 return;
530}
Note: See TracBrowser for help on using the repository browser.