Isis 3 Programmer Reference
BundleControlPoint.h
Go to the documentation of this file.
1 #ifndef BundleControlPoint_h
2 #define BundleControlPoint_h
3 
26 #include <QVector>
27 
28 #include <QSharedPointer>
29 
30 #include "BundleMeasure.h"
31 #include "BundleSettings.h"
32 #include "ControlPoint.h"
33 #include "SparseBlockMatrix.h"
34 #include "SurfacePoint.h"
35 
36 namespace Isis {
37 
38  class ControlMeasure;
39  class LinearAlgebra;
40  class SparseBlockMatrix;
41 
105  class BundleControlPoint : public QVector<BundleMeasureQsp> {
106 
107  public:
108  // default constructor
109  BundleControlPoint(BundleSettingsQsp bundleSettings,
110  ControlPoint *point);
111  // copy constructor
113 
114  //destructor
116 
117  // equals operator
118  BundleControlPoint &operator=(const BundleControlPoint &src);// ??? not implemented
119 
120  // copy method
121  void copy(const BundleControlPoint &src);
122 
123  // mutators
124  BundleMeasureQsp addMeasure(ControlMeasure *controlMeasure);
125  void computeResiduals();
126  void setAdjustedSurfacePoint(SurfacePoint surfacePoint);
127  void setNumberOfRejectedMeasures(int numRejected);
128  void setRejected(bool reject);
129  void setWeights(const BundleSettingsQsp settings);
130  void setSigmaWeightFromGlobals(double gSigma, int index);
131  void setSigmaWeightFromGlobals(double gSigma, int index, double cFactor);
133  void productAlphaAV(double alpha,
134  SparseBlockMatrix &sparseNormals,
135  // boost::numeric::ublas::bounded_vector< double, 3 > &v2,
136  // SparseBlockRowMatrix &Q,
139  SparseBlockMatrix &sparseNormals, const BundleTargetBodyQsp target);
140 
141  // accessors
142  ControlPoint *rawControlPoint() const;
143  bool isRejected() const;
144  int numberOfMeasures() const;
145  int numberOfRejectedMeasures() const;
146  double residualRms() const;
148  QString id() const;
152  boost::numeric::ublas::bounded_vector< double, 3 > &corrections();
153  boost::numeric::ublas::bounded_vector< double, 3 > &aprioriSigmas();
154  boost::numeric::ublas::bounded_vector< double, 3 > &adjustedSigmas();
155  boost::numeric::ublas::bounded_vector< double, 3 > &weights();
156  boost::numeric::ublas::bounded_vector<double, 3> &nicVector();
158 
159  // string format methods
160  QString formatBundleOutputSummaryString(bool errorPropagation) const;
161  QString formatBundleOutputDetailString(bool errorPropagation, bool solveRadius=false) const;
162  QString formatBundleLatitudinalOutputDetailString(bool errorPropagation,
163  bool solveRadius=false) const;
164  QString formatBundleRectangularOutputDetailString(bool errorPropagation) const;
165  QString formatValue(double value, int fieldWidth, int precision) const;
166  QString formatAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth,
167  int precision, bool solveRadius=false) const;
168  QString formatCoordAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth,
169  int precision, bool solveRadius=false) const;
170  QString formatAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision,
171  bool errorPropagation) const;
172  QString formatCoordAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision,
173  bool errorPropagation) const;
174 
175  private:
176  // methods
179 
181  ControlPoint *m_controlPoint;
182 
184  boost::numeric::ublas::bounded_vector< double, 3 > m_corrections;
186  boost::numeric::ublas::bounded_vector< double, 3 > m_aprioriSigmas;
188  boost::numeric::ublas::bounded_vector< double, 3 > m_adjustedSigmas;
190  boost::numeric::ublas::bounded_vector< double, 3 > m_weights;
192  boost::numeric::ublas::bounded_vector<double, 3> m_nicVector;
197  SurfacePoint::CoordinateType m_coordTypeBundle;
198  };
199 
200  // typedefs
203 }
204 
205 #endif // BundleControlPoint_h
206 
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:148
SparseBlockMatrix.
QString formatBundleRectangularOutputDetailString(bool errorPropagation) const
Formats a detailed output string table for this Rectangular BundleControlPoint.
ControlPoint::PointType type() const
Accesses BundleControlPoint&#39;s type.
QString formatAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision, bool errorPropagation) const
Formats the adjusted sigma value indicated by the given type code.
QString formatBundleOutputDetailString(bool errorPropagation, bool solveRadius=false) const
Formats a detailed output string table for this BundleControlPoint.
boost::numeric::ublas::bounded_vector< double, 3 > m_adjustedSigmas
adjusted sigmas for point parameters
double residualRms() const
Gets the root-mean-square (rms) of the BundleControlPoint&#39;s residuals.
BundleControlPoint(BundleSettingsQsp bundleSettings, ControlPoint *point)
Constructs a BundleControlPoint object from a ControlPoint.
SurfacePoint::CoordinateType coordTypeBundle() const
Accesses BundleControlPoint&#39;s control point coordinate type for the bundle adjustment.
QString formatAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth, int precision, bool solveRadius=false) const
Formats the apriori sigma value indicated by the given type code.
void setRejected(bool reject)
Sets this BundleControlPoint to rejected or not rejected.
BundleMeasureQsp addMeasure(ControlMeasure *controlMeasure)
Creates a BundleMeasure from the given ControlMeasure and appends it to this BundleControlPoint&#39;s mea...
void applyParameterCorrections(LinearAlgebra::Vector imageSolution, SparseBlockMatrix &sparseNormals, const BundleTargetBodyQsp target)
Apply the parameter corrections to the bundle control point.
void copy(const BundleControlPoint &src)
Copies given BundleControlPoint to this BundleControlPoint.
PointType
These are the valid &#39;types&#39; of point.
Definition: ControlPoint.h:379
void computeResiduals()
Computes the residuals for this BundleControlPoint.
boost::numeric::ublas::bounded_vector< double, 3 > & weights()
Accesses the 3 dimensional ordered vector of weight values associated with coordinate1, coordinate2, and coordinate3.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
boost::numeric::ublas::bounded_vector< double, 3 > & aprioriSigmas()
Accesses the 3 dimensional ordered vector of apriori sigmas (apriori coordinate1, apriori coordinate2...
void updateAdjustedSurfacePointRectangularly()
pointer to the control point object this represents
QString formatValue(double value, int fieldWidth, int precision) const
Formats the given double precision value using the specified field width and precision.
boost::numeric::ublas::bounded_vector< double, 3 > & adjustedSigmas()
Accesses the 3 dimensional ordered vector of adjusted sigmas (adjusted coordinate1, adjusted coordinate2, adjusted coordinate3).
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
boost::numeric::ublas::bounded_vector< double, 3 > & corrections()
Accesses the 3 dimensional ordered vector of correction values associated with coord1, coord2, and coord 3 (latitude, longitude, and radius or X, Y, and Z.
boost::numeric::ublas::bounded_vector< double, 3 > & nicVector()
Accesses the 3 dimensional ordered NIC vector.
boost::numeric::ublas::bounded_vector< double, 3 > m_nicVector
array of NICs (see Brown, 1976)
ControlPoint * rawControlPoint() const
Accessor for the raw ControlPoint object used for this BundleControlPoint.
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
void updateAdjustedSurfacePointLatitudinally(const BundleTargetBodyQsp target)
Apply the parameter corrections to the bundle control point latitudinally.
QString formatBundleLatitudinalOutputDetailString(bool errorPropagation, bool solveRadius=false) const
Formats a detailed output string table for this Latitudinal BundleControlPoint.
int numberOfRejectedMeasures() const
Accesses the number of rejected measures for this BundleControlPoint.
boost::numeric::ublas::bounded_vector< double, 3 > m_aprioriSigmas
apriori sigmas for point parameters
void zeroNumberOfRejectedMeasures()
Resets the number of rejected measures for this BundleControlPoint to zero.
void setAdjustedSurfacePoint(SurfacePoint surfacePoint)
Sets the adjusted surface point for this BundleControlPoint.
SurfacePoint::CoordinateType m_coordTypeReports
BundleControlPoint coordinate type.
boost::numeric::ublas::bounded_vector< double, 3 > m_weights
weights for point parameters
This class holds information about a control point that BundleAdjust needs to run correctly...
~BundleControlPoint()
Destructor for BundleControlPoint.
A single control point.
Definition: ControlPoint.h:369
boost::numeric::ublas::bounded_vector< double, 3 > m_corrections
corrections to point parameters
void productAlphaAV(double alpha, SparseBlockMatrix &sparseNormals, LinearAlgebra::Vector &v1)
Perform the matrix multiplication v2 = alpha ( Q x v1 ).
SurfacePoint::CoordinateType coordTypeReports() const
Accesses BundleControlPoint&#39;s coordinate type for reports.
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
Definition: SurfacePoint.h:155
QString formatCoordAdjustedSigmaString(SurfacePoint::CoordIndex, int fieldWidth, int precision, bool errorPropagation) const
Formats the adjusted coordinate sigma value.
SurfacePoint adjustedSurfacePoint() const
Accesses the adjusted SurfacePoint associated with this BundleControlPoint.
int numberOfMeasures() const
Accesses number of measures associated with this BundleControlPoint.
This class holds all static methods to perform linear algebra operations on vectors and matrices...
void setSigmaWeightFromGlobals(double gSigma, int index)
Sets the member sigmas and weights from a global sigma.
QString id() const
Accesses the Point ID associated with this BundleControlPoint.
QString formatCoordAprioriSigmaString(SurfacePoint::CoordIndex index, int fieldWidth, int precision, bool solveRadius=false) const
Formats the apriori coordinate 1 (latitude or X) sigma value.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
QString formatBundleOutputSummaryString(bool errorPropagation) const
Formats an output summary string for this BundleControlPoint.
SparseBlockRowMatrix m_cholmodQMatrix
The CholMod matrix associated with this point.
a control measurement
bool isRejected() const
Method used to determine whether this control point is rejected.
QSharedPointer< BundleControlPoint > BundleControlPointQsp
Definition for BundleControlPointQSP, a shared pointer to a BundleControlPoint.
void setWeights(const BundleSettingsQsp settings)
Sets the weights using the given BundleSettings QSharedPointer and a conversion value for meters to r...
void setNumberOfRejectedMeasures(int numRejected)
Sets the number of rejected measures for this BundleControlPoint.
SparseBlockRowMatrix & cholmodQMatrix()
Accesses the CholMod matrix associated with this BundleControlPoint.
SparseBlockRowMatrix.