40 static ossimTrace traceExec (
"ossimLandSatModel:exec");
41 static ossimTrace traceDebug (
"ossimLandSatModel:debug");
43 static const char* PROJECTION_TYPE_KW =
"theProjectionType";
44 static const char* MAP_ZONE_KW =
"theMapZone";
45 static const char* MAP_OFFSET_X_KW =
"theMapOffset.x";
46 static const char* MAP_OFFSET_Y_KW =
"theMapOffset.y";
47 static const char* WRS_PATH_NUMBER_KW =
"theWrsPathNumber";
48 static const char* ROW_NUMBER_KW =
"theWrsRowNumber";
49 static const char* ILLUM_AZIMUTH_KW =
"theIllumAzimuth";
50 static const char* ILLUM_ELEVATION_KW =
"theIllumElevation";
51 static const char* MERIDIANAL_ANGLE_KW =
"theMeridianalAngle";
52 static const char* ORBIT_ALTITUDE_KW =
"theOrbitAltitude";
53 static const char* ORBIT_INCLINATION_KW =
"theOrbitInclination";
54 static const char* MAP_AZIM_ANGLE_KW =
"theMapAzimAngle";
55 static const char* MAP_2Ic_ROT_ANGLE_KW =
"theMap2IcRotAngle";
56 static const char* INTRACK_OFFSET_KW =
"theIntrackOffset";
57 static const char* CRTRACK_OFFSET_KW =
"theCrtrackOffset";
58 static const char* LINE_GSD_CORR_KW =
"theLineGsdCorr";
59 static const char* SAMP_GSD_CORR_KW =
"theSampGsdCorr";
60 static const char* ROLL_OFFSET_KW =
"theRollOffset";
61 static const char* YAW_OFFSET_KW =
"theYawOffset";
62 static const char* YAW_RATE_KW =
"theYawRate";
63 static const char* MAP_ROTATION_KW =
"theMapRotation";
66 static const double GEODETIC_2_GEOCENTRIC_FACTOR = 1.00674;
67 static const double L7_ORBIT_ALTITUDE = 705300.0;
68 static const double L7_ORBIT_INCLINATION = 98.22;
69 static const double L7_NOMINAL_POS_ERROR = 200.0;
71 static const double L5_ORBIT_ALTITUDE = 705300.0;
72 static const double L5_ORBIT_INCLINATION = 98.22;
73 static const double L5_NOMINAL_POS_ERROR = 12000.0;
76 static const char* PARAM_NAMES[] ={
"intrack_offset",
85 static const char* PARAM_UNITS[] ={
"meters",
94 static const char* PROJ_TYPE[] = {
"UNKNOWN_PROJECTION",
107 theIntrackOffset (0.0),
108 theCrtrackOffset (0.0),
109 theLineGsdCorr (0.0),
110 theSampGsdCorr (0.0),
131 theIntrackOffset (0.0),
132 theCrtrackOffset (0.0),
133 theLineGsdCorr (0.0),
134 theSampGsdCorr (0.0),
176 theIntrackOffset (0.0),
177 theCrtrackOffset (0.0),
178 theLineGsdCorr (0.0),
179 theSampGsdCorr (0.0),
203 theIllumAzimuth (rhs.theIllumAzimuth),
204 theIllumElevation (rhs.theIllumElevation),
205 theOrbitAltitude (rhs.theOrbitAltitude),
206 theOrbitInclination(rhs.theOrbitInclination),
207 theMapZone (rhs.theMapZone),
208 theMapOffset (rhs.theMapOffset),
209 theWrsPathNumber (rhs.theWrsPathNumber),
210 theWrsRowNumber (rhs.theWrsRowNumber),
211 theMeridianalAngle (rhs.theMeridianalAngle),
212 thePositionError (rhs.thePositionError),
213 theProjectionType (rhs.theProjectionType),
214 theMapProjection (rhs.theMapProjection.valid()?
217 theMapAzimAngle (rhs.theMapAzimAngle),
218 theMapAzimCos (rhs.theMapAzimCos),
219 theMapAzimSin (rhs.theMapAzimSin),
220 theMap2IcRotAngle (rhs.theMap2IcRotAngle),
221 theMap2IcRotCos (rhs.theMap2IcRotCos),
222 theMap2IcRotSin (rhs.theMap2IcRotSin),
223 theIntrackOffset (rhs.theIntrackOffset),
224 theCrtrackOffset (rhs.theCrtrackOffset),
225 theLineGsdCorr (rhs.theLineGsdCorr),
226 theSampGsdCorr (rhs.theSampGsdCorr),
227 theRollOffset (rhs.theRollOffset),
228 theYawOffset (rhs.theYawOffset),
229 theYawRate (rhs.theYawRate),
230 theMapRotation (rhs.theMapRotation),
231 theRollRotMat (rhs.theRollRotMat)
317 GEODETIC_2_GEOCENTRIC_FACTOR);
367 <<
"Unknown projection/orientation type." << std::endl;
382 <<
"DEBUG ossimLandSatModel::initFromHeader:" 383 <<
"\ntheMapProjection:\n";
388 <<
"\nHeader upper left ground point: " << head.
theUL_Corner 410 const double& height,
465 bool debug_flag =
false;
466 if (traceDebug() || debug_flag)
484 if (traceDebug() || debug_flag)
502 if (traceDebug() || debug_flag)
523 if (traceDebug() || debug_flag)
545 if (traceDebug() || debug_flag)
558 if (traceDebug() || debug_flag)
570 ossimLsrRay initLsrImgRay (vehicleLsrPos, lsrInPt);
573 if (traceDebug() || debug_flag)
603 ossimLsrRay adjLsrImgRay (adjLsrImgRayOrg, adjLsrImgRayDir);
607 if (traceDebug() || debug_flag)
628 os <<
"\nDump of ossimLandSatModel object at " 629 << hex <<
this <<
":\n" 630 <<
"\nLandSatModel -- Dump of all data members: " 670 const char* prefix)
const 726 <<
"\nInput kwl: " << kwl
730 const char* value = NULL;
731 const char* keyword =NULL;
738 if (!value || (strcmp(value,
TYPE_NAME(
this))))
762 keyword = PROJECTION_TYPE_KW;
763 value = kwl.
find(prefix, keyword);
772 keyword = MAP_ZONE_KW;
773 value = kwl.
find(prefix, keyword);
781 keyword = MAP_OFFSET_X_KW;
782 value = kwl.
find(prefix, keyword);
790 keyword = MAP_OFFSET_Y_KW;
791 value = kwl.
find(prefix, keyword);
799 keyword = WRS_PATH_NUMBER_KW;
800 value = kwl.
find(prefix, keyword);
808 keyword = ROW_NUMBER_KW;
809 value = kwl.
find(prefix, keyword);
817 keyword = ILLUM_AZIMUTH_KW;
818 value = kwl.
find(prefix, keyword);
826 keyword = ILLUM_ELEVATION_KW;
827 value = kwl.
find(prefix, keyword);
835 keyword = MERIDIANAL_ANGLE_KW;
836 value = kwl.
find(prefix, keyword);
844 keyword = ORBIT_ALTITUDE_KW;
845 value = kwl.
find(prefix, keyword);
853 keyword = ORBIT_INCLINATION_KW;
854 value = kwl.
find(prefix, keyword);
862 keyword = MAP_AZIM_ANGLE_KW;
863 value = kwl.
find(prefix, keyword);
871 keyword = MAP_2Ic_ROT_ANGLE_KW;
872 value = kwl.
find(prefix, keyword);
969 "//**************************************************************\n" 970 "// Template for LandSat model keywordlist\n" 971 "//**************************************************************\n" 977 <<
"// Derived-class ossimLandSatModel Keywords:\n" 979 << PROJECTION_TYPE_KW <<
": <float>\n" 980 << MAP_ZONE_KW <<
": <float>\n" 981 << MAP_OFFSET_X_KW <<
": <float>\n" 982 << MAP_OFFSET_Y_KW <<
": <float>\n" 983 << WRS_PATH_NUMBER_KW <<
": <float>\n" 984 << ROW_NUMBER_KW <<
": <float>\n" 985 << ILLUM_AZIMUTH_KW <<
": <float>\n" 986 << ILLUM_ELEVATION_KW <<
": <float>\n" 987 << MERIDIANAL_ANGLE_KW <<
": <float>\n" 988 << ORBIT_ALTITUDE_KW <<
": <float>\n" 989 << ORBIT_INCLINATION_KW <<
": <float>\n" 990 << MAP_AZIM_ANGLE_KW <<
": <float>\n" 991 << MAP_2Ic_ROT_ANGLE_KW <<
": <float>\n" 992 << INTRACK_OFFSET_KW <<
": <float> [optional]\n" 993 << CRTRACK_OFFSET_KW <<
": <float> [optional]\n" 994 << LINE_GSD_CORR_KW <<
": <float> [optional]\n" 995 << SAMP_GSD_CORR_KW <<
": <float> [optional]\n" 996 << ROLL_OFFSET_KW <<
": <float> [optional]\n" 997 << YAW_OFFSET_KW <<
": <float> [optional]\n" 998 << YAW_RATE_KW <<
": <float> [optional]\n" 999 << MAP_ROTATION_KW <<
": <float> [optional]\n" 1119 for (
int i=0; i<numParams; i++)
1159 ff_headerp = h.
get();
1191 if(!ff_headerp.
valid())
virtual void initAdjustableParameters()
void setParameterDescription(ossim_uint32 idx, const ossimString &descrption)
double computeParameterOffset(ossim_uint32 idx) const
virtual ossimObject * dup() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
static void writeGeomTemplate(ostream &os)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual void updateModel()
ossimEcefPoint intersectAboveEarthEllipsoid(const double &heightAboveEllipsoid, const ossimDatum *aDatum=ossimDatumFactory::instance() ->wgs84()) const
Represents serializable keyword/value map.
const char * find(const char *key) const
virtual void imagingRay(const ossimDpt &image_point, ossimEcefRay &image_ray) const
bool contains(char aChar) const
void initFromHeader(const ossimFfL7 &head)
ossimIpt theCenterImagePoint
ossimColumnVector3d & data()
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossim_float64 hgt
Height in meters above the ellipsiod.
double latd() const
Will convert the radian measure to degrees.
ossim_uint32 getNumberOfAdjustableParameters() const
static const char * TYPE_KW
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
NEWMAT::Matrix theRollRotMat
ossimRefPtr< ossimFfRevb > revb()
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
char theMapProjectionName[5]
virtual void lineSampleHeightToWorld(const ossimDpt &image_point, const double &heightEllipsoid, ossimGpt &worldPoint) const
virtual ~ossimLandSatModel()
uses file path to init model
double theMeridianalAngle
ossim_float64 theNominalPosError
virtual bool setupOptimizer(const ossimString &init_file)
image to ground faster
const char * chars() const
For backward compatibility.
ossimPolygon theBoundGndPolygon
void setParameterUnit(ossim_uint32 idx, ossimUnitType unit)
static NEWMAT::Matrix create()
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual std::ostream & print(std::ostream &out) const
ossimErrorCode theErrorStatus
virtual ossimDpt extrapolate(const ossimGpt &gp) const
static void writeGeomTemplate(ostream &os)
double theOrbitInclination
virtual std::ostream & print(std::ostream &out) const
virtual ossimDpt forward(const ossimGpt &worldPoint) const =0
All map projections will convert the world coordinate to an easting northing (Meters).
RTTI_DEF1(ossimLandSatModel, "ossimLandSatModel", ossimSensorModel)
ossimDrect theImageClipRect
virtual ossimErrorCode getErrorStatus() const
virtual void setAdjustableParameter(ossim_uint32 idx, double value, bool notify=false)
ProjectionType theProjectionType
void resizeAdjustableParameterArray(ossim_uint32 numberOfParameters)
virtual bool insideImage(const ossimDpt &p) const
const ossimLsrVector & direction() const
void setHemisphere(const ossimGpt &ground)
virtual std::ostream & print(std::ostream &out) const
Prints data members to stream.
char theRequestNumber[21]
void setParameterSigma(ossim_uint32 idx, double value, bool notify=false)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
ossimRefPtr< ossimMapProjection > theMapProjection
double theOrientationAngle
ossimString & downcase()
Downcases this string.