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
Antoine Belvire
otb
Commits
bfc838f7
Commit
bfc838f7
authored
16 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Fixing the ossimSpot5Model bug (segfault on some platforms including visual8
parent
93dc740b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Utilities/otbossim/include/ossim/projection/ossimSpot5Model.h
+1
-3
1 addition, 3 deletions
...ities/otbossim/include/ossim/projection/ossimSpot5Model.h
Utilities/otbossim/src/ossim/projection/ossimSpot5Model.cpp
+11
-16
11 additions, 16 deletions
Utilities/otbossim/src/ossim/projection/ossimSpot5Model.cpp
with
12 additions
and
19 deletions
Utilities/otbossim/include/ossim/projection/ossimSpot5Model.h
+
1
−
3
View file @
bfc838f7
...
...
@@ -118,7 +118,7 @@ protected:
void
loadGeometry
(
FILE
*
);
void
loadSupportData
();
void
computeSatToOrbRotation
(
ossim_float64
t
)
const
;
NEWMAT
::
Matrix
computeSatToOrbRotation
(
ossim_float64
t
)
const
;
/* virtual ossimDpt extrapolate (const ossimGpt& gp) const; */
/* virtual ossimGpt extrapolate (const ossimDpt& ip, */
...
...
@@ -140,8 +140,6 @@ protected:
ossim_float64
theLineSamplingPeriod
;
ossimDpt
theSpotSubImageOffset
;
mutable
NEWMAT
::
Matrix
theSatToOrbRotation
;
mutable
NEWMAT
::
Matrix
theOrbToEcfRotation
;
//---
// Adjustable parameters:
...
...
This diff is collapsed.
Click to expand it.
Utilities/otbossim/src/ossim/projection/ossimSpot5Model.cpp
+
11
−
16
View file @
bfc838f7
...
...
@@ -76,8 +76,6 @@ ossimSpot5Model::ossimSpot5Model()
theRefImagingTime
(
0.0
),
theRefImagingTimeLine
(
0.0
),
theLineSamplingPeriod
(
0.0
),
theSatToOrbRotation
(
3
,
3
),
theOrbToEcfRotation
(
3
,
3
),
theRollOffset
(
0.0
),
thePitchOffset
(
0.0
),
theYawOffset
(
0.0
),
...
...
@@ -100,8 +98,6 @@ ossimSpot5Model::ossimSpot5Model(ossimSpotDimapSupportData* sd)
theRefImagingTime
(
0.0
),
theRefImagingTimeLine
(
0.0
),
theLineSamplingPeriod
(
0.0
),
theSatToOrbRotation
(
3
,
3
),
theOrbToEcfRotation
(
3
,
3
),
theRollOffset
(
0.0
),
thePitchOffset
(
0.0
),
theYawOffset
(
0.0
),
...
...
@@ -168,7 +164,7 @@ ossimSpot5Model::ossimSpot5Model(const ossimSpot5Model& rhs)
//*****************************************************************************
// METHOD
//*****************************************************************************
void
ossimSpot5Model
::
computeSatToOrbRotation
(
ossim_float64
t
)
const
NEWMAT
::
Matrix
ossimSpot5Model
::
computeSatToOrbRotation
(
ossim_float64
t
)
const
{
if
(
traceExec
())
{
...
...
@@ -204,13 +200,14 @@ void ossimSpot5Model::computeSatToOrbRotation(ossim_float64 t)const
//---
// Populate rotation matrix:
//---
theS
atToOrbRotation
=
NEWMAT
::
Matrix
(
3
,
3
);
theS
atToOrbRotation
<<
(
cr
*
cy
)
<<
(
-
cr
*
sy
)
<<
(
-
sr
)
NEWMAT
::
Matrix
s
atToOrbRotation
=
NEWMAT
::
Matrix
(
3
,
3
);
s
atToOrbRotation
<<
(
cr
*
cy
)
<<
(
-
cr
*
sy
)
<<
(
-
sr
)
<<
(
cp
*
sy
+
sp
*
sr
*
cy
)
<<
(
cp
*
cy
-
sp
*
sr
*
sy
)
<<
(
sp
*
cr
)
<<
(
-
sp
*
sy
+
cp
*
sr
*
cy
)
<<
(
-
sp
*
cy
-
cp
*
sr
*
sy
)
<<
cp
*
cr
;
if
(
traceExec
())
ossimNotify
(
ossimNotifyLevel_DEBUG
)
<<
"DEBUG ossimSpot5Model::computeSatToOrbRotation(): returning..."
<<
std
::
endl
;
return
satToOrbRotation
;
}
//*****************************************************************************
...
...
@@ -544,13 +541,13 @@ void ossimSpot5Model::imagingRay(const ossimDpt& image_point,
// 4. Transform vehicle LSR space look direction vector to orbital LSR space
// (S_orb):
//
computeSatToOrbRotation
(
t_line
);
NEWMAT
::
Matrix
satToOrbRotation
=
computeSatToOrbRotation
(
t_line
);
ossimColumnVector3d
u_orb
=
(
theS
atToOrbRotation
*
u_sat
).
unit
();
ossimColumnVector3d
u_orb
=
(
s
atToOrbRotation
*
u_sat
).
unit
();
if
(
traceDebug
()
||
runtime_dbflag
)
{
ossimNotify
(
ossimNotifyLevel_DEBUG
)
<<
"DEBUG:
\n\t
theS
atToOrbRotation = "
<<
theS
atToOrbRotation
<<
"DEBUG:
\n\t
s
atToOrbRotation = "
<<
s
atToOrbRotation
<<
"
\n\t
u_orb = "
<<
u_orb
<<
endl
;
}
...
...
@@ -571,17 +568,17 @@ void ossimSpot5Model::imagingRay(const ossimDpt& image_point,
V_ecf
.
z
()).
cross
(
Z_orb
).
unit
();
ossimColumnVector3d
Y_orb
=
Z_orb
.
cross
(
X_orb
);
theO
rbToEcfRotation
=
NEWMAT
::
Matrix
(
3
,
3
);
theO
rbToEcfRotation
<<
X_orb
[
0
]
<<
Y_orb
[
0
]
<<
Z_orb
[
0
]
NEWMAT
::
Matrix
o
rbToEcfRotation
=
NEWMAT
::
Matrix
(
3
,
3
);
o
rbToEcfRotation
<<
X_orb
[
0
]
<<
Y_orb
[
0
]
<<
Z_orb
[
0
]
<<
X_orb
[
1
]
<<
Y_orb
[
1
]
<<
Z_orb
[
1
]
<<
X_orb
[
2
]
<<
Y_orb
[
2
]
<<
Z_orb
[
2
];
ossimColumnVector3d
u_ecf
=
(
theO
rbToEcfRotation
*
u_orb
);
ossimColumnVector3d
u_ecf
=
(
o
rbToEcfRotation
*
u_orb
);
if
(
traceDebug
()
||
runtime_dbflag
)
{
ossimNotify
(
ossimNotifyLevel_DEBUG
)
<<
"DEBUG:
\n\t
theO
rbToEcfRotation = "
<<
theO
rbToEcfRotation
<<
"DEBUG:
\n\t
o
rbToEcfRotation = "
<<
o
rbToEcfRotation
<<
"
\n\t
u_ecf = "
<<
u_ecf
<<
endl
;
}
...
...
@@ -714,8 +711,6 @@ ossimSpot5Model::initFromMetadata(ossimSpotDimapSupportData* sd)
thePositionError
=
0.0
;
theRefImagingTime
=
0.0
;
theLineSamplingPeriod
=
0.0
;
theSatToOrbRotation
=
0.0
;
//matrix
theOrbToEcfRotation
=
0.0
;
//matrix
theRollOffset
=
0.0
;
thePitchOffset
=
0.0
;
theYawOffset
=
0.0
;
...
...
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