source: ntrip/trunk/BNC/combination/bnccomb.cpp@ 3470

Last change on this file since 3470 was 3470, checked in by mervart, 13 years ago
File size: 20.7 KB
Line 
1/* -------------------------------------------------------------------------
2 * BKG NTRIP Client
3 * -------------------------------------------------------------------------
4 *
5 * Class: bncComb
6 *
7 * Purpose: Combinations of Orbit/Clock Corrections
8 *
9 * Author: L. Mervart
10 *
11 * Created: 22-Jan-2011
12 *
13 * Changes:
14 *
15 * -----------------------------------------------------------------------*/
16
17#include <newmatio.h>
18#include <iomanip>
19#include <sstream>
20
21#include "bnccomb.h"
22#include "bncapp.h"
23#include "upload/bncrtnetdecoder.h"
24#include "bncsettings.h"
25#include "bncmodel.h"
26#include "bncutils.h"
27#include "bncpppclient.h"
28#include "bncsp3.h"
29#include "bncantex.h"
30#include "bnctides.h"
31
32const int moduloTime = 10;
33
34const double sig0_offAC = 1000.0;
35const double sig0_offACSat = 100.0;
36const double sigP_offACSat = 0.01;
37const double sig0_clkSat = 100.0;
38
39const double sigObs = 0.05;
40
41const int MAXPRN_GPS = 32;
42
43using namespace std;
44
45// Constructor
46////////////////////////////////////////////////////////////////////////////
47cmbParam::cmbParam(parType type_, int index_,
48 const QString& ac_, const QString& prn_) {
49
50 type = type_;
51 index = index_;
52 AC = ac_;
53 prn = prn_;
54 xx = 0.0;
55 eph = 0;
56
57 if (type == offAC) {
58 epoSpec = true;
59 sig0 = sig0_offAC;
60 sigP = sig0;
61 }
62 else if (type == offACSat) {
63 epoSpec = false;
64 sig0 = sig0_offACSat;
65 sigP = sigP_offACSat;
66 }
67 else if (type == clkSat) {
68 epoSpec = true;
69 sig0 = sig0_clkSat;
70 sigP = sig0;
71 }
72}
73
74// Destructor
75////////////////////////////////////////////////////////////////////////////
76cmbParam::~cmbParam() {
77}
78
79// Partial
80////////////////////////////////////////////////////////////////////////////
81double cmbParam::partial(const QString& AC_, const QString& prn_) {
82
83 if (type == offAC) {
84 if (AC == AC_) {
85 return 1.0;
86 }
87 }
88 else if (type == offACSat) {
89 if (AC == AC_ && prn == prn_) {
90 return 1.0;
91 }
92 }
93 else if (type == clkSat) {
94 if (prn == prn_) {
95 return 1.0;
96 }
97 }
98
99 return 0.0;
100}
101
102//
103////////////////////////////////////////////////////////////////////////////
104QString cmbParam::toString() const {
105
106 QString outStr;
107
108 if (type == offAC) {
109 outStr = "AC offset " + AC;
110 }
111 else if (type == offACSat) {
112 outStr = "Sat Offset " + AC + " " + prn;
113 }
114 else if (type == clkSat) {
115 outStr = "Clk Corr " + prn;
116 }
117
118 return outStr;
119}
120
121// Constructor
122////////////////////////////////////////////////////////////////////////////
123bncComb::bncComb() {
124
125 bncSettings settings;
126
127 QStringList combineStreams = settings.value("combineStreams").toStringList();
128
129 _masterMissingEpochs = 0;
130
131 if (combineStreams.size() >= 1 && !combineStreams[0].isEmpty()) {
132 QListIterator<QString> it(combineStreams);
133 while (it.hasNext()) {
134 QStringList hlp = it.next().split(" ");
135 cmbAC* newAC = new cmbAC();
136 newAC->mountPoint = hlp[0];
137 newAC->name = hlp[1];
138 newAC->weight = hlp[2].toDouble();
139 if (_masterOrbitAC.isEmpty()) {
140 _masterOrbitAC = newAC->name;
141 }
142 _ACs.append(newAC);
143 }
144 }
145
146 _rtnetDecoder = 0;
147
148 connect(this, SIGNAL(newMessage(QByteArray,bool)),
149 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
150
151 // Combination Method
152 // ------------------
153 if (settings.value("cmbMethod").toString() == "Filter") {
154 _method = filter;
155 }
156 else {
157 _method = singleEpoch;
158 }
159
160 // Initialize Parameters (model: Clk_Corr = AC_Offset + Sat_Offset + Clk)
161 // ----------------------------------------------------------------------
162 if (_method == filter) {
163 int nextPar = 0;
164 QListIterator<cmbAC*> it(_ACs);
165 while (it.hasNext()) {
166 cmbAC* AC = it.next();
167 _params.push_back(new cmbParam(cmbParam::offAC, ++nextPar, AC->name, ""));
168 for (int iGps = 1; iGps <= MAXPRN_GPS; iGps++) {
169 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0'));
170 _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar,
171 AC->name, prn));
172 }
173 }
174 for (int iGps = 1; iGps <= MAXPRN_GPS; iGps++) {
175 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0'));
176 _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
177 }
178
179 // Initialize Variance-Covariance Matrix
180 // -------------------------------------
181 _QQ.ReSize(_params.size());
182 _QQ = 0.0;
183 for (int iPar = 1; iPar <= _params.size(); iPar++) {
184 cmbParam* pp = _params[iPar-1];
185 _QQ(iPar,iPar) = pp->sig0 * pp->sig0;
186 }
187 }
188
189 // ANTEX File
190 // ----------
191 _antex = 0;
192 QString antexFileName = settings.value("pppAntex").toString();
193 if (!antexFileName.isEmpty()) {
194 _antex = new bncAntex();
195 if (_antex->readFile(antexFileName) != success) {
196 emit newMessage("wrong ANTEX file", true);
197 delete _antex;
198 _antex = 0;
199 }
200 }
201
202 // Maximal Residuum
203 // ----------------
204 _MAXRES = settings.value("cmbMaxres").toDouble();
205 if (_MAXRES <= 0.0) {
206 _MAXRES = 999.0;
207 }
208}
209
210// Destructor
211////////////////////////////////////////////////////////////////////////////
212bncComb::~bncComb() {
213 QListIterator<cmbAC*> icAC(_ACs);
214 while (icAC.hasNext()) {
215 delete icAC.next();
216 }
217 delete _rtnetDecoder;
218 delete _antex;
219 for (int iPar = 1; iPar <= _params.size(); iPar++) {
220 delete _params[iPar-1];
221 }
222 QVectorIterator<cmbCorr*> itCorr(corrs());
223 while (itCorr.hasNext()) {
224 delete itCorr.next();
225 }
226}
227
228// Read and store one correction line
229////////////////////////////////////////////////////////////////////////////
230void bncComb::processCorrLine(const QString& staID, const QString& line) {
231 QMutexLocker locker(&_mutex);
232
233 // Find the AC Name
234 // ----------------
235 QString acName;
236 QListIterator<cmbAC*> icAC(_ACs);
237 while (icAC.hasNext()) {
238 cmbAC* AC = icAC.next();
239 if (AC->mountPoint == staID) {
240 acName = AC->name;
241 break;
242 }
243 }
244 if (acName.isEmpty()) {
245 return;
246 }
247
248 // Read the Correction
249 // -------------------
250 cmbCorr* newCorr = new cmbCorr();
251 newCorr->acName = acName;
252 if (!newCorr->readLine(line) == success) {
253 delete newCorr;
254 return;
255 }
256
257 // Check Modulo Time
258 // -----------------
259 if (int(newCorr->tt.gpssec()) % moduloTime != 0.0) {
260 delete newCorr;
261 return;
262 }
263
264 // Delete old corrections
265 // ----------------------
266 if (_resTime.valid() && newCorr->tt <= _resTime) {
267 delete newCorr;
268 return;
269 }
270
271 // Check the Ephemeris
272 //--------------------
273 if (_eph.find(newCorr->prn) == _eph.end()) {
274 delete newCorr;
275 return;
276 }
277 else {
278 t_eph* lastEph = _eph[newCorr->prn]->last;
279 t_eph* prevEph = _eph[newCorr->prn]->prev;
280 if (lastEph && lastEph->IOD() == newCorr->iod) {
281 newCorr->eph = lastEph;
282 }
283 else if (prevEph && prevEph->IOD() == newCorr->iod) {
284 newCorr->eph = prevEph;
285 switchToLastEph(lastEph, newCorr);
286 }
287 else {
288 delete newCorr;
289 return;
290 }
291 }
292
293 // Process previous Epoch(s)
294 // -------------------------
295 QListIterator<bncTime> itTime(_buffer.keys());
296 while (itTime.hasNext()) {
297 bncTime epoTime = itTime.next();
298 if (epoTime < newCorr->tt - moduloTime) {
299 _resTime = epoTime;
300 processEpoch();
301 }
302 }
303
304 // Merge or add the correction
305 // ---------------------------
306 QVector<cmbCorr*>& corrs = _buffer[newCorr->tt].corrs;
307 cmbCorr* existingCorr = 0;
308 QVectorIterator<cmbCorr*> itCorr(corrs);
309 while (itCorr.hasNext()) {
310 cmbCorr* hlp = itCorr.next();
311 if (hlp->prn == newCorr->prn && hlp->acName == newCorr->prn) {
312 existingCorr = hlp;
313 break;
314 }
315 }
316 if (existingCorr) {
317 delete newCorr;
318 existingCorr->readLine(line); // merge (multiple messages)
319 }
320 else {
321 corrs.append(newCorr);
322 }
323}
324
325// Change the correction so that it refers to last received ephemeris
326////////////////////////////////////////////////////////////////////////////
327void bncComb::switchToLastEph(const t_eph* lastEph, t_corr* corr) {
328
329 if (corr->eph == lastEph) {
330 return;
331 }
332
333 ColumnVector oldXC(4);
334 ColumnVector oldVV(3);
335 corr->eph->position(corr->tt.gpsw(), corr->tt.gpssec(),
336 oldXC.data(), oldVV.data());
337
338 ColumnVector newXC(4);
339 ColumnVector newVV(3);
340 lastEph->position(corr->tt.gpsw(), corr->tt.gpssec(),
341 newXC.data(), newVV.data());
342
343 ColumnVector dX = newXC.Rows(1,3) - oldXC.Rows(1,3);
344 ColumnVector dV = newVV - oldVV;
345 double dC = newXC(4) - oldXC(4);
346
347 ColumnVector dRAO(3);
348 XYZ_to_RSW(newXC.Rows(1,3), newVV, dX, dRAO);
349
350 ColumnVector dDotRAO(3);
351 XYZ_to_RSW(newXC.Rows(1,3), newVV, dV, dDotRAO);
352
353 QString msg = "switch corr " + corr->prn
354 + QString(" %1 -> %2 %3").arg(corr->iod,3)
355 .arg(lastEph->IOD(),3).arg(dC*t_CST::c, 8, 'f', 4);
356
357 emit newMessage(msg.toAscii(), false);
358
359 corr->iod = lastEph->IOD();
360 corr->eph = lastEph;
361 corr->rao += dRAO;
362 corr->dotRao += dDotRAO;
363 corr->dClk -= dC;
364}
365
366// Process Epoch
367////////////////////////////////////////////////////////////////////////////
368void bncComb::processEpoch() {
369 if (_method == filter) {
370 return processEpoch_filter();
371 }
372 else {
373 return processEpoch_singleEpoch();
374 }
375}
376
377// Process Epoch - Filter Method
378////////////////////////////////////////////////////////////////////////////
379void bncComb::processEpoch_filter() {
380 int nPar = _params.size();
381
382 _log.clear();
383
384 QTextStream out(&_log, QIODevice::WriteOnly);
385
386 out << endl << "Combination:" << endl
387 << "------------------------------" << endl;
388
389 // Observation Statistics
390 // ----------------------
391 bool masterPresent = false;
392 QListIterator<cmbAC*> icAC(_ACs);
393 while (icAC.hasNext()) {
394 cmbAC* AC = icAC.next();
395 AC->numObs = 0;
396 QVectorIterator<cmbCorr*> itCorr(corrs());
397 while (itCorr.hasNext()) {
398 cmbCorr* corr = itCorr.next();
399 if (corr->acName == AC->name) {
400 AC->numObs += 1;
401 if (AC->name == _masterOrbitAC) {
402 masterPresent = true;
403 }
404 }
405 }
406 out << AC->name.toAscii().data() << ": " << AC->numObs << endl;
407 }
408
409 // If Master not present, switch to another one
410 // --------------------------------------------
411 if (masterPresent) {
412 _masterMissingEpochs = 0;
413 }
414 else {
415 ++_masterMissingEpochs;
416 if (_masterMissingEpochs < 10) {
417 out << "Missing Master, Epoch skipped" << endl;
418 _buffer.remove(_resTime);
419 emit newMessage(_log, false);
420 return;
421 }
422 else {
423 _masterMissingEpochs = 0;
424 QListIterator<cmbAC*> icAC(_ACs);
425 while (icAC.hasNext()) {
426 cmbAC* AC = icAC.next();
427 if (AC->numObs > 0) {
428 out << "Switching Master AC "
429 << _masterOrbitAC.toAscii().data() << " --> "
430 << AC->name.toAscii().data() << " "
431 << _resTime.datestr().c_str() << " "
432 << _resTime.timestr().c_str() << endl;
433 _masterOrbitAC = AC->name;
434 break;
435 }
436 }
437 }
438 }
439
440 // Prediction Step
441 // ---------------
442 ColumnVector x0(nPar);
443 for (int iPar = 1; iPar <= _params.size(); iPar++) {
444 cmbParam* pp = _params[iPar-1];
445 if (pp->epoSpec) {
446 pp->xx = 0.0;
447 _QQ.Row(iPar) = 0.0;
448 _QQ.Column(iPar) = 0.0;
449 _QQ(iPar,iPar) = pp->sig0 * pp->sig0;
450 }
451 else {
452 _QQ(iPar,iPar) += pp->sigP * pp->sigP;
453 }
454 x0(iPar) = pp->xx;
455 }
456
457 SymmetricMatrix QQ_sav = _QQ;
458
459 ColumnVector dx;
460 QMap<QString, t_corr*> resCorr;
461
462 // Update and outlier detection loop
463 // ---------------------------------
464 while (true) {
465
466 Matrix AA;
467 ColumnVector ll;
468 DiagonalMatrix PP;
469
470 if (createAmat(AA, ll, PP, x0, resCorr) != success) {
471 _buffer.remove(_resTime);
472 emit newMessage(_log, false);
473 return;
474 }
475
476 bncModel::kalman(AA, ll, PP, _QQ, dx);
477 ColumnVector vv = ll - AA * dx;
478
479 int maxResIndex;
480 double maxRes = vv.maximum_absolute_value1(maxResIndex);
481 out.setRealNumberNotation(QTextStream::FixedNotation);
482 out.setRealNumberPrecision(3);
483 out << _resTime.datestr().c_str() << " " << _resTime.timestr().c_str()
484 << " Maximum Residuum " << maxRes << ' '
485 << corrs()[maxResIndex-1]->acName << ' ' << corrs()[maxResIndex-1]->prn;
486
487 if (maxRes > _MAXRES) {
488 for (int iPar = 1; iPar <= _params.size(); iPar++) {
489 cmbParam* pp = _params[iPar-1];
490 if (pp->type == cmbParam::offACSat &&
491 pp->AC == corrs()[maxResIndex-1]->acName &&
492 pp->prn == corrs()[maxResIndex-1]->prn) {
493 QQ_sav.Row(iPar) = 0.0;
494 QQ_sav.Column(iPar) = 0.0;
495 QQ_sav(iPar,iPar) = pp->sig0 * pp->sig0;
496 }
497 }
498
499 out << " Outlier" << endl;
500 _QQ = QQ_sav;
501 corrs().remove(maxResIndex-1);
502 }
503 else {
504 out << " OK" << endl;
505 break;
506 }
507 }
508
509 // Update Parameter Values
510 // -----------------------
511 for (int iPar = 1; iPar <= _params.size(); iPar++) {
512 cmbParam* pp = _params[iPar-1];
513 pp->xx += dx(iPar);
514 if (pp->type == cmbParam::clkSat) {
515 if (resCorr.find(pp->prn) != resCorr.end()) {
516 resCorr[pp->prn]->dClk = pp->xx / t_CST::c;
517 }
518 }
519 out << _resTime.datestr().c_str() << " "
520 << _resTime.timestr().c_str() << " ";
521 out.setRealNumberNotation(QTextStream::FixedNotation);
522 out.setFieldWidth(8);
523 out.setRealNumberPrecision(4);
524 out << pp->toString() << " "
525 << pp->xx << " +- " << sqrt(_QQ(pp->index,pp->index)) << endl;
526 out.setFieldWidth(0);
527 }
528
529 // Print Results
530 // -------------
531 printResults(out, resCorr);
532 dumpResults(resCorr);
533
534 emit newMessage(_log, false);
535
536 // Delete Data
537 // -----------
538 _buffer.remove(_resTime);
539}
540
541// Print results
542////////////////////////////////////////////////////////////////////////////
543void bncComb::printResults(QTextStream& out,
544 const QMap<QString, t_corr*>& resCorr) {
545
546 QMapIterator<QString, t_corr*> it(resCorr);
547 while (it.hasNext()) {
548 it.next();
549 t_corr* corr = it.value();
550 const t_eph* eph = corr->eph;
551 if (eph) {
552 double xx, yy, zz, cc;
553 eph->position(_resTime.gpsw(), _resTime.gpssec(), xx, yy, zz, cc);
554
555 out << _resTime.datestr().c_str() << " "
556 << _resTime.timestr().c_str() << " ";
557 out.setFieldWidth(3);
558 out << "Full Clock " << corr->prn << " " << corr->iod << " ";
559 out.setFieldWidth(14);
560 out << (cc + corr->dClk) * t_CST::c << endl;
561 out.setFieldWidth(0);
562 }
563 else {
564 out << "bncComb::printResuls bug" << endl;
565 }
566 }
567}
568
569// Send results to RTNet Decoder and directly to PPP Client
570////////////////////////////////////////////////////////////////////////////
571void bncComb::dumpResults(const QMap<QString, t_corr*>& resCorr) {
572
573 ostringstream out; out.setf(std::ios::fixed);
574 QStringList corrLines;
575
576 unsigned year, month, day, hour, minute;
577 double sec;
578 _resTime.civil_date(year, month, day);
579 _resTime.civil_time(hour, minute, sec);
580
581 out << "* "
582 << setw(4) << year << " "
583 << setw(2) << month << " "
584 << setw(2) << day << " "
585 << setw(2) << hour << " "
586 << setw(2) << minute << " "
587 << setw(12) << setprecision(8) << sec << " "
588 << endl;
589
590 QMapIterator<QString, t_corr*> it(resCorr);
591 while (it.hasNext()) {
592 it.next();
593 t_corr* corr = it.value();
594
595 double dT = 60.0;
596
597 for (int iTime = 1; iTime <= 2; iTime++) {
598
599 bncTime time12 = (iTime == 1) ? _resTime : _resTime + dT;
600
601 ColumnVector xc(4);
602 ColumnVector vv(3);
603 corr->eph->position(time12.gpsw(), time12.gpssec(),
604 xc.data(), vv.data());
605 bncPPPclient::applyCorr(time12, corr, xc, vv);
606
607 // Relativistic Correction
608 // -----------------------
609 double relCorr = - 2.0 * DotProduct(xc.Rows(1,3),vv) / t_CST::c / t_CST::c;
610 xc(4) -= relCorr;
611
612 // Code Biases
613 // -----------
614 double dcbP1C1 = 0.0;
615 double dcbP1P2 = 0.0;
616
617 // Correction Phase Center --> CoM
618 // -------------------------------
619 ColumnVector dx(3); dx = 0.0;
620 if (_antex) {
621 double Mjd = time12.mjd() + time12.daysec()/86400.0;
622 if (_antex->satCoMcorrection(corr->prn, Mjd, xc.Rows(1,3), dx) == success) {
623 xc(1) -= dx(1);
624 xc(2) -= dx(2);
625 xc(3) -= dx(3);
626 }
627 else {
628 cout << "antenna not found" << endl;
629 }
630 }
631
632 if (iTime == 1) {
633 out << 'P' << corr->prn.toAscii().data()
634 << setw(14) << setprecision(6) << xc(1) / 1000.0
635 << setw(14) << setprecision(6) << xc(2) / 1000.0
636 << setw(14) << setprecision(6) << xc(3) / 1000.0
637 << setw(14) << setprecision(6) << xc(4) * 1e6
638 << setw(14) << setprecision(6) << relCorr * 1e6
639 << setw(8) << setprecision(3) << dx(1)
640 << setw(8) << setprecision(3) << dx(2)
641 << setw(8) << setprecision(3) << dx(3)
642 << setw(8) << setprecision(3) << dcbP1C1
643 << setw(8) << setprecision(3) << dcbP1P2
644 << setw(6) << setprecision(1) << dT;
645
646 QString line;
647 int messageType = COTYPE_GPSCOMBINED;
648 int updateInt = 0;
649 line.sprintf("%d %d %d %.1f %s"
650 " %3d"
651 " %8.3f %8.3f %8.3f %8.3f"
652 " %10.5f %10.5f %10.5f %10.5f"
653 " %10.5f %10.5f %10.5f %10.5f INTERNAL",
654 messageType, updateInt, time12.gpsw(), time12.gpssec(),
655 corr->prn.toAscii().data(),
656 corr->iod,
657 corr->dClk * t_CST::c,
658 corr->rao[0],
659 corr->rao[1],
660 corr->rao[2],
661 corr->dotDClk * t_CST::c,
662 corr->dotRao[0],
663 corr->dotRao[1],
664 corr->dotRao[2],
665 corr->dotDotDClk * t_CST::c,
666 corr->dotDotRao[0],
667 corr->dotDotRao[1],
668 corr->dotDotRao[2]);
669 corrLines << line;
670 }
671 else {
672 out << setw(14) << setprecision(6) << xc(1) / 1000.0
673 << setw(14) << setprecision(6) << xc(2) / 1000.0
674 << setw(14) << setprecision(6) << xc(3) / 1000.0 << endl;
675 }
676 }
677
678 delete corr;
679 }
680 out << "EOE" << endl; // End Of Epoch flag
681
682 if (!_rtnetDecoder) {
683 _rtnetDecoder = new bncRtnetDecoder();
684 }
685
686 vector<string> errmsg;
687 _rtnetDecoder->Decode((char*) out.str().data(), out.str().size(), errmsg);
688
689 // Optionally send new Corrections to PPP
690 // --------------------------------------
691 bncApp* app = (bncApp*) qApp;
692 if (app->_bncPPPclient) {
693 app->_bncPPPclient->slotNewCorrections(corrLines);
694 }
695}
696
697// Create First Design Matrix and Vector of Measurements
698////////////////////////////////////////////////////////////////////////////
699t_irc bncComb::createAmat(Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP,
700 const ColumnVector& x0,
701 QMap<QString, t_corr*>& resCorr) {
702
703 unsigned nPar = _params.size();
704 unsigned nObs = corrs().size();
705
706 if (nObs == 0) {
707 return failure;
708 }
709
710 const int nCon = 1 + MAXPRN_GPS;
711
712 AA.ReSize(nObs+nCon, nPar); AA = 0.0;
713 ll.ReSize(nObs+nCon); ll = 0.0;
714 PP.ReSize(nObs+nCon); PP = 1.0 / (sigObs * sigObs);
715
716 int iObs = 0;
717
718 QVectorIterator<cmbCorr*> itCorr(corrs());
719 while (itCorr.hasNext()) {
720 cmbCorr* corr = itCorr.next();
721 QString prn = corr->prn;
722 switchToLastEph(_eph[prn]->last, corr);
723 ++iObs;
724
725 if (corr->acName == _masterOrbitAC && resCorr.find(prn) == resCorr.end()) {
726 resCorr[prn] = new t_corr(*corr);
727 }
728
729 for (int iPar = 1; iPar <= _params.size(); iPar++) {
730 cmbParam* pp = _params[iPar-1];
731 AA(iObs, iPar) = pp->partial(corr->acName, prn);
732 }
733
734 ll(iObs) = corr->dClk * t_CST::c - DotProduct(AA.Row(iObs), x0);
735 }
736
737 // Regularization
738 // --------------
739 const double Ph = 1.e6;
740 PP(nObs+1) = Ph;
741 for (int iPar = 1; iPar <= _params.size(); iPar++) {
742 cmbParam* pp = _params[iPar-1];
743 if ( AA.Column(iPar).maximum_absolute_value() > 0.0 &&
744 pp->type == cmbParam::clkSat ) {
745 AA(nObs+1, iPar) = 1.0;
746 }
747 }
748 int iCond = 1;
749 for (int iGps = 1; iGps <= MAXPRN_GPS; iGps++) {
750 QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0'));
751 ++iCond;
752 PP(nObs+iCond) = Ph;
753 for (int iPar = 1; iPar <= _params.size(); iPar++) {
754 cmbParam* pp = _params[iPar-1];
755 if ( AA.Column(iPar).maximum_absolute_value() > 0.0 &&
756 pp->type == cmbParam::offACSat &&
757 pp->prn == prn) {
758 AA(nObs+iCond, iPar) = 1.0;
759 }
760 }
761 }
762
763 return success;
764}
765
766// Process Epoch - Single-Epoch Method
767////////////////////////////////////////////////////////////////////////////
768void bncComb::processEpoch_singleEpoch() {
769
770
771}
Note: See TracBrowser for help on using the repository browser.