- Timestamp:
- Mar 22, 2011, 9:58:12 AM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r3106 r3107 143 143 _staID = staID; 144 144 145 connect(this, SIGNAL(newMessage(QByteArray,bool)), 146 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool))); 147 145 148 bncSettings settings; 146 149 … … 189 192 } 190 193 191 connect(this, SIGNAL(newMessage(QByteArray,bool)), 192 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool))); 193 194 // Several options 195 // --------------- 194 196 _usePhase = false; 195 197 if ( Qt::CheckState(settings.value("pppUsePhase").toInt()) == Qt::Checked) { … … 202 204 } 203 205 204 _xcBanc.ReSize(4); _xcBanc = 0.0; 205 _ellBanc.ReSize(3); _ellBanc = 0.0; 206 207 int nextPar = 0; 208 _params.push_back(new bncParam(bncParam::CRD_X, ++nextPar, "")); 209 _params.push_back(new bncParam(bncParam::CRD_Y, ++nextPar, "")); 210 _params.push_back(new bncParam(bncParam::CRD_Z, ++nextPar, "")); 211 _params.push_back(new bncParam(bncParam::RECCLK, ++nextPar, "")); 212 if (_estTropo) { 213 _params.push_back(new bncParam(bncParam::TROPO, ++nextPar, "")); 214 } 206 _useGalileo = false; 215 207 if ( Qt::CheckState(settings.value("pppGalileo").toInt()) == Qt::Checked) { 216 _ params.push_back(new bncParam(bncParam::GALILEO_OFFSET, ++nextPar, ""));208 _useGalileo = true; 217 209 } 218 210 … … 237 229 } 238 230 231 // Antenna Name, ANTEX File 232 // ------------------------ 239 233 _antex = 0; 240 234 QString antexFileName = settings.value("pppAntex").toString(); … … 248 242 else { 249 243 _antennaName = settings.value("pppAntenna").toString(); 244 } 245 } 246 247 // Bancroft Coordinates 248 // -------------------- 249 _xcBanc.ReSize(4); _xcBanc = 0.0; 250 _ellBanc.ReSize(3); _ellBanc = 0.0; 251 } 252 253 // Reset 254 //////////////////////////////////////////////////////////////////////////// 255 void bncModel::reset() { 256 257 for (int iPar = 1; iPar <= _params.size(); iPar++) { 258 delete _params[iPar-1]; 259 } 260 _params.clear(); 261 262 int nextPar = 0; 263 _params.push_back(new bncParam(bncParam::CRD_X, ++nextPar, "")); 264 _params.push_back(new bncParam(bncParam::CRD_Y, ++nextPar, "")); 265 _params.push_back(new bncParam(bncParam::CRD_Z, ++nextPar, "")); 266 _params.push_back(new bncParam(bncParam::RECCLK, ++nextPar, "")); 267 if (_estTropo) { 268 _params.push_back(new bncParam(bncParam::TROPO, ++nextPar, "")); 269 } 270 if (_useGalileo) { 271 _params.push_back(new bncParam(bncParam::GALILEO_OFFSET, ++nextPar, "")); 272 } 273 274 _QQ.ReSize(_params.size()); 275 _QQ = 0.0; 276 for (int iPar = 1; iPar <= _params.size(); iPar++) { 277 bncParam* pp = _params[iPar-1]; 278 pp->xx = 0.0; 279 if (pp->isCrd()) { 280 _QQ(iPar,iPar) = _sigCrd0 * _sigCrd0; 281 } 282 else if (pp->type == bncParam::RECCLK) { 283 _QQ(iPar,iPar) = _sigClk0 * _sigClk0; 284 } 285 else if (pp->type == bncParam::TROPO) { 286 _QQ(iPar,iPar) = _sigTrp0 * _sigTrp0; 287 } 288 else if (pp->type == bncParam::GALILEO_OFFSET) { 289 _QQ(iPar,iPar) = _sigGalileoOffset0 * _sigGalileoOffset0; 250 290 } 251 291 } … … 428 468 _time = epoData->tt; // current epoch time 429 469 430 const double MAXSOLGAP = 60.0;470 const double MAXSOLGAP = 10.0; 431 471 432 472 bool firstCrd = false; … … 434 474 firstCrd = true; 435 475 _startTime = epoData->tt; 436 437 unsigned nPar = _params.size(); 438 _QQ.ReSize(nPar); 439 _QQ = 0.0; 440 for (int iPar = 1; iPar <= _params.size(); iPar++) { 441 bncParam* pp = _params[iPar-1]; 442 pp->xx = 0.0; 443 if (pp->isCrd()) { 444 _QQ(iPar,iPar) = _sigCrd0 * _sigCrd0; 445 } 446 else if (pp->type == bncParam::RECCLK) { 447 _QQ(iPar,iPar) = _sigClk0 * _sigClk0; 448 } 449 else if (pp->type == bncParam::TROPO) { 450 _QQ(iPar,iPar) = _sigTrp0 * _sigTrp0; 451 } 452 else if (pp->type == bncParam::GALILEO_OFFSET) { 453 _QQ(iPar,iPar) = _sigGalileoOffset0 * _sigGalileoOffset0; 454 } 455 } 476 reset(); 456 477 } 457 478 -
trunk/BNC/bncmodel.h
r3106 r3107 93 93 94 94 private: 95 void reset(); 95 96 void cmpEle(t_satData* satData); 96 97 void addAmb(t_satData* satData); … … 138 139 bool _usePhase; 139 140 bool _estTropo; 141 bool _useGalileo; 140 142 QByteArray _log; 141 143 QFile* _nmeaFile;
Note:
See TracChangeset
for help on using the changeset viewer.