[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 | }
|
---|
| 75 | }
|
---|
| 76 |
|
---|
| 77 | // Print
|
---|
| 78 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 79 | void 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 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 102 | t_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")) {
|
---|
[9684] | 150 | // from nano seconds into meters
|
---|
[9685] | 151 | value /= 1.e9;
|
---|
[9684] | 152 | value *= t_CST::c;
|
---|
[9685] | 153 |
|
---|
[9677] | 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 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 187 | t_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 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 216 | t_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 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 275 | t_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 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 298 | void bncBiasSnx::determineSsrSatCodeBiases(QString prn, double aIF1, double aIF2, t_satCodeBias& satCodeBias) {
|
---|
| 299 | std::string rnxType2ch;
|
---|
| 300 | double value;
|
---|
| 301 | if (_snxSatCodeBiasMap.contains(prn)) {
|
---|
| 302 | char sys = prn.at(0).toLatin1();
|
---|
| 303 | QMap<QString, double>& cb = _snxSatCodeBiasMap[prn]->_biasMap;
|
---|
| 304 | switch (sys) {
|
---|
| 305 | case 'G':
|
---|
| 306 | if (cb.contains("C1W-C2W")) {
|
---|
| 307 | double dcb_1W2W = cb.find("C1W-C2W").value();
|
---|
| 308 | rnxType2ch = "1W";
|
---|
| 309 | value = aIF2 * dcb_1W2W;
|
---|
| 310 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 311 | rnxType2ch = "2W";
|
---|
| 312 | value = -aIF1 * dcb_1W2W;
|
---|
| 313 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 314 | if (cb.contains("C1C-C1W")) {
|
---|
| 315 | double dcb_1C1W = cb.find("C1C-C1W").value();
|
---|
| 316 | rnxType2ch = "1C";
|
---|
| 317 | value = dcb_1C1W + aIF2 * dcb_1W2W;
|
---|
| 318 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 319 | if (cb.contains("C1C-C5Q")) {
|
---|
| 320 | double dcb_1C5Q = cb.find("C1C-C5Q").value();
|
---|
| 321 | rnxType2ch = "5Q";
|
---|
| 322 | value = dcb_1C1W + aIF2 * dcb_1W2W - dcb_1C5Q;
|
---|
| 323 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 324 | }
|
---|
| 325 | if (cb.contains("C1C-C5X")) {
|
---|
| 326 | double dcb_1C5X = cb.find("C1C-C5X").value();
|
---|
| 327 | rnxType2ch = "5X";
|
---|
| 328 | value = dcb_1C1W + aIF2 * dcb_1W2W - dcb_1C5X;
|
---|
| 329 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 330 | }
|
---|
| 331 | }
|
---|
| 332 | else {
|
---|
| 333 | if (cb.contains("C1C-C2W")) {
|
---|
| 334 | double dcb_1C2W = cb.find("C1C-C2W").value();
|
---|
| 335 | rnxType2ch = "1C";
|
---|
| 336 | value = dcb_1C2W - aIF1 * dcb_1W2W;
|
---|
| 337 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 338 | }
|
---|
| 339 | }
|
---|
| 340 | if (cb.contains("C2C-C2W")) {
|
---|
| 341 | double dcb_2C2W = cb.find("C2C-C2W").value();
|
---|
| 342 | rnxType2ch = "2C";
|
---|
| 343 | value = dcb_2C2W - aIF1 * dcb_1W2W;
|
---|
| 344 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 345 | }
|
---|
| 346 | if (cb.contains("C2W-C2S")) {
|
---|
| 347 | double dcb_2W2S = cb.find("C2W-C2S").value();
|
---|
| 348 | rnxType2ch = "2S";
|
---|
| 349 | value = -aIF1 * dcb_1W2W - dcb_2W2S;
|
---|
| 350 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 351 | }
|
---|
| 352 | if (cb.contains("C2W-C2L")) {
|
---|
| 353 | double dcb_2W2L = cb.find("C2W-C2L").value();
|
---|
| 354 | rnxType2ch = "2L";
|
---|
| 355 | value = -aIF1 * dcb_1W2W - dcb_2W2L;
|
---|
| 356 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 357 | }
|
---|
| 358 | if (cb.contains("C2W-C2X")) {
|
---|
| 359 | double dcb_2W2X = cb.find("C2W-C2X").value();
|
---|
| 360 | rnxType2ch = "2X";
|
---|
| 361 | value = -aIF1 * dcb_1W2W - dcb_2W2X;
|
---|
| 362 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 363 | }
|
---|
| 364 | }
|
---|
| 365 | break;
|
---|
| 366 | case 'R':
|
---|
| 367 | if (cb.contains("C1P-C2P")) {
|
---|
| 368 | double dcb_1P2P = cb.find("C1P-C2P").value();
|
---|
| 369 | rnxType2ch = "1P";
|
---|
| 370 | value = aIF2 * dcb_1P2P;
|
---|
| 371 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 372 | rnxType2ch = "2P";
|
---|
| 373 | value = -aIF1 * dcb_1P2P;
|
---|
| 374 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 375 | if (cb.contains("C1C-C1P")) {
|
---|
| 376 | double dcb_1C1P = cb.find("C1C-C1P").value();
|
---|
| 377 | rnxType2ch = "1C";
|
---|
| 378 | value = dcb_1C1P + aIF2 * dcb_1P2P;
|
---|
| 379 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 380 | }
|
---|
| 381 | if (cb.contains("C2C-C2P")) {
|
---|
| 382 | double dcb_2C2P = cb.find("C2C-C2P").value();
|
---|
| 383 | rnxType2ch = "2C";
|
---|
| 384 | value = dcb_2C2P - aIF1 * dcb_1P2P;
|
---|
| 385 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 386 | }
|
---|
| 387 | }
|
---|
| 388 | break;
|
---|
| 389 | case 'E':
|
---|
| 390 | if (cb.contains("C1C-C5Q")) {
|
---|
| 391 | double dcb_1C5Q = cb.find("C1C-C5Q").value();
|
---|
| 392 | rnxType2ch = "5Q";
|
---|
| 393 | value = -aIF1 * dcb_1C5Q;
|
---|
| 394 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 395 | rnxType2ch = "1C";
|
---|
| 396 | value = aIF2 * dcb_1C5Q;
|
---|
| 397 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 398 | if (cb.contains("C1C-C6C")) {
|
---|
| 399 | double dcb_1C6C = cb.find("C1C-C6C").value();
|
---|
| 400 | rnxType2ch = "6C";
|
---|
| 401 | value = aIF2 * dcb_1C5Q - dcb_1C6C;
|
---|
| 402 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 403 | }
|
---|
| 404 | if (cb.contains("C1C-C7Q")) {
|
---|
| 405 | double dcb_1C7Q = cb.find("C1C-C7Q").value();
|
---|
| 406 | rnxType2ch = "7Q";
|
---|
| 407 | value = aIF2 * dcb_1C5Q - dcb_1C7Q;
|
---|
| 408 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 409 | }
|
---|
| 410 | if (cb.contains("C1C-C8Q")) {
|
---|
| 411 | double dcb_1C8Q = cb.find("C1C-C8Q").value();
|
---|
| 412 | rnxType2ch = "8Q";
|
---|
| 413 | value = aIF2 * dcb_1C5Q - dcb_1C8Q;
|
---|
| 414 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 415 | }
|
---|
| 416 | }
|
---|
| 417 | break;
|
---|
| 418 | case 'C':
|
---|
| 419 | if (cb.contains("C2I-C6I")) {
|
---|
| 420 | double dcb_2I6I = cb.find("C2I-C6I").value();
|
---|
| 421 | rnxType2ch = "2I";
|
---|
| 422 | value = aIF2 * dcb_2I6I;
|
---|
| 423 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 424 | rnxType2ch = "6I";
|
---|
| 425 | value = -aIF1 * dcb_2I6I;
|
---|
| 426 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 427 | if (cb.contains("C2I-C7I")) {
|
---|
| 428 | double dcb_2I7I = cb.find("C2I-C7I").value();
|
---|
| 429 | rnxType2ch = "7I";
|
---|
| 430 | value = aIF2 * dcb_2I6I - dcb_2I7I;
|
---|
| 431 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 432 | }
|
---|
| 433 | if (cb.contains("C1X-C6I")) {
|
---|
| 434 | double dcb_1X6I = cb.find("C1X-C6I").value();
|
---|
| 435 | rnxType2ch = "1X";
|
---|
| 436 | value = dcb_1X6I - aIF1 * dcb_2I6I;
|
---|
| 437 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 438 | if (cb.contains("C1X-C7Z")) {
|
---|
| 439 | double dcb_1X7Z = cb.find("C1X-C7Z").value();
|
---|
| 440 | rnxType2ch = "7Z";
|
---|
| 441 | value = dcb_1X6I - aIF1 * dcb_2I6I - dcb_1X7Z;
|
---|
| 442 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 443 | }
|
---|
| 444 | if (cb.contains("C1X-C8X")) {
|
---|
| 445 | double dcb_1X8X = cb.find("C1X-C8X").value();
|
---|
| 446 | rnxType2ch = "8X";
|
---|
| 447 | value = dcb_1X6I - aIF1 * dcb_2I6I - dcb_1X8X;
|
---|
| 448 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 449 | }
|
---|
| 450 | if (cb.contains("C1X-C5X")) {
|
---|
| 451 | double dcb_1X5X = cb.find("C1X-C5X").value();
|
---|
| 452 | rnxType2ch = "5X";
|
---|
| 453 | value = dcb_1X6I - aIF1 * dcb_2I6I - dcb_1X5X;
|
---|
| 454 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 455 | }
|
---|
| 456 | }
|
---|
| 457 | if (cb.contains("C1P-C6I")) {
|
---|
| 458 | double dcb_1P6I = cb.find("C1P-C6I").value();
|
---|
| 459 | rnxType2ch = "1P";
|
---|
| 460 | value = dcb_1P6I - aIF1 * dcb_2I6I;
|
---|
| 461 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 462 | if (cb.contains("C1P-C5P")) {
|
---|
| 463 | double dcb_1P5P = cb.find("C1P-C5P").value();
|
---|
| 464 | rnxType2ch = "5P";
|
---|
| 465 | value = dcb_1P6I - aIF1 * dcb_2I6I - dcb_1P5P;
|
---|
| 466 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 467 | }
|
---|
| 468 | }
|
---|
| 469 | if (cb.contains("C1D-C6I")) {
|
---|
| 470 | double dcb_1D6I = cb.find("C1D-C6I").value();
|
---|
| 471 | rnxType2ch = "1D";
|
---|
| 472 | value = dcb_1D6I - aIF1 * dcb_2I6I;
|
---|
| 473 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 474 | if (cb.contains("C1D-C5D")) {
|
---|
| 475 | double dcb_1D5D = cb.find("C1D-C5D").value();
|
---|
| 476 | rnxType2ch = "5D";
|
---|
| 477 | value = dcb_1D6I - aIF1 * dcb_2I6I - dcb_1D5D;
|
---|
| 478 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 479 | }
|
---|
| 480 | }
|
---|
| 481 | }
|
---|
| 482 | break;
|
---|
| 483 | case 'J':
|
---|
| 484 | if (cb.contains("C1C-C2L")) {
|
---|
| 485 | double dcb_1C2L = cb.find("C1C-C2L").value();
|
---|
| 486 | rnxType2ch = "1C";
|
---|
| 487 | value = aIF2 * dcb_1C2L;
|
---|
| 488 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 489 | rnxType2ch = "2L";
|
---|
| 490 | value = -aIF1 * dcb_1C2L;
|
---|
| 491 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 492 | if (cb.contains("C1C-C1X")) {
|
---|
| 493 | double dcb_1C1X = cb.find("C1C-C1X").value();
|
---|
| 494 | rnxType2ch = "1X";
|
---|
| 495 | value = aIF2 * dcb_1C2L - dcb_1C1X;
|
---|
| 496 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 497 | if (cb.contains("C1X-C2X")) {
|
---|
| 498 | double dcb_1X2X = cb.find("C1X-C2X").value();
|
---|
| 499 | rnxType2ch = "2X";
|
---|
| 500 | value = aIF2 * dcb_1C2L - dcb_1C1X - dcb_1X2X;
|
---|
| 501 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 502 | }
|
---|
| 503 | }
|
---|
| 504 | if (cb.contains("C1C-C5X")) {
|
---|
| 505 | double dcb_1C5X = cb.find("C1C-C5X").value();
|
---|
| 506 | rnxType2ch = "5X";
|
---|
| 507 | value = aIF2 * dcb_1C2L - dcb_1C5X;
|
---|
| 508 | setSsrSatCodeBias(rnxType2ch, value, satCodeBias);
|
---|
| 509 | }
|
---|
| 510 | }
|
---|
| 511 | break;
|
---|
| 512 | default:
|
---|
| 513 | break;
|
---|
| 514 | }
|
---|
| 515 | }
|
---|
[9698] | 516 | return;
|
---|
[9677] | 517 | }
|
---|
| 518 |
|
---|
| 519 |
|
---|
| 520 | void bncBiasSnx::setSsrSatCodeBias(std::string rnxType2ch, double value, t_satCodeBias& satCodeBias) {
|
---|
| 521 | t_frqCodeBias frqCodeBias;
|
---|
| 522 |
|
---|
| 523 | frqCodeBias._rnxType2ch = rnxType2ch;
|
---|
| 524 | frqCodeBias._value = value;
|
---|
| 525 |
|
---|
| 526 | satCodeBias._bias.push_back(frqCodeBias);
|
---|
| 527 | return;
|
---|
| 528 | }
|
---|