Changeset 8905 in ntrip for trunk/BNC/src/PPP/pppParlist.cpp
- Timestamp:
- Mar 18, 2020, 11:13:50 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppParlist.cpp
r7988 r8905 94 94 _noise = OPT->_noiseTrp; 95 95 break; 96 case ion: 97 _epoSpec = false; 98 _sigma0 = OPT->_aprSigIon; 99 _noise = OPT->_noiseIon; 100 break; 101 case cBias1: 102 case cBias2: 103 _epoSpec = false; 104 _sigma0 = OPT->_aprSigCodeBias; 105 _noise = OPT->_noiseCodeBias; 106 break; 107 case pBias1: 108 case pBias2: 109 _epoSpec = false; 110 _sigma0 = OPT->_aprSigPhaseBias; 111 _noise = OPT->_noisePhaseBias; 112 break; 96 113 } 97 114 } … … 106 123 //////////////////////////////////////////////////////////////////////////// 107 124 double t_pppParam::partial(const bncTime& /* epoTime */, const t_pppSatObs* obs, 108 const t_lc::type& tLC) const {125 const t_lc::type& tLC) const {//qDebug() << "t_pppParam::partial: " << tLC; 109 126 110 127 // Special Case - Melbourne-Wuebbena … … 115 132 116 133 const t_pppStation* sta = PPP_CLIENT->staRover(); 117 ColumnVector rhoV = sta->xyzApr() - obs->xc().Rows(1,3); 134 ColumnVector rhoV = sta->xyzApr() - obs->xc().Rows(1,3); 135 136 map<t_frequency::type, double> codeCoeff; 137 map<t_frequency::type, double> phaseCoeff; 138 map<t_frequency::type, double> ionoCoeff; 139 obs->lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff); 118 140 119 141 switch (_type) { 120 142 case crdX: 121 return (sta->xyzApr()[0] - obs->xc()[0]) / rhoV.norm_Frobenius(); 143 if (tLC == t_lc::GIM) {return 0.0;} 144 return (sta->xyzApr()[0] - obs->xc()[0]) / rhoV.NormFrobenius(); 122 145 case crdY: 123 return (sta->xyzApr()[1] - obs->xc()[1]) / rhoV.norm_Frobenius(); 146 if (tLC == t_lc::GIM) {return 0.0;} 147 return (sta->xyzApr()[1] - obs->xc()[1]) / rhoV.NormFrobenius(); 124 148 case crdZ: 125 return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.norm_Frobenius(); 149 if (tLC == t_lc::GIM) {return 0.0;} 150 return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius(); 126 151 case clkR: 152 if (tLC == t_lc::GIM) {return 0.0;} 127 153 return 1.0; 128 154 case offGG: 155 if (tLC == t_lc::GIM) {return 0.0;} 129 156 return (obs->prn().system() == 'R') ? 1.0 : 0.0; 130 157 case amb: 158 if (tLC == t_lc::GIM) {return 0.0;} 159 else if ((OPT->_obsModelType == OPT->IF) || 160 (OPT->_obsModelType == OPT->PPPRTK) || 161 (OPT->_obsModelType == OPT->UncombPPP) || 162 (OPT->_obsModelType == OPT->DCMcodeBias && !obs->isReference()) || 163 (OPT->_obsModelType == OPT->DCMphaseBias && !obs->isReference()) ) { 164 if (obs->prn() == _prn) { 165 if (tLC == _tLC) { 166 return (obs->lambda(tLC)); 167 } 168 else if (tLC == t_lc::lIF && _tLC == t_lc::MW) { 169 return obs->lambda(t_lc::lIF) * obs->lambda(t_lc::MW) / obs->lambda(t_lc::l2); 170 } 171 else { 172 if (_tLC == t_lc::l1) { 173 return obs->lambda(t_lc::l1) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)]; 174 } 175 else if (_tLC == t_lc::l2) { 176 return obs->lambda(t_lc::l2) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)]; 177 } 178 } 179 } 180 } 181 break; 182 case trp: 183 if (tLC == t_lc::GIM) {return 0.0;} 184 return 1.0 / sin(obs->eleSat()); 185 case ion: 186 // qDebug() << "refPrn: " << _refPrn.toString().c_str(); 131 187 if (obs->prn() == _prn) { 132 if (tLC == _tLC) { 133 return (obs->lambda(tLC)); 134 } 135 else if (tLC == t_lc::lIF && _tLC == t_lc::MW) { 136 return obs->lambda(t_lc::lIF) * obs->lambda(t_lc::MW) / obs->lambda(t_lc::l2); 137 } 138 else { 139 map<t_frequency::type, double> codeCoeff; 140 map<t_frequency::type, double> phaseCoeff; 141 obs->lcCoeff(tLC, codeCoeff, phaseCoeff); 142 if (_tLC == t_lc::l1) { 143 return obs->lambda(t_lc::l1) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)]; 144 } 145 else if (_tLC == t_lc::l2) { 146 return obs->lambda(t_lc::l2) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)]; 147 } 148 } 149 } 150 return 0.0; 151 case trp: 152 return 1.0 / sin(obs->eleSat()); 153 } 154 188 if (tLC == t_lc::c1) { 189 return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c1)]; 190 } 191 else if (tLC == t_lc::c2) { 192 return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c2)]; 193 } 194 else if (tLC == t_lc::l1) { 195 return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)]; 196 } 197 else if (tLC == t_lc::l2) { 198 return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)]; 199 } 200 else if (tLC == t_lc::GIM) { 201 return -1.0; 202 } 203 } 204 if (tLC == t_lc::GIM && _prn == _refPrn) { 205 return 1.0; 206 } 207 break; 208 case cBias1: 209 if (tLC == t_lc::c1) { 210 return 1.0; 211 } 212 else { 213 return 0.0; 214 } 215 break; 216 case cBias2: 217 if (tLC == t_lc::c2) { 218 return 1.0; 219 } 220 else { 221 return 0.0; 222 } 223 break; 224 case pBias1: 225 if (tLC == t_lc::l1) { 226 return 1.0; 227 } 228 else { 229 return 0.0; 230 } 231 break; 232 case pBias2: 233 if (tLC == t_lc::l2) { 234 return 1.0; 235 } 236 else { 237 return 0.0; 238 } 239 } 155 240 return 0.0; 156 241 } … … 171 256 break; 172 257 case clkR: 173 ss << "CLK "; 174 break; 175 case amb: 176 ss << "AMB " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString(); 258 ss << "REC_CLK "; 177 259 break; 178 260 case offGG: … … 181 263 case trp: 182 264 ss << "TRP "; 265 break; 266 case amb: 267 ss << "AMB " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString(); 268 break; 269 case ion: 270 ss << "ION " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString(); 271 break; 272 case cBias1: 273 case cBias2: 274 case pBias1: 275 case pBias2: 276 ss << "BIAS " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << "REC"; 183 277 break; 184 278 } … … 201 295 // 202 296 //////////////////////////////////////////////////////////////////////////// 203 t_irc t_pppParlist::set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector) { 297 t_irc t_pppParlist::set(const bncTime& epoTime, 298 const std::vector<t_pppSatObs*>& obsVector) { 204 299 205 300 // Remove some Parameters … … 271 366 required.push_back(new t_pppParam(t_pppParam::clkR, t_prn(), t_lc::dummy)); 272 367 273 // GPS-G lonassClock Offset368 // GPS-GLONASS Clock Offset 274 369 // ------------------------ 275 370 if (OPT->useSystem('R')) { … … 283 378 } 284 379 380 // Ionosphere 381 // ---------- 382 if (OPT->_obsModelType == OPT->UncombPPP || 383 OPT->_obsModelType == OPT->DCMcodeBias || 384 OPT->_obsModelType == OPT->DCMphaseBias ) { 385 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 386 const t_pppSatObs* satObs = obsVector[jj]; 387 required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy)); 388 } 389 } 390 285 391 // Ambiguities 286 392 // ----------- 287 393 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 288 394 const t_pppSatObs* satObs = obsVector[jj]; 289 const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system()); 290 for (unsigned ii = 0; ii < ambLCs.size(); ii++) { 291 required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector)); 292 } 395 if ((OPT->_obsModelType == OPT->IF) || 396 (OPT->_obsModelType == OPT->PPPRTK) || 397 (OPT->_obsModelType == OPT->UncombPPP) || 398 (OPT->_obsModelType == OPT->DCMcodeBias && !satObs->isReference()) || 399 (OPT->_obsModelType == OPT->DCMphaseBias && !satObs->isReference()) ) { 400 const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system()); 401 for (unsigned ii = 0; ii < ambLCs.size(); ii++) { 402 required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector)); 403 } 404 } 405 } 406 407 // Receiver Code Biases 408 // -------------------- 409 if (OPT->_obsModelType == OPT->DCMcodeBias) { 410 required.push_back(new t_pppParam(t_pppParam::cBias1, t_prn(), t_lc::c1)); 411 required.push_back(new t_pppParam(t_pppParam::cBias2, t_prn(), t_lc::c2)); 412 } 413 414 // Receiver Phase Biases 415 // --------------------- 416 if ((OPT->_obsModelType == OPT->DCMphaseBias) || 417 (OPT->_obsModelType == OPT->PPPRTK) ) { 418 required.push_back(new t_pppParam(t_pppParam::pBias1, t_prn(), t_lc::l1)); 419 required.push_back(new t_pppParam(t_pppParam::pBias2, t_prn(), t_lc::l2)); 293 420 } 294 421
Note:
See TracChangeset
for help on using the changeset viewer.