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