Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb
Commits
19036134
Commit
19036134
authored
15 years ago
by
Chia Aik Song
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Correction of prf unit
parent
5c9dce34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Utilities/otbossimplugins/ossim/ossimAlosPalsarModel.cpp
+18
-2
18 additions, 2 deletions
Utilities/otbossimplugins/ossim/ossimAlosPalsarModel.cpp
with
18 additions
and
2 deletions
Utilities/otbossimplugins/ossim/ossimAlosPalsarModel.cpp
+
18
−
2
View file @
19036134
...
...
@@ -93,6 +93,7 @@ bool ossimAlosPalsarModel::InitSensorParams(const ossimKeywordlist &kwl, const c
_sensor
=
new
SensorParams
();
/*
if(strcmp(time_dir_pix.c_str(), "INCREASE") == 0)
{
_sensor->set_col_direction(1);
...
...
@@ -101,7 +102,12 @@ bool ossimAlosPalsarModel::InitSensorParams(const ossimKeywordlist &kwl, const c
{
_sensor->set_col_direction(-1);
}
*/
// WARNING: _col_direction hard-coded to 1, as level 1.0 image is not flipped.
_sensor
->
set_col_direction
(
1
);
// TODO: Have to verify whether the time direction indicator should be always positive
/*
if(strcmp(time_dir_lin.c_str(), "INCREASE") == 0)
{
_sensor->set_lin_direction(1);
...
...
@@ -110,6 +116,8 @@ bool ossimAlosPalsarModel::InitSensorParams(const ossimKeywordlist &kwl, const c
{
_sensor->set_lin_direction(-1);
}
*/
_sensor
->
set_lin_direction
(
1
);
_sensor
->
set_sightDirection
(
SensorParams
::
Right
)
;
...
...
@@ -118,7 +126,7 @@ bool ossimAlosPalsarModel::InitSensorParams(const ossimKeywordlist &kwl, const c
double
n_rnglok
=
atof
(
kwl
.
find
(
prefix
,
"n_rnglok"
));
_sensor
->
set_nRangeLook
(
n_rnglok
);
_sensor
->
set_prf
(
fa
);
_sensor
->
set_prf
(
fa
/
1000.
);
// For ALOS, the fa value in the leader file is in units of mHz
_sensor
->
set_sf
(
fr
);
_sensor
->
set_rwl
(
wave_length
);
...
...
@@ -381,6 +389,11 @@ bool ossimAlosPalsarModel::InitPlatformPosition(const ossimKeywordlist &kwl, con
const
char
*
eph_sec_str
=
kwl
.
find
(
prefix
,
"eph_sec"
);
double
eph_sec
=
atof
(
eph_sec_str
);
std
::
cout
<<
"eph_year = "
<<
eph_year_str
<<
std
::
endl
;
std
::
cout
<<
"eph_month = "
<<
eph_month_str
<<
std
::
endl
;
std
::
cout
<<
eph_day_str
<<
std
::
endl
;
std
::
cout
<<
eph_sec_str
<<
std
::
endl
;
ref_civil_date
.
set_year
(
eph_year
);
ref_civil_date
.
set_month
(
eph_month
);
ref_civil_date
.
set_day
(
eph_day
);
...
...
@@ -549,6 +562,9 @@ bool ossimAlosPalsarModel::InitRefPoint(const ossimKeywordlist &kwl, const char
int
sec
=
atoi
(
sec_str
);
double
mili
=
atof
(
mili_str
);
std
::
cout
<<
"year/month/day = "
<<
year
<<
'/'
<<
month
<<
'/'
<<
day
<<
std
::
endl
;
std
::
cout
<<
"hour:min:sec = "
<<
hour
<<
':'
<<
min
<<
':'
<<
sec
<<
std
::
endl
;
std
::
cout
<<
"mili = "
<<
mili
<<
std
::
endl
;
CivilDateTime
date
(
year
,
month
,
day
,
hour
*
3600
+
min
*
60
+
sec
,
mili
/
1000.0
);
...
...
@@ -569,7 +585,7 @@ bool ossimAlosPalsarModel::InitRefPoint(const ossimKeywordlist &kwl, const char
//double distance = (rng_gate*1e-3 + ((double)sc_pix)*_sensor->get_nRangeLook()/_sensor->get_sf()) * (c/2.0);
const
char
*
slantRange
=
kwl
.
find
(
prefix
,
"slant_range_to_1st_data_sample"
);
double
distance
=
atof
(
slantRange
);
double
distance
=
atof
(
slantRange
)
+
static_cast
<
double
>
(
sc_pix
)
*
_sensor
->
get_nRangeLook
()
/
_sensor
->
get_sf
()
*
c
/
2.0
;
_refPoint
->
set_distance
(
distance
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment