OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimSpot5Model.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Oscar Kramer (ossim port by D. Burken)
6 //
7 // Description:
8 //
9 // Contains definition of class ossimSpot5Model.
10 //
11 //*****************************************************************************
12 // $Id: ossimSpot5Model.cpp 19658 2011-05-26 13:16:06Z gpotts $
13 
14 #include <iostream>
15 #include <iomanip>
16 #include <fstream>
17 using namespace std;
18 
26 #include <ossim/base/ossimLsrRay.h>
28 #include <ossim/base/ossimDpt3d.h>
31 
32 RTTI_DEF1(ossimSpot5Model, "ossimSpot5Model", ossimSensorModel);
33 
34 
35 //---
36 // Define Trace flags for use within this file:
37 //---
38 #include <ossim/base/ossimTrace.h>
39 static ossimTrace traceExec ("ossimSpot5Model:exec");
40 static ossimTrace traceDebug ("ossimSpot5Model:debug");
41 
42 static const ossim_int32 MODEL_VERSION_NUMBER = 1;
43 
44 static const char* PARAM_NAMES[] = { "roll_offset",
45  "pitch_offset",
46  "yaw_offset",
47  "roll_rate",
48  "pitch_rate",
49  "yaw_rate",
50  "focal_length_offset" };
51 
52 static const char* PARAM_UNITS[] = { "degrees", // degrees
53  "degrees", // degrees
54  "degrees", // degrees
55  "degrees", // degrees/sec
56  "degrees", // degrees/sec
57  "degrees", // degrees/sec
58  "unknown" }; // percent deviation from nominal
59 
60 static const ossim_float64 SIGMA[] = { 0.0001, // degrees
61  0.0001, // degrees
62  0.0003, // degrees
63  0.00002, // delta degrees
64  0.00002, // delta degrees
65  0.00005, // delta degrees
66  0.0001 }; // percent
67 
69  :
71  theSupportData (NULL),
72  theMetaDataFile ("NOT ASSIGNED"),
73  theIllumAzimuth (0.0),
74  theIllumElevation (0.0),
75  thePositionError (0.0),
76  theRefImagingTime (0.0),
77  theRefImagingTimeLine (0.0),
78  theLineSamplingPeriod (0.0),
79 // theSatToOrbRotation (3, 3),
80 // theOrbToEcfRotation (3, 3),
81  theRollOffset (0.0),
82  thePitchOffset (0.0),
83  theYawOffset (0.0),
84  theRollRate (0.0),
85  thePitchRate (0.0),
86  theYawRate (0.0),
87  theFocalLenOffset (0.0)
88 {
90 }
91 
93  :
95  theSupportData (sd),
96  theMetaDataFile ("NOT ASSIGNED"),
97  theIllumAzimuth (0.0),
98  theIllumElevation (0.0),
99  thePositionError (0.0),
100  theRefImagingTime (0.0),
101  theRefImagingTimeLine (0.0),
102  theLineSamplingPeriod (0.0),
103 // theSatToOrbRotation (3, 3),
104 // theOrbToEcfRotation (3, 3),
105  theRollOffset (0.0),
106  thePitchOffset (0.0),
107  theYawOffset (0.0),
108  theRollRate (0.0),
109  thePitchRate (0.0),
110  theYawRate (0.0),
111  theFocalLenOffset (0.0)
112 {
113  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model(dimap_file) Constructor: entering..." << std::endl;
114 
115  //---
116  // Instantiate the support data classes after establishing the filenames:
117  //---
118  loadSupportData();
120  {
121  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model(dimap_file) Constructor: returning with error..." << std::endl;
122  return;
123  }
124 
125  //---
126  // initialize remaining data members:
127  //---
129  updateModel();
130 
131  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model(dimap_file) Constructor: returning..." << std::endl;
132 }
133 
134 //*****************************************************************************
135 // DESTRUCTOR: ~ossimSpot5Model()
136 //
137 //*****************************************************************************
139 {
140  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG DESTRUCTOR: ~ossimSpot5Model(): entering..." << std::endl;
141 
142  theSupportData = 0;
143 
144  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG DESTRUCTOR: ~ossimSpot5Model(): returning..." << std::endl;
145 }
146 
148  :ossimSensorModel(rhs)
149 {
150  if(rhs.theSupportData.valid())
151  {
153  }
154  loadSupportData();
155  updateModel();
156 }
157 
158 
159 void ossimSpot5Model::computeSatToOrbRotation(NEWMAT::Matrix& result, ossim_float64 t)const
160 {
161  if (traceExec())
162  {
164  << "DEBUG ossimSpot5Model::computeSatToOrbRotation(): entering..."
165  << std::endl;
166  }
167  //---
168  // Linearly interpolate attitudes angles:
169  //---
170  ossimDpt3d att;
171  theSupportData->getAttitude(t, att);
172 
173  //---
174  // Apply the attitude adjustable parameters:
175  //---
176  double dt = theRefImagingTime - t;
177  att.x += thePitchOffset + dt*thePitchRate;
178  att.y += theRollOffset + dt*theRollRate;
179  att.z += theYawOffset + dt*theYawRate;
180 
181  //---
182  // Compute trig functions to populate rotation matrices: ANGLES IN RADIANS
183  //---
184  double cp = cos(att.x);
185  double sp = sin(att.x);
186  double cr = cos(att.y);
187  double sr = sin(att.y);
188  double cy = cos(att.z);
189  double sy = sin(att.z);
190 
191  //---
192  // Populate rotation matrix:
193  //---
194  result = NEWMAT::Matrix(3,3);
195  result << (cr*cy) << (-cr*sy) << (-sr)
196  << (cp*sy+sp*sr*cy) << (cp*cy-sp*sr*sy) << (sp*cr)
197  << (-sp*sy+cp*sr*cy) << (-sp*cy-cp*sr*sy) << cp*cr;
198 
199 
200  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::computeSatToOrbRotation(): returning..." << std::endl;
201 }
202 
203 #if 0
204 //*****************************************************************************
205 // METHOD
206 //*****************************************************************************
208 {
209  if (traceExec())
210  {
212  << "DEBUG ossimSpot5Model::computeSatToOrbRotation(): entering..."
213  << std::endl;
214  }
215 
216  //---
217  // Linearly interpolate attitudes angles:
218  //---
219  ossimDpt3d att;
220  theSupportData->getAttitude(t, att);
221 
222  //---
223  // Apply the attitude adjustable parameters:
224  //---
225  double dt = theRefImagingTime - t;
226  att.x += thePitchOffset + dt*thePitchRate;
227  att.y += theRollOffset + dt*theRollRate;
228  att.z += theYawOffset + dt*theYawRate;
229 
230  //---
231  // Compute trig functions to populate rotation matrices: ANGLES IN RADIANS
232  //---
233  double cp = cos(att.x);
234  double sp = sin(att.x);
235  double cr = cos(att.y);
236  double sr = sin(att.y);
237  double cy = cos(att.z);
238  double sy = sin(att.z);
239 
240  //---
241  // Populate rotation matrix:
242  //---
243  theSatToOrbRotation = NEWMAT::Matrix(3,3);
244  theSatToOrbRotation << (cr*cy) << (-cr*sy) << (-sr)
245  << (cp*sy+sp*sr*cy) << (cp*cy-sp*sr*sy) << (sp*cr)
246  << (-sp*sy+cp*sr*cy) << (-sp*cy-cp*sr*sy) << cp*cr;
247 
248 
249  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::computeSatToOrbRotation(): returning..." << std::endl;
250 }
251 #endif
252 //*****************************************************************************
253 // PUBLIC METHOD: ossimSpot5Model::updateModel()
254 //
255 // Updates the model parameters given the normalized adjustable parameter
256 // array.
257 //
258 //*****************************************************************************
260 {
262 
263  try
264  {
265  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::updateModel(): entering..." << std::endl;
266 
268  {
269  theRollOffset = 0;
270  thePitchOffset = 0;
271  theYawOffset = 0;
272  theRollRate = 0;
273  thePitchRate = 0;
274  theYawRate = 0;
275  theFocalLenOffset = 0;
276  }
277  else
278  {
286  }
287  theSeedFunction = 0;
288  ossimGpt ulg, urg, lrg, llg;
297  ulg,
298  urg,
299  lrg,
300  llg);
301 
302  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::updateModel(): returning..." << std::endl;
303  }
304  catch(...)
305  {
307  }
308 }
309 
311 {
312  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::initAdjustableParameters(): entering..." << std::endl;
313 
314  //---
315  // Allocate storage for adjustables and assign their names and units
316  // strings.
317  //---
320 
321  //---
322  // Initialize base-class adjustable parameter array:
323  //---
324  for (ossim_uint32 i=0; i<numParams; ++i)
325  {
326  setAdjustableParameter(i, 0.0);
327  setParameterDescription(i, PARAM_NAMES[i]);
328  setParameterUnit(i,PARAM_UNITS[i]);
329  setParameterSigma(i, SIGMA[i]);
330  }
331 
332  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::initAdjustableParameters(): returning..." << std::endl;
333 }
334 
336 {
337  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSpot5Model::loadSupportData(): entering..." << std::endl;
338 
339  //---
340  // Check for good support data:
341  //---
342  if (!theSupportData)
343  {
344  setErrorStatus();
345  ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimSpot5Model::loadSupportData(): Null SpotDimapSupportData pointer passed to"
346  << " constructor! Aborting..." << std::endl;
347  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::loadSupportData(): returning..." << std::endl;
348  return;
349  }
350 
352  {
353  setErrorStatus();
354  ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimSpot5Model::loadSupportData(): Bad SpotDimapSupportData detected. Aborting..."
355  << std::endl;
356  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::loadSupportData(): returning..." << std::endl;
357  return;
358  }
359 
360  //---
361  // Initialize some member variables from the support data:
362  //---
366 
367  // Center of frame, sub image if we have one.
369 
372  ossimDpt sz;
374  theImageSize = sz;
377 
380 
381  //---
382  // We make this zero base as the base ossimSensorModel does not know about
383  // any sub image we have.
384  //---
387 
388  ossimGpt p1;
389  ossimGpt p2;
390  ossimGpt p3;
391  ossimGpt p4;
392 
393 
394  // I need to find the nominal scale of the spot 5 dataset
395 
396  //---
397  // Position error is a function of whether star tracker information was
398  // available:
399  //---
401  {
402  thePositionError = 50.0;
403  }
404  else
405  {
406  thePositionError = 200.0; // meters
407  }
408  updateModel();
413 
414 // theSupportData->getUlCorner(p1);
415 // theSupportData->getUrCorner(p2);
416 // theSupportData->getLrCorner(p3);
417 // theSupportData->getLlCorner(p4);
418 
419  ossimDpt v[4]; // temporarily holds vertices for ground polygon
420  v[0] = p1;
421  v[1] = p2;
422  v[2] = p3;
423  v[3] = p4;
425 
426 
427  ossimGpt cgpt, hgpt, vgpt;
428  // ossimEcefPoint hVector, vVector;
430 
431  lineSampleToWorld(midpt, cgpt);
432  lineSampleToWorld(midpt + ossimDpt(1,0), hgpt);
433  lineSampleToWorld(midpt + ossimDpt(0,1), vgpt);
434 
435  theGSD = ossimDpt((ossimEcefPoint(cgpt) - ossimEcefPoint(hgpt)).magnitude(),
436  (ossimEcefPoint(cgpt) - ossimEcefPoint(vgpt)).magnitude());
437 
438  theMeanGSD = (theGSD.x+theGSD.y)/2.0;
439 
440  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::loadSupportData(): returning..." << std::endl;
441 }
442 
444 {
445  return new ossimSpot5Model(*this);
446 }
447 
449 {
450  // Capture stream flags since we are going to mess with them.
451  std::ios_base::fmtflags f = out.flags();
452 
453  out << "\nDump of ossimSpot5Model at address " << (hex) << this
454  << (dec)
455  << "\n------------------------------------------------"
456  << "\n theImageID = " << theImageID
457  << "\n theMetadataFile = " << theMetaDataFile
458  << "\n theIllumAzimuth = " << theIllumAzimuth
459  << "\n theIllumElevation = " << theIllumElevation
460  << "\n thePositionError = " << thePositionError
461  << "\n theImageSize = " << theImageSize
462  << "\n theRefGndPt = " << theRefGndPt
463  << "\n theRefImgPt = " << theRefImgPt
464  << "\n theRefImagingTime = " << theRefImagingTime
465  << "\n theRefImagingTimeLine = " << theRefImagingTimeLine
466  << "\n theLineSamplingPeriod = " << theLineSamplingPeriod
467  << "\n theRollOffset = " << theRollOffset
468  << "\n thePitchOffset = " << thePitchOffset
469  << "\n theYawOffset = " << theYawOffset
470  << "\n theRollRate = " << theRollRate
471  << "\n thePitchRate = " << thePitchRate
472  << "\n theYawRate = " << theYawRate
473  << "\n theFocalLenOffset = " << theFocalLenOffset
474  << "\n------------------------------------------------"
475  << "\n " << endl;
476 
477  // Set the flags back.
478  out.flags(f);
479 
480  return ossimSensorModel::print(out);
481 }
482 
484  const char* prefix) const
485 {
486  if(theSupportData.valid())
487  {
488  ossimString supportPrefix = ossimString(prefix) + "support_data.";
489  theSupportData->saveState(kwl, supportPrefix);
490  }
491  else
492  {
493  return false;
494  }
495 
496  return ossimSensorModel::saveState(kwl, prefix);
497 }
498 
500  const char* prefix)
501 {
502  ossimString supportPrefix = ossimString(prefix) + "support_data.";
503 
504  if(!theSupportData)
505  {
507  }
508 
509  if(theSupportData->loadState(kwl, supportPrefix))
510  {
511  if(!ossimSensorModel::loadState(kwl, prefix))
512  {
513  return false;
514  }
515  }
516  else
517  {
518  return false;
519  }
520 
521  loadSupportData();
522  updateModel();
523 
525 }
526 
527 void ossimSpot5Model::imagingRay(const ossimDpt& image_point,
528  ossimEcefRay& image_ray) const
529 {
530  bool runtime_dbflag = 0;
531  NEWMAT::Matrix satToOrbit;
532  ossimDpt iPt = image_point;
535 
536  //
537  // 1. Establish time of line imaging:
538  //
539  double t_line = theRefImagingTime +
541  if (traceDebug() || runtime_dbflag)
542  {
543  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG Spot5Model::imagingRay():------------ BEGIN DEBUG PASS ---------------" << std::endl;
544  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG Spot5Model::imagingRay(): t_line = " << t_line << std::endl;
545  }
546 
547  //
548  // 2. Interpolate ephemeris position and velocity (in ECF):
549  //
550  ossimEcefPoint tempEcefPoint;
551  ossimEcefPoint P_ecf;
552  theSupportData->getPositionEcf(t_line, P_ecf);
553  theSupportData->getVelocityEcf(t_line, tempEcefPoint);
554  ossimEcefVector V_ecf(tempEcefPoint.x(),
555  tempEcefPoint.y(),
556  tempEcefPoint.z());
557  if (traceDebug() || runtime_dbflag)
558  {
560  << "DEBUG:\n\tP_ecf = " << P_ecf
561  << "\n\t V_ecf = " << V_ecf << std::endl;
562  }
563 
564  //
565  // 3. Establish the look direction in Vehicle LSR space (S_sat).
566  // ANGLES IN RADIANS
567  //
568  ossim_float64 Psi_x;
570  ossim_float64 Psi_y;
572  if (traceDebug() || runtime_dbflag)
573  {
575  << "DEBUG:\n\t Psi_x = " << Psi_x
576  << "\n\t Psi_y = " << Psi_y << endl;
577  }
578 
579  ossimColumnVector3d u_sat (-tan(Psi_y), tan(Psi_x), -(1.0 + theFocalLenOffset));
580  if (traceDebug() || runtime_dbflag)
581  {
583  << "DEBUG \n\t u_sat = " << u_sat << endl;
584  }
585 
586  //
587  // 4. Transform vehicle LSR space look direction vector to orbital LSR space
588  // (S_orb):
589  //
590  computeSatToOrbRotation(satToOrbit, t_line);
591 
592  ossimColumnVector3d u_orb = (satToOrbit*u_sat).unit();
593  if (traceDebug() || runtime_dbflag)
594  {
596  << "DEBUG:\n\t theSatToOrbRotation = " << satToOrbit
597  << "\n\t u_orb = " << u_orb << endl;
598  }
599 
600  //
601  // 5. Transform orbital LSR space look direction vector to ECF.
602  //
603  // a. S_orb space Z-axis (Z_orb) is || to the ECF radial vector (P_ecf),
604  // b. X_orb axis is computed as cross-product between velocity and radial,
605  // c. Y_orb completes the orthogonal S_orb coordinate system.
606  //
607  ossimColumnVector3d Z_orb (P_ecf.x(),
608  P_ecf.y(),
609  P_ecf.z());
610  Z_orb = Z_orb.unit();
611 
612  ossimColumnVector3d X_orb = ossimColumnVector3d(V_ecf.x(),
613  V_ecf.y(),
614  V_ecf.z()).cross(Z_orb).unit();
615  ossimColumnVector3d Y_orb = Z_orb.cross(X_orb);
616 
617  NEWMAT::Matrix orbToEcfRotation = NEWMAT::Matrix(3, 3);
618  orbToEcfRotation << X_orb[0] << Y_orb[0] << Z_orb[0]
619  << X_orb[1] << Y_orb[1] << Z_orb[1]
620  << X_orb[2] << Y_orb[2] << Z_orb[2];
621 
622 
623  ossimColumnVector3d u_ecf = (orbToEcfRotation*u_orb);
624  if (traceDebug() || runtime_dbflag)
625  {
627  << "DEBUG:\n\t orbToEcfRotation = " << orbToEcfRotation
628  << "\n\t u_ecf = " << u_ecf << endl;
629  }
630 
631  //
632  // Establish the imaging ray given direction and origin:
633  //
634  image_ray = ossimEcefRay(P_ecf, ossimEcefVector(u_ecf[0], u_ecf[1], u_ecf[2]));
635 
636  if (traceExec())
637  {
639  << "DEBUG Spot5Model::imagingRay(): returning..." << std::endl;
640  }
641 }
642 
644  const ossim_float64& heightEllipsoid,
645  ossimGpt& worldPoint) const
646 {
647 // if (!insideImage(image_point))
648  if ( !theImageClipRect.pointWithin(image_point, 1.0-FLT_EPSILON) )
649  {
650  if(theSeedFunction.valid())
651  {
652  theSeedFunction->lineSampleToWorld(image_point, worldPoint);
653  }
654  else
655  {
656  worldPoint = extrapolate(image_point, heightEllipsoid);
657  }
658  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::lineSampleHeightToWorld(): returning..." << std::endl;
659  return;
660  }
661  //***
662  // First establish imaging ray from image point:
663  //***
664  ossimEcefRay imaging_ray;
665  imagingRay(image_point, imaging_ray);
666  ossimEcefPoint Pecf (imaging_ray.intersectAboveEarthEllipsoid(heightEllipsoid));
667  worldPoint = ossimGpt(Pecf);
668 }
669 
670 // ossimDpt ossimSpot5Model::extrapolate (const ossimGpt& gp) const
671 // {
672 // ossimDpt temp;
673 
674 // temp.makeNan();
675 
676 // return temp;
677 
678 // ossimDpt tempGpt = gp;
679 // ossimDpt dest;
680 // theGroundToImageMap.map(tempGpt, dest);
681 
682 // return dest;
683 
684 // }
685 
686 // ossimGpt ossimSpot5Model::extrapolate (const ossimDpt& ip,
687 // const double& height) const
688 // {
689 // return ossimGpt(ossim::nan(), ossim::nan(), ossim::nan(), 0);
690 
691 // ossimDpt dest;
692 
693 // theImageToGroundMap.map(ip, dest);
694 
695 
696 // return ossimGpt(dest.lat, dest.lon, ossim::nan(), origin().datum());
697 // }
698 
699 bool
701 {
702  ossimFilename spot5Test = init_file;
703  ossimFilename geomFile = init_file;
704  geomFile = geomFile.setExtension("geom");
705  bool tryKwl = false;
706 
707  if(!spot5Test.exists())
708  {
709  spot5Test = geomFile.path();
710  spot5Test = spot5Test.dirCat(ossimFilename("METADATA.DIM"));
711  if(spot5Test.exists() == false)
712  {
713  spot5Test = geomFile.path();
714  spot5Test = spot5Test.dirCat(ossimFilename("metadata.dim"));
715  }
716  }
717  if(spot5Test.exists())
718  {
720  if(meta->loadXmlFile(spot5Test))
721  {
722  initFromMetadata(meta.get());
723  if (getErrorStatus())
724  {
725  tryKwl = true;
726  meta=0;
727  }
728  else
729  {
730  return true;
731  }
732  }
733  else
734  {
735  meta=0;
736  tryKwl = true;
737  }
738  }
739  if(tryKwl)
740  {
741  ossimKeywordlist kwl;
742  if(kwl.addFile(init_file.c_str()))
743  {
744  return loadState(kwl);
745  }
746  }
747  return false;
748 }
749 
750 bool
752 {
753  // init parms
754  theSupportData = sd;
755  theMetaDataFile = "NOT ASSIGNED";
756  theIllumAzimuth = 0.0;
757  theIllumElevation = 0.0;
758  thePositionError = 0.0;
759  theRefImagingTime = 0.0;
760  theLineSamplingPeriod = 0.0;
761 // theSatToOrbRotation = 0.0; //matrix
762 // theOrbToEcfRotation = 0.0; //matrix
763  theRollOffset = 0.0;
764  thePitchOffset = 0.0;
765  theYawOffset = 0.0;
766  theRollRate = 0.0;
767  thePitchRate = 0.0;
768  theYawRate = 0.0;
769  theFocalLenOffset = 0.0;
770 
771  //---
772  // Instantiate the support data classes after establishing the filenames:
773  //---
774  loadSupportData();
776  {
777  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpot5Model::initFromMetadata(dimap_file): returning with error..." << std::endl;
778  return false;
779  }
780 
781  //---
782  // initialize remaining data members:
783  //---
785  updateModel();
786  return true;
787 }
ossim_float64 theRefImagingTime
ossimString theSensorID
ossim_float64 theYawOffset
void setParameterDescription(ossim_uint32 idx, const ossimString &descrption)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=NULL) const
void computeSatToOrbRotation(NEWMAT::Matrix &result, ossim_float64 t) const
ossimColumnVector3d cross(const ossimColumnVector3d &rhs) const
virtual void lineSampleHeightToWorld(const ossimDpt &image_point, const ossim_float64 &heightEllipsoid, ossimGpt &worldPoint) const
bool pointWithin(const ossimDpt &pt, double epsilon=0.0) const
Definition: ossimDrect.h:781
bool loadXmlFile(const ossimFilename &file, bool processSwir=false)
void getPixelLookAngleX(ossim_uint32 sample, ossim_float64 &pa) const
ossim_float64 thePositionError
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimEcefPoint intersectAboveEarthEllipsoid(const double &heightAboveEllipsoid, const ossimDatum *aDatum=ossimDatumFactory::instance() ->wgs84()) const
Represents serializable keyword/value map.
bool addFile(const char *file)
static const ossimErrorCode OSSIM_OK
bool valid() const
Definition: ossimRefPtr.h:75
ossimString theImageID
ossim_float64 theIllumElevation
double samp
Definition: ossimDpt.h:164
void getImageRect(ossimDrect &rect) const
Zero based image rectangle, sub image if there is one.
RTTI_DEF1(ossimSpot5Model, "ossimSpot5Model", ossimSensorModel)
const ossimDpt & ul() const
Definition: ossimDrect.h:339
double y
Definition: ossimDpt.h:165
virtual bool setupOptimizer(const ossimString &init_file)
image to ground faster
ossimDpt theSpotSubImageOffset
ossim_float64 theRefImagingTimeLine
relative to full image
ossimFilename theMetaDataFile
double x() const
ossim_float64 theRollRate
ossimColumnVector3d unit() const
static const ossimErrorCode OSSIM_ERROR
void getSunAzimuth(ossim_float64 &az) const
virtual void lineSampleToWorld(const ossimDpt &image_point, ossimGpt &world_point) const
void getRefImagePoint(ossimDpt &rp) const
zero base center point
ossim_float64 theFocalLenOffset
ossimRefPtr< ossimSpotDimapSupportData > theSupportData
void getAttitude(ossim_uint32 sample, ossimDpt3d &at) const
bool initFromMetadata(ossimSpotDimapSupportData *sd)
uses file path to init model
void getVelocityEcf(ossim_uint32 sample, ossimEcefPoint &ve) const
void getPixelLookAngleY(ossim_uint32 sample, ossim_float64 &pa) const
void getImageSize(ossimDpt &sz) const
ossim_float64 theIllumAzimuth
double ossim_float64
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=NULL)
virtual std::ostream & print(std::ostream &out) const
ossim_float64 theRollOffset
ossim_float64 theYawRate
virtual void imagingRay(const ossimDpt &image_point, ossimEcefRay &image_ray) const
double z
Definition: ossimDpt3d.h:145
double line
Definition: ossimDpt.h:165
ossim_float64 theLineSamplingPeriod
bool exists() const
#define FLT_EPSILON
ossim_float64 thePitchOffset
unsigned int ossim_uint32
void getSunElevation(ossim_float64 &el) const
ossimPolygon theBoundGndPolygon
void setParameterUnit(ossim_uint32 idx, ossimUnitType unit)
void getRefLineTimeLine(ossim_float64 &rtl) const
relative to full frame.
void getRefGroundPoint(ossimGpt &gp) const
Center of frame, sub image if there is one.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual std::ostream & print(std::ostream &out) const
virtual ossimDpt extrapolate(const ossimGpt &gp) const
ossimRefPtr< ossimProjection > theSeedFunction
Used as an initial guess for iterative solutions and a guess for points outside the support bounds...
virtual ossimObject * dup() const
ossim_float64 thePitchRate
void getLineSamplingPeriod(ossim_float64 &pe) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimDrect theImageClipRect
virtual void updateModel()
virtual ossimErrorCode getErrorStatus() const
double y() const
ossimDpt midPoint() const
Definition: ossimDrect.h:817
virtual void setAdjustableParameter(ossim_uint32 idx, double value, bool notify=false)
const ossimDpt & ur() const
Definition: ossimDrect.h:340
double x
Definition: ossimDpt.h:164
double x
Definition: ossimDpt3d.h:143
ossimFilename dirCat(const ossimFilename &file) const
void resizeAdjustableParameterArray(ossim_uint32 numberOfParameters)
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
virtual ossimObject * dup() const
void getPositionEcf(ossim_uint32 sample, ossimEcefPoint &pe) const
const ossimDpt & ll() const
Definition: ossimDrect.h:342
virtual ~ossimSpot5Model()
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
double y
Definition: ossimDpt3d.h:144
virtual void lineSampleToWorld(const ossimDpt &lineSampPt, ossimGpt &worldPt) const =0
ossimFilename & setExtension(const ossimString &e)
Sets the extension of a file name.
const ossimDpt & lr() const
Definition: ossimDrect.h:341
void getSubImageOffset(ossimDpt &offset) const
double z() const
ossimFilename path() const
void setParameterSigma(ossim_uint32 idx, double value, bool notify=false)
void initAdjustableParameters()
void getRefLineTime(ossim_float64 &rt) const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
ossim_float64 theMeanGSD
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
int ossim_int32