-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcsm2to3model.h
224 lines (197 loc) · 8.9 KB
/
csm2to3model.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
//*****************************************************************************
// FILE: csm2to3model.h
//
// Copyright (C) 2012 Harris Corporation. All rights reserved.
//
// CLASSIFICATION: Unclassified
//
// DESCRIPTION: csm2to3model
//
// LIMITATIONS: None
//
// SOFTWARE HISTORY:
//>
// Date Author Comment
// ----------- ------ -------
// 30-Mar-2012 SCM Initial Coding
// 26-Sep-2012 JPK Ripple class hierarchy change
// 11-Oct-2012 SCM Added getParameterUnits.
// 30-Oct-2012 SCM Fixed includes.
// 31-Oct-2012 SCM Rippled more interface changes.
// 27-Nov-2012 JPK Changed return type for getCovarianceModel(),
// cleaned up variable names.
// 29-Nov-2012 JPK Added support for ParamSet enumeration and
// Parameter and SharingCriteria structures.
// 06-Dec-2012 JPK Rippled various name / scoping changes.
// 12-Feb-2013 JPK Renamed CovarianceModel to CorrelationModel
//<
//*****************************************************************************
#ifndef csm2to3model_HEADER
#define csm2to3model_HEADER
#include <csm/RasterGM.h>
#include <csm/CorrelationModel.h>
class TSMSensorModel;
//*****************************************************************************
// CLASS: csm2to3model
//> This class implements a CSM version 3 RasterGM interface by calling the
// equivalent CSM version 2 TSMSensorModel methods. It must be constructed
// with that TSMSensorModel object
//<
//*****************************************************************************
class csm2to3model : public csm::RasterGM
{
public:
explicit csm2to3model(TSMSensorModel* impl,const std::string& pluginName);
//> This constructs the csm2to3model with the given TSMSensorModel
// object. This object must not be NULL. The csm2to3model takes
// ownership of the TSMSensorModel object, and will delete it when it is
// destructed. The passed in plugin name enables the capability to
// re-load a state. Without this data member being set to the
// actual name of the plugin containing this model, an exception will
// be thrown when atempting to reload the state.
//<
virtual ~csm2to3model();
//> This is the destructor.
//<
virtual csm::Version getVersion() const;
virtual std::string getModelName() const;
virtual std::string getPedigree() const;
//---
// Basic collection information
//---
virtual std::string getImageIdentifier() const;
virtual void setImageIdentifier(const std::string& imageId,
csm::WarningList* warnings = NULL);
virtual std::string getSensorIdentifier() const;
virtual std::string getPlatformIdentifier() const;
virtual std::string getCollectionIdentifier() const;
virtual std::string getSensorType() const;
virtual std::string getSensorMode() const;
virtual csm::EcefCoord getReferencePoint() const;
virtual void setReferencePoint(const csm::EcefCoord& groundPt);
//---
// Sensor Model State
//---
virtual std::string getModelState() const;
virtual void replaceModelState(const std::string& argState);
//> This method loads the argument state string and attempts to
// use it to initialize the state of the current model.
// If the state string contains a valid state for current
// model, the internal state of the model is updated.
// If the argument state string is empty,
//<
//---
// Core Photogrammetry
//---
virtual csm::ImageCoord groundToImage(
const csm::EcefCoord& groundPt,
double desiredPrecision = 0.001,
double* achievedPrecision = NULL,
csm::WarningList* warnings = NULL) const;
virtual csm::ImageCoordCovar groundToImage(
const csm::EcefCoordCovar& groundPt,
double desiredPrecision = 0.001,
double* achievedPrecision = NULL,
csm::WarningList* warnings = NULL) const;
virtual csm::EcefCoord imageToGround(
const csm::ImageCoord& imagePt,
double height,
double desiredPrecision = 0.001,
double* achievedPrecision = NULL,
csm::WarningList* warnings = NULL) const;
virtual csm::EcefCoordCovar imageToGround(
const csm::ImageCoordCovar& imagePt,
double height, double heightVariance,
double desiredPrecision = 0.001,
double* achievedPrecision = NULL,
csm::WarningList* warnings = NULL) const;
virtual csm::EcefLocus imageToProximateImagingLocus(
const csm::ImageCoord& imagePt,
const csm::EcefCoord& groundPt,
double desiredPrecision = 0.001,
double* achievedPrecision = NULL,
csm::WarningList* warnings = NULL) const;
virtual csm::EcefLocus imageToRemoteImagingLocus(
const csm::ImageCoord& imagePt,
double desiredPrecision = 0.001,
double* achievedPrecision = NULL,
csm::WarningList* warnings = NULL) const;
//---
// Monoscopic Mensuration
//---
virtual csm::ImageCoord getImageStart() const;
virtual csm::ImageVector getImageSize() const;
virtual std::pair<double,double> getValidHeightRange() const;
virtual std::pair<csm::ImageCoord,csm::ImageCoord> getValidImageRange() const;
virtual csm::EcefVector getIlluminationDirection(const csm::EcefCoord& gndPt) const;
//---
// Time and Trajectory
//---
virtual std::string getTrajectoryIdentifier() const;
virtual std::string getReferenceDateAndTime() const;
virtual double getImageTime(const csm::ImageCoord& pt) const;
virtual csm::EcefCoord getSensorPosition(const csm::ImageCoord& pt) const;
virtual csm::EcefCoord getSensorPosition(double time) const;
virtual csm::EcefVector getSensorVelocity(const csm::ImageCoord& pt) const;
virtual csm::EcefVector getSensorVelocity(double time) const;
//---
// Sensor Model Parameters
//---
virtual int getNumParameters() const;
virtual std::string getParameterName(int index) const;
virtual std::string getParameterUnits(int index) const;
virtual bool hasShareableParameters() const;
virtual bool isParameterShareable(int index) const;
virtual csm::SharingCriteria getParameterSharingCriteria(int index) const;
virtual double getParameterValue(int index) const;
virtual void setParameterValue(int index, double value);
virtual csm::param::Type getParameterType(int index) const;
virtual void setParameterType(int index, csm::param::Type pType);
//---
// Uncertainty Propagation
//---
virtual std::vector<double> computeGroundPartials(const csm::EcefCoord& groundPt) const;
virtual SensorPartials computeSensorPartials(
int index,
const csm::EcefCoord& groundPt,
double desiredPrecision = 0.001,
double* achievedPrecision = NULL,
csm::WarningList* warnings = NULL) const;
virtual SensorPartials computeSensorPartials(
int index,
const csm::ImageCoord& imagePt,
const csm::EcefCoord& groundPt,
double desiredPrecision = 0.001,
double* achievedPrecision = NULL,
csm::WarningList* warnings = NULL) const;
virtual double getParameterCovariance(int index1,
int index2) const;
virtual void setParameterCovariance(int index1,
int index2,
double covariance);
//---
// Error Correction
//---
virtual int getNumGeometricCorrectionSwitches() const;
virtual std::string getGeometricCorrectionName(int index) const;
virtual void setGeometricCorrectionSwitch(int index,
bool value,
csm::param::Type pType);
virtual bool getGeometricCorrectionSwitch(int index) const;
virtual std::vector<double> getCrossCovarianceMatrix(
const csm::GeometricModel& comparisonModel,
csm::param::Set pSet = csm::param::VALID,
const GeometricModelList& otherModels = GeometricModelList()) const;
virtual const csm::CorrelationModel& getCorrelationModel() const;
virtual std::vector<double> getUnmodeledCrossCovariance(
const csm::ImageCoord& pt1,
const csm::ImageCoord& pt2) const;
private:
TSMSensorModel* theImpl;
std::string thePluginName;
//> This data member is used when attempting to reload the state
// of a model. Only look for the plugin whose name matches this name.
//<
csm::CorrelationModel* theCorrelationModel;
};
#endif