Isis 3 Programmer Reference
BundleControlPoint.h
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
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;
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.
QString formatValue(double value, int fieldWidth, int precision) const
Formats the given double precision value using the specified field width and precision.
double residualRms() const
Gets the root-mean-square (rms) of the BundleControlPoint's residuals.
void setNumberOfRejectedMeasures(int numRejected)
Sets the number of rejected measures for this BundleControlPoint.
SparseBlockRowMatrix & cholmodQMatrix()
Accesses the CholMod matrix associated with this BundleControlPoint.
virtual void applyParameterCorrections(LinearAlgebra::Vector imageSolution, SparseBlockMatrix &sparseNormals, const BundleTargetBodyQsp target)
Apply the parameter corrections to the bundle control point.
QString formatBundleOutputDetailString(bool errorPropagation, bool solveRadius=false) const
Formats a detailed output string table for this BundleControlPoint.
SurfacePoint::CoordinateType coordTypeReports() const
Accesses BundleControlPoint's coordinate type for reports.
void setRejected(bool reject)
Sets this BundleControlPoint to rejected or not rejected.
boost::numeric::ublas::bounded_vector< double, 3 > m_nicVector
array of NICs (see Brown, 1976)
QString formatBundleRectangularOutputDetailString(bool errorPropagation) const
Formats a detailed output string table for this Rectangular BundleControlPoint.
void updateAdjustedSurfacePointRectangularly()
Apply the parameter corrections to the bundle control point rectangularly.
virtual ~BundleControlPoint()
Destructor for BundleControlPoint.
BundleControlPoint(BundleSettingsQsp bundleSettings, ControlPoint *point)
Constructs a BundleControlPoint object from a ControlPoint.
void productAlphaAV(double alpha, SparseBlockMatrix &sparseNormals, LinearAlgebra::Vector &v1)
Perform the matrix multiplication v2 = alpha ( Q x v1 ).
int numberOfRejectedMeasures() const
Accesses the number of rejected measures for this BundleControlPoint.
QString formatBundleLatitudinalOutputDetailString(bool errorPropagation, bool solveRadius=false) const
Formats a detailed output string table for this Latitudinal BundleControlPoint.
void updateAdjustedSurfacePointLatitudinally(const BundleTargetBodyQsp target)
Apply the parameter corrections to the bundle control point latitudinally.
double vtpvMeasures()
Compute vtpv of image measures (weighted sum of squares of measure residuals).
QString formatAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth, int precision, bool solveRadius=false) const
Formats the apriori sigma value indicated by the given type code.
boost::numeric::ublas::bounded_vector< double, 3 > m_corrections
corrections to point parameters
void zeroNumberOfRejectedMeasures()
Resets the number of rejected measures for this BundleControlPoint to zero.
void computeResiduals()
Computes the residuals for this BundleControlPoint.
SurfacePoint adjustedSurfacePoint() const
Accesses the adjusted SurfacePoint associated with this BundleControlPoint.
QString formatCoordAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision, bool errorPropagation) const
Formats the adjusted coordinate sigma value.
SurfacePoint::CoordinateType coordTypeBundle() const
Accesses BundleControlPoint's control point coordinate type for the bundle adjustment.
boost::numeric::ublas::bounded_vector< double, 3 > & nicVector()
Accesses the 3 dimensional ordered NIC vector.
double vtpv()
Compute vtpv, the weighted sum of squares of constrained point residuals.
ControlPoint::PointType type() const
Accesses BundleControlPoint's type.
boost::numeric::ublas::bounded_vector< double, 3 > & weights()
Accesses the 3 dimensional ordered vector of weight values associated with coordinate1,...
bool isRejected() const
Method used to determine whether this control point is rejected.
void setAdjustedSurfacePoint(SurfacePoint surfacePoint)
Sets the adjusted surface point for this BundleControlPoint.
boost::numeric::ublas::bounded_vector< double, 3 > m_aprioriSigmas
apriori sigmas for point parameters
ControlPoint * m_controlPoint
< pointer to the control point object this represents
QString formatAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision, bool errorPropagation) const
Formats the adjusted sigma value indicated by the given type code.
QString formatCoordAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth, int precision, bool solveRadius=false) const
Formats the apriori coordinate 1 (latitude or X) sigma value.
boost::numeric::ublas::bounded_vector< double, 3 > & corrections()
Accesses the 3 dimensional ordered vector of correction values associated with coord1,...
boost::numeric::ublas::bounded_vector< double, 3 > & aprioriSigmas()
Accesses the 3 dimensional ordered vector of apriori sigmas (apriori coordinate1, apriori coordinate2...
BundleMeasureQsp addMeasure(ControlMeasure *controlMeasure)
Creates a BundleMeasure from the given ControlMeasure and appends it to this BundleControlPoint's mea...
boost::numeric::ublas::bounded_vector< double, 3 > m_adjustedSigmas
adjusted sigmas for point parameters
void copy(const BundleControlPoint &src)
Copies given BundleControlPoint to this BundleControlPoint.
SurfacePoint::CoordinateType m_coordTypeReports
BundleControlPoint coordinate type.
boost::numeric::ublas::bounded_vector< double, 3 > & adjustedSigmas()
Accesses the 3 dimensional ordered vector of adjusted sigmas (adjusted coordinate1,...
void setWeights(const BundleSettingsQsp settings)
Sets the weights using the given BundleSettings QSharedPointer and a conversion value for meters to r...
QString formatBundleOutputSummaryString(bool errorPropagation) const
Formats an output summary string for this BundleControlPoint.
void setSigmaWeightFromGlobals(double gSigma, int index)
Sets the member sigmas and weights from a global sigma.
int numberOfMeasures() const
Accesses number of measures associated with this BundleControlPoint.
ControlPoint * rawControlPoint() const
Accessor for the raw ControlPoint object used for this BundleControlPoint.
boost::numeric::ublas::bounded_vector< double, 3 > m_weights
weights for point parameters
SparseBlockRowMatrix m_cholmodQMatrix
The CholMod matrix associated with this point.
QString id() const
Accesses the Point ID associated with this BundleControlPoint.
a control measurement
A single control point.
PointType
These are the valid 'types' of point.
This class holds all static methods to perform linear algebra operations on vectors and matrices.
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
This class defines a body-fixed surface point.
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
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.