1#include "BundleLidarControlPoint.h"
10#include <boost/lexical_cast.hpp>
11#include <boost/numeric/ublas/io.hpp>
12#include <boost/numeric/ublas/matrix_proxy.hpp>
13#include <boost/numeric/ublas/matrix_sparse.hpp>
14#include <boost/numeric/ublas/vector_proxy.hpp>
17#include "BundleLidarControlPoint.h"
18#include "BundleLidarRangeConstraint.h"
20#include "ControlMeasure.h"
24#include "SpecialPixel.h"
26using namespace boost::numeric::ublas;
45 m_lidarControlPoint = lidarControlPoint;
55 QStringList simultaneousSerialNumbers = m_lidarControlPoint->snSimultaneous();
56 for (
int i= 0; i < size(); i++) {
58 if (!simultaneousSerialNumbers.contains(measure->cubeSerialNumber())) {
103 m_lidarControlPoint->ComputeResiduals();
106 for (
int i = 0; i < size(); i++) {
107 at(i)->setFocalPlaneResidualsMillimeters();
122 for (
int i = 0; i < m_rangeConstraints.size(); i++) {
123 m_lidarControlPoint->setRange(m_rangeConstraints[i]->rangeComputed());
147 int constraintsApplied = 0;
150 for (
int i = 0; i < m_rangeConstraints.size(); i++) {
151 if (m_rangeConstraints.at(i)->applyConstraint(normalsMatrix, N22, N12, n1, n2)) {
152 constraintsApplied++;
156 return constraintsApplied;
168 for (
int i = 0; i < m_rangeConstraints.size(); i++) {
169 vtpv += m_rangeConstraints.at(i)->vtpv();
183 return m_rangeConstraints.size();
196 return m_rangeConstraints.at(n);
207 return m_lidarControlPoint->range();
218 return m_lidarControlPoint->sigmaRange();
This class holds information about a control point that BundleAdjust needs to run correctly.
virtual void applyParameterCorrections(LinearAlgebra::Vector imageSolution, SparseBlockMatrix &sparseNormals, const BundleTargetBodyQsp target)
Apply the parameter corrections to the bundle control point.
double vtpv()
Compute vtpv, the weighted sum of squares of constrained point residuals.
void copy(const BundleControlPoint &src)
Copies given BundleControlPoint to this BundleControlPoint.
This class holds information about a lidar control point that BundleAdjust requires.
int applyLidarRangeConstraints(SparseBlockMatrix &normalsMatrix, LinearAlgebra::MatrixUpperTriangular &N22, SparseBlockColumnMatrix &N12, LinearAlgebra::VectorCompressed &n1, LinearAlgebra::Vector &n2)
Applies range constraint between image and lidar point acquired simultaneously.
BundleLidarControlPoint(BundleSettingsQsp bundleSettings, LidarControlPointQsp lidarControlPoint)
Constructs a BundleLidarControlPoint object from a LidarControlPoint.
BundleLidarRangeConstraintQsp rangeConstraint(int n)
Returns range constraint at index n.
int numberRangeConstraints()
Returns number of range constraints between this lidar point & images acquired simultaneously.
void computeResiduals()
Computes the residuals for this BundleLidarControlPoint.
virtual void applyParameterCorrections(LinearAlgebra::Vector imageSolution, SparseBlockMatrix &sparseNormals, const BundleTargetBodyQsp target)
Apply the parameter corrections to the lidar range.
double range()
Returns range between this point and ???
void copy(const BundleLidarControlPoint &src)
Copies given BundleLidarControlPoint to this BundleLidarControlPoint.
void initializeRangeConstraints()
Initialize range constraints.
~BundleLidarControlPoint()
TODO: implement? Copy constructor.
double vtpvRangeContribution()
Returns Weighted sum of squares of range residuals for this point.
double sigmaRange()
Returns sigma of observed range.
Implements range constraint between image position and lidar point acquired simultaneously with the i...
boost::numeric::ublas::compressed_vector< double > VectorCompressed
Definition for an Isis::LinearAlgebra::VectorCompressed of doubles.
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > MatrixUpperTriangular
Definition for an Isis::LinearAlgebra::MatrixUpperTriangular of doubles with an upper configuration.
This is free and unencumbered software released into the public domain.
QSharedPointer< BundleLidarRangeConstraint > BundleLidarRangeConstraintQsp
Typdef for BundleLidarRangeConstraint QSharedPointer.