Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add seven new files for Multi-point capabilities. GAS/3.0.4 #24

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
863 changes: 863 additions & 0 deletions MPRGWrapper.cpp

Large diffs are not rendered by default.

1,073 changes: 1,073 additions & 0 deletions MPRGWrapper.h

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions MultiPointCloudGM.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//##############################################################################
//
// FILENAME: MultiPointCloudGM.cpp
//
// CLASSIFICATION: Unclassified
//
// DESCRIPTION:
//
//
//
// LIMITATIONS: None
//
//
// SOFTWARE HISTORY:
// Date Author Comment
// ----------- ------ -------
// 09-Nov-20221 EJR Initial version.
//
// NOTES:
//
//##############################################################################

#define CSM_LIBRARY

#include "MultiPointCloudGM.h"

namespace csm
{
//*****************************************************************************
// MultiPointCloudGM::~MultiPointCloudGM
//*****************************************************************************
MultiPointCloudGM::~MultiPointCloudGM()
{}

//*****************************************************************************
// MultiPointCloudGM::getFamily()
//*****************************************************************************
std::string MultiPointCloudGM::getFamily() const
{
return (PointCloudGM::getFamily() + CSM_MPR_FAMILY);
}
}
238 changes: 238 additions & 0 deletions MultiPointCloudGM.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
//#############################################################################
//
// FILENAME: MultiPointCloudGM.h
//
// CLASSIFICATION: Unclassified
//
// DESCRIPTION:
//
//
//
// LIMITATIONS: None
//
//
// SOFTWARE HISTORY:
// Date Author Comment
// ----------- ------ -------
// 31-Dec-2021 EJR Initial version.
//
// NOTES:
//
//#############################################################################

#ifndef __CSM_MULTI_POINTCLOUDGM_H
#define __CSM_MULTI_POINTCLOUDGM_H

#include "PointCloudGM.h"
#include "csmPointCloud.h"
#include "csmMultiPoint.h"

#define CSM_POINTCLOUD_FAMILY "PointCloud"

namespace csm {

class CorrelationModel;

class CSM_EXPORT_API MultiPointCloudGM : public PointCloudGM {

public:
MultiPointCloudGM() {};
virtual std::string getFamily() const;

// destructor implementation is needed so there will be something to call when derived
// classes are destroyed.
virtual ~MultiPointCloudGM();
//> This method returns the Family ID for the current model.
//<


virtual MultiModelCoord multiGroundToModel(MultiEcefCoord& groundPts,
double desiredPrecision = 0.001,
MultiDbl* achievedPrecisions = NULL,
WarningList* warnings = NULL) const = 0;
//> This method converts the given vector of groundPt (x,y,z in ECEF meters) to a
// returned vector of model coordinates (m0,m1,m2 in the model's coordinate
// space).
//
// Iterative algorithms will use desiredPrecision, in meters, as the
// convergence criterion, otherwise it will be ignored.
//
// If a non-NULL vector of achievedPrecision arguments are received, it will be
// populated with the actual precisions, in meters, achieved by iterative
// algorithms and 0.0 for deterministic algorithms.
//
// If a non-NULL warnings argument is received, it will be populated
// as applicable.
//<


virtual std::vector<ModelCoordCovar> multiGroundToModel(MultiEcefCoordCovar& groundPts,
double desiredPrecision = 0.001,
MultiDbl* achievedPrecisions = NULL,
WarningList* warnings = NULL) const = 0;
//> This method converts the given vector of groundPts (x,y,z in ECEF meters and
// corresponding 3x3 covariance in ECEF meters squared) to a returned
// vector of model coordinates with covariance (m0,m1,m2 in the model's
// coordinate space and corresponding 3x3 covariance).
//
// Iterative algorithms will use desiredPrecision, in meters, as the
// convergence criterion, otherwise it will be ignored.
//
// If a non-NULL vector of achievedPrecision arguments is received, it will be
// populated with the actual precision, in meters, achieved by iterative
// algorithms and 0.0 for deterministic algorithms.
//
// If a non-NULL warnings argument is received, it will be populated
// as applicable.
//<

virtual MultiEcefCoord multiModelToGround(MultiModelCoord& modelPts,
double desiredPrecision = 0.001,
MultiDbl* achievedPrecision = NULL,
WarningList* warnings = NULL) const = 0;
//> This method converts the given vector of modelPts (m0,m1,m2 in model
// coordinates) to a returned vector of ground coordinates (x,y,z in ECEF meters).
//
// Iterative algorithms will use desiredPrecision, in meters, as the
// convergence criterion, otherwise it will be ignored.
//
// If a non-NULL vector of achievedPrecision arguments is received, it will be
// populated with the actual precision, in meters, achieved by iterative
// algorithms and 0.0 for deterministic algorithms.
//
// If a non-NULL warnings argument is received, it will be populated
// as applicable.
//<

virtual MultiEcefCoordCovar multiModelToGround(MultiModelCoordCovar& modelPts,
double desiredPrecision = 0.001,
MultiDbl* achievedPrecisions = NULL,
WarningList* warnings = NULL) const = 0;
//> This method converts the given vector of modelPts (m0,m1,m2 in model
// coordinates) and corresponding 3x3 covariance to a returned vector of ground
// coordinates with covariance (x,y,z in ECEF meters and corresponding
// 3x3 covariance in ECEF meters squared).
//
// Iterative algorithms will use desiredPrecision, in meters, as the
// convergence criterion, otherwise it will be ignored.
//
// If a non-NULL vector of achievedPrecision arguments is received, it will be
// populated with the actual precision, in meters, achieved by iterative
// algorithms and 0.0 for deterministic algorithms.
//
// If a non-NULL warnings argument is received, it will be populated
// as applicable.
//<

//---
// Uncertainty Propagation
//---

//> This type is used to hold the partial derivatives of model
// coordinates m0, m1, and m2, respectively, with respect to a model
// parameter.
//<


virtual std::vector<csm::PointCloudGM::SensorPartials> multiComputeSensorPartials(int index,
MultiEcefCoord& groundPts,
double desiredPrecision = 0.001,
MultiDbl* achievedPrecision = NULL,
WarningList* warnings = NULL) const = 0;
//>
// This is the multi-point version of ComputeSensorPartials that takes EcefCoord input.
//<

virtual std::vector<csm::PointCloudGM::SensorPartials> multiComputeSensorPartials(int index,
const MultiModelCoord& modelPts,
MultiEcefCoord& groundPts,
double desiredPrecision = 0.001,
MultiDbl* achievedPrecision = NULL,
WarningList* warnings = NULL) const = 0;
//>
// This is the multi-point version of ComputeSensorPartials that takes all forms of input
// ground points for efficiency.
//<

virtual std::vector<ModelPartialsVctr> multiComputeAllSensorPartials(const
MultiEcefCoord& groundPts,
param::Set pSet = param::VALID,
double desiredPrecision = 0.001,
MultiDbl* achievedPrecision = NULL,
WarningList* warnings = NULL) const=0;
//>
// This is the multi-point version of ComputeAllSensorPartials that takes EcefCoord input.
//<

virtual std::vector<ModelPartialsVctr> multiComputeAllSensorPartials(const
MultiModelCoord& modelPts,
const std::vector<EcefCoord>& groundPts,
param::Set pSet = param::VALID,
double desiredPrecision = 0.001,
MultiDbl* achievedPrecision = NULL,
WarningList* warnings = NULL) const=0;
//>
// This is the multi-point version of ComputeAllSensorPartials that takes all forms of input
// ground points for efficiency.
//<

virtual MultiDblVctr multiComputeGroundPartials(const MultiEcefCoord& groundPts) const = 0;
//> This method returns a vector of vectors of partial derivatives of model
// coordinates m0, m1, m2 with respect to the given groundPts (x,y,z in ECEF meters).
//
// The inner vector contains the set of 9 partial dervitatives for a given point.
// The value returned is a vector with nine elements as follows:
//
//- [0] = partial derivative of m0 with respect to x
//- [1] = partial derivative of m0 with respect to y
//- [2] = partial derivative of m0 with respect to z
//- [3] = partial derivative of m1 with respect to x
//- [4] = partial derivative of m1 with respect to y
//- [5] = partial derivative of m1 with respect to z
//- [6] = partial derivative of m2 with respect to x
//- [7] = partial derivative of m2 with respect to y
//- [8] = partial derivative of m2 with respect to z
//<

virtual MultiDblVctr multiGetUnmodeledError(const MultiModelCoord& modelPts) const = 0;
//> This method returns a vector of 3x3 covariance matrices (in model coordinates)
// at the given vector of modelPt for any model error not accounted for by the
// model parameters.
//
// The inner vector contains the 9 values of the 3x3 covariance matrix for a single point.
// The value returned is a vector of nine elements as follows:
//
//- [0] = m0 variance
//- [1] = m0/m1 covariance
//- [2] = m0/m2 covariance
//- [3] = m1/m0 covariance
//- [4] = m1 variance
//- [5] = m1/m2 covariance
//- [6] = m2/m0 covariance
//- [7] = m2/m1 covariance
//- [8] = m2 variance
//<

virtual MultiDblVctr multiGetUnmodeledCrossCovariance(const MultiModelCoordPair& modelCoords) const = 0;
//> This method returns a vector of 3x3 cross-covariance matrix (in model
// coordinates) between eaach pair of model points pts1 and pts2 for any model error not
// accounted for by the model parameters.
//
// The inner vector contains the 9 elements of the cross covariance between a pair of points.
// The value returned is a vector of nine elements as follows:
//
//- [0] = pt1.m0/pt2.m0 covariance
//- [1] = pt1.m0/pt2.m1 covariance
//- [2] = pt1.m0/pt2.m2 covariance
//- [3] = pt1.m1/pt2.m0 covariance
//- [4] = pt1.m1/pt2.m1 covariance
//- [5] = pt1.m1/pt2.m2 covariance
//- [6] = pt1.m2/pt2.m0 covariance
//- [7] = pt1.m2/pt2.m1 covariance
//- [8] = pt1.m2/pt2.m2 covariance
//<
};

} // namespace csm

#endif // __CSM_MULTI_POINTCLOUDGM_H
43 changes: 43 additions & 0 deletions MultiPointRasterGM.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//##############################################################################
//
// FILENAME: MultiPointRasterGM.cpp
//
// CLASSIFICATION: Unclassified
//
// DESCRIPTION:
//
//
//
// LIMITATIONS: None
//
//
// SOFTWARE HISTORY:
// Date Author Comment
// ----------- ------ -------
// 31-Dec-2021 JPK Initial version.
//
// NOTES:
//
//##############################################################################

#define CSM_LIBRARY

#include "MultiPointRasterGM.h"

namespace csm
{
//*****************************************************************************
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, no tab characters. Just use spaces to indent (though the other CSM code does not indent due to a namespace, so really no indent is needed here at all).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

// MultiPointRasterGM::~MultiRasterPointGM
//*****************************************************************************
MultiPointRasterGM::~MultiPointRasterGM()
{}

//*****************************************************************************
// MultiPointRasterGM::getFamily()
//*****************************************************************************
std::string MultiPointRasterGM::getFamily() const
{
return (RasterGM::getFamily() + CSM_MPR_FAMILY);
}

} // namespace csm
Loading