39 static ossimTrace traceExec (
"ossimSpot5Model:exec");
40 static ossimTrace traceDebug (
"ossimSpot5Model:debug");
44 static const char* PARAM_NAMES[] = {
"roll_offset",
50 "focal_length_offset" };
52 static const char* PARAM_UNITS[] = {
"degrees",
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),
87 theFocalLenOffset (0.0)
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),
106 thePitchOffset (0.0),
111 theFocalLenOffset (0.0)
164 <<
"DEBUG ossimSpot5Model::computeSatToOrbRotation(): entering..." 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);
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;
212 <<
"DEBUG ossimSpot5Model::computeSatToOrbRotation(): entering..." 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);
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;
346 <<
" constructor! Aborting..." << std::endl;
451 std::ios_base::fmtflags f = out.flags();
453 out <<
"\nDump of ossimSpot5Model at address " << (hex) <<
this 455 <<
"\n------------------------------------------------" 474 <<
"\n------------------------------------------------" 484 const char* prefix)
const 530 bool runtime_dbflag = 0;
531 NEWMAT::Matrix satToOrbit;
541 if (traceDebug() || runtime_dbflag)
557 if (traceDebug() || runtime_dbflag)
560 <<
"DEBUG:\n\tP_ecf = " << P_ecf
561 <<
"\n\t V_ecf = " << V_ecf << std::endl;
572 if (traceDebug() || runtime_dbflag)
575 <<
"DEBUG:\n\t Psi_x = " << Psi_x
576 <<
"\n\t Psi_y = " << Psi_y << endl;
580 if (traceDebug() || runtime_dbflag)
583 <<
"DEBUG \n\t u_sat = " << u_sat << endl;
593 if (traceDebug() || runtime_dbflag)
596 <<
"DEBUG:\n\t theSatToOrbRotation = " << satToOrbit
597 <<
"\n\t u_orb = " << u_orb << endl;
610 Z_orb = Z_orb.
unit();
614 V_ecf.z()).cross(Z_orb).
unit();
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];
624 if (traceDebug() || runtime_dbflag)
627 <<
"DEBUG:\n\t orbToEcfRotation = " << orbToEcfRotation
628 <<
"\n\t u_ecf = " << u_ecf << endl;
639 <<
"DEBUG Spot5Model::imagingRay(): returning..." << std::endl;
656 worldPoint =
extrapolate(image_point, heightEllipsoid);
709 spot5Test = geomFile.
path();
711 if(spot5Test.
exists() ==
false)
713 spot5Test = geomFile.
path();
ossim_float64 theRefImagingTime
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
double computeParameterOffset(ossim_uint32 idx) 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
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
ossim_float64 theIllumElevation
void getImageRect(ossimDrect &rect) const
Zero based image rectangle, sub image if there is one.
RTTI_DEF1(ossimSpot5Model, "ossimSpot5Model", ossimSensorModel)
const ossimDpt & ul() const
virtual bool setupOptimizer(const ossimString &init_file)
image to ground faster
ossimDpt theSpotSubImageOffset
ossim_float64 theRefImagingTimeLine
relative to full image
ossimFilename theMetaDataFile
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_uint32 getNumberOfAdjustableParameters() const
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
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=NULL)
virtual std::ostream & print(std::ostream &out) const
ossim_float64 theRollOffset
virtual void imagingRay(const ossimDpt &image_point, ossimEcefRay &image_ray) const
ossim_float64 theLineSamplingPeriod
virtual void clearErrorStatus() const
ossim_float64 thePitchOffset
unsigned int ossim_uint32
void getSunElevation(ossim_float64 &el) const
ossimPolygon theBoundGndPolygon
ossimString getImageID() const
bool isStarTrackerUsed() const
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
ossimDpt midPoint() const
virtual void setAdjustableParameter(ossim_uint32 idx, double value, bool notify=false)
virtual void setErrorStatus() const
const ossimDpt & ur() const
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's contents...
virtual ossimObject * dup() const
void getPositionEcf(ossim_uint32 sample, ossimEcefPoint &pe) const
const ossimDpt & ll() const
ossimString getSensorID() const
virtual ~ossimSpot5Model()
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
ossimFilename getMetadataFile() const
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
void getSubImageOffset(ossimDpt &offset) 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)
std::basic_ostream< char > ostream
Base class for char output streams.