This file is indexed.

/usr/include/ossim/projection/ossimPositionQualityEvaluator.h is in libossim-dev 1.7.21-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
//----------------------------------------------------------------------------
//
// License:  See top level LICENSE.txt file.
//
// Author:  David Hicks
//
// Description: Base class for position quality evaluation operations.
//----------------------------------------------------------------------------
#ifndef ossimPositionQualityEvaluator_HEADER
#define ossimPositionQualityEvaluator_HEADER

#include <ossim/base/ossimDpt.h>
#include <ossim/base/ossimEcefPoint.h>
#include <ossim/base/ossimGpt.h>
#include <ossim/base/ossimLsrVector.h>
#include <ossim/base/ossimColumnVector3d.h>
#include <ossim/base/ossimMatrix3x3.h>
#include <ossim/matrix/newmat.h>
#include <ossim/matrix/newmatap.h>
#include <ossim/matrix/newmatio.h>


// Probability level specifiers
enum pqeProbLev_t
{
   ONE_SIGMA = 0,
   P50,
   P90,
   P95,
   NUM_PROB_LEVELS
};

// Ground space ellipse
struct pqeErrorEllipse
{
   double   theSemiMinorAxis;
   double   theSemiMajorAxis;
   double   theAzimAngle;
   ossimGpt theCenter;
};

// RPC model parameters
struct pqeRPCModel
{
   double theLineScale;
   double theSampScale;
   double theLatScale;
   double theLonScale;
   double theHgtScale;
   double theLineOffset;
   double theSampOffset;
   double theLatOffset;
   double theLonOffset;
   double theHgtOffset;
   double theLineNumCoef[20];
   double theLineDenCoef[20];
   double theSampNumCoef[20];
   double theSampDenCoef[20];
   char   theType; // A or B
};

// Image space ellipse point set
typedef std::vector<ossimDpt> pqeImageErrorEllipse_t;



class OSSIM_DLL ossimPositionQualityEvaluator
{
public:

   /** @brief default constructor */
   ossimPositionQualityEvaluator();
   
   /** @brief covariance matrix-based constructor
    *
    * @param pt     Current ECF ground estimate.
    * @param covMat 3X3 ECF covariance matrix.
    */
   ossimPositionQualityEvaluator(
      const ossimEcefPoint& pt,
      const NEWMAT::Matrix& covMat);
   
   /** @brief LOS error/geometry-based constructor
    *
    * @param pt           Current ECF ground estimate.
    * @param errBiasLOS   0.68p LOS bias component.
    * @param errRandLOS   0.68p LOS random component.
    * @param elevAngleLOS target elevation angle.
    * @param azimAngleLOS target azimuth angle.
    * @param surfN        surface normal unit vector (defaults to unit Z).
    * @param surfCovMat   surface ENU 3X3 covariance matrix (defaults to zero).
    */
   ossimPositionQualityEvaluator(
      const ossimEcefPoint&      pt,
      const ossim_float64&       errBiasLOS,
      const ossim_float64&       errRandLOS,
      const ossim_float64&       elevAngleLOS,
      const ossim_float64&       azimAngleLOS,
      const ossimColumnVector3d& surfN = ossimColumnVector3d(0,0,1),
      const NEWMAT::Matrix&      surfCovMat = ossimMatrix3x3::createZero());
   
   /** @brief LOS error/coefficient-based constructor
    *
    * @param pt         Current ECF ground estimate.
    * @param errBiasLOS 0.68p LOS bias component.
    * @param errRandLOS 0.68p LOS random component.
    * @param rpc        RPC coefficients.
    * @param surfN      surface normal unit vector (defaults to unit Z).
    * @param surfCovMat surface ENU 3X3 covariance matrix (defaults to zero).
    */
   ossimPositionQualityEvaluator(
      const ossimEcefPoint&      pt,
      const ossim_float64&       errBiasLOS,
      const ossim_float64&       errRandLOS,
      const pqeRPCModel&         rpc,
      const ossimColumnVector3d& surfN = ossimColumnVector3d(0,0,1),
      const NEWMAT::Matrix&      surfCovMat = ossimMatrix3x3::createZero());

   /** @brief virtual destructor */
   ~ossimPositionQualityEvaluator();
   
   /**
    * @brief Add contributing covariance matrix
    *
    * @param covMat 3X3 covariance matrix.
    *
    * @return true on success, false on error.
    */
   bool addContributingCovariance(
      NEWMAT::Matrix& covMat);
   
   /**
    * @brief Add contributing CE/LE
    *
    * @param cCE contributing 90% circular error (m).
    * @param cLE contributing 90% linear error (m).
    *
    * @return true on success, false on error.
    */
   bool addContributingCE_LE(
      const ossim_float64& cCE,
      const ossim_float64& cLE);
   
   /**
    * @brief Subtract contributing covariance matrix
    *
    * @param covMat 3X3 covariance matrix.
    *
    * @return true on success, false on error.
    */
   bool subtractContributingCovariance(
      NEWMAT::Matrix& covMat);
   
   /**
    * @brief Subtract contributing CE/LE
    *
    * @param cCE contributing 90% circular error (m).
    * @param cLE contributing 90% linear error (m).
    *
    * @return true on success, false on error.
    */
   bool subtractContributingCE_LE(
      const ossim_float64& cCE,
      const ossim_float64& cLE);
   
   /**
    * @brief Covariance matrix access
    *
    * @param covMat 3X3 covariance matrix.
    *
    * @return true on success, false on error.
    */
   bool getCovMatrix(
      NEWMAT::Matrix& covMat) const;
   
   /**
    * @brief Compute circular/linear error (CE/LE).
    *
    * @param pLev Probability level.
    * @param CE   pLev% circular error (m).
    * @param LE   pLev% linear error (m).
    *
    * @return true on success, false on error.
    */
   bool computeCE_LE(
      const pqeProbLev_t   pLev,
            ossim_float64& CE,
            ossim_float64& LE) const;

   
   /**
    * @brief Extract error ellipse parameters
    *
    * @param pLev    Probability level.
    * @param ellipse pLev% error ellipse.
    *
    * @return true on success, false on error.
    */
   bool extractErrorEllipse(
      const pqeProbLev_t     pLev,
            pqeErrorEllipse& ellipse);

   
   /**
    * @brief Extract error ellipse parameters; valid only with RPC parameters
    *
    * @param pLev             Probability level.
    * @param angularIncrement Angular increment for ellipse point spacing (deg)
    * @param ellipse          pLev% error ellipse.
    * @param ellImage         pLev% image space error ellipse.
    *
    * @return true on success, false on error.
    */
   bool extractErrorEllipse(
      const pqeProbLev_t            pLev,
      const ossim_float64&          angularIncrement,
            pqeErrorEllipse&        ellipse,
            pqeImageErrorEllipse_t& ellImage);
                                  
   
   /**
    * @brief State accessor.
    */
   inline bool isValid() const { return theEvaluatorValid; }
                                  
   
   /**
    * @brief Print method.
    */
   std::ostream& print(std::ostream& out) const;

protected:

private:
   //***
   // Members
   //***
   bool            theEvaluatorValid;
   ossimGpt        thePtG;
   NEWMAT::Matrix  theCovMat;  //local ENU frame
   ossimLsrSpace   theLocalFrame;
   pqeErrorEllipse theEllipse;
   NEWMAT::Matrix  theEigenvectors;
   pqeRPCModel     theRpcModel;
   
   //***
   // Method for eigenvector decomposition of covariance matrix
   //***
   bool decomposeMatrix();
   
   //***
   // Method for covariance matrix formation from 1-sigma LOS
   // error componenents and imaging geometry
   //***
   bool constructMatrix(const ossim_float64&       errBiasLOS,
                        const ossim_float64&       errRandLOS,
                        const ossim_float64&       elevAngleLOS,
                        const ossim_float64&       azimAngleLOS,
                        const ossimColumnVector3d& surfN,
                        const NEWMAT::Matrix&      surfCovMat);

   //***
   // Method for forming 3X3 ENU covariance matrix from CE/LE
   //***
   bool formCovMatrixFromCE_LE(const ossim_float64&  CE,
                               const ossim_float64&  LE,
                                     NEWMAT::Matrix& covMat) const;

   //***
   // Method for computing 90% CE using interpolating function
   //***
   double compute90PCE() const;
   
   //***
   // Method for computing acquisition angles from RPC coefficients
   //***
   bool computeElevAzim(const pqeRPCModel     rpc,
                              ossim_float64&  elevAngleLOS,
                              ossim_float64&  azimAngleLOS) const;
   
   //***
   // Methods for computing RPC polynomial and its derivatives
   //***
   double polynomial(const double& nlat,
                     const double& nlon,
                     const double& nhgt,
                     const double* coeffs) const;
   double dPoly_dLat(const double& nlat,
                     const double& nlon,
                     const double& nhgt,
                     const double* coeffs) const;
   double dPoly_dLon(const double& nlat,
                     const double& nlon,
                     const double& nhgt,
                     const double* coeffs) const;
   double dPoly_dHgt(const double& nlat,
                     const double& nlon,
                     const double& nhgt,
                     const double* coeffs) const;
    
    
    
   //***
   // Utility methods
   //***
   ossimColumnVector3d vperp(const ossimColumnVector3d& v1,
                             const ossimColumnVector3d& v2) const;
                             
   double atan3(const ossim_float64 y, const ossim_float64 x) const;

};

#endif /* #ifndef ossimPositionQualityEvaluator_HEADER */