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

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