Isis 3 Programmer Reference
BundleResults.cpp
1
7/* SPDX-License-Identifier: CC0-1.0 */
8
9#include "BundleResults.h"
10
11#include <QDataStream>
12#include <QDebug>
13#include <QString>
14#include <QStringRef>
15#include <QtGlobal> // qMax()
16#include <QUuid>
17#include <QXmlStreamWriter>
18#include <QXmlStreamReader>
19
20#include <boost/lexical_cast.hpp>
21#include <boost/numeric/ublas/io.hpp>
22#include <boost/numeric/ublas/matrix_sparse.hpp>
23#include <boost/numeric/ublas/vector_proxy.hpp>
24
25#include "Camera.h"
26#include "ControlMeasure.h"
27#include "ControlPoint.h"
28#include "CorrelationMatrix.h"
29#include "Distance.h"
30#include "FileName.h"
31#include "IString.h"
32#include "MaximumLikelihoodWFunctions.h"
33#include "Project.h"
34#include "PvlKeyword.h"
35#include "PvlObject.h"
36#include "SerialNumberList.h"
37#include "StatCumProbDistDynCalc.h"
38#include "Statistics.h"
39
40#include <iostream>
41
42using namespace boost::numeric::ublas;
43
44namespace Isis {
45
52
53 initialize();
54
58
59 // residual prob distribution is calculated even if there is no maximum likelihood estimation.
60 // so set up the solver to have a node at every percent of the distribution
62
63 }
64
73 BundleResults::BundleResults(QXmlStreamReader *xmlReader,
74 QObject *parent) : QObject(parent)
75 {
76 // TODO: does xml stuff need project???
77
78 initialize();
79
80 readBundleResults(xmlReader);
81 }
82
83 void BundleResults::readBundleResults(QXmlStreamReader *xmlReader) {
84 Q_ASSERT(xmlReader->name() == "bundleResults");
85 while(xmlReader->readNextStartElement()) {
86 if (xmlReader->qualifiedName() == "correlationMatrix") {
87 readCorrelationMatrix(xmlReader);
88 }
89 else if (xmlReader->qualifiedName() == "generalStatisticsValues") {
90 readGenStatsValues(xmlReader);
91 }
92 else if (xmlReader->qualifiedName() == "rms") {
93 readRms(xmlReader);
94 }
95 else if (xmlReader->qualifiedName() == "elapsedTime") {
96
97 QStringRef time = xmlReader->attributes().value("time");
98 if (!time.isEmpty()) {
99 m_elapsedTime = time.toDouble();
100 }
101
102 QStringRef errorProp = xmlReader->attributes().value("errorProp");
103 if (!errorProp.isEmpty()) {
104 m_elapsedTimeErrorProp = errorProp.toDouble();
105 }
106 xmlReader->skipCurrentElement();
107 }
108 else if (xmlReader->qualifiedName() == "minMaxSigmas") {
109 readMinMaxSigmas(xmlReader);
110 }
111 else if (xmlReader->qualifiedName() == "maximumLikelihoodEstimation") {
112 readMaxLikelihoodEstimation(xmlReader);
113 }
114
115 // ??? else if (xmlReader->qualifiedName() == "minMaxSigmaDistances") {
116 // ??? QStringRef units = xmlReader->attributes().value("units");
117 // ??? if (!QStringRef::compare(units, "meters", Qt::CaseInsensitive)) {
118 // ??? QStringRef msg = "Unable to read BundleResults xml. Sigma distances must be "
119 // ??? "provided in meters.";
120 // ??? throw IException(IException::Io, msg, _FILEINFO_);
121 // ??? }
122 // ??? }
123 else {
124 xmlReader->skipCurrentElement();
125 }
126 }
127 }
128
129 void BundleResults::readCorrelationMatrix(QXmlStreamReader *xmlReader) {
130 Q_ASSERT(xmlReader->name() == "correlationMatrix");
131 m_correlationMatrix = NULL;
133
134 QString correlationFileName = *(xmlReader->attributes().value("correlationFileName").string());
135 if (!correlationFileName.isEmpty()) {
136 FileName correlationFile(correlationFileName);
138 }
139
140 QString covarianceFileName = *(xmlReader->attributes().value("covarianceFileName").string());
141 if (!covarianceFileName.isEmpty()) {
142 FileName covarianceFile(covarianceFileName);
144 }
145 while (xmlReader->readNextStartElement()) {
146 if (xmlReader->qualifiedName() == "image") {
147 QString correlationMatrixImageId = *(xmlReader->attributes().value("id").string());
148 if (!correlationMatrixImageId.isEmpty()) {
149 m_xmlHandlerCorrelationImageId = correlationMatrixImageId;
150 }
151 }
152 else {
153 xmlReader->skipCurrentElement();
154 }
155 }
156 }
157
158 void BundleResults::readGenStatsValues(QXmlStreamReader *xmlReader) {
159 Q_ASSERT(xmlReader->name() == "generalStatisticsValues");
160 while (xmlReader->readNextStartElement()) {
161 if (xmlReader->qualifiedName() == "numberFixedPoints") {
162 m_numberFixedPoints = toInt(xmlReader->readElementText());
163 }
164 else if (xmlReader->qualifiedName() == "numberIgnoredPoints") {
165 m_numberIgnoredPoints = xmlReader->readElementText().toInt();
166 }
167 else if (xmlReader->qualifiedName() == "numberHeldImages") {
168 m_numberHeldImages = xmlReader->readElementText().toInt();
169 }
170 else if (xmlReader->qualifiedName() == "rejectionLimit") {
171 m_rejectionLimit = xmlReader->readElementText().toDouble();
172 }
173 else if (xmlReader->qualifiedName() == "numberRejectedObservations") {
174 m_numberRejectedObservations = xmlReader->readElementText().toInt();
175 }
176 else if (xmlReader->qualifiedName() == "numberLidarRangeConstraintEquations") {
177 m_numberLidarRangeConstraintEquations = xmlReader->readElementText().toInt();
178 }
179 else if (xmlReader->qualifiedName() == "numberObservations") {
180 m_numberObservations = xmlReader->readElementText().toInt();
181 }
182 else if (xmlReader->qualifiedName() == "numberImageObservations") {
183 m_numberImageObservations = xmlReader->readElementText().toInt();
184 }
185 else if (xmlReader->qualifiedName() == "numberLidarImageObservations") {
186 m_numberLidarImageObservations = xmlReader->readElementText().toInt();
187 }
188 else if (xmlReader->qualifiedName() == "numberImageParameters") {
189 m_numberImageParameters = xmlReader->readElementText().toInt();
190 }
191 else if (xmlReader->qualifiedName() == "numberConstrainedPointParameters") {
193 xmlReader->readElementText().toInt();
194 }
195 else if (xmlReader->qualifiedName() == "numberConstrainedImageParameters") {
197 xmlReader->readElementText().toInt();
198 }
199 else if (xmlReader->qualifiedName() == "numberConstrainedTargetParameters") {
201 xmlReader->readElementText().toInt();
202 }
203 else if (xmlReader->qualifiedName() == "numberUnknownParameters") {
204 m_numberUnknownParameters = xmlReader->readElementText().toInt();
205 }
206 else if (xmlReader->qualifiedName() == "degreesOfFreedom") {
207 m_degreesOfFreedom = xmlReader->readElementText().toInt();
208 }
209 else if (xmlReader->qualifiedName() == "sigma0") {
210 m_sigma0 = xmlReader->readElementText().toDouble();
211 }
212 else if (xmlReader->qualifiedName() == "converged") {
213 m_converged = toBool(xmlReader->readElementText());
214 }
215 else if (xmlReader->qualifiedName() == "iterations") {
216 m_iterations = xmlReader->readElementText().toInt();
217 }
218 else {
219 xmlReader->skipCurrentElement();
220 }
221 }
222 }
223
224 void BundleResults::readRms(QXmlStreamReader *xmlReader) {
225 Q_ASSERT(xmlReader->name() == "rms");
226 while (xmlReader->readNextStartElement()) {
227 if (xmlReader->qualifiedName() == "residuals") {
228 QStringRef rx = xmlReader->attributes().value("x");
229 if (!rx.isEmpty()) {
230 m_rmsXResiduals = rx.toDouble();
231 }
232
233 QStringRef ry = xmlReader->attributes().value("y");
234 if (!ry.isEmpty()) {
235 m_rmsYResiduals = ry.toDouble();
236 }
237
238 QStringRef rxy = xmlReader->attributes().value("xy");
239 if (!rxy.isEmpty()) {
240 m_rmsXYResiduals = rxy.toDouble();
241 }
242 xmlReader->skipCurrentElement();
243 }
244 else if (xmlReader->qualifiedName() == "sigmas")
245 {
246 QStringRef lat = xmlReader->attributes().value("lat");
247 if (!lat.isEmpty()){
248 m_rmsSigmaCoord1Stats = lat.toDouble();
249 }
250
251 QStringRef lon = xmlReader->attributes().value("lon");
252 if (!lon.isEmpty()){
253 m_rmsSigmaCoord2Stats = lon.toDouble();
254 }
255
256 QStringRef rad = xmlReader->attributes().value("rad");
257 if (!rad.isEmpty()){
258 m_rmsSigmaCoord3Stats = rad.toDouble();
259 }
260
261 QStringRef x = xmlReader->attributes().value("x");
262 if (!x.isEmpty()){
263 m_rmsSigmaCoord1Stats = x.toDouble();
264 }
265
266 QStringRef y = xmlReader->attributes().value("y");
267 if (!y.isEmpty()){
268 m_rmsSigmaCoord2Stats = y.toDouble();
269 }
270
271 QStringRef z = xmlReader->attributes().value("z");
272 if (!z.isEmpty()){
273 m_rmsSigmaCoord3Stats = z.toDouble();
274 }
275 xmlReader->skipCurrentElement();
276 }
277 else if (xmlReader->qualifiedName() == "imageResidualsLists") {
278 readImageResidualsLists(xmlReader);
279 }
280 else if (xmlReader->qualifiedName() == "imageSigmasLists") {
281 readSigmasLists(xmlReader);
282 }
283 else {
284 xmlReader->skipCurrentElement();
285 }
286 }
287 }
288
289 void BundleResults::readImageResidualsLists(QXmlStreamReader *xmlReader) {
290 Q_ASSERT(xmlReader->name() == "imageResidualsLists");
291 while (xmlReader->readNextStartElement()) {
292 if (xmlReader->qualifiedName() == "residualsList") {
293 readStatsToList(m_rmsImageResiduals, xmlReader);
294 }
295 else if (xmlReader->qualifiedName() == "sampleList") {
296 readStatsToList(m_rmsImageSampleResiduals, xmlReader);
297 }
298 else if (xmlReader->qualifiedName() == "lineList") {
299 readStatsToList(m_rmsImageLineResiduals, xmlReader);
300 }
301 else if (xmlReader->qualifiedName() == "lidarResidualsList") {
302 readStatsToList(m_rmsLidarImageResiduals, xmlReader);
303 }
304 else if (xmlReader->qualifiedName() == "lidarSampleList") {
305 readStatsToList(m_rmsLidarImageSampleResiduals, xmlReader);
306 }
307 else if (xmlReader->qualifiedName() == "lidarLineList") {
308 readStatsToList(m_rmsLidarImageLineResiduals, xmlReader);
309 }
310 else {
311 xmlReader->skipCurrentElement();
312 }
313 }
314 }
315
316 void BundleResults::readSigmasLists(QXmlStreamReader *xmlReader) {
317 Q_ASSERT(xmlReader->name() == "imageSigmasLists");
318 while (xmlReader->readNextStartElement()) {
319 if (xmlReader->qualifiedName() == "xSigmas") {
320 readStatsToVector(m_rmsImageXSigmas, xmlReader);
321 }
322 else if (xmlReader->qualifiedName() == "ySigmas") {
323 readStatsToVector(m_rmsImageYSigmas, xmlReader);
324 }
325 else if (xmlReader->qualifiedName() == "zSigmas") {
326 readStatsToVector(m_rmsImageZSigmas, xmlReader);
327 }
328 else if (xmlReader->qualifiedName() == "raSigmas") {
329 readStatsToVector(m_rmsImageRASigmas, xmlReader);
330 }
331 else if (xmlReader->qualifiedName() == "decSigmas") {
332 readStatsToVector(m_rmsImageDECSigmas, xmlReader);
333 }
334 else if (xmlReader->qualifiedName() == "twistSigmas") {
335 readStatsToVector(m_rmsImageTWISTSigmas, xmlReader);
336 }
337 else {
338 xmlReader->skipCurrentElement();
339 }
340 }
341 }
342
343 void BundleResults::readStatsToList(QList<Statistics> &list, QXmlStreamReader *xmlReader) {
344 Q_ASSERT(xmlReader->attributes().hasAttribute("listSize"));
345 int listSize = xmlReader->attributes().value("listSize").toInt();
346 for (int i = 0; i < listSize; i++) {
347 xmlReader->readNextStartElement();
348 Q_ASSERT(xmlReader->name() == "statisticsItem");
349 xmlReader->readNextStartElement();
350 Q_ASSERT(xmlReader->name() == "statistics");
351 list.append(new Statistics(xmlReader));
352 xmlReader->readNextStartElement();
353 }
354 xmlReader->readNextStartElement();
355 }
356
357 void BundleResults::readStatsToVector(QVector<Statistics> &vec, QXmlStreamReader *xmlReader) {
358 Q_ASSERT(xmlReader->attributes().hasAttribute("listSize"));
359 int listSize = xmlReader->attributes().value("listSize").toInt();
360 for (int i = 0; i < listSize; i++) {
361 xmlReader->readNextStartElement();
362 Q_ASSERT(xmlReader->name() == "statisticsItem");
363 xmlReader->readNextStartElement();
364 Q_ASSERT(xmlReader->name() == "statistics");
365 vec.append(new Statistics(xmlReader));
366 xmlReader->readNextStartElement();
367 }
368 xmlReader->readNextStartElement();
369 }
370
371 void BundleResults::readMinMaxSigmas(QXmlStreamReader *xmlReader) {
372 Q_ASSERT(xmlReader->name() == "minMaxSigmas");
373 while (xmlReader->readNextStartElement()) {
374 if (xmlReader->qualifiedName() == "minLat" ||
375 xmlReader->qualifiedName() == "minX") {
377 }
378 else if (xmlReader->qualifiedName() == "maxLat" ||
379 xmlReader->qualifiedName() == "maxX") {
381 }
382 else if (xmlReader->qualifiedName() == "minLon" ||
383 xmlReader->qualifiedName() == "minY") {
385 }
386 else if (xmlReader->qualifiedName() == "maxLon" ||
387 xmlReader->qualifiedName() == "maxY") {
389 }
390 else if (xmlReader->qualifiedName() == "minRad" ||
391 xmlReader->qualifiedName() == "minZ") {
393 }
394 else if (xmlReader->qualifiedName() == "maxRad" ||
395 xmlReader->qualifiedName() == "maxZ") {
397 }
398 else {
399 xmlReader->skipCurrentElement();
400 }
401 }
402 }
403
404 void BundleResults::readSigma(Distance &dist, QString &pointId, QXmlStreamReader *xmlReader) {
405 Q_ASSERT(xmlReader->attributes().hasAttribute("value"));
406 Q_ASSERT(xmlReader->attributes().hasAttribute("pointId"));
407 QStringRef sigmaValue = xmlReader->attributes().value("value");
408 if (!sigmaValue.isEmpty()) {
409 dist.setMeters(sigmaValue.toDouble());
410 }
411
412 QString sigmaPointId = xmlReader->attributes().value("pointId").toString();
413 if (!sigmaPointId.isEmpty()) {
414 pointId = sigmaPointId;
415 }
416 xmlReader->skipCurrentElement();
417 }
418
419 void BundleResults::readMaxLikelihoodEstimation(QXmlStreamReader *xmlReader) {
420 Q_ASSERT(xmlReader->name() == "maximumLikelihoodEstimation");
421 QStringRef maximumLikelihoodIndex = xmlReader->attributes().value("maximumLikelihoodIndex");
422 if (!maximumLikelihoodIndex.isEmpty()) {
423 m_maximumLikelihoodIndex = maximumLikelihoodIndex.toInt();
424 }
425
427 xmlReader->attributes().value("maximumLikelihoodMedianR2Residuals");
428 if (!maximumLikelihoodMedianR2Residuals.isEmpty()) {
431 }
432 while (xmlReader->readNextStartElement()) {
433 if (xmlReader->qualifiedName() == "cumulativeProbabilityCalculator") {
434 m_cumPro = NULL;
435 m_cumPro = new StatCumProbDistDynCalc(xmlReader);
436 }
437 else if (xmlReader->qualifiedName() == "residualsCumulativeProbabilityCalculator") {
438 m_cumProRes = NULL;
440 m_cumProRes->readStatistics(xmlReader);
441 }
442 else if (xmlReader->qualifiedName() == "model") {
443 QString model = xmlReader->attributes().value("modelSelection").toString();
444 QStringRef tweakingConstant = xmlReader->attributes().value("tweakingConstant");
445 QStringRef quantile = xmlReader->attributes().value("quantile");
446 bool validModel = true;
447 if (model.isEmpty())
448 validModel = false;
449 if (tweakingConstant.isEmpty())
450 validModel = false;
451 if (quantile.isEmpty())
452 validModel = false;
453 if (validModel)
454 {
457 MaximumLikelihoodWFunctions::stringToModel(model),
458 tweakingConstant.toDouble()),
459 quantile.toDouble()));
460 }
461 xmlReader->skipCurrentElement();
462 }
463 else {
464 xmlReader->skipCurrentElement();
465 }
466 }
467 }
468
476 : m_correlationMatrix(new CorrelationMatrix(*src.m_correlationMatrix)),
477 m_numberFixedPoints(src.m_numberFixedPoints),
478 m_numberIgnoredPoints(src.m_numberIgnoredPoints),
479 m_numberHeldImages(src.m_numberHeldImages),
480 m_rmsXResiduals(src.m_rmsXResiduals),
481 m_rmsYResiduals(src.m_rmsYResiduals),
482 m_rmsXYResiduals(src.m_rmsXYResiduals),
483 m_rejectionLimit(src.m_rejectionLimit),
484 m_numberObservations(src.m_numberObservations),
485 m_numberImageObservations(src.m_numberImageObservations),
486 m_numberLidarImageObservations(src.m_numberLidarImageObservations),
487 m_numberRejectedObservations(src.m_numberRejectedObservations),
488 m_numberLidarRangeConstraintEquations(src.m_numberLidarRangeConstraintEquations),
489 m_numberUnknownParameters(src.m_numberUnknownParameters),
490 m_numberImageParameters(src.m_numberImageParameters),
491 m_numberConstrainedImageParameters(src.m_numberConstrainedImageParameters),
492 m_numberConstrainedPointParameters(src.m_numberConstrainedPointParameters),
493 m_numberConstrainedLidarPointParameters(src.m_numberConstrainedLidarPointParameters),
494 m_numberConstrainedTargetParameters(src.m_numberConstrainedTargetParameters),
495 m_degreesOfFreedom(src.m_degreesOfFreedom),
496 m_sigma0(src.m_sigma0),
497 m_elapsedTime(src.m_elapsedTime),
498 m_elapsedTimeErrorProp(src.m_elapsedTimeErrorProp),
499 m_converged(src.m_converged),
500 m_bundleControlPoints(src.m_bundleControlPoints),
501 m_bundleLidarPoints(src.m_bundleLidarPoints),
502 m_outNet(src.m_outNet),
503 m_outLidarData(src.m_outLidarData),
504 m_iterations(src.m_iterations),
505 m_observations(src.m_observations),
506 m_rmsImageSampleResiduals(src.m_rmsImageSampleResiduals),
507 m_rmsImageLineResiduals(src.m_rmsImageLineResiduals),
508 m_rmsImageResiduals(src.m_rmsImageResiduals),
509 m_rmsLidarImageSampleResiduals(src.m_rmsLidarImageSampleResiduals),
510 m_rmsLidarImageLineResiduals(src.m_rmsLidarImageLineResiduals),
511 m_rmsLidarImageResiduals(src.m_rmsLidarImageResiduals),
512 m_rmsImageXSigmas(src.m_rmsImageXSigmas),
513 m_rmsImageYSigmas(src.m_rmsImageYSigmas),
514 m_rmsImageZSigmas(src.m_rmsImageZSigmas),
515 m_rmsImageRASigmas(src.m_rmsImageRASigmas),
516 m_rmsImageDECSigmas(src.m_rmsImageDECSigmas),
517 m_rmsImageTWISTSigmas(src.m_rmsImageTWISTSigmas),
518 m_minSigmaCoord1Distance(src.m_minSigmaCoord1Distance),
519 m_maxSigmaCoord1Distance(src.m_maxSigmaCoord1Distance),
520 m_minSigmaCoord2Distance(src.m_minSigmaCoord2Distance),
521 m_maxSigmaCoord2Distance(src.m_maxSigmaCoord2Distance),
522 m_minSigmaCoord3Distance(src.m_minSigmaCoord3Distance),
523 m_maxSigmaCoord3Distance(src.m_maxSigmaCoord3Distance),
524 m_minSigmaCoord1PointId(src.m_minSigmaCoord1PointId),
525 m_maxSigmaCoord1PointId(src.m_maxSigmaCoord1PointId),
526 m_minSigmaCoord2PointId(src.m_minSigmaCoord2PointId),
527 m_maxSigmaCoord2PointId(src.m_maxSigmaCoord2PointId),
528 m_minSigmaCoord3PointId(src.m_minSigmaCoord3PointId),
529 m_maxSigmaCoord3PointId(src.m_maxSigmaCoord3PointId),
530 m_rmsSigmaCoord1Stats(src.m_rmsSigmaCoord1Stats),
531 m_rmsSigmaCoord2Stats(src.m_rmsSigmaCoord2Stats),
532 m_rmsSigmaCoord3Stats(src.m_rmsSigmaCoord3Stats),
533 m_maximumLikelihoodFunctions(src.m_maximumLikelihoodFunctions),
534 m_maximumLikelihoodIndex(src.m_maximumLikelihoodIndex),
535 m_cumPro(new StatCumProbDistDynCalc(*src.m_cumPro)),
536 m_cumProRes(new StatCumProbDistDynCalc(*src.m_cumProRes)),
537 m_maximumLikelihoodMedianR2Residuals(src.m_maximumLikelihoodMedianR2Residuals)
538 {
539 }
540
545
546 delete m_correlationMatrix;
547 m_correlationMatrix = NULL;
548
549 delete m_cumPro;
550 m_cumPro = NULL;
551
552 delete m_cumProRes;
553 m_cumProRes = NULL;
554
555 }
556
557
565
566 if (&src != this) {
567 delete m_correlationMatrix;
568 m_correlationMatrix = NULL;
569 m_correlationMatrix = new CorrelationMatrix(*src.m_correlationMatrix);
570
571 m_numberFixedPoints = src.m_numberFixedPoints;
572 m_numberIgnoredPoints = src.m_numberIgnoredPoints;
573 m_numberHeldImages = src.m_numberHeldImages;
574 m_rmsXResiduals = src.m_rmsXResiduals;
575 m_rmsYResiduals = src.m_rmsYResiduals;
576 m_rmsXYResiduals = src.m_rmsXYResiduals;
577 m_rejectionLimit = src.m_rejectionLimit;
578 m_numberObservations = src.m_numberObservations;
579 m_numberImageObservations = src.m_numberImageObservations;
580 m_numberLidarImageObservations = src.m_numberLidarImageObservations;
581 m_numberRejectedObservations = src.m_numberRejectedObservations;
582 m_numberLidarRangeConstraintEquations = src.m_numberLidarRangeConstraintEquations;
583 m_numberUnknownParameters = src.m_numberUnknownParameters;
584 m_numberImageParameters = src.m_numberImageParameters;
585 m_numberConstrainedImageParameters = src.m_numberConstrainedImageParameters;
586 m_numberConstrainedPointParameters = src.m_numberConstrainedPointParameters;
587 m_numberConstrainedLidarPointParameters = src.m_numberConstrainedLidarPointParameters;
588 m_numberConstrainedTargetParameters = src.m_numberConstrainedTargetParameters;
589 m_degreesOfFreedom = src.m_degreesOfFreedom;
590 m_sigma0 = src.m_sigma0;
591 m_elapsedTime = src.m_elapsedTime;
592 m_elapsedTimeErrorProp = src.m_elapsedTimeErrorProp;
593 m_converged = src.m_converged;
594 m_bundleControlPoints = src.m_bundleControlPoints;
595 m_bundleLidarPoints = src.m_bundleLidarPoints;
596 m_outNet = src.m_outNet;
597 m_outLidarData = src.m_outLidarData;
598 m_iterations = src.m_iterations;
599 m_observations = src.m_observations;
600 m_rmsImageSampleResiduals = src.m_rmsImageSampleResiduals;
601 m_rmsImageLineResiduals = src.m_rmsImageLineResiduals;
602 m_rmsImageResiduals = src.m_rmsImageResiduals;
603 m_rmsLidarImageSampleResiduals = src.m_rmsLidarImageSampleResiduals;
604 m_rmsLidarImageLineResiduals = src.m_rmsLidarImageLineResiduals;
605 m_rmsLidarImageResiduals = src.m_rmsLidarImageResiduals;
606 m_rmsImageXSigmas = src.m_rmsImageXSigmas;
607 m_rmsImageYSigmas = src.m_rmsImageYSigmas;
608 m_rmsImageZSigmas = src.m_rmsImageZSigmas;
609 m_rmsImageRASigmas = src.m_rmsImageRASigmas;
610 m_rmsImageDECSigmas = src.m_rmsImageDECSigmas;
611 m_rmsImageTWISTSigmas = src.m_rmsImageTWISTSigmas;
612 m_minSigmaCoord1Distance = src.m_minSigmaCoord1Distance;
613 m_maxSigmaCoord1Distance = src.m_maxSigmaCoord1Distance;
614 m_minSigmaCoord2Distance = src.m_minSigmaCoord2Distance;
615 m_maxSigmaCoord2Distance = src.m_maxSigmaCoord2Distance;
616 m_minSigmaCoord3Distance = src.m_minSigmaCoord3Distance;
617 m_maxSigmaCoord3Distance = src.m_maxSigmaCoord3Distance;
618 m_minSigmaCoord1PointId = src.m_minSigmaCoord1PointId;
619 m_maxSigmaCoord1PointId = src.m_maxSigmaCoord1PointId;
620 m_minSigmaCoord2PointId = src.m_minSigmaCoord2PointId;
621 m_maxSigmaCoord2PointId = src.m_maxSigmaCoord2PointId;
622 m_minSigmaCoord3PointId = src.m_minSigmaCoord3PointId;
623 m_maxSigmaCoord3PointId = src.m_maxSigmaCoord3PointId;
624 m_rmsSigmaCoord1Stats = src.m_rmsSigmaCoord1Stats;
625 m_rmsSigmaCoord2Stats = src.m_rmsSigmaCoord2Stats;
626 m_rmsSigmaCoord3Stats = src.m_rmsSigmaCoord3Stats;
627 m_maximumLikelihoodFunctions = src.m_maximumLikelihoodFunctions;
628 m_maximumLikelihoodIndex = src.m_maximumLikelihoodIndex;
629
630 delete m_cumPro;
631 m_cumPro = NULL;
632 m_cumPro = new StatCumProbDistDynCalc(*src.m_cumPro);
633
634 delete m_cumProRes;
635 m_cumProRes = NULL;
636 m_cumProRes = new StatCumProbDistDynCalc(*src.m_cumProRes);
637
638 m_maximumLikelihoodMedianR2Residuals = src.m_maximumLikelihoodMedianR2Residuals;
639 }
640 return *this;
641 }
642
643
650 m_correlationMatrix = NULL;
651
652 m_numberFixedPoints = 0; // set in BA constructor->init->fillPointIndexMap
653 m_numberIgnoredPoints = 0; // set in BA constructor->init->fillPointIndexMap
654
655
656 // set in BundleAdjust init()
658
659 // members set while computing bundle stats
662 m_rmsImageResiduals.clear();
666 m_rmsImageXSigmas.clear();
667 m_rmsImageYSigmas.clear();
668 m_rmsImageZSigmas.clear();
669 m_rmsImageRASigmas.clear();
670 m_rmsImageDECSigmas.clear();
671 m_rmsImageTWISTSigmas.clear();
672
673 // Initialize coordinate sigma boundaries. Units are meters for sigmas in both
674 // latitudinal and rectangular coordinates
687
691
692
693 // set by compute residuals
694 m_rmsXResiduals = 0.0;
695 m_rmsYResiduals = 0.0;
696 m_rmsXYResiduals = 0.0;
697
698 // set by compute rejection limit
699 m_rejectionLimit = 0.0;
700
701 // set by flag outliers
703
704 // set by formNormalEquations_CHOLMOD, formNormalEquations_SPECIALK, or solve
709
710// ??? unused variable ??? m_numberHeldPoints = 0;
711
712 // set by formNormalEquations_CHOLMOD, formNormalEquations_SPECIALK, or
713 // setParameterWeights (i.e. solve)
719
720 // set by initialize, formNormalEquations_CHOLMOD, formNormalEquations_SPECIALK, or solve
722
723 // solve and solve cholesky
725 m_iterations = 0;
726 m_sigma0 = 0.0;
727 m_elapsedTime = 0.0;
729 m_converged = false; // or initialze method
730
731 m_cumPro = NULL;
735 m_cumProRes = NULL;
736
737 m_observations.clear();
738 m_outNet.clear();
739 m_outLidarData.clear();
740
741 }
742
743
750 m_rmsImageXSigmas.resize(numberImages);
751 m_rmsImageYSigmas.resize(numberImages);
752 m_rmsImageZSigmas.resize(numberImages);
753 m_rmsImageRASigmas.resize(numberImages);
754 m_rmsImageDECSigmas.resize(numberImages);
755 m_rmsImageTWISTSigmas.resize(numberImages);
756 }
757
758
759#if 0
760 void BundleResults::setRmsImageResidualLists(QVector<Statistics> rmsImageLineResiduals,
761 QVector<Statistics> rmsImageSampleResiduals,
762 QVector<Statistics> rmsImageResiduals) {
763 // QList??? jigsaw apptest gives - ASSERT failure in QList<T>::operator[]: "index out of range",
767 }
768#endif
769
770
778 void BundleResults::setRmsImageResidualLists(QList<Statistics> rmsImageLineResiduals,
779 QList<Statistics> rmsImageSampleResiduals,
780 QList<Statistics> rmsImageResiduals) {
784 }
785
786
794 void BundleResults::setRmsLidarImageResidualLists(QList<Statistics> rmsLidarImageLineResiduals,
795 QList<Statistics> rmsLidarImageSampleResiduals,
796 QList<Statistics> rmsLidarImageResiduals) {
800 }
801
802
811 void BundleResults::setSigmaCoord1Range(Distance minCoord1Dist, Distance maxCoord1Dist,
812 QString minCoord1PointId, QString maxCoord1PointId) {
813 m_minSigmaCoord1Distance = minCoord1Dist;
814 m_maxSigmaCoord1Distance = maxCoord1Dist;
815 m_minSigmaCoord1PointId = minCoord1PointId;
816 m_maxSigmaCoord1PointId = maxCoord1PointId;
817 }
818
819
828 void BundleResults::setSigmaCoord2Range(Distance minCoord2Dist, Distance maxCoord2Dist,
829 QString minCoord2PointId, QString maxCoord2PointId) {
830 m_minSigmaCoord2Distance = minCoord2Dist;
831 m_maxSigmaCoord2Distance = maxCoord2Dist;
832 m_minSigmaCoord2PointId = minCoord2PointId;
833 m_maxSigmaCoord2PointId = maxCoord2PointId;
834 }
835
836
845 void BundleResults::setSigmaCoord3Range(Distance minCoord3Dist, Distance maxCoord3Dist,
846 QString minCoord3PointId, QString maxCoord3PointId) {
847 m_minSigmaCoord3Distance = minCoord3Dist;
848 m_maxSigmaCoord3Distance = maxCoord3Dist;
849 m_minSigmaCoord3PointId = minCoord3PointId;
850 m_maxSigmaCoord3PointId = maxCoord3PointId;
851 }
852
853
862 double rmsFromSigmaCoord1Stats,
863 double rmsFromSigmaCoord2Stats,
864 double rmsFromSigmaCoord3Stats) {
865 m_rmsSigmaCoord1Stats = rmsFromSigmaCoord1Stats;
866 m_rmsSigmaCoord2Stats = rmsFromSigmaCoord2Stats;
867 m_rmsSigmaCoord3Stats = rmsFromSigmaCoord3Stats;
868 }
869
870
879 QList< QPair< MaximumLikelihoodWFunctions::Model, double > > modelsWithQuantiles) {
880
881
882 // reinitialize variables if this setup has already been called
885
886 // residual prob distribution is calculated even if there is no maximum likelihood estimation.
887 // set up the solver to have a node at every percent of the distribution
888 m_cumProRes = NULL;
891
892 // if numberMaximumLikelihoodModels > 0, then MaximumLikeliHood Estimation is being used.
893 for (int i = 0; i < modelsWithQuantiles.size(); i++) {
894
895 // if maximum likelihood is being used, the cum prob calculator is initialized.
896 if (i == 0) {
897 m_cumPro = NULL;
899 // set up the solver to have a node at every percent of the distribution
901 }
902
903 // set up the w functions for the maximum likelihood estimation
905 qMakePair(MaximumLikelihoodWFunctions(modelsWithQuantiles[i].first),
906 modelsWithQuantiles[i].second));
907
908 }
909
910
911 //maximum likelihood estimation tiered solutions requiring multiple convergeances are supported,
912 // this index keeps track of which tier the solution is in
914 }
915
916
921// printf("Maximum Likelihood Tier: %d\n", m_maximumLikelihoodIndex);
923 // if maximum likelihood estimation is being used
924 // at the end of every iteration
925 // reset the tweaking contant to the desired quantile of the |residual| distribution
927 double tc = m_cumPro->value(quantile);
928 m_maximumLikelihoodFunctions[m_maximumLikelihoodIndex].first.setTweakingConstant(tc);
929 // print meadians of residuals
931// printf("Median of R^2 residuals: %lf\n", m_maximumLikelihoodMedianR2Residuals);
932
933 //restart the dynamic calculation of the cumulative probility distribution of |R^2 residuals|
934 // so it will be up to date for the next iteration
936 }
937 }
938
939
946 m_cumPro->setQuantiles(nodes);
947 }
948
949
956 m_cumProRes->setQuantiles(nodes);
957 }
958
959
967 m_cumPro->addObs(observationValue);
968 }
969
970
978 m_cumProRes->addObs(observationValue);
979 }
980
981
989
990
997
998
1007
1008
1015
1016
1023 return m_numberHeldImages;
1024 }
1025
1026
1033
1034
1043
1044
1052 void BundleResults::setRmsXYResiduals(double rx, double ry, double rxy) {
1053 m_rmsXResiduals = rx;
1054 m_rmsYResiduals = ry;
1055 m_rmsXYResiduals = rxy;
1056 }
1057
1058
1064 void BundleResults::setRejectionLimit(double rejectionLimit) {
1066 }
1067
1068
1077
1078
1087
1088
1100
1101
1107 void BundleResults::setNumberLidarImageObservations(int numberLidarObservations) {
1108 m_numberLidarImageObservations = numberLidarObservations;
1109 }
1110
1111
1117 void BundleResults::setNumberImageParameters(int numberParameters) {
1118 m_numberImageParameters = numberParameters;
1119 }
1120
1121
1128 m_numberConstrainedPointParameters = numberParameters;
1129 }
1130
1131
1140
1141
1148
1149
1158
1159
1166
1167
1176
1177
1184
1185
1194
1195
1202 m_numberUnknownParameters = numberParameters;
1203 }
1204
1205
1211 void BundleResults::setNumberLidarRangeConstraints(int numberLidarRangeConstraints) {
1212 m_numberLidarRangeConstraintEquations = numberLidarRangeConstraints;
1213 }
1214
1215
1229
1230
1249
1250 if (m_degreesOfFreedom > 0) {
1251 m_sigma0 = dvtpv / m_degreesOfFreedom;
1252 }
1253 else if (m_degreesOfFreedom == 0 && criteria == BundleSettings::ParameterCorrections) {
1254 m_sigma0 = dvtpv;
1255 }
1256 else {
1257 QString msg = "Computed degrees of freedom [" + toString(m_degreesOfFreedom)
1258 + "] is invalid.";
1259 throw IException(IException::Io, msg, _FILEINFO_);
1260 }
1261
1262 m_sigma0 = sqrt(m_sigma0);
1263 }
1264
1265
1271 void BundleResults::setDegreesOfFreedom(double degreesOfFreedom) { // old sparse
1273 }
1274
1275
1281 void BundleResults::setSigma0(double sigma0) { // old sparse
1282 m_sigma0 = sigma0;
1283 }
1284
1285
1292 m_elapsedTime = time;
1293 }
1294
1295
1304
1305
1311 void BundleResults::setConverged(bool converged) {
1312 m_converged = converged;
1313 }
1314
1315
1321 void BundleResults::setBundleControlPoints(QVector<BundleControlPointQsp> controlPoints) {
1322 m_bundleControlPoints = controlPoints;
1323 }
1324
1325
1331 void BundleResults::setBundleLidarPoints(QVector<BundleLidarControlPointQsp> lidarPoints) {
1332 m_bundleLidarPoints = lidarPoints;
1333 }
1334
1335
1342 m_outNet = outNet;
1343 }
1344
1345
1352 m_outLidarData = outLidarData;
1353 }
1354
1355
1361 void BundleResults::setIterations(int iterations) {
1363 }
1364
1365
1374
1375
1376
1377 //************************* Accessors **********************************************************//
1378
1384 QList<Statistics> BundleResults::rmsImageSampleResiduals() const {
1386 }
1387
1388
1394 QList<Statistics> BundleResults::rmsImageLineResiduals() const {
1396 }
1397
1398
1404 QList<Statistics> BundleResults::rmsImageResiduals() const {
1405 return m_rmsImageResiduals;
1406 }
1407
1408
1417
1418
1426 }
1427
1428
1434 QList<Statistics> BundleResults::rmsLidarImageResiduals() const {
1436 }
1437
1438
1444 QVector<Statistics> BundleResults::rmsImageXSigmas() const {
1445 return m_rmsImageXSigmas;
1446 }
1447
1448
1454 QVector<Statistics> BundleResults::rmsImageYSigmas() const {
1455 return m_rmsImageYSigmas;
1456 }
1457
1458
1464 QVector<Statistics> BundleResults::rmsImageZSigmas() const {
1465 return m_rmsImageZSigmas;
1466 }
1467
1468
1474 QVector<Statistics> BundleResults::rmsImageRASigmas() const {
1475 return m_rmsImageRASigmas;
1476 }
1477
1478
1484 QVector<Statistics> BundleResults::rmsImageDECSigmas() const {
1485 return m_rmsImageDECSigmas;
1486 }
1487
1488
1494 QVector<Statistics> BundleResults::rmsImageTWISTSigmas() const {
1495 return m_rmsImageTWISTSigmas;
1496 }
1497
1498
1507
1508
1517
1518
1527
1528
1537
1538
1547
1548
1557
1558
1567
1568
1577
1578
1587
1588
1597
1598
1607
1608
1617
1618
1627
1628
1637
1638
1647
1648
1654 double BundleResults::rmsRx() const {
1655 return m_rmsXResiduals;
1656 }
1657
1658
1664 double BundleResults::rmsRy() const {
1665 return m_rmsYResiduals;
1666 }
1667
1668
1674 double BundleResults::rmsRxy() const {
1675 return m_rmsXYResiduals;
1676 }
1677
1678
1685 return m_rejectionLimit;
1686 }
1687
1688
1697
1698
1707
1708
1717
1718
1727
1728
1737
1738
1747
1748
1757
1758
1767
1768
1777
1778
1787
1788
1795 return m_degreesOfFreedom;
1796 }
1797
1798
1804 double BundleResults::sigma0() const {
1805 return m_sigma0;
1806 }
1807
1808
1815 return m_elapsedTime;
1816 }
1817
1818
1827
1828
1835 return m_converged;
1836 }
1837
1838
1844 QVector<BundleControlPointQsp> &BundleResults::bundleControlPoints() {
1845 return m_bundleControlPoints;
1846 }
1847
1848
1854 QVector<BundleLidarControlPointQsp> &BundleResults::bundleLidarControlPoints() {
1855 return m_bundleLidarPoints;
1856 }
1857
1858
1867 if (!m_outNet) {
1869 "Output Control Network has not been set.",
1870 _FILEINFO_);
1871 }
1872 return m_outNet;
1873 }
1874
1875
1886
1887
1894 return m_iterations;
1895 }
1896
1897
1906
1907
1916
1917
1926
1927
1937
1938
1947
1948
1957
1958
1969
1970
1979 return m_maximumLikelihoodFunctions[modelIndex].second;
1980 }
1981
1982
1983// QList< QPair< MaximumLikelihoodWFunctions, double > >
1984// BundleResults::maximumLikelihoodModels() const {
1985// return m_maximumLikelihoodFunctions;
1986// }
1987
1988
1997 if (m_correlationMatrix) {
1998 return *m_correlationMatrix;
1999 }
2000 else {
2002 "Correlation matrix for this bundle is NULL.",
2003 _FILEINFO_);
2004 }
2005 }
2006
2007
2017
2018
2024 void BundleResults::setCorrMatImgsAndParams(QMap<QString, QStringList> imgsAndParams) {
2025 correlationMatrix();// throw error if null
2027 }
2028
2029
2030 SurfacePoint::CoordinateType BundleResults::coordTypeReports() {
2031 // Get the coordinate type from the output net if it exists. Otherwise use the default.
2033
2034 if (m_outNet) {
2035 type = outputControlNet()->GetCoordType();
2036 }
2037
2038 return type;
2039 }
2040
2041
2048 void BundleResults::save(QXmlStreamWriter &stream, const Project *project) const {
2049 // Get the coordinate type from the output net if it exists. Otherwise use the default.
2051
2052 if (m_outNet) {
2053 coordType = outputControlNet()->GetCoordType();
2054 }
2055
2056 stream.writeStartElement("bundleResults");
2057 stream.writeStartElement("correlationMatrix");
2058 stream.writeAttribute("correlationFileName",
2059 correlationMatrix().correlationFileName().expanded());
2060 stream.writeAttribute("covarianceFileName",
2061 correlationMatrix().covarianceFileName().expanded());
2062 stream.writeStartElement("imagesAndParameters");
2063 QMapIterator<QString, QStringList> imgParamIt(*correlationMatrix().imagesAndParameters());
2064 while (imgParamIt.hasNext()) {
2065 imgParamIt.next();
2066 stream.writeStartElement("image");
2067 stream.writeAttribute("id", imgParamIt.key());
2068 QStringList parameters = imgParamIt.value();
2069 for (int i = 0; i < parameters.size(); i++) {
2070 stream.writeTextElement("parameter", parameters[i]);
2071 }
2072 stream.writeEndElement(); // end image
2073
2074 }
2075 stream.writeEndElement(); // end images and parameters
2076 stream.writeEndElement(); // end correlationMatrix
2077
2078 stream.writeStartElement("generalStatisticsValues");
2079 stream.writeTextElement("numberFixedPoints", toString(numberFixedPoints()));
2080 stream.writeTextElement("numberIgnoredPoints", toString(numberIgnoredPoints()));
2081 stream.writeTextElement("numberHeldImages", toString(numberHeldImages()));
2082 stream.writeTextElement("rejectionLimit", toString(rejectionLimit()));
2083 stream.writeTextElement("numberRejectedObservations", toString(numberRejectedObservations()));
2084 stream.writeTextElement("numberObservations", toString(numberObservations()));
2085 stream.writeTextElement("numberLidarRangeConstraintEquations", toString(numberLidarRangeConstraintEquations()));
2086 stream.writeTextElement("numberImageObservations", toString(numberImageObservations()));
2087 stream.writeTextElement("numberLidarImageObservations", toString(numberLidarImageObservations()));
2088 stream.writeTextElement("numberImageParameters", toString(numberImageParameters()));
2089 stream.writeTextElement("numberConstrainedPointParameters",
2091 stream.writeTextElement("numberConstrainedImageParameters",
2093 stream.writeTextElement("numberConstrainedTargetParameters",
2095 stream.writeTextElement("numberUnknownParameters", toString(numberUnknownParameters()));
2096 stream.writeTextElement("degreesOfFreedom", toString(degreesOfFreedom()));
2097 stream.writeTextElement("sigma0", toString(sigma0()));
2098 stream.writeTextElement("converged", toString(converged()));
2099 stream.writeTextElement("iterations", toString(iterations()));
2100 stream.writeEndElement(); // end generalStatisticsValues
2101
2102 stream.writeStartElement("rms");
2103 stream.writeStartElement("residuals");
2104 stream.writeAttribute("x", toString(rmsRx()));
2105 stream.writeAttribute("y", toString(rmsRy()));
2106 stream.writeAttribute("xy", toString(rmsRxy()));
2107 stream.writeEndElement(); // end residuals element
2108 stream.writeStartElement("sigmas");
2109
2110 // Set the label based of the coordinate type set for reports
2111 switch (coordType) {
2113 stream.writeAttribute("lat", toString(sigmaCoord1StatisticsRms()));
2114 stream.writeAttribute("lon", toString(sigmaCoord2StatisticsRms()));
2115 stream.writeAttribute("rad", toString(sigmaCoord3StatisticsRms()));
2116 break;
2118 stream.writeAttribute("x", toString(sigmaCoord1StatisticsRms()));
2119 stream.writeAttribute("y", toString(sigmaCoord2StatisticsRms()));
2120 stream.writeAttribute("z", toString(sigmaCoord3StatisticsRms()));
2121 break;
2122 default:
2123 IString msg ="Unknown surface point coordinate type enum [" + toString(coordType) + "]." ;
2124 throw IException(IException::Programmer, msg, _FILEINFO_);
2125 }
2126 stream.writeEndElement(); // end sigmas element
2127
2128 stream.writeStartElement("imageResidualsLists");
2129 stream.writeStartElement("residualsList");
2130 stream.writeAttribute("listSize", toString(rmsImageResiduals().size()));
2131 for (int i = 0; i < m_rmsImageResiduals.size(); i++) {
2132 stream.writeStartElement("statisticsItem");
2133 m_rmsImageResiduals[i].save(stream, project);
2134 stream.writeEndElement(); // end statistics item
2135 }
2136 stream.writeEndElement(); // end residuals list
2137 stream.writeStartElement("sampleList");
2138 stream.writeAttribute("listSize", toString(rmsImageSampleResiduals().size()));
2139 for (int i = 0; i < m_rmsImageSampleResiduals.size(); i++) {
2140 stream.writeStartElement("statisticsItem");
2141 m_rmsImageSampleResiduals[i].save(stream, project);
2142 stream.writeEndElement(); // end statistics item
2143 }
2144 stream.writeEndElement(); // end sample residuals list
2145
2146 stream.writeStartElement("lineList");
2147 stream.writeAttribute("listSize", toString(rmsImageLineResiduals().size()));
2148 for (int i = 0; i < m_rmsImageLineResiduals.size(); i++) {
2149 stream.writeStartElement("statisticsItem");
2150 m_rmsImageLineResiduals[i].save(stream, project);
2151 stream.writeEndElement(); // end statistics item
2152 }
2153 stream.writeEndElement(); // end line residuals list
2154
2155 stream.writeStartElement("lidarResidualsList");
2156 stream.writeAttribute("listSize", toString(rmsLidarImageResiduals().size()));
2157 for (int i = 0; i < m_rmsLidarImageResiduals.size(); i++) {
2158 stream.writeStartElement("statisticsItem");
2159 m_rmsLidarImageResiduals[i].save(stream, project);
2160 stream.writeEndElement(); // end statistics item
2161 }
2162 stream.writeEndElement(); // end line residuals list
2163
2164 stream.writeStartElement("lidarSampleList");
2165 stream.writeAttribute("listSize", toString(rmsLidarImageSampleResiduals().size()));
2166 for (int i = 0; i < m_rmsLidarImageSampleResiduals.size(); i++) {
2167 stream.writeStartElement("statisticsItem");
2168 m_rmsLidarImageSampleResiduals[i].save(stream, project);
2169 stream.writeEndElement(); // end statistics item
2170 }
2171 stream.writeEndElement(); // end line residuals list
2172
2173 stream.writeStartElement("lidarLineList");
2174 stream.writeAttribute("listSize", toString(rmsLidarImageLineResiduals().size()));
2175 for (int i = 0; i < m_rmsLidarImageLineResiduals.size(); i++) {
2176 stream.writeStartElement("statisticsItem");
2177 m_rmsLidarImageLineResiduals[i].save(stream, project);
2178 stream.writeEndElement(); // end statistics item
2179 }
2180 stream.writeEndElement(); // end line residuals list
2181 stream.writeEndElement(); // end image residuals lists
2182
2183 stream.writeStartElement("imageSigmasLists");
2184 stream.writeStartElement("xSigmas");
2185 stream.writeAttribute("listSize", toString(rmsImageXSigmas().size()));
2186 for (int i = 0; i < m_rmsImageXSigmas.size(); i++) {
2187 stream.writeStartElement("statisticsItem");
2188 m_rmsImageXSigmas[i].save(stream, project);
2189 stream.writeEndElement(); // end statistics item
2190 }
2191
2192 stream.writeEndElement(); // end x sigma list
2193
2194 stream.writeStartElement("ySigmas");
2195 stream.writeAttribute("listSize", toString(rmsImageYSigmas().size()));
2196 for (int i = 0; i < m_rmsImageYSigmas.size(); i++) {
2197 stream.writeStartElement("statisticsItem");
2198 m_rmsImageYSigmas[i].save(stream, project);
2199 stream.writeEndElement(); // end statistics item
2200 }
2201 stream.writeEndElement(); // end y sigma list
2202
2203 stream.writeStartElement("zSigmas");
2204 stream.writeAttribute("listSize", toString(rmsImageZSigmas().size()));
2205 for (int i = 0; i < m_rmsImageZSigmas.size(); i++) {
2206 stream.writeStartElement("statisticsItem");
2207 m_rmsImageZSigmas[i].save(stream, project);
2208 stream.writeEndElement(); // end statistics item
2209 }
2210 stream.writeEndElement(); // end z sigma list
2211
2212 stream.writeStartElement("raSigmas");
2213 stream.writeAttribute("listSize", toString(rmsImageRASigmas().size()));
2214 for (int i = 0; i < m_rmsImageRASigmas.size(); i++) {
2215 stream.writeStartElement("statisticsItem");
2216 m_rmsImageRASigmas[i].save(stream, project);
2217 stream.writeEndElement(); // end statistics item
2218 }
2219 stream.writeEndElement(); // end ra sigma list
2220
2221 stream.writeStartElement("decSigmas");
2222 stream.writeAttribute("listSize", toString(rmsImageDECSigmas().size()));
2223 for (int i = 0; i < m_rmsImageDECSigmas.size(); i++) {
2224 stream.writeStartElement("statisticsItem");
2225 m_rmsImageDECSigmas[i].save(stream, project);
2226 stream.writeEndElement(); // end statistics item
2227 }
2228 stream.writeEndElement(); // end dec sigma list
2229
2230 stream.writeStartElement("twistSigmas");
2231 stream.writeAttribute("listSize", toString(rmsImageTWISTSigmas().size()));
2232 for (int i = 0; i < m_rmsImageTWISTSigmas.size(); i++) {
2233 stream.writeStartElement("statisticsItem");
2234 m_rmsImageTWISTSigmas[i].save(stream, project);
2235 stream.writeEndElement(); // end statistics item
2236 }
2237 stream.writeEndElement(); // end twist sigma list
2238 stream.writeEndElement(); // end sigmas lists
2239 stream.writeEndElement(); // end rms
2240
2241 stream.writeStartElement("elapsedTime");
2242 stream.writeAttribute("time", toString(elapsedTime()));
2243 stream.writeAttribute("errorProp", toString(elapsedTimeErrorProp()));
2244 stream.writeEndElement(); // end elapsed time
2245
2246 stream.writeStartElement("minMaxSigmas");
2247
2248 // Write the labels corresponding to the coordinate type set for reports
2249 switch (coordType) {
2251 stream.writeStartElement("minLat");
2252 stream.writeAttribute("value", toString(minSigmaCoord1Distance().meters()));
2253 stream.writeAttribute("pointId", minSigmaCoord1PointId());
2254 stream.writeEndElement();
2255 stream.writeStartElement("maxLat");
2256 stream.writeAttribute("value", toString(maxSigmaCoord1Distance().meters()));
2257 stream.writeAttribute("pointId", maxSigmaCoord1PointId());
2258 stream.writeEndElement();
2259 stream.writeStartElement("minLon");
2260 stream.writeAttribute("value", toString(minSigmaCoord2Distance().meters()));
2261 stream.writeAttribute("pointId", minSigmaCoord2PointId());
2262 stream.writeEndElement();
2263 stream.writeStartElement("maxLon");
2264 stream.writeAttribute("value", toString(maxSigmaCoord2Distance().meters()));
2265 stream.writeAttribute("pointId", maxSigmaCoord2PointId());
2266 stream.writeEndElement();
2267 stream.writeStartElement("minRad");
2268 stream.writeAttribute("value", toString(minSigmaCoord3Distance().meters()));
2269 stream.writeAttribute("pointId", minSigmaCoord3PointId());
2270 stream.writeEndElement();
2271 stream.writeStartElement("maxRad");
2272 stream.writeAttribute("value", toString(maxSigmaCoord3Distance().meters()));
2273 stream.writeAttribute("pointId", maxSigmaCoord3PointId());
2274 stream.writeEndElement();
2275 break;
2277 stream.writeStartElement("minX");
2278 stream.writeAttribute("value", toString(minSigmaCoord1Distance().meters()));
2279 stream.writeAttribute("pointId", minSigmaCoord1PointId());
2280 stream.writeEndElement();
2281 stream.writeStartElement("maxX");
2282 stream.writeAttribute("value", toString(maxSigmaCoord1Distance().meters()));
2283 stream.writeAttribute("pointId", maxSigmaCoord1PointId());
2284 stream.writeEndElement();
2285 stream.writeStartElement("minY");
2286 stream.writeAttribute("value", toString(minSigmaCoord2Distance().meters()));
2287 stream.writeAttribute("pointId", minSigmaCoord2PointId());
2288 stream.writeEndElement();
2289 stream.writeStartElement("maxY");
2290 stream.writeAttribute("value", toString(maxSigmaCoord2Distance().meters()));
2291 stream.writeAttribute("pointId", maxSigmaCoord2PointId());
2292 stream.writeEndElement();
2293 stream.writeStartElement("minZ");
2294 stream.writeAttribute("value", toString(minSigmaCoord3Distance().meters()));
2295 stream.writeAttribute("pointId", minSigmaCoord3PointId());
2296 stream.writeEndElement();
2297 stream.writeStartElement("maxZ");
2298 stream.writeAttribute("value", toString(maxSigmaCoord3Distance().meters()));
2299 stream.writeAttribute("pointId", maxSigmaCoord3PointId());
2300 stream.writeEndElement();
2301 break;
2302 default:
2303 IString msg ="Unknown surface point coordinate type enum [" + toString(coordType) + "]." ;
2304 throw IException(IException::Programmer, msg, _FILEINFO_);
2305 }
2306 stream.writeEndElement(); // end minMaxSigmas
2307
2308 // call max likelihood setup from startElement to fill the rest of these values...
2309 stream.writeStartElement("maximumLikelihoodEstimation");
2310 stream.writeAttribute("numberModels", toString(numberMaximumLikelihoodModels()));
2311 stream.writeAttribute("maximumLikelihoodIndex", toString(maximumLikelihoodModelIndex()));
2312 stream.writeAttribute("maximumLikelihoodMedianR2Residuals",
2314
2315 stream.writeStartElement("cumulativeProbabilityCalculator");
2316 // cumulativeProbabilityDistribution().save(stream, project);
2317 stream.writeEndElement(); // end cumulativeProbabilityCalculator
2318
2319 stream.writeStartElement("residualsCumulativeProbabilityCalculator");
2320 // residualsCumulativeProbabilityDistribution().save(stream, project);
2321 stream.writeEndElement(); // end residualsCumulativeProbabilityCalculator
2322
2323 for (int i = 0; i < numberMaximumLikelihoodModels(); i++) {
2324 stream.writeStartElement("model");
2325 stream.writeAttribute("modelNumber", toString(i+1));
2326 stream.writeAttribute("modelSelection",
2328 stream.writeAttribute("tweakingConstant",
2329 toString(m_maximumLikelihoodFunctions[i].first.tweakingConstant()));
2330 stream.writeAttribute("quantile", toString(m_maximumLikelihoodFunctions[i].second));
2331 stream.writeEndElement(); // end this model
2332 }
2333 stream.writeEndElement(); // end maximumLikelihoodEstimation
2334 stream.writeEndElement(); // end bundleResults
2335 }
2336}
This class is a container class for BundleObservations.
A container class for statistical results from a BundleAdjust solution.
void addProbabilityDistributionObservation(double obsValue)
Adds an observation to the cumulative probability distribution of |R^2 residuals|.
void incrementNumberConstrainedImageParameters(int incrementAmount)
Increase the number of constrained image parameters.
~BundleResults()
Destroys this BundleResults object.
QString m_minSigmaCoord1PointId
The minimum sigma coordinate 1 point id.
QVector< Statistics > m_rmsImageTWISTSigmas
< The root mean square image twist sigmas.
double elapsedTimeErrorProp() const
Returns the elapsed time for error propagation.
int numberRejectedObservations() const
Returns the number of observation that were rejected.
int m_numberUnknownParameters
total number of parameters to solve for
QString minSigmaCoord2PointId() const
Returns the minimum sigma point id for coordinate 2.
void setSigma0(double sigma0)
Sets the sigma0.
double rejectionLimit() const
Returns the rejection limit.
int m_degreesOfFreedom
degrees of freedom
QList< Statistics > m_rmsLidarImageResiduals
RMS image lidar sample & line residual stats for each image in the bundle
int m_numberFixedPoints
number of 'fixed' (ground) points (define)
void incrementNumberConstrainedPointParameters(int incrementAmount)
Increase the number of contrained point parameters.
double rmsRxy() const
Returns the RMS of the x and y residuals.
QList< Statistics > rmsImageSampleResiduals() const
Returns the list of RMS image sample residuals statistics.
QList< Statistics > m_rmsLidarImageSampleResiduals
List of RMS lidar sample residual stats for each image in the bundle
int m_numberConstrainedTargetParameters
number of constrained target parameters
BundleObservationVector m_observations
The vector of BundleObservations from BundleAdjust.
BundleResults(QObject *parent=0)
Constructs a BundleResults object.
ControlNetQsp outputControlNet() const
Returns a shared pointer to the output control network.
int numberObservations() const
Returns the number of observations.
void setElapsedTime(double time)
Sets the elapsed time for the bundle adjustment.
Distance m_maxSigmaCoord3Distance
The maximum sigma radius distance.
MaximumLikelihoodWFunctions maximumLikelihoodModelWFunc(int modelIndex) const
Returns the maximum likelihood model at the given index.
void incrementHeldImages()
Increases the number of 'held' images.
int m_numberLidarImageObservations
lidar image coords. (2 per measure)
double m_maximumLikelihoodMedianR2Residuals
Median of R^2 residuals.
double sigmaCoord3StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 3.
double m_rmsXResiduals
rms of x residuals
double m_rmsSigmaCoord3Stats
rms of adjusted Radius sigmas
void initializeProbabilityDistribution(unsigned int nodes=20)
Initializes or resets the cumulative probability distribution of |R^2 residuals|.
void incrementIgnoredPoints()
Increase the number of ignored points.
void incrementFixedPoints()
Increase the number of 'fixed' (ground) points.
void setBundleControlPoints(QVector< BundleControlPointQsp > controlPoints)
Sets the bundle control point vector.
void setNumberConstrainedPointParameters(int numberParameters)
Set number of contrained point parameters.
void setBundleLidarPoints(QVector< BundleLidarControlPointQsp > lidarPoints)
Sets the bundle lidar point vector.
double sigma0() const
Returns the Sigma0 of the bundle adjustment.
QVector< Statistics > m_rmsImageZSigmas
< The root mean square image z sigmas.
void setIterations(int iterations)
Sets the number of iterations taken by the BundleAdjust.
bool converged() const
Returns whether or not the bundle adjustment converged.
Distance m_maxSigmaCoord1Distance
The maximum sigma latitude distance.
double maximumLikelihoodModelQuantile(int modelIndex) const
Returns the quantile of the maximum likelihood model at the given index.
int m_numberImageObservations
photogrammetry image coords. (2 per measure)
void setSigmaCoord1Range(Distance minCoord1Dist, Distance maxCoord1Dist, QString minCoord1PointId, QString maxCoord1PointId)
Sets the min and max sigma distances and point ids for coordinate 1.
void incrementMaximumLikelihoodModelIndex()
Increases the value that indicates which stage the maximum likelihood adjustment is currently on.
QVector< Statistics > rmsImageDECSigmas() const
Returns the list of RMS image declination sigma statistics.
QString m_maxSigmaCoord1PointId
The maximum sigma coordinate 1 point id.
QVector< Statistics > m_rmsImageYSigmas
< The root mean square image y sigmas.
QList< Statistics > rmsLidarImageSampleResiduals() const
Returns the list of RMS image lidar sample residuals statistics.
void setOutputControlNet(ControlNetQsp outNet)
Sets the output ControlNet.
int m_iterations
The number of iterations taken by BundleAdjust.
double m_rmsXYResiduals
rms of all x and y residuals
int m_numberLidarRangeConstraintEquations
void setSigmaCoord2Range(Distance minCoord2Dist, Distance maxCoord2Dist, QString minCoord2PointId, QString maxCoord2PointId)
Sets the min and max sigma distances and point ids for coordinate 2.
int numberConstrainedPointParameters() const
Returns the number of constrained point parameters.
double rmsRy() const
Returns the RMS of the y residuals.
void resetNumberConstrainedImageParameters()
Resets the number of constrained image parameters to 0.
int m_numberIgnoredPoints
number of ignored points
void computeDegreesOfFreedom()
Computes the degrees of freedom of the bundle adjustment and stores it internally.
Distance m_minSigmaCoord2Distance
The minimum sigma longitude distance.
int iterations() const
Returns the number of iterations taken by the BundleAdjust.
CorrelationMatrix correlationMatrix() const
Returns the Correlation Matrix.
void setNumberRejectedObservations(int numberObservations)
Sets the number of rejected observations.
QString minSigmaCoord1PointId() const
Returns the minimum sigma point id for coordinate 1.
double m_rejectionLimit
current rejection limit
QVector< Statistics > rmsImageYSigmas() const
Returns the list of RMS image y sigma statistics.
QString m_minSigmaCoord2PointId
The minimum sigma coordinate 2 point id.
void maximumLikelihoodSetUp(QList< QPair< MaximumLikelihoodWFunctions::Model, double > > modelsWithQuantiles)
This method steps up the maximum likelihood estimation solution.
void save(QXmlStreamWriter &stream, const Project *project) const
Saves the BundleResults object to an XML file.
int m_numberConstrainedImageParameters
number of constrained image parameters
int numberIgnoredPoints() const
Returns the number of ignored points.
QVector< BundleControlPointQsp > & bundleControlPoints()
Returns a reference to the BundleControlPoint vector.
void setCorrMatImgsAndParams(QMap< QString, QStringList > imgsAndParams)
Set the images and their associated parameters of the correlation matrix.
Distance maxSigmaCoord2Distance() const
Returns the maximum sigma distance for coordinate 2.
QString m_minSigmaCoord3PointId
The minimum sigma coordinate 3 point id.
int numberUnknownParameters() const
Returns the number of unknown parameters.
void addResidualsProbabilityDistributionObservation(double obsValue)
Adds an observation to the cumulative probability distribution of residuals used for reporting.
QVector< BundleLidarControlPointQsp > & bundleLidarControlPoints()
Returns a reference to the BundleLidarControlPoint vector.
int m_numberImageParameters
number of image parameters
double m_sigma0
std deviation of unit weight
int numberImageParameters() const
Returns the total number of image parameters.
QList< Statistics > rmsLidarImageLineResiduals() const
Returns the list of RMS image lidar line residuals statistics.
int m_maximumLikelihoodIndex
This count keeps track of which stage of the maximum likelihood adjustment the bundle is currently on...
QList< Statistics > m_rmsImageLineResiduals
List of RMS image line residual statistics for each image in the bundle
int numberMaximumLikelihoodModels() const
Returns how many maximum likelihood models were used in the bundle adjustment.
StatCumProbDistDynCalc * m_cumProRes
This class keeps track of the cumulative probability distribution of residuals (in unweighted pixels)...
void setNumberLidarRangeConstraints(int numberLidarRangeConstraints)
Sets the total number of lidar range constraints.
int maximumLikelihoodModelIndex() const
Returns which step the bundle adjustment is on.
LidarDataQsp outputLidarData() const
Returns a shared pointer to the output LidarData object.
int m_numberConstrainedPointParameters
number of constrained point parameters
int m_numberConstrainedLidarPointParameters
lidar points
int m_numberRejectedObservations
number of rejected image coordinate observations
int numberHeldImages() const
Returns the number of 'held' images.
double sigmaCoord2StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 2.
StatCumProbDistDynCalc * m_cumPro
This class will be used to calculate the cumulative probability distribution of |R^2 residuals|,...
int m_numberObservations
number of image coordinate observations
void setRejectionLimit(double rejectionLimit)
Sets the rejection limit.
Distance minSigmaCoord3Distance() const
Returns the minimum sigma distance for coordinate 3.
int numberLidarImageObservations() const
Returns the number of lidar observations.
void incrementNumberConstrainedTargetParameters(int incrementAmount)
Increases the number of constrained target parameters.
QVector< BundleControlPointQsp > m_bundleControlPoints
The vector of BundleControlPoints from BundleAdjust.
void setOutputLidarData(LidarDataQsp outLidarData)
Sets the output LidarData object.
double m_rmsSigmaCoord2Stats
rms of adjusted Longitude sigmas
void setNumberImageObservations(int numberObservations)
Sets the number of photogrammetric image observations.
void setRmsImageResidualLists(QList< Statistics > rmsImageLineResiduals, QList< Statistics > rmsImageSampleResiduals, QList< Statistics > rmsImageResiduals)
Sets the root mean square image residual Statistics lists.
double maximumLikelihoodMedianR2Residuals() const
Returns the median of the |R^2 residuals|.
int numberFixedPoints() const
Returns the number of 'fixed' (ground) points.
QString maxSigmaCoord1PointId() const
Returns the maximum sigma point id for coordinate 1.
int numberImageObservations() const
Returns the number of observations.
LidarDataQsp m_outLidarData
Output lidar data from BundleAdjust.
void setNumberLidarImageObservations(int numberLidarObservations)
Sets the number of lidar observations.
void resetNumberConstrainedPointParameters()
Resets the number of contrained point parameters to 0.
void setNumberImageParameters(int numberParameters)
Sets the number of image parameters.
int numberConstrainedTargetParameters() const
Return the number of constrained target parameters.
StatCumProbDistDynCalc residualsCumulativeProbabilityDistribution() const
Returns the cumulative probability distribution of the residuals used for reporting.
double elapsedTime() const
Returns the elapsed time for the bundle adjustment.
QList< Statistics > m_rmsLidarImageLineResiduals
List of RMS lidar line residual stats for each image in the bundle
QList< Statistics > rmsImageResiduals() const
Returns the list of RMS image residuals statistics.
Distance m_maxSigmaCoord2Distance
The maximum sigma longitude distance.
QVector< Statistics > m_rmsImageRASigmas
< The root mean square image right ascension sigmas.
const BundleObservationVector & observations() const
Returns a reference to the observations used by the BundleAdjust.
Distance m_minSigmaCoord3Distance
The minimum sigma radius distance.
ControlNetQsp m_outNet
The output control net from BundleAdjust.
void initialize()
Initializes the BundleResults to a default state where all numeric members are set to 0 or another de...
Distance minSigmaCoord1Distance() const
Returns the minimum sigma distance for coordinate 1.
void setNumberUnknownParameters(int numberParameters)
Sets the total number of parameters to solve for.
void setSigmaCoord3Range(Distance minCoord3Dist, Distance maxCoord3Dist, QString minCoord3PointId, QString maxCoord3PointId)
Sets the min and max sigma distances and point ids for coordinate 3.
QString minSigmaCoord3PointId() const
Returns the minimum sigma point id for coordinate 3.
void setNumberConstrainedLidarPointParameters(int numberParameters)
Set number of contrained point parameters.
double rmsRx() const
Returns the RMS of the x residuals.
void setObservations(BundleObservationVector observations)
Sets the vector of BundleObservations.
void initializeResidualsProbabilityDistribution(unsigned int nodes=20)
Initializes or resets the cumulative probability distribution of residuals used for reporting.
void setRmsFromSigmaStatistics(double rmsFromSigmaCoord1Stats, double rmsFromSigmaCoord2Stats, double rmsFromSigmaCoord3Stats)
Sets the root mean square values of the adjusted sigmas for all three coordinates.
void setRmsXYResiduals(double rx, double ry, double rxy)
Sets the root mean square of the x and y residuals.
QList< Statistics > rmsImageLineResiduals() const
Returns the list of RMS image line residuals statistics.
double m_elapsedTime
elapsed time for bundle
double m_elapsedTimeErrorProp
elapsed time for error propagation
QVector< Statistics > rmsImageRASigmas() const
Returns the list of RMS image right ascension sigma statistics.
void setNumberObservations(int numberObservations)
Sets the number of observations.
int numberLidarRangeConstraintEquations() const
Return the number of lidar range constraint equations.
QVector< Statistics > rmsImageXSigmas() const
Returns the list of RMS image x sigma statistics.
void printMaximumLikelihoodTierInformation()
Prints out information about which tier the solution is in and the status of the residuals.
BundleResults & operator=(const BundleResults &src)
Assignment operator for BundleResults.
void resizeSigmaStatisticsVectors(int numberImages)
Resizes all image sigma vectors.
CorrelationMatrix * m_correlationMatrix
The correlation matrix from the BundleAdjust.
void setDegreesOfFreedom(double degreesOfFreedom)
Sets the degrees of freedom.
Distance m_minSigmaCoord1Distance
The minimum sigma latitude distance.
Distance maxSigmaCoord3Distance() const
Returns the maximum sigma distance for coordinate 3.
Distance maxSigmaCoord1Distance() const
Returns the maximum sigma distance for coordinate 1.
double m_rmsYResiduals
rms of y residuals
QString m_maxSigmaCoord2PointId
The maximum sigma coordinate2 point id.
QList< QPair< MaximumLikelihoodWFunctions, double > > m_maximumLikelihoodFunctions
< The maximum likelihood models and their quantiles.
void setCorrMatCovFileName(FileName name)
Set the covariance file name for the matrix used to calculate the correlation matrix.
QString m_maxSigmaCoord3PointId
The maximum sigma coordinate 3 point id.
QList< Statistics > m_rmsImageSampleResiduals
List of RMS image sample residual statistics for each image in the bundle
QVector< Statistics > rmsImageTWISTSigmas() const
Returns the list of RMS image twist sigma statistics.
void setRmsLidarImageResidualLists(QList< Statistics > rmsLidarImageLineResiduals, QList< Statistics > rmsLidarImageSampleResiduals, QList< Statistics > rmsLidarImageResiduals)
Sets the root mean square lidar image residual Statistics lists.
QString maxSigmaCoord3PointId() const
Returns the maximum sigma point id for coordinate 3.
void computeSigma0(double dvtpv, BundleSettings::ConvergenceCriteria criteria)
Computes the sigma0 and stores it internally.
QList< Statistics > m_rmsImageResiduals
RMS image sample and line residual statistics for each image in the bundle
QString maxSigmaCoord2PointId() const
Returns the maximum sigma point id for coordinate 2.
int numberConstrainedImageParameters() const
Returns the number of constrained image parameters.
void setElapsedTimeErrorProp(double time)
Sets the elapsed time for error propegation.
QVector< Statistics > rmsImageZSigmas() const
Returns the list of RMS image z sigma statistics.
QList< Statistics > rmsLidarImageResiduals() const
Returns the list of RMS image lidar residuals statistics.
int m_numberHeldImages
number of 'held' images (define)
double sigmaCoord1StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 1.
void setConverged(bool converged)
Sets if the bundle adjustment converged.
Distance minSigmaCoord2Distance() const
Returns the minimum sigma distance for coordinate 2.
void resetNumberConstrainedTargetParameters()
Resets the number of constrained target parameters to 0.
double m_rmsSigmaCoord1Stats
rms of adjusted Latitude sigmas
StatCumProbDistDynCalc cumulativeProbabilityDistribution() const
Returns the cumulative probability distribution of the |R^2 residuals|.
int degreesOfFreedom() const
Returns the degrees of freedom.
QVector< Statistics > m_rmsImageDECSigmas
< The root mean square image declination sigmas.
ConvergenceCriteria
This enum defines the options for the bundle adjustment's convergence.
@ ParameterCorrections
All parameter corrections will be used to determine that the bundle adjustment has converged.
This is a container for the correlation matrix that comes from a bundle adjust.
void setCovarianceFileName(FileName covarianceFileName)
Set the qmap of images and parameters.
void setImagesAndParameters(QMap< QString, QStringList > imagesAndParameters)
Set the qmap of images and parameters.
void setCorrelationFileName(FileName correlationFileName)
Set the qmap of images and parameters.
Distance measurement, usually in meters.
Definition Distance.h:34
void setMeters(double distanceInMeters)
Set the distance in meters.
Definition Distance.cpp:96
File name manipulation and expansion.
Definition FileName.h:100
Isis exception class.
Definition IException.h:91
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition IException.h:118
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition IException.h:146
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition IException.h:155
Adds specific functionality to C++ strings.
Definition IString.h:165
Class provides maximum likelihood estimation functions for robust parameter estimation,...
static QString modelToString(Model model)
Static method to return a string represtentation for a given MaximumLikelihoodWFunctions::Model enum.
The main project for ipce.
Definition Project.h:287
This class is used to approximate cumulative probibility distributions of a stream of observations wi...
double value(double cumProb)
Provides the value of the variable that has the given cumulative probility (according the current est...
void addObs(double obs)
Values for the estimated quantile positions are update as observations are added.
This class is used to accumulate statistics on double arrays.
Definition Statistics.h:93
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
@ Latitudinal
Planetocentric latitudinal (lat/lon/rad) coordinates.
@ Rectangular
Body-fixed rectangular x/y/z coordinates.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition IString.cpp:211
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition IString.cpp:93
bool toBool(const QString &string)
Global function to convert from a string to a boolean.
Definition IString.cpp:38