29 RTTI_DEF1(ossimCosmoSkymedModel,
"ossimCosmoSkymedModel", ossimGeometricSarSensorModel);
34 _sceneCenterRangeTime(0),
60 const char* central_freq_str = kwl.
find(prefix,
"central_freq");
61 double central_freq = atof(central_freq_str);
62 const char* fr_str = kwl.
find(prefix,
"fr");
63 double fr = atof(fr_str);
64 const char* fa_str = kwl.
find(prefix,
"fa");
65 double fa = atof(fa_str);
68 const char* n_azilok_str = kwl.
find(prefix,
"n_azilok");
69 double n_azilok = atof(n_azilok_str);
70 const char* n_rnglok_str = kwl.
find(prefix,
"n_rnglok");
71 double n_rnglok = atof(n_rnglok_str);
74 const char* ellip_maj_str = kwl.
find(prefix,
"ellip_maj");
75 double ellip_maj = atof(ellip_maj_str) * 1000.0;
76 const char* ellip_min_str = kwl.
find(prefix,
"ellip_min");
77 double ellip_min = atof(ellip_min_str) * 1000.0;
90 const char* orbitDirection_str = kwl.
find(prefix,
"orbitDirection");
91 std::string orbitDirection(orbitDirection_str) ;
92 int orbitDirectionSign ;
93 if (orbitDirection==
"DESCENDING") orbitDirectionSign = 1 ;
94 else orbitDirectionSign = - 1 ;
96 const char* lookDirection_str = kwl.
find(prefix,
"lookDirection");
97 std::string lookDirection(lookDirection_str) ;
101 const char* colsOrder_str = kwl.
find(prefix,
"colsOrder");
102 std::string colsOrder(colsOrder_str) ;
103 const char* linsOrder_str = kwl.
find(prefix,
"linsOrder");
104 std::string linsOrder(linsOrder_str) ;
105 if (colsOrder==
"NEAR-FAR")
108 if (linsOrder==
"NEAR-FAR")
113 const double CLUM = 2.99792458e+8 ;
114 double wave_length = CLUM / central_freq ;
133 const char* neph_str = kwl.
find(prefix,
"neph");
134 int neph = atoi(neph_str);
139 const char* referenceUTC_str = kwl.
find(prefix,
"referenceUTC");
140 std::string referenceUTC(referenceUTC_str) ;
148 for (
int i = 0; i < neph; ++i)
154 sprintf(name,
"eph%i_date",i);
155 const char* date_str = kwl.
find(prefix,name);
156 float relative_date = atof(date_str);
158 sprintf(name,
"eph%i_posX",i);
159 const char* px_str = kwl.
find(prefix,name);
160 pos[0] = atof(px_str);
162 sprintf(name,
"eph%i_posY",i);
163 const char* py_str = kwl.
find(prefix,name);
164 pos[1] = atof(py_str);
166 sprintf(name,
"eph%i_posZ",i);
167 const char* pz_str = kwl.
find(prefix,name);
168 pos[2] = atof(pz_str);
170 sprintf(name,
"eph%i_velX",i);
171 const char* vx_str = kwl.
find(prefix,name);
172 vit[0] = atof(vx_str) ;
174 sprintf(name,
"eph%i_velY",i);
175 const char* vy_str = kwl.
find(prefix,name);
176 vit[1] = atof(vy_str) ;
178 sprintf(name,
"eph%i_velZ",i);
179 const char* vz_str = kwl.
find(prefix,name);
180 vit[2] = atof(vz_str) ;
184 int second = (int) relative_date ;
185 double decimal = relative_date - second ;
206 for (
int i=0;i<neph;i++)
217 const char* sc_lin_str = kwl.
find(prefix,
"sc_lin");
218 double sc_lin = atof(sc_lin_str);
220 const char* sc_pix_str = kwl.
find(prefix,
"sc_pix");
221 double sc_pix = atof(sc_pix_str);
226 const char* azimuthStartTime_str = kwl.
find(prefix,
"azimuthStartTime");
227 double azimuthStartTime = atof(azimuthStartTime_str);
229 const char* rng_gate_str = kwl.
find(prefix,
"rng_gate");
230 double rng_gate = atof(rng_gate_str);
232 const char* referenceUTC_str = kwl.
find(prefix,
"referenceUTC");
233 std::string referenceUTC(referenceUTC_str) ;
245 double relative_date = (azimuthStartTime + sc_lin/
_sensor->
get_prf());
246 int second = (int) relative_date ;
247 double decimal = relative_date - second ;
253 ref_civil_date.
get_day(), second, decimal);
256 if (ephemeris == NULL)
return false ;
270 double c = 2.99792458e+8;
284 const char* nbCol_str = kwl.
find(prefix,
"nbCol");
285 const char* nbLin_str = kwl.
find(prefix,
"nbLin");
292 std::list<ossimGpt> groundGcpCoordinates ;
293 std::list<ossimDpt> imageGcpCoordinates ;
295 for (
int k=0 ; k<5 ; k++) {
296 sprintf(name,
"cornersCol%i",k);
297 const char* i_str = kwl.
find(name);
299 sprintf(name,
"cornersLin%i",k);
300 const char* j_str = kwl.
find(name);
302 sprintf(name,
"cornersLon%i",k);
303 const char* lon_str = kwl.
find(name);
304 double lon = atof(lon_str);
305 sprintf(name,
"cornersLat%i",k);
306 const char* lat_str = kwl.
find(name);
307 double lat = atof(lat_str);
308 sprintf(name,
"cornersHeight%i",k);
309 const char* height_str = kwl.
find(name);
310 double height = atof(height_str) ;
313 ossimGpt groundGCP(lat, lon, height);
314 groundGcpCoordinates.push_back(groundGCP) ;
315 imageGcpCoordinates.push_back(imageGCP) ;
326 const char* rangeProjectionType_str = kwl.
find(prefix,
"rangeProjectionType");
327 std::string rangeProjectionType(rangeProjectionType_str);
329 const char* pixel_spacing_str = kwl.
find(prefix,
"pixel_spacing");
335 const char* nbCol_str = kwl.
find(prefix,
"nbCol");
339 const char* SrGr_R0_str = kwl.
find(prefix,
"SrGr_R0");
347 sprintf(name,
"SrToGr_coeffs_%i",i);
348 const char* coeff_str = kwl.
find(prefix,name);
349 coeff = atof(coeff_str);
361 if (utcString.size() < 8)
return false ;
362 const char* stringUTCDate = utcString.c_str() ;
365 for (
int i=0;i<4;i++)
367 year_str[i] = stringUTCDate[i];
372 for (
int i=4;i<6;i++)
374 month_str[i-4] = stringUTCDate[i];
379 for (
int i=6;i<8;i++)
381 day_str[i-6] = stringUTCDate[i];
385 outputDate.
set_year(atoi(year_str));
387 outputDate.
set_day(atoi(day_str));
This class represent an ephemeris in Geographic coordinates system.
double _SrGr_R0
Slant Range for each Ground Range Projection reference point.
void set_month(int month)
void set_sightDirection(SightDirection sight)
This class represents a date and time in the civil format.
virtual bool InitSensorParams(const ossimKeywordlist &kwl, const char *prefix)
Initializes the Sensor Params from a projection keywordlist.
RTTI_DEF1(ossimAlosPalsarModel, "ossimAlosPalsarModel", ossimGeometricSarSensorModel)
Represents serializable keyword/value map.
const char * find(const char *key) const
This class handles the referential point.
double get_distance() const
void set_lin_direction(int dir)
void set_second(int second)
double get_nRangeLook() const
This class handles the sensor parameters.
virtual bool InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix)
Initializes the Platform Position from a projection keywordlist.
ossimCosmoSkymedModel()
Constructor.
void set_pix_line(double pix_line)
void set_pix_col(double pix_col)
bool _isProductGeoreferenced
True iff the product is ground range.
void set_semiMinorAxis(double value)
virtual bool InitRefPoint(const ossimKeywordlist &kwl, const char *prefix)
Initializes the Reference Point from a projection keywordlist.
~ossimCosmoSkymedModel()
Destructor.
This class represents an ephemeris.
virtual double getSlantRangeFromGeoreferenced(double col) const
This function associates an image column number to a slant range when the image is georeferenced (gro...
void set_decimal(double decimal)
std::vector< double > _SrGr_coeffs
Slant Range for each Ground Range Projection coefficients.
void set_semiMajorAxis(double value)
double get_pix_col() const
void set_nRangeLook(double look)
bool UtcDateTimeStringToCivilDate(const std::string &utcString, CivilDateTime &outputDate)
virtual bool InitSRGR(const ossimKeywordlist &kwl, const char *prefix)
Initializes the Slant Range to Ground Range data sets : _SrToGr_R0,_SrToGr_coeffs_number,_SrToGr_exponent,_SrToGr_coeffs,_nbCol.
int get_col_direction() const
ossimDrect theImageClipRect
PlatformPosition * _platformPosition
Handle the position of the platform.
double _pixel_spacing
Pixel spacing.
void set_nAzimuthLook(double look)
virtual bool optimizeModel(const std::list< ossimGpt > &groundCoordinates, const std::list< ossimDpt > &imageCoordinates)
This function optimizes the model according to a list of Ground Control Points.
void set_ephemeris(Ephemeris *ephemeris)
void set_col_direction(int dir)
This class represents a date.
float distance(double lat1, double lon1, double lat2, double lon2, int units)
void set_distance(double distance)
double _nbCol
Number of columns.