OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimSarModel.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: David Hicks
6 //
7 // Description: Base class for Synthetic Aperture Radar model.
8 //
9 // This model represents a standard model using relatively
10 // generic support data based on the following references:
11 // [1] Modern Photogrammetry; Mikhail, Bethel, & McGlone;
12 // Sections 11.7-11.9. Equation number references are
13 // provided where possible for added clarity.
14 // [2] The Compendium of Controlled Extensions for NITFS
15 // 21 Mar 2006, paragraph E.3.8, SAR MPDSR
16 //
17 //----------------------------------------------------------------------------
18 // $Id: ossimSarModel.cpp 17206 2010-04-25 23:20:40Z dburken $
19 
23 #include <ossim/base/ossimTrace.h>
24 #include <ossim/base/ossimString.h>
25 #include <ossim/base/ossimTrace.h>
26 #include <ossim/base/ossimNotify.h>
27 
28 RTTI_DEF1(ossimSarModel, "ossimSarModel", ossimSensorModel);
29 
30 static ossimTrace traceExec (ossimString("ossimSarModel:exec"));
31 static ossimTrace traceDebug(ossimString("ossimSarModel:debug"));
32 
33 #ifdef OSSIM_ID_ENABLED
34 static const char OSSIM_ID[] = "$Id: ossimSarModel.cpp 17206 2010-04-25 23:20:40Z dburken $";
35 #endif
36 
37 static const char ACQ_MODE_KW[] = "acq_mode";
38 static const char ORP_POS_KW[] = "orp_pos";
39 static const char ORP_CENTER_KW[] = "orp_ctr_xy";
40 static const char OPNORM_KW[] = "opnorm";
41 static const char OP_X_AXIS_KW[] = "opx";
42 static const char OIPR_KW[] = "oipr";
43 static const char PIX_SIZE_KW[] = "pixel_size";
44 static const char ARP_TIME_KW[] = "arptm";
45 static const char ARP_POLY_COEFF_X_KW[] = "arppol_coeff_x";
46 static const char ARP_POLY_COEFF_Y_KW[] = "arppol_coeff_y";
47 static const char ARP_POLY_COEFF_Z_KW[] = "arppol_coeff_z";
48 static const char TIME_COEFF[] = "time_coeff";
49 
50 static const ossimString PARAM_NAMES[] ={"x_pos_offset",
51  "y_pos_offset",
52  "z_pos_offset"};
53 static const ossimString PARAM_UNITS[] ={"meters",
54  "meters",
55  "meters"};
56 
57 
58 //*****************************************************************************
59 // METHOD: ossimSarModel::ossimSarModel()
60 //
61 // Constructor.
62 //
63 //*****************************************************************************
65  :
66  theAcquisitionMode(),
67  theOrpPosition(),
68  theOrpCenter(),
69  theOutputPlaneNormal(),
70  theOipr(0.0),
71  theLsrOffset(0, 0, 0)
72 {
74 
75  if (traceDebug())
76  {
78  << "ossimSarModel::ossimSarModel DEBUG:" << std::endl;
79 #ifdef OSSIM_ID_ENABLED
81  << "OSSIM_ID: " << OSSIM_ID << std::endl;
82 #endif
83  }
84 
85 }
86 
87 
88 //*****************************************************************************
89 // DESTRUCTOR: ~ossimSarModel()
90 //
91 //*****************************************************************************
93 {
94  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG DESTRUCTOR: ~ossimSarModel(): entering..." << std::endl;
95  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG DESTRUCTOR: ~ossimSarModel(): returning..." << std::endl;
96 }
97 
98 
99 //*****************************************************************************
100 // METHOD: ossimSarModel::initAdjustableParameters()
101 //
102 // This method initializes the base class adjustable parameter and associated
103 // sigmas arrays with quantities specific to this model. These are default
104 // values only. A functional implementation would assign the sigmas via a
105 // keywordlist or camera specific derived class.
106 //
107 //*****************************************************************************
109 {
110  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSarModel::initAdjustableParameters: entering..." << std::endl;
111 
112  int numParams = NUM_ADJUSTABLE_PARAMS;
114 
115  //***
116  // Initialize adjustable parameter array:
117  //***
118  for (int i=0; i<numParams; i++)
119  {
120  setAdjustableParameter(i, 0.0);
121  setParameterDescription(i, PARAM_NAMES[i]);
122  setParameterUnit(i, PARAM_UNITS[i]);
123  }
124 
125  //***
126  // Initialize parameter sigma array:
127  //***
128  setParameterSigma(X_POS, 50.0);
129  setParameterSigma(Y_POS, 50.0);
130  setParameterSigma(Z_POS, 50.0);
131 
132  if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSarModel::initAdjustableParameters: returning..." << std::endl;
133 }
134 
135 
136 //*****************************************************************************
137 // METHOD: ossimSarModel::loadState()
138 //
139 // Load the state of this object from KWL.
140 //
141 //*****************************************************************************
142 bool ossimSarModel::loadState(const ossimKeywordlist& kwl, const char* prefix)
143 {
144  // Call the base class. If it fails, no sense going on.
145  if (ossimSensorModel::loadState(kwl, prefix) == false)
146  {
147  if (traceDebug())
148  {
150  << "DEBUG ossimSarModel::loadState(): returning with error..."
151  << std::endl;
152  }
153 
154  return false;
155  }
156 
157  const char* lookup;
158 
159  // Get the acquisition mode
160  lookup = kwl.find(prefix, ACQ_MODE_KW);
162  if (lookup)
163  {
165  }
167  {
168  if (traceDebug())
169  {
171  << "DEBUG ossimSarModel::loadState() lookup failure: "
172  << ACQ_MODE_KW << "\nreturning with error..."
173  << std::endl;
174  }
175  return false;
176  }
177 
178  // Get the ORP (aka Output/Ground Reference Point)
180  lookup = kwl.find(prefix, ORP_POS_KW);
181  if (lookup)
182  {
183  theOrpPosition.toPoint(std::string(lookup));
184  }
185 
186  if (theOrpPosition.hasNans())
187  {
188  if (traceDebug())
189  {
191  << "DEBUG ossimSarModel::loadState() lookup failure: "
192  << ORP_POS_KW << "\nreturning with error..."
193  << std::endl;
194  }
195  return false;
196  }
197 
198  // Get the ORP image coordinates
200  lookup = kwl.find(prefix, ORP_CENTER_KW);
201  if (lookup)
202  {
203  theOrpCenter.toPoint(std::string(lookup));
204  }
205 
206  if (theOrpCenter.hasNans())
207  {
208  if (traceDebug())
209  {
211  << "DEBUG ossimSarModel::loadState() lookup failure: "
212  << ORP_CENTER_KW << "\nreturning with error..."
213  << std::endl;
214  }
215  return false;
216  }
217 
218  // Get the output plane normal (slant plane orientation)
220  lookup = kwl.find(prefix, OPNORM_KW);
221  if (lookup)
222  {
223  theOutputPlaneNormal.toPoint(std::string(lookup));
224  }
225 
227  {
228  if (traceDebug())
229  {
231  << "DEBUG ossimSarModel::loadState() lookup failure: "
232  << OPNORM_KW << "\nreturning with error..."
233  << std::endl;
234  }
235  return false;
236  }
237 
238  // Get the output plane x-axis (slant plane orientation)
240  lookup = kwl.find(prefix, OP_X_AXIS_KW);
241  if (lookup)
242  {
243  theOutputPlaneXaxis.toPoint(std::string(lookup));
244  }
245 
247  {
248  if (traceDebug())
249  {
251  << "DEBUG ossimSarModel::loadState() lookup failure: "
252  << OP_X_AXIS_KW << "\nreturning with error..."
253  << std::endl;
254  }
255  return false;
256  }
257 
258  // Get the output IPR
259  theOipr = ossim::nan();
260  lookup = kwl.find(prefix, OIPR_KW);
261  if (lookup)
262  {
264  }
265 
266  if (ossim::isnan(theOipr))
267  {
268  if (traceDebug())
269  {
271  << "DEBUG ossimSarModel::loadState() lookup failure: "
272  << OIPR_KW << "\nreturning with error..."
273  << std::endl;
274  }
275  return false;
276  }
277 
278  // Get the pixel size
280  lookup = kwl.find(prefix, PIX_SIZE_KW);
281  if (lookup)
282  {
284  }
285 
287  {
288  if (traceDebug())
289  {
291  << "DEBUG ossimSarModel::loadState() lookup failure: "
292  << PIX_SIZE_KW << "\nreturning with error..."
293  << std::endl;
294  }
295  return false;
296  }
297 
298  // Get the ARP time
300  lookup = kwl.find(prefix, ARP_TIME_KW);
301  if (lookup)
302  {
304  }
305 
307  {
308  if (traceDebug())
309  {
311  << "DEBUG ossimSarModel::loadState() lookup failure: "
312  << ARP_TIME_KW << "\nreturning with error..."
313  << std::endl;
314  }
315  return false;
316  }
317 
318  // Get the ARP position coefficients
319  // (variable degree polynomial representation of position)
320  theArpXPolCoeff.clear();
321  theArpYPolCoeff.clear();
322  theArpZPolCoeff.clear();
323  ossim_uint32 x_count = kwl.numberOf(ARP_POLY_COEFF_X_KW);
324  ossim_uint32 y_count = kwl.numberOf(ARP_POLY_COEFF_Y_KW);
325  ossim_uint32 z_count = kwl.numberOf(ARP_POLY_COEFF_Z_KW);
326 
327  if ( (x_count == y_count) && (x_count == z_count) )
328  {
329  ossim_uint32 found = 0;
330  ossim_uint32 count = 0;
331 
332  while ( (found < x_count) &&
333  (count < 100) ) // limit lookups to 100...
334  {
336  ossimString xkw = ARP_POLY_COEFF_X_KW;
337  ossimString ykw = ARP_POLY_COEFF_Y_KW;
338  ossimString zkw = ARP_POLY_COEFF_Z_KW;
339  xkw += s;
340  ykw += s;
341  zkw += s;
342 
343  const char* xLookup = kwl.find(prefix, xkw.c_str());
344  const char* yLookup = kwl.find(prefix, ykw.c_str());
345  const char* zLookup = kwl.find(prefix, zkw.c_str());
346 
347  if (xLookup && yLookup && zLookup)
348  {
349  ++found;
350  theArpXPolCoeff.push_back(ossimString::toFloat64(xLookup));
351  theArpYPolCoeff.push_back(ossimString::toFloat64(yLookup));
352  theArpZPolCoeff.push_back(ossimString::toFloat64(zLookup));
353  }
354  ++count;
355  }
356  }
357  else
358  {
359  if (traceDebug())
360  {
362  << "DEBUG ossimSarModel::loadState() lookup failure: "
363  << "arppol_coeff" << "\nreturning with error..."
364  << std::endl;
365  }
366  return false;
367  }
368 
369  // Get the time coefficients
370  // (variable degree polynomial representation of time WRT image coordinates)
371  theTimeCoeff.clear();
372  ossim_uint32 timeCount = kwl.numberOf(TIME_COEFF);
373  if (timeCount)
374  {
375  ossim_uint32 found = 0;
376  ossim_uint32 count = 0;
377 
378  while ( (found < timeCount) &&
379  (count < 100) ) // limit lookups to 100...
380  {
381  ossimString kw = TIME_COEFF;
382  kw += ossimString::toString(count);;
383 
384  lookup = kwl.find(prefix, kw.c_str());
385 
386  if (lookup)
387  {
388  ++found;
389  theTimeCoeff.push_back(ossimString::toFloat64(lookup));
390  }
391  ++count;
392  }
393  }
394  else
395  {
396  if (traceDebug())
397  {
399  << "DEBUG ossimSarModel::loadState() lookup failure: "
400  << TIME_COEFF << "\nreturning with error..."
401  << std::endl;
402  }
403  return false;
404  }
405 
406 
407  updateModel();
408 
409  if (traceDebug())
410  {
412  << "ossimSarModel::loadState() DEBUG: " << std::endl;
413  }
414 
415  return true;
416 }
417 
418 
419 //*****************************************************************************
420 // METHOD: ossimSarModel::saveState()
421 //
422 // Save the state of this object to KWL.
423 //
424 //*****************************************************************************
425 bool ossimSarModel::saveState(ossimKeywordlist& kwl, const char* prefix) const
426 {
427  kwl.add(prefix, ACQ_MODE_KW, getAcquistionModeString());
428  kwl.add(prefix, ORP_POS_KW, theOrpPosition.toString(15).c_str());
429  kwl.add(prefix, ORP_CENTER_KW, theOrpCenter.toString(15).c_str());
430  kwl.add(prefix, OPNORM_KW, theOutputPlaneNormal.toString(15).c_str());
431  kwl.add(prefix, OP_X_AXIS_KW, theOutputPlaneXaxis.toString(15).c_str());
432  kwl.add(prefix, OIPR_KW, theOipr);
433  kwl.add(prefix, PIX_SIZE_KW, thePixelSize);
434  kwl.add(prefix, ARP_TIME_KW, theArpTime);
435 
436  ossim_uint32 i;
437  for (i = 0; i < theArpXPolCoeff.size(); ++i)
438  {
439  ossimString kw = ARP_POLY_COEFF_X_KW;
440  kw += ossimString::toString(i);
441  kwl.add(prefix, kw, theArpXPolCoeff[i]);
442  }
443  for (i = 0; i < theArpYPolCoeff.size(); ++i)
444  {
445  ossimString kw = ARP_POLY_COEFF_Y_KW;
446  kw += ossimString::toString(i);
447  kwl.add(prefix, kw, theArpYPolCoeff[i]);
448  }
449  for (i = 0; i < theArpZPolCoeff.size(); ++i)
450  {
451  ossimString kw = ARP_POLY_COEFF_Z_KW;
452  kw += ossimString::toString(i);
453  kwl.add(prefix, kw, theArpZPolCoeff[i]);
454  }
455  for (i = 0; i < theTimeCoeff.size(); ++i)
456  {
457  ossimString kw = TIME_COEFF;
458  kw += ossimString::toString(i);
459  kwl.add(prefix, kw, theTimeCoeff[i]);
460  }
461 
462  return ossimSensorModel::saveState(kwl, prefix);
463 }
464 
465 
466 //*****************************************************************************
467 // STATIC METHOD: ossimSarModel::writeGeomTemplate
468 //
469 // Writes a sample kwl to output stream. Please update this method with any
470 // format and/or keyword changes. It will make life a lot easier for everyone.
471 //
472 //*****************************************************************************
474 {
475  if (traceExec())
476  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSarModel::writeGeomTemplate: entering..." << std::endl;
477 
478  os <<
479  "//************************************\n"
480  "// Template for SAR model keywordlist\n"
481  "//************************************\n";
482 
484  os << "//***\n"
485  << "// Base-class SAR Keywords:\n"
486  << "//***\n"
487  << ACQ_MODE_KW << ": <SCAN, SPOT>\n"
488  << ORP_POS_KW << ": <meters (ECF)>\n"
489  << ORP_CENTER_KW << ": <pixels>\n"
490  << OPNORM_KW << ": <unit vector>\n"
491  << OP_X_AXIS_KW << ": <unit vector>\n"
492  << OIPR_KW << ": <meters>\n"
493  << PIX_SIZE_KW << ": <meters>\n"
494  << ARP_TIME_KW << ": <sec>\n"
495  << ARP_POLY_COEFF_X_KW << ": <meters (ECF)>\n"
496  << ARP_POLY_COEFF_Y_KW << ": <meters (ECF)>\n"
497  << ARP_POLY_COEFF_Z_KW << ": <meters (ECF)>\n"
498  << TIME_COEFF << ": <sec>\n";
499  }
500 
501 
502 //*****************************************************************************
503 // METHOD: ossimSarModel::print()
504 //
505 // Print the KWL.
506 //
507 //*****************************************************************************
509 {
510  out << "// ossimSarModel::print:" << std::endl;
511 
512  ossimKeywordlist kwl;
513  if (saveState(kwl))
514  {
515  kwl.print(out);
516  }
517  else
518  {
519  out << "// ossimSarModel::saveState failed!" << std::endl;
520  }
521  return ossimSensorModel::print(out);
522 }
523 
524 
525 //*****************************************************************************
526 // METHOD: ossimSarModel::getAcquisitionMode()
527 //
528 // Get internal acquisition mode parameter.
529 //
530 //*****************************************************************************
532 {
533  ossimString result;
534 
535  switch (theAcquisitionMode)
536  {
537  case ossimSarModel::SCAN:
538  result = "scan";
539  break;
540  case ossimSarModel::SPOT:
541  result = "spot";
542  break;
544  default:
545  result = "unknown";
546  break;
547  }
548  return result;
549 }
550 
551 
552 //*****************************************************************************
553 // METHOD: ossimSarModel::lineSampleHeightToWorld()
554 //
555 // Perform inverse projection of image space to ground point @ specified hgt.
556 //
557 // Note: Special case indicated by 'heightAboveEllipsoid=OSSIM_NAN'
558 // will utilize the ORP height for intersection.
559 //
560 //*****************************************************************************
562  const double& heightAboveEllipsoid,
563  ossimGpt& worldPt) const
564 {
565  // Compute OP position from image coordinates
566  ossimEcefPoint opPt;
567  computeOPfromImage(lineSampPt, opPt);
568 
569  // Get image time
570  ossim_float64 iTime = getArpTime(lineSampPt);
571 
572  // Get ARP state
573  ossimEcefPoint arpPos = getArpPos(iTime);
574  ossimEcefVector arpVel = getArpVel(iTime);
575 
576  // Get range/Doppler
577  ossim_float64 range;
578  ossim_float64 doppler;
579  computeRangeDoppler(opPt, arpPos, arpVel, range, doppler);
580 
581  // Set the height reference
582  ossim_float64 hgtSet;
583  if ( ossim::isnan(heightAboveEllipsoid) )
584  {
585  ossimGpt orpG(theOrpPosition);
586  hgtSet = orpG.height();
587  }
588  else
589  {
590  hgtSet = heightAboveEllipsoid;
591  }
592 
593  ossimHgtRef hgtRef(AT_HGT, hgtSet);
594 
595  // Project OP to DEM
596  ossimEcefPoint ellPt;
597  projOPtoSurface(opPt, range, doppler, arpPos, arpVel, &hgtRef, ellPt);
598  ossimGpt iPt(ellPt);
599 
600  worldPt = iPt;
601 }
602 
603 
604 //*****************************************************************************
605 // METHOD: ossimSarModel::worldToLineSample()
606 //
607 // Perform forward projection of ground point to image space.
608 //
609 //*****************************************************************************
611  ossimDpt& image_point) const
612 {
613  ossimEcefPoint pt(world_point);
614 
615  // Project to OP plane
616  ossimEcefPoint opPt;
617  projEllipsoidToOP(pt, opPt);
618 
619  // Compute image coordinates from OP position
620  computeImageFromOP(opPt,image_point);
621 }
622 
623 
624 //*****************************************************************************
625 // METHOD: ossimSarModel::lineSampleToWorld()
626 //
627 // Perform inverse projection of image space to ground point.
628 //
629 //*****************************************************************************
631  ossimGpt& worldPt) const
632 {
633  // Compute OP position from image coordinates
634  ossimEcefPoint opPt;
635  computeOPfromImage(lineSampPt, opPt);
636 
637  // Get image time
638  ossim_float64 iTime = getArpTime(lineSampPt);
639 
640  // Get ARP state vector
641  ossimEcefPoint arpPos = getArpPos(iTime);
642  ossimEcefVector arpVel = getArpVel(iTime);
643 
644  // Get range/Doppler
645  ossim_float64 range;
646  ossim_float64 doppler;
647  computeRangeDoppler(opPt, arpPos, arpVel, range, doppler);
648 
649  // Set the height reference
650  ossimHgtRef hgtRef(AT_DEM);
651 
652  // Project OP to DEM
653  ossimEcefPoint ellPt;
654  projOPtoSurface(opPt, range, doppler, arpPos, arpVel, &hgtRef, ellPt);
655  ossimGpt iPt(ellPt);
656 
657  worldPt = iPt;
658 
659 }
660 
661 
662 //*****************************************************************************
663 // METHOD: ossimSarModel::imagingRay()
664 //
665 // Given an image point, returns a ray originating at the ARP position
666 // and pointing towards the target's position in the Output
667 // Plane.
668 // This DOES NOT provide the conventional definition for an imaging ray
669 // because the imaging locus for SAR is not a ray.
670 //
671 // It DOES provide a radius vector for the range/Doppler circle.
672 //
673 //*****************************************************************************
674 void ossimSarModel::imagingRay(const ossimDpt& image_point,
675  ossimEcefRay& image_ray) const
676 {
677  // Compute OP position from image coordinates
678  ossimEcefPoint opPt;
679  computeOPfromImage(image_point, opPt);
680 
681  // Get image time
682  ossim_float64 iTime = getArpTime(image_point);
683 
684  // Get ARP position
685  ossimEcefPoint arpPos = getArpPos(iTime);
686 
687  // Construct the ray
688  ossimGpt start(arpPos);
689  ossimGpt end(opPt);
690 
691  image_ray = ossimEcefRay(start, end);
692 
693  return;
694 }
695 
696 
697 //*****************************************************************************
698 // METHOD: ossimSarModel::getObsCovMat()
699 //
700 // Gives 2X2 covariance matrix of observations.
701 //
702 // Note: At this base class level, the only error source currently
703 // considered is mensuration error. This is obviously optimistic,
704 // but is included as a placeholder/example.
705 //
706 //*****************************************************************************
708  const ossimDpt& /* ipos */, NEWMAT::SymmetricMatrix& Cov)
709 {
710  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
711  // Mensuration error contribution
712  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
713  // Sensitivity matrix
714  NEWMAT::SymmetricMatrix B(2);
715  B(1,1) = thePixelSpacing;
716  B(2,2) = B(1,1);
717  B(1,2) = 0.0;
718  // Default pointing error = 0.5 pixels
719  ossim_float64 defPointingSigma = 0.5;
720  NEWMAT::SymmetricMatrix P(2);
721  P(1,1) = defPointingSigma*defPointingSigma;
722  P(2,2) = P(1,1);
723  P(1,2) = 0.0;
724  // Propagate to rng/az
725  NEWMAT::SymmetricMatrix Cm;
726  Cm << B * P * B.t();
727 
728  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
729  // Sum total covariance in rng/az
730  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
731  NEWMAT::SymmetricMatrix Ctot = Cm; //+ other contributors as identified
732 
733  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
734  // Propagate to rng/Dop
735  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
736  NEWMAT::SymmetricMatrix Bad(2);
737  Bad(1,1) = 1.0;
738  Bad(2,2) = theParDopWRTaz;
739  Bad(1,2) = 0.0;
740 
741  Cov << Bad * Ctot * Bad.t();
742 
744 }
745 
746 //*****************************************************************************
747 // METHOD: ossimSarModel::updateModel()
748 //
749 // Update computed parameters.
750 //
751 //*****************************************************************************
753 {
754  // Set the pixel size
756 
757  // Define the output(focus) plane
758  // Ref[1], eq. 11-29 -> 11-31
761 
763  theOPY.normalize();
764 
766 
767  if (traceDebug())
768  {
770  << "DEBUG updateModel:\n OP vectors...";
772  << "\n OPX: "<<theOPX
773  << "\n OPY: "<<theOPY
774  << "\n OPZ: "<<theOPZ<<endl;
775  ossimGpt orpg(theOrpPosition);
777  <<" ORPgeo: "<<orpg<<endl;
778  }
779  // Update geometry
786 
787  // Set base class members
793 
794 }
795 
796 
797 //*****************************************************************************
798 // METHOD: ossimSarModel::getArpPos()
799 //
800 // Return ARP position as constant term.
801 //
802 //*****************************************************************************
804 {
806  theArpYPolCoeff[0],
807  theArpZPolCoeff[0]);
808 
809  // Handle the adjustable offset
810  // Define ENU space at pos
811  ossimGpt posG(pos);
812  ossimLsrSpace enu(posG);
813  // Rotate offset vector to ECF
815  ossimEcefVector ecfOffset = enu.lsrToEcefRotMatrix()*tpnn;
816  // Add the offset
817  pos = pos + ecfOffset;
818 
819  return pos;
820 }
821 
822 
823 //*****************************************************************************
824 // METHOD: ossimSarModel::getArpVel()
825 //
826 // Return ARP velocity as 1st order term coefficient.
827 //
828 //*****************************************************************************
830 {
832  theArpYPolCoeff[1],
833  theArpZPolCoeff[1]);
834 
835  return vec;
836 }
837 
838 
839 //*****************************************************************************
840 // METHOD: ossimSarModel::getArpPos()
841 //
842 // Compute ARP position as function of time-dependent polynomial.
843 // Note: The polynomial degree/coefficients must be
844 // predetermined by the data provider.
845 //
846 //*****************************************************************************
848 {
849  ossim_int32 i;
850  ossim_uint32 nTermsX = (ossim_uint32)theArpXPolCoeff.size();
851  ossim_uint32 nTermsY = (ossim_uint32)theArpYPolCoeff.size();
852  ossim_uint32 nTermsZ = (ossim_uint32)theArpZPolCoeff.size();
853 
854  ossim_float64 x = theArpXPolCoeff[nTermsX-1];
855  for (i=nTermsX-2; i>=0; i--)
856  x = x*time + theArpXPolCoeff[i];
857 
858  ossim_float64 y = theArpYPolCoeff[nTermsY-1];
859  for (i=nTermsY-2; i>=0; i--)
860  y = y*time + theArpYPolCoeff[i];
861 
862  ossim_float64 z = theArpZPolCoeff[nTermsZ-1];
863  for (i=nTermsZ-2; i>=0; i--)
864  z = z*time + theArpZPolCoeff[i];
865 
866  ossimEcefPoint pos(x, y, z);
867 
868  // Handle the adjustable offset
869  // Define ENU space at pos
870  ossimGpt posG(pos);
871  ossimLsrSpace enu(posG);
872  // Rotate offset vector to ECF
874  ossimEcefVector ecfOffset = enu.lsrToEcefRotMatrix()*tpnn;
875  // Add the offset
876  pos = pos + ecfOffset;
877 
878  if (traceDebug())
879  {
880  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG getArpPos:"<<endl;
881  ossimNotify(ossimNotifyLevel_DEBUG) << " time = "<<time<<endl;
882  ossimNotify(ossimNotifyLevel_DEBUG) << " pos = "<<pos<<endl;
883  ossimNotify(ossimNotifyLevel_DEBUG) << " offset = "<<theLsrOffset<<endl;
884  }
885 
886  return pos;
887 }
888 
889 
890 //*****************************************************************************
891 // METHOD: ossimSarModel::getArpVel()
892 //
893 // Compute ARP velocity as 1st derivative of time-dependent polynomial.
894 // Note: The polynomial degree/coefficients must be
895 // predetermined by the data provider.
896 //
897 //*****************************************************************************
899 {
900  ossim_int32 i;
901  ossim_uint32 nTermsX = (ossim_uint32)theArpXPolCoeff.size();
902  ossim_uint32 nTermsY = (ossim_uint32)theArpYPolCoeff.size();
903  ossim_uint32 nTermsZ = (ossim_uint32)theArpZPolCoeff.size();
904 
905  ossim_float64 x = nTermsX * theArpXPolCoeff[nTermsX-1];
906  for (i=nTermsX-2; i>=1; i--)
907  x = x*time + i*theArpXPolCoeff[i];
908 
909  ossim_float64 y = nTermsY * theArpYPolCoeff[nTermsY-1];
910  for (i=nTermsY-2; i>=1; i--)
911  y = y*time + i*theArpYPolCoeff[i];
912 
913  ossim_float64 z = nTermsZ * theArpZPolCoeff[nTermsZ-1];
914  for (i=nTermsZ-2; i>=1; i--)
915  z = z*time + i*theArpZPolCoeff[i];
916 
917  ossimEcefVector vel(x, y, z);
918 
919  if (traceDebug())
920  {
921  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG getArpVel:"<<endl;
922  ossimNotify(ossimNotifyLevel_DEBUG) << " time = "<<time<<endl;
923  ossimNotify(ossimNotifyLevel_DEBUG) << " vel = "<<vel<<endl;
924  }
925 
926  return vel;
927 }
928 
929 
930 //*****************************************************************************
931 // METHOD: ossimSarModel::getArpTime()
932 //
933 // Return constant ARP time.
934 //
935 //*****************************************************************************
937 {
938  return theTimeCoeff[0];
939 }
940 
941 
942 //*****************************************************************************
943 // METHOD: ossimSarModel::getArpTime()
944 //
945 // Compute ARP time as function of line/sample-dependent polynomial.
946 // Defaults to full 3rd order.
947 // Note: The polynomial degree/coefficients must be
948 // predetermined by the data provider. Higher order terms
949 // can be zeroed out if necessary.
950 //
951 //*****************************************************************************
953 {
954  ossim_float64 s = imgPt.samp;
955  ossim_float64 l = imgPt.line;
956 
957  ossim_float64 s2 = s*s;
958  ossim_float64 s3 = s2*s;
959  ossim_float64 l2 = l*l;
960  ossim_float64 l3 = l2*l;
961 
962  // Evaluate the time polynomial
963  ossim_float64 imgTime = theTimeCoeff[0];
964  imgTime += theTimeCoeff[1] * l;
965  imgTime += theTimeCoeff[2] * l2;
966  imgTime += theTimeCoeff[3] * l3;
967  imgTime += theTimeCoeff[4] * s;
968  imgTime += theTimeCoeff[5] * s * l;
969  imgTime += theTimeCoeff[6] * s * l2;
970  imgTime += theTimeCoeff[7] * s * l3;
971  imgTime += theTimeCoeff[8] * s2;
972  imgTime += theTimeCoeff[9] * s2 * l;
973  imgTime += theTimeCoeff[10] * s2 * l2;
974  imgTime += theTimeCoeff[11] * s2 * l3;
975  imgTime += theTimeCoeff[12] * s3;
976  imgTime += theTimeCoeff[13] * s3 * l;
977  imgTime += theTimeCoeff[14] * s3 * l2;
978  imgTime += theTimeCoeff[15] * s3 * l3;
979 
980  if (traceDebug())
981  {
982  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG getArpTime:"<<endl;
983  ossimNotify(ossimNotifyLevel_DEBUG) << " imgPt = "<<imgPt<<endl;
984  ossimNotify(ossimNotifyLevel_DEBUG) << " imgTime = "<<imgTime<<endl;
985  }
986 
987 
988  return imgTime;
989 }
990 
991 
992 //*****************************************************************************
993 // METHOD: ossimSarModel::computeRangeDoppler()
994 //
995 // Compute range/Doppler for given ARP state and ECF point.
996 // Ref[1], eq. 11-37, 11-38
997 //
998 //*****************************************************************************
1000  const ossimEcefPoint& arpPos,
1001  const ossimEcefVector& arpVel,
1002  ossim_float64& range,
1003  ossim_float64& doppler) const
1004 {
1005  // Compute range
1006  ossimEcefVector delta = pt - arpPos;
1007  range = delta.magnitude();
1008 
1009  if (traceDebug())
1010  {
1012  << "DEBUG computeRangeDoppler: range vector..." << endl;
1014  << "delta components: \n"<<delta<<endl;
1015  }
1016 
1017  if (range != 0.0)
1018  {
1019  // Compute Doppler
1020  doppler = arpVel.dot(delta) / range;
1021  return true;
1022  }
1023 
1024  return false;
1025 }
1026 
1027 
1028 //*****************************************************************************
1029 // METHOD: ossimSarModel::computeOPfromImage()
1030 //
1031 // Compute Output Plane coordinates from image coordinates.
1032 // Ref[1], eq. 11-32 -> 11-35
1033 //
1034 //*****************************************************************************
1036  ossimEcefPoint& opPt) const
1037 {
1038  ossim_float64 dL = imgPt.line - theOrpCenter.line;
1039  ossim_float64 dS = imgPt.samp - theOrpCenter.samp;
1040 
1041  dL *= thePixelSpacing;
1042  dS *= thePixelSpacing;
1043 
1044  opPt = theOPX*dL + theOPY*dS + theOrpPosition;
1045 
1046  return true;
1047 }
1048 
1049 
1050 //*****************************************************************************
1051 // METHOD: ossimSarModel::computeImageFromOP()
1052 //
1053 // Compute image coordinates from Output Plane coordinates.
1054 // Ref[1], eq. 11-32 -> 11-35
1055 //
1056 //*****************************************************************************
1058 {
1059  ossimEcefVector delta(opPt - theOrpPosition);
1060 
1061  ossim_float64 dL = delta.dot(theOPX) / thePixelSpacing;
1062  ossim_float64 dS = delta.dot(theOPY) / thePixelSpacing;
1063 
1064  imgPt.line = theOrpCenter.line + dL;
1065  imgPt.samp = theOrpCenter.samp + dS;
1066 
1067  return true;
1068 }
1069 
1070 
1071 //*****************************************************************************
1072 // METHOD: ossimSarModel::projOPtoSurface()
1073 //
1074 // Project Output Plane coordinates to ellipsoid at reference height.
1075 //
1076 //*****************************************************************************
1078  const ossim_float64& range,
1079  const ossim_float64& doppler,
1080  const ossimEcefPoint& arpPos,
1081  const ossimEcefVector& arpVel,
1082  const ossimHgtRef* hgtRef,
1083  ossimEcefPoint& ellPt) const
1084 {
1085  // Set slopes for tangent plane
1086  ossim_float64 sx = 0.0;
1087  ossim_float64 sy = 0.0;
1088 
1089  // Set tangent plane normal vector in ENU
1090  ossimColumnVector3d tpn(sx, sy, 1.0);
1091  ossimColumnVector3d tpnn(-sx, -sy, 1.0);
1092 
1093  // Initialize at OP point
1094  ossimEcefPoint rg(opPt);
1095 
1096  // Matrices
1097  NEWMAT::SymmetricMatrix BtB(3);
1098  NEWMAT::ColumnVector BtF(3);
1099  NEWMAT::ColumnVector F(3);
1100  NEWMAT::ColumnVector dR(3);
1101 
1102  // Initialize criteria
1103  F(1)=theOipr;
1104 
1105  ossim_int32 iter = 0;
1106 
1107  while ((F(1)>=theOipr || F(2)>=0.0003048 || F(3)>=0.5) && iter<5)
1108  {
1109  // Compute current latitude/longitude estimate
1110  ossimGpt pg(rg);
1111 
1112  // Set reference point @ desired elevation
1113  ossim_float64 atHgt = hgtRef->getRefHeight(pg);
1114  pg.height(atHgt);
1115  ossimEcefPoint rt(pg);
1116 
1117  // Define ENU space at reference point
1118  ossimLsrSpace enu(pg);
1119 
1120  // Rotate normal vector to ECF
1121  ossimEcefVector st = enu.lsrToEcefRotMatrix()*tpn;
1122 
1123  // Compute current range & Doppler estimate
1124  ossim_float64 rngComp;
1125  ossim_float64 dopComp;
1126  computeRangeDoppler(rg, arpPos, arpVel, rngComp, dopComp);
1127 
1128  // Compute current height estimate
1129  ossim_float64 diffHgt = st.dot(rg-rt);
1130 
1131  // Compute current fr, fd, ft
1132  F(1) = rngComp - range;
1133  F(2) = dopComp - doppler;
1134  F(3) = diffHgt;
1135 
1136  // Compute fr partials
1137  ossimEcefVector delta = rg - arpPos;
1138  ossimEcefVector deltaUv = delta.unitVector();
1139  ossimEcefVector p_fr = -deltaUv;
1140 
1141  // Compute fd partials
1142  ossim_float64 vDotr = arpVel.dot(deltaUv);
1143  ossimEcefVector p_fd = (arpVel - deltaUv*vDotr)/rngComp;
1144 
1145  // Compute ft partials
1146  ossimColumnVector3d p_ft = enu.lsrToEcefRotMatrix()*tpnn;
1147 
1148  // Form B-matrix
1149  NEWMAT::Matrix B = ossimMatrix3x3::create(p_fr[0], p_fr[1], p_fr[2],
1150  p_fd[0], p_fd[1], p_fd[2],
1151  p_ft[0], p_ft[1], p_ft[2]);
1152 
1153  // Form coefficient matrix & discrepancy vector
1154  BtF << B.t()*F;
1155  BtB << B.t()*B;
1156 
1157  // Solve system
1158  dR = solveLeastSquares(BtB, BtF);
1159 
1160  // Update estimate
1161  for (ossim_int32 k=0; k<3; k++)
1162  rg[k] -= dR(k+1);
1163 
1164  iter++;
1165  }
1166 
1167  // Set intersection for return
1168  ellPt = rg;
1169 
1170  return true;
1171 }
1172 
1173 
1174 //*****************************************************************************
1175 // METHOD: ossimSarModel::projEllipsoidToOP()
1176 //
1177 // Projects ellipsoid coordinates to Output Plane.
1178 //
1179 //*****************************************************************************
1181  ossimEcefPoint& opPt) const
1182 {
1183  ossimDpt currentImagePt;
1184  ossimEcefPoint selPt;
1185 
1186  // Initialize at ORP image point
1187  currentImagePt = theOrpCenter;
1188 
1189  ossim_float64 checkTime = 1.0;
1190  ossim_float64 lTime=10000.0;
1191  ossim_int32 iter = 0;
1192 
1193 
1194  // Iterate on imaging time
1195  while (checkTime > 10.0e-6 && iter<5)
1196  {
1197 
1198  // Get current time estimate
1199  ossim_float64 cTime = getArpTime(currentImagePt);
1200  checkTime = fabs(cTime-lTime)/cTime;
1201 
1202  // Get state vector at current time estimate
1203  ossimEcefPoint arpPos = getArpPos(cTime);
1204  ossimEcefVector arpVel = getArpVel(cTime);
1205  ossimEcefVector arpVelunit = arpVel.unitVector();
1206 
1207  // Define planes
1208  ossim_float64 constOP = theOPZ.dot(
1210  ossim_float64 constRD = arpVelunit.dot(
1211  ossimEcefVector(ellPt[0],ellPt[1],ellPt[2]));
1212 
1213  // Compute dot product of normals
1214  ossim_float64 ndot = theOPZ.dot(arpVelunit);
1215 
1216  // Compute line of intersection of OP and RD planes
1217  ossim_float64 det = 1.0 - ndot*ndot;
1218  ossim_float64 c1 = (constOP - ndot*constRD) / det;
1219  ossim_float64 c2 = (constRD - ndot*constOP) / det;
1220  ossimEcefPoint ori = (theOPZ*c1+arpVelunit*c2)+ossimEcefPoint(0.0,0.0,0.0);
1221  ossimEcefVector dir = theOPZ.cross(arpVelunit);
1222 
1223  // Solve for intersection points (RD circle and OP)
1224  ossimEcefVector delta = ori - arpPos;
1225  ossim_float64 a2 = dir.length()*dir.length();
1226  ossim_float64 a1 = delta.dot(dir);
1227  ossimEcefVector rng(ellPt-arpPos);
1228  ossim_float64 a0 = delta.length()*delta.length()-rng.length()*rng.length();
1229 
1230  ossim_float64 rootSqr = a1*a1-a0*a2;
1231  ossim_float64 root = sqrt(rootSqr);
1232  ossimEcefPoint p1 = ori - dir*((a1+root)/a2);
1233  ossimEcefPoint p2 = ori - dir*((a1-root)/a2);
1234 
1235  ossimEcefVector p1Delta = p1 - ellPt;
1236  ossimEcefVector p2Delta = p2 - ellPt;
1237 
1238  // Pick correct point
1239  if (p1Delta.magnitude()<p2Delta.magnitude())
1240  selPt = p1;
1241  else
1242  selPt = p2;
1243 
1244  // Compute OP image coordinates
1245  computeImageFromOP(selPt,currentImagePt);
1246 
1247  lTime = cTime;
1248  iter++;
1249  }
1250 
1251  opPt = selPt;
1252 
1253  return true;
1254 }
1255 
1256 
1257 //*****************************************************************************
1258 // METHOD: ossimSarModel::getForwardDeriv()
1259 //
1260 // Compute partials of range/Doppler WRT to ground.
1261 //
1262 //*****************************************************************************
1264  const ossimGpt& pos,
1265  double h)
1266 {
1267  // If derivMode (parmIdx) >= 0 call base class version
1268  // for "adjustable parameters"
1269  if (derivMode >= 0)
1270  {
1271  return ossimSensorModel::getForwardDeriv(derivMode, pos, h);
1272  }
1273 
1274  // Use alternative derivMode definitions
1275  else
1276  {
1277  ossimDpt returnData;
1278 
1279  //******************************************
1280  // OBS_INIT mode
1281  // [1] compute r/D corresponding to (s,l)
1282  // [2] compute time, ARP posvel and save
1283  // Note: In this mode, pos is used to pass
1284  // in the (s,l) observations.
1285  //******************************************
1286  if (derivMode==OBS_INIT)
1287  {
1288  // Compute the r/D observations from image coordinates
1289  ossimDpt obs;
1290  obs.samp = pos.latd();
1291  obs.line = pos.lond();
1292 
1293  theObsTime = getArpTime(obs);
1298 
1302  ossimDpt obsRD(theObsRng, theObsDop);
1303  theObs = obsRD;
1304  }
1305 
1306  //******************************************
1307  // EVALUATE mode
1308  // [1] evaluate & save partials, residuals
1309  // [2] return residuals
1310  //******************************************
1311  else if (derivMode==EVALUATE)
1312  {
1313 
1314  // Compute the partials
1315  ossimEcefPoint gpos(pos);
1316  ossimEcefPoint ellObs = gpos;
1317  theObsPosition = gpos;
1318 
1319  // Partials of range WRT ground
1320  ossimEcefVector rng = ellObs - theObsArpPos;
1321  ossimEcefVector rngU = rng.unitVector();
1322 
1323  // Partials of azimuth WRT ground
1324  ossimEcefVector slantPerp = rngU.cross(theObsArpVel);
1326  ossim_float64 signPar = (slantPerp.dot(rs)<0.0) ? -1:1;
1327  ossimEcefVector slantNormal = slantPerp.unitVector() * signPar;
1328  ossimEcefVector azU = slantNormal.unitVector().cross(rngU);
1329 
1330  // Partials of Doppler WRT azimuth
1331  ossim_float64 dca = acos(theObsArpVel_U.dot(rngU));
1332  signPar = ((theObsArpVel.cross(rng)).dot(slantNormal)<0.0) ? 1:-1;
1333  theParDopWRTaz = signPar*sin(dca)*theObsArpVel_Mag/rng.magnitude();
1334 
1335  // Save the partials
1336  // Range
1337  theParWRTx.u = rngU.x();
1338  theParWRTy.u = rngU.y();
1339  theParWRTz.u = rngU.z();
1340  // Doppler
1341  theParWRTx.v = azU.x()*theParDopWRTaz;
1342  theParWRTy.v = azU.y()*theParDopWRTaz;
1343  theParWRTz.v = azU.z()*theParDopWRTaz;
1344 
1345  // Residuals
1346  ossim_float64 cRng;
1347  ossim_float64 cDop;
1348  ossimEcefPoint opPt;
1349  projEllipsoidToOP(ellObs, opPt);
1350  computeRangeDoppler(opPt, theObsArpPos, theObsArpVel, cRng, cDop);
1351  ossimDpt resid(theObsRng-cRng, theObsDop-cDop);
1352  returnData = resid;
1353  }
1354 
1355  //******************************************
1356  // P_WRT_X, P_WRT_Y, P_WRT_Z modes
1357  // [1] 3 separate calls required
1358  // [2] return 3 sets of partials
1359  //******************************************
1360  else if (derivMode==P_WRT_X)
1361  {
1362  returnData = theParWRTx;
1363  }
1364 
1365  else if (derivMode==P_WRT_Y)
1366  {
1367  returnData = theParWRTy;
1368  }
1369 
1370  else
1371  {
1372  returnData = theParWRTz;
1373  }
1374 
1375  return returnData;
1376  }
1377 }
1378 
1379 
1380 //*****************************************************************************
1381 // METHOD: ossimSarModel::setAcquisitionMode()
1382 //
1383 // Set internal acquisition mode parameter.
1384 //
1385 //*****************************************************************************
1387 {
1388  ossimString os = mode;
1389  os.downcase();
1390  if (os == "scan")
1391  {
1393  }
1394  else if (os == "spot")
1395  {
1397  }
1398  else
1399  {
1401  }
1402 }
1403 
1404 double ossimSarModel::sensorAzimuth(const ossimDpt& image_point) const
1405 {
1406  ossimGpt ground;
1407  lineSampleToWorld(image_point, ground);
1408 
1409  // Get image time
1410  ossim_float64 iTime = getArpTime(image_point);
1411 
1412  // Get ARP position
1413  ossimEcefPoint arpPos = getArpPos(iTime);
1414 
1415  ossimGpt sensor(arpPos);
1416 
1417  return ground.azimuthTo(sensor);
1418 }
ossim_uint32 x
virtual ossim_float64 getArpTime() const
Get ARP time for SPOT mode (constant time).
void setParameterDescription(ossim_uint32 idx, const ossimString &descrption)
ossim_float64 theOipr
output impulse response
ossimEcefVector unitVector() const
vector< ossim_float64 > theArpZPolCoeff
double azimuthTo(const ossimGpt &arg_gpt) const
METHOD: azimuthTo(ossimGpt) Computes the great-circle starting azimuth (i.e., at this gpt) to the arg...
Definition: ossimGpt.cpp:446
ossimEcefVector theOutputPlaneXaxis
output plane x-axis
ossimString getAcquistionModeString() const
Returns the acquisition mode as a string.
virtual std::ostream & print(std::ostream &os) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
ossim_float64 theObsDop
ossimEcefPoint theObsOP
ossim_uint32 numberOf(const char *str) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to load or recreate the state of an ossimSarModel from a keyword list.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual ossim_float64 getRefHeight(const ossimGpt &pg) const
Method to get height reference.
Definition: ossimHgtRef.cpp:90
double z() const
bool hasNans() const
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
ossim_float64 theArpTime
Aperture Reference/Center Point (ARP) time in seconds.
Represents serializable keyword/value map.
double u
Definition: ossimDpt.h:164
ossim_uint32 y
virtual void imagingRay(const ossimDpt &image_point, ossimEcefRay &image_ray) const
METHOD: imagingRay(image_point, &ossimEcefRay) Given an image point, returns a ray originating at the ARP...
virtual void lineSampleToWorld(const ossimDpt &image_point, ossimGpt &world_point) const
ossimEcefPoint theOrpPosition
Output/Ground Reference Point (ORP) position.
ossimEcefVector cross(const ossimEcefVector &) const
const char * find(const char *key) const
double dot(const ossimEcefVector &) const
double samp
Definition: ossimDpt.h:164
ossimEcefVector theOPX
Output/slant plane unit vectors.
RTTI_DEF1(ossimSarModel, "ossimSarModel", ossimSensorModel)
virtual bool projOPtoSurface(const ossimEcefPoint &opPt, const ossim_float64 &range, const ossim_float64 &doppler, const ossimEcefPoint &arpPos, const ossimEcefVector &arpVel, const ossimHgtRef *hgtRef, ossimEcefPoint &ellPt) const
Method to project output plane coordinates to surface.
ossimString toString(ossim_uint32 precision=15) const
To string method.
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
static ossimString toString(bool aValue)
Numeric to string methods.
double magnitude() const
void initAdjustableParameters()
ossim_float64 thePixelSpacing
Other computed parameters.
static void writeGeomTemplate(ostream &os)
virtual std::ostream & print(std::ostream &out) const
print method.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
virtual bool computeImageFromOP(const ossimEcefPoint &opPt, ossimDpt &imgPt) const
Method to compute image coordinates from output plane coordinates.
vector< ossim_float64 > theTimeCoeff
Time Coefficients.
void toPoint(const std::string &s)
Initializes this point from string.
virtual ossimDpt getForwardDeriv(int parmIdx, const ossimGpt &gpos, double hdelta=1e-11)
ossim_float64 theObsTime
virtual ~ossimSarModel()
virtual destructor
double ossim_float64
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
const NEWMAT::Matrix & lsrToEcefRotMatrix() const
void toPoint(const std::string &s)
Initializes this point from string.
double line
Definition: ossimDpt.h:165
void setAcquisitionMode(const ossimString &mode)
Sets the acquisition mode from string.
ossimEcefVector theObsArpVel_U
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of this object to a keyword list.
ossim_float64 theObsArpVel_Mag
ossimDpt theOrpCenter
sample (x)/line(y) image coordinates of ORP
unsigned int ossim_uint32
virtual bool computeOPfromImage(const ossimDpt &imgPt, ossimEcefPoint &opPt) const
Method to compute output plane coordinates from image coordinates.
void toPoint(const std::string &s)
Initializes this point from string.
Definition: ossimDpt.cpp:192
double height() const
Definition: ossimGpt.h:107
ossim_float64 toFloat64() const
ossim_float64 theParDopWRTaz
Partials for current point.
virtual ossimSensorModel::CovMatStatus getObsCovMat(const ossimDpt &ipos, NEWMAT::SymmetricMatrix &Cov)
virtual void updateModel()
Compute other parameters & update the model.
virtual void lineSampleHeightToWorld(const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const
void setParameterUnit(ossim_uint32 idx, ossimUnitType unit)
ossimEcefVector theOPZ
static NEWMAT::Matrix create()
ossimEcefPoint theObsArpPos
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual std::ostream & print(std::ostream &out) const
bool hasNans() const
Definition: ossimDpt.h:67
ossimEcefVector theObsArpVel
static void writeGeomTemplate(ostream &os)
vector< ossim_float64 > theArpXPolCoeff
Aperture Reference Point (ARP) Polynomials.
ossimEcefPoint theObsPosition
ossimEcefVector theOutputPlaneNormal
output plane normal
double length() const
AcquisitionMode theAcquisitionMode
acquisition mode
ossim_float64 theObsRng
Adjustment-related data used and set by getForwardDeriv.
virtual double sensorAzimuth(const ossimDpt &image_point) const
NEWMAT::ColumnVector solveLeastSquares(NEWMAT::SymmetricMatrix &A, NEWMAT::ColumnVector &r) const
double x() const
ossimString toString(ossim_uint32 precision=15) const
Definition: ossimDpt.cpp:160
virtual bool computeRangeDoppler(const ossimEcefPoint &pt, const ossimEcefPoint &arpPos, const ossimEcefVector &arpVel, ossim_float64 &range, ossim_float64 &doppler) const
Method to compute range & Doppler.
virtual void setAdjustableParameter(ossim_uint32 idx, double value, bool notify=false)
bool hasNans() const
ossimSarModel()
default constructor
virtual ossimEcefPoint getArpPos() const
Get ARP position for SPOT mode (constant time).
double y() 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
ossimEcefVector theLsrOffset
Adjustable parameters.
virtual void worldToLineSample(const ossimGpt &world_point, ossimDpt &image_point) const
ossimEcefVector theOPY
ossim_float64 thePixelSize
pixel size
ossimDpt theParWRTx
Partials for current point.
ossimDpt theObs
Observations & residuals for current point.
virtual ossimEcefVector getArpVel() const
Get ARP velocity for SPOT mode (constant time).
vector< ossim_float64 > theArpYPolCoeff
void setParameterSigma(ossim_uint32 idx, double value, bool notify=false)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
void makeNan()
Definition: ossimDpt.h:65
virtual bool projEllipsoidToOP(const ossimEcefPoint &ellPt, ossimEcefPoint &opPt) const
Method to project ellipsoid coordinates to output plane.
ossim_float64 theMeanGSD
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
double v
Definition: ossimDpt.h:165
ossimString toString(ossim_uint32 precision=15) const
To string method.
virtual ossimDpt getForwardDeriv(int parmIdx, const ossimGpt &gpos, double h)
Compute partials of range/Doppler WRT ground point.
int ossim_int32
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91