Isis Developer Reference
BundleControlPoint.h
Go to the documentation of this file.
1#ifndef BundleControlPoint_h
2#define BundleControlPoint_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QVector>
13
14#include <QSharedPointer>
15
16#include "BundleMeasure.h"
17#include "BundleSettings.h"
18#include "ControlPoint.h"
19#include "SparseBlockMatrix.h"
20#include "SurfacePoint.h"
21
22namespace Isis {
23
24 class ControlMeasure;
25 class LinearAlgebra;
27
91 class BundleControlPoint : public QVector<BundleMeasureQsp> {
92
93 public:
94 // default constructor
96 ControlPoint *point);
97 // copy constructor
99
100 //destructor
101 virtual ~BundleControlPoint();
102
103 // equals operator
104 BundleControlPoint &operator=(const BundleControlPoint &src);// ??? not implemented
105
106 // copy method
107 void copy(const BundleControlPoint &src);
108
109 // mutators
111 void computeResiduals();
112 void setAdjustedSurfacePoint(SurfacePoint surfacePoint);
113 void setNumberOfRejectedMeasures(int numRejected);
114 void setRejected(bool reject);
115 void setWeights(const BundleSettingsQsp settings);
116 void setSigmaWeightFromGlobals(double gSigma, int index);
117 void setSigmaWeightFromGlobals(double gSigma, int index, double cFactor);
119 void productAlphaAV(double alpha,
120 SparseBlockMatrix &sparseNormals,
121 // boost::numeric::ublas::bounded_vector< double, 3 > &v2,
122 // SparseBlockRowMatrix &Q,
124 virtual void applyParameterCorrections(LinearAlgebra::Vector imageSolution,
125 SparseBlockMatrix &sparseNormals,
126 const BundleTargetBodyQsp target);
127 double vtpv();
128 double vtpvMeasures();
129
130 // accessors
132 bool isRejected() const;
133 int numberOfMeasures() const;
134 int numberOfRejectedMeasures() const;
135 double residualRms() const;
137 QString id() const;
141 boost::numeric::ublas::bounded_vector< double, 3 > &corrections();
142 boost::numeric::ublas::bounded_vector< double, 3 > &aprioriSigmas();
143 boost::numeric::ublas::bounded_vector< double, 3 > &adjustedSigmas();
144 boost::numeric::ublas::bounded_vector< double, 3 > &weights();
145 boost::numeric::ublas::bounded_vector<double, 3> &nicVector();
147
148 // string format methods
149 QString formatBundleOutputSummaryString(bool errorPropagation) const;
150 QString formatBundleOutputDetailString(bool errorPropagation, bool solveRadius=false) const;
151 QString formatBundleLatitudinalOutputDetailString(bool errorPropagation,
152 bool solveRadius=false) const;
153 QString formatBundleRectangularOutputDetailString(bool errorPropagation) const;
154 QString formatValue(double value, int fieldWidth, int precision) const;
155 QString formatAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth,
156 int precision, bool solveRadius=false) const;
157 QString formatCoordAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth,
158 int precision, bool solveRadius=false) const;
159 QString formatAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision,
160 bool errorPropagation) const;
161 QString formatCoordAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision,
162 bool errorPropagation) const;
163
164 protected:
167
168 private:
169 // methods
170 void updateAdjustedSurfacePointLatitudinally(const BundleTargetBodyQsp target);
171 void updateAdjustedSurfacePointRectangularly();
172
174 boost::numeric::ublas::bounded_vector< double, 3 > m_corrections;
176 boost::numeric::ublas::bounded_vector< double, 3 > m_aprioriSigmas;
178 boost::numeric::ublas::bounded_vector< double, 3 > m_adjustedSigmas;
180 boost::numeric::ublas::bounded_vector< double, 3 > m_weights;
182 boost::numeric::ublas::bounded_vector<double, 3> m_nicVector;
184 SparseBlockRowMatrix m_cholmodQMatrix;
186 SurfacePoint::CoordinateType m_coordTypeReports;
187 SurfacePoint::CoordinateType m_coordTypeBundle;
188 };
189
190 // typedefs
192 typedef QSharedPointer<BundleControlPoint> BundleControlPointQsp;
193}
194
195#endif // BundleControlPoint_h
This class holds information about a control point that BundleAdjust needs to run correctly.
Definition BundleControlPoint.h:91
QString formatValue(double value, int fieldWidth, int precision) const
Formats the given double precision value using the specified field width and precision.
Definition BundleControlPoint.cpp:976
double residualRms() const
Gets the root-mean-square (rms) of the BundleControlPoint's residuals.
Definition BundleControlPoint.cpp:474
void setNumberOfRejectedMeasures(int numRejected)
Sets the number of rejected measures for this BundleControlPoint.
Definition BundleControlPoint.cpp:167
SparseBlockRowMatrix & cholmodQMatrix()
Accesses the CholMod matrix associated with this BundleControlPoint.
Definition BundleControlPoint.cpp:602
virtual void applyParameterCorrections(LinearAlgebra::Vector imageSolution, SparseBlockMatrix &sparseNormals, const BundleTargetBodyQsp target)
Apply the parameter corrections to the bundle control point.
Definition BundleControlPoint.cpp:395
QString formatBundleOutputDetailString(bool errorPropagation, bool solveRadius=false) const
Formats a detailed output string table for this BundleControlPoint.
Definition BundleControlPoint.cpp:668
SurfacePoint::CoordinateType coordTypeReports() const
Accesses BundleControlPoint's coordinate type for reports.
Definition BundleControlPoint.cpp:520
void setRejected(bool reject)
Sets this BundleControlPoint to rejected or not rejected.
Definition BundleControlPoint.cpp:179
QString formatBundleRectangularOutputDetailString(bool errorPropagation) const
Formats a detailed output string table for this Rectangular BundleControlPoint.
Definition BundleControlPoint.cpp:851
virtual ~BundleControlPoint()
Destructor for BundleControlPoint.
Definition BundleControlPoint.cpp:85
BundleControlPoint(BundleSettingsQsp bundleSettings, ControlPoint *point)
Constructs a BundleControlPoint object from a ControlPoint.
Definition BundleControlPoint.cpp:33
void productAlphaAV(double alpha, SparseBlockMatrix &sparseNormals, LinearAlgebra::Vector &v1)
Perform the matrix multiplication v2 = alpha ( Q x v1 ).
Definition BundleControlPoint.cpp:367
int numberOfRejectedMeasures() const
Accesses the number of rejected measures for this BundleControlPoint.
Definition BundleControlPoint.cpp:462
QString formatBundleLatitudinalOutputDetailString(bool errorPropagation, bool solveRadius=false) const
Formats a detailed output string table for this Latitudinal BundleControlPoint.
Definition BundleControlPoint.cpp:707
double vtpvMeasures()
Compute vtpv of image measures (weighted sum of squares of measure residuals).
Definition BundleControlPoint.cpp:1193
QString formatAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth, int precision, bool solveRadius=false) const
Formats the apriori sigma value indicated by the given type code.
Definition BundleControlPoint.cpp:998
void zeroNumberOfRejectedMeasures()
Resets the number of rejected measures for this BundleControlPoint to zero.
Definition BundleControlPoint.cpp:353
BundleControlPoint & operator=(const BundleControlPoint &src)
void computeResiduals()
Computes the residuals for this BundleControlPoint.
Definition BundleControlPoint.cpp:140
SurfacePoint adjustedSurfacePoint() const
Accesses the adjusted SurfacePoint associated with this BundleControlPoint.
Definition BundleControlPoint.cpp:484
QString formatCoordAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision, bool errorPropagation) const
Formats the adjusted coordinate sigma value.
Definition BundleControlPoint.cpp:1084
SurfacePoint::CoordinateType coordTypeBundle() const
Accesses BundleControlPoint's control point coordinate type for the bundle adjustment.
Definition BundleControlPoint.cpp:533
boost::numeric::ublas::bounded_vector< double, 3 > & nicVector()
Accesses the 3 dimensional ordered NIC vector.
Definition BundleControlPoint.cpp:592
double vtpv()
Compute vtpv, the weighted sum of squares of constrained point residuals.
Definition BundleControlPoint.cpp:1221
ControlPoint::PointType type() const
Accesses BundleControlPoint's type.
Definition BundleControlPoint.cpp:507
boost::numeric::ublas::bounded_vector< double, 3 > & weights()
Accesses the 3 dimensional ordered vector of weight values associated with coordinate1,...
Definition BundleControlPoint.cpp:582
bool isRejected() const
Method used to determine whether this control point is rejected.
Definition BundleControlPoint.cpp:440
void setAdjustedSurfacePoint(SurfacePoint surfacePoint)
Sets the adjusted surface point for this BundleControlPoint.
Definition BundleControlPoint.cpp:155
ControlPoint * m_controlPoint
< pointer to the control point object this represents
Definition BundleControlPoint.h:166
QString formatAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision, bool errorPropagation) const
Formats the adjusted sigma value indicated by the given type code.
Definition BundleControlPoint.cpp:1048
void setSigmaWeightFromGlobals(double gSigma, int index, double cFactor)
QString formatCoordAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth, int precision, bool solveRadius=false) const
Formats the apriori coordinate 1 (latitude or X) sigma value.
Definition BundleControlPoint.cpp:1027
boost::numeric::ublas::bounded_vector< double, 3 > & corrections()
Accesses the 3 dimensional ordered vector of correction values associated with coord1,...
Definition BundleControlPoint.cpp:546
boost::numeric::ublas::bounded_vector< double, 3 > & aprioriSigmas()
Accesses the 3 dimensional ordered vector of apriori sigmas (apriori coordinate1, apriori coordinate2...
Definition BundleControlPoint.cpp:557
BundleMeasureQsp addMeasure(ControlMeasure *controlMeasure)
Creates a BundleMeasure from the given ControlMeasure and appends it to this BundleControlPoint's mea...
Definition BundleControlPoint.cpp:125
void copy(const BundleControlPoint &src)
Copies given BundleControlPoint to this BundleControlPoint.
Definition BundleControlPoint.cpp:94
boost::numeric::ublas::bounded_vector< double, 3 > & adjustedSigmas()
Accesses the 3 dimensional ordered vector of adjusted sigmas (adjusted coordinate1,...
Definition BundleControlPoint.cpp:571
void setWeights(const BundleSettingsQsp settings)
Sets the weights using the given BundleSettings QSharedPointer and a conversion value for meters to r...
Definition BundleControlPoint.cpp:191
QString formatBundleOutputSummaryString(bool errorPropagation) const
Formats an output summary string for this BundleControlPoint.
Definition BundleControlPoint.cpp:621
void setSigmaWeightFromGlobals(double gSigma, int index)
Sets the member sigmas and weights from a global sigma.
Definition BundleControlPoint.cpp:288
int numberOfMeasures() const
Accesses number of measures associated with this BundleControlPoint.
Definition BundleControlPoint.cpp:450
ControlPoint * rawControlPoint() const
Accessor for the raw ControlPoint object used for this BundleControlPoint.
Definition BundleControlPoint.cpp:430
QString id() const
Accesses the Point ID associated with this BundleControlPoint.
Definition BundleControlPoint.cpp:494
a control measurement
Definition ControlMeasure.h:175
A single control point.
Definition ControlPoint.h:356
PointType
These are the valid 'types' of point.
Definition ControlPoint.h:366
This class holds all static methods to perform linear algebra operations on vectors and matrices.
Definition LinearAlgebra.h:91
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
Definition LinearAlgebra.h:132
SparseBlockMatrix.
Definition SparseBlockMatrix.h:186
SparseBlockRowMatrix.
Definition SparseBlockMatrix.h:125
This class defines a body-fixed surface point.
Definition SurfacePoint.h:132
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
Definition SurfacePoint.h:139
CoordIndex
Definition SurfacePoint.h:149
This is free and unencumbered software released into the public domain.
Definition Calculator.h:18
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QSharedPointer< BundleControlPoint > BundleControlPointQsp
Definition for BundleControlPointQSP, a shared pointer to a BundleControlPoint.
Definition BundleControlPoint.h:192