25 #ifdef OSSIM_ID_ENABLED 26 static const char OSSIM_ID[] =
"$Id: ossimHgtRef.cpp 21399 2012-07-27 18:19:22Z gpotts $";
39 theCurrentHeightRefType(cRefType)
44 <<
"ossimHgtRef::ossimHgtRef DEBUG:" << std::endl;
45 #ifdef OSSIM_ID_ENABLED 47 <<
"OSSIM_ID: " << OSSIM_ID << std::endl;
62 theCurrentHeightRefType(cRefType),
63 theCurrentRefHeight(atHgt)
68 <<
"ossimHgtRef::ossimHgtRef DEBUG:" << std::endl;
69 #ifdef OSSIM_ID_ENABLED 71 <<
"OSSIM_ID: " << OSSIM_ID << std::endl;
118 bool ossimHgtRef::getSurfaceInfo(
const ossimGpt& pg,
225 if (getSurfaceInfo(pg, info, gsd))
227 if (info.contains(
"Srtm"))
242 else if (info.contains(
"Dted"))
268 <<
" ref: " << refCE <<
"/" << refLE << endl;
282 cov(1,1) = refCE/2.146;
283 cov(2,2) = refCE/2.146;
284 cov(3,3) = refLE/1.6449;
285 cov(1,1) *= cov(1,1);
286 cov(2,2) *= cov(2,2);
287 cov(3,3) *= cov(3,3);
301 NEWMAT::Matrix& cov)
const 306 if (refCE<0.0 || refLE<0.0)
336 cov(1,1) = useCE/2.146;
337 cov(2,2) = useCE/2.146;
338 cov(3,3) = useLE/1.6449;
339 cov(1,1) *= cov(1,1);
340 cov(2,2) *= cov(2,2);
341 cov(3,3) *= cov(3,3);
356 const NEWMAT::Matrix& surfCov,
357 NEWMAT::Matrix& normCov)
const 363 NEWMAT::Matrix covEcf;
368 NEWMAT::Matrix tnU(3,1);
369 tnU << sn[0] << sn[1] << sn[2];
372 NEWMAT::Matrix tnUecf(3,1);
377 NEWMAT::SymmetricMatrix ptns;
378 ptn = tnUecf.t() * covEcf * tnUecf;
382 normCov = tnUecf * ptns * tnUecf.t();
410 NEWMAT::Matrix h(3,3);
432 <<
"DEBUG: getLocalTerrainNormal... 3X3 grid"<<endl;
442 ((h(1,3)+2*h(2,3)+h(3,3))-(h(1,1)+2*h(2,1)+h(3,1)))/(8*delta);
444 ((h(1,1)+2*h(1,2)+h(1,3))-(h(3,1)+2*h(3,2)+h(3,3)))/(8*delta);
447 tNorm[2] = 1.0 - sqrt(dz_dlon*dz_dlon+dz_dlat*dz_dlat);
459 <<
"WARNING: ossimHgtRef::getLocalTerrainNormal(): " 460 <<
"\n error... terrain normal set to vertical..." virtual bool getAccuracyInfo(ossimElevationAccuracyInfo &info, const ossimGpt &gpt) const
virtual ossim_float64 getRefHeight(const ossimGpt &pg) const
Method to get height reference.
virtual ~ossimHgtRef()
virtual destructor.
double lond() const
Will convert the radian measure to degrees.
bool hasValidAbsoluteError() const
static ossimElevManager * instance()
METHOD: instance() Implements singelton pattern.
double latd() const
Will convert the radian measure to degrees.
virtual bool getSurfaceCovMatrix(const ossimGpt &pg, NEWMAT::Matrix &cov) const
Method to get surface information string.
ossimHgtRef(HeightRefType_t cRefType)
constructor.
ossim_float64 theCurrentRefHeight
const NEWMAT::Matrix & lsrToEcefRotMatrix() const
virtual double getHeightAboveEllipsoid(const ossimGpt &gpt)
HeightRefType_t theCurrentHeightRefType
virtual ossimColumnVector3d getLocalTerrainNormal(const ossimGpt &pg) const
Method to get local terrain normal unit vector (slope).
ossimDpt metersPerDegree() const
bool getSurfaceNormalCovMatrix(const ossimGpt &pg, const NEWMAT::Matrix &surfCov, NEWMAT::Matrix &normCov) const
Method to get surface normal covariance matrix.
const ossimColumnVector3d & zAligned()
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.