Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Usgscsm
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Usgscsm
Commits
2b67411d
Commit
2b67411d
authored
6 years ago
by
Jesse Mapel
Browse files
Options
Downloads
Patches
Plain Diff
Recompute pixel size each time partials are computed
parent
d55406c4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/usgscsm/UsgsAstroFrameSensorModel.h
+0
-1
0 additions, 1 deletion
include/usgscsm/UsgsAstroFrameSensorModel.h
src/UsgsAstroFrameSensorModel.cpp
+15
-17
15 additions, 17 deletions
src/UsgsAstroFrameSensorModel.cpp
with
15 additions
and
18 deletions
include/usgscsm/UsgsAstroFrameSensorModel.h
+
0
−
1
View file @
2b67411d
...
@@ -363,7 +363,6 @@ class UsgsAstroFrameSensorModel : public csm::RasterGM {
...
@@ -363,7 +363,6 @@ class UsgsAstroFrameSensorModel : public csm::RasterGM {
int
m_nParameters
;
int
m_nParameters
;
csm
::
EcefCoord
m_referencePointXyz
;
csm
::
EcefCoord
m_referencePointXyz
;
double
m_pixelGroundSize
;
std
::
string
m_logFile
;
std
::
string
m_logFile
;
std
::
shared_ptr
<
spdlog
::
logger
>
m_logger
;
std
::
shared_ptr
<
spdlog
::
logger
>
m_logger
;
...
...
This diff is collapsed.
Click to expand it.
src/UsgsAstroFrameSensorModel.cpp
+
15
−
17
View file @
2b67411d
...
@@ -77,7 +77,6 @@ void UsgsAstroFrameSensorModel::reset() {
...
@@ -77,7 +77,6 @@ void UsgsAstroFrameSensorModel::reset() {
m_referencePointXyz
.
x
=
0
;
m_referencePointXyz
.
x
=
0
;
m_referencePointXyz
.
y
=
0
;
m_referencePointXyz
.
y
=
0
;
m_referencePointXyz
.
z
=
0
;
m_referencePointXyz
.
z
=
0
;
m_pixelGroundSize
=
1.0
;
m_logFile
=
""
;
m_logFile
=
""
;
m_logger
.
reset
();
m_logger
.
reset
();
}
}
...
@@ -563,17 +562,23 @@ std::vector<double> UsgsAstroFrameSensorModel::computeGroundPartials(const csm::
...
@@ -563,17 +562,23 @@ std::vector<double> UsgsAstroFrameSensorModel::computeGroundPartials(const csm::
double
z
=
groundPt
.
z
;
double
z
=
groundPt
.
z
;
csm
::
ImageCoord
ipB
=
groundToImage
(
groundPt
);
csm
::
ImageCoord
ipB
=
groundToImage
(
groundPt
);
csm
::
ImageCoord
ipX
=
groundToImage
(
csm
::
EcefCoord
(
x
+
m_pixelGroundSize
,
y
,
z
));
csm
::
EcefCoord
nextPoint
=
imageToGround
(
csm
::
ImageCoord
(
ipB
.
line
+
1
,
ipB
.
samp
+
1
));
csm
::
ImageCoord
ipY
=
groundToImage
(
csm
::
EcefCoord
(
x
,
y
+
m_pixelGroundSize
,
z
));
double
dx
=
nextPoint
.
x
-
x
;
csm
::
ImageCoord
ipZ
=
groundToImage
(
csm
::
EcefCoord
(
x
,
y
,
z
+
m_pixelGroundSize
));
double
dy
=
nextPoint
.
y
-
y
;
double
dz
=
nextPoint
.
z
-
z
;
double
pixelGroundSize
=
sqrt
((
dx
*
dx
+
dy
*
dy
+
dz
*
dz
)
/
2.0
);
csm
::
ImageCoord
ipX
=
groundToImage
(
csm
::
EcefCoord
(
x
+
pixelGroundSize
,
y
,
z
));
csm
::
ImageCoord
ipY
=
groundToImage
(
csm
::
EcefCoord
(
x
,
y
+
pixelGroundSize
,
z
));
csm
::
ImageCoord
ipZ
=
groundToImage
(
csm
::
EcefCoord
(
x
,
y
,
z
+
pixelGroundSize
));
std
::
vector
<
double
>
partials
(
6
,
0.0
);
std
::
vector
<
double
>
partials
(
6
,
0.0
);
partials
[
0
]
=
(
ipX
.
line
-
ipB
.
line
)
/
m_
pixelGroundSize
;
partials
[
0
]
=
(
ipX
.
line
-
ipB
.
line
)
/
pixelGroundSize
;
partials
[
3
]
=
(
ipX
.
samp
-
ipB
.
samp
)
/
m_
pixelGroundSize
;
partials
[
3
]
=
(
ipX
.
samp
-
ipB
.
samp
)
/
pixelGroundSize
;
partials
[
1
]
=
(
ipY
.
line
-
ipB
.
line
)
/
m_
pixelGroundSize
;
partials
[
1
]
=
(
ipY
.
line
-
ipB
.
line
)
/
pixelGroundSize
;
partials
[
4
]
=
(
ipY
.
samp
-
ipB
.
samp
)
/
m_
pixelGroundSize
;
partials
[
4
]
=
(
ipY
.
samp
-
ipB
.
samp
)
/
pixelGroundSize
;
partials
[
2
]
=
(
ipZ
.
line
-
ipB
.
line
)
/
m_
pixelGroundSize
;
partials
[
2
]
=
(
ipZ
.
line
-
ipB
.
line
)
/
pixelGroundSize
;
partials
[
5
]
=
(
ipZ
.
samp
-
ipB
.
samp
)
/
m_
pixelGroundSize
;
partials
[
5
]
=
(
ipZ
.
samp
-
ipB
.
samp
)
/
pixelGroundSize
;
MESSAGE_LOG
(
this
->
m_logger
,
"Computing ground partials results:
\n
Line: {}, {}, {}
\n
Sample: {}, {}, {}"
,
MESSAGE_LOG
(
this
->
m_logger
,
"Computing ground partials results:
\n
Line: {}, {}, {}
\n
Sample: {}, {}, {}"
,
partials
[
0
],
partials
[
1
],
partials
[
2
],
partials
[
3
],
partials
[
4
],
partials
[
5
]);
partials
[
0
],
partials
[
1
],
partials
[
2
],
partials
[
3
],
partials
[
4
],
partials
[
5
]);
...
@@ -716,7 +721,6 @@ std::string UsgsAstroFrameSensorModel::getModelState() const {
...
@@ -716,7 +721,6 @@ std::string UsgsAstroFrameSensorModel::getModelState() const {
{
"m_referencePointXyz"
,
{
m_referencePointXyz
.
x
,
{
"m_referencePointXyz"
,
{
m_referencePointXyz
.
x
,
m_referencePointXyz
.
y
,
m_referencePointXyz
.
y
,
m_referencePointXyz
.
z
}},
m_referencePointXyz
.
z
}},
{
"m_pixelGroundSize"
,
m_pixelGroundSize
},
{
"m_currentParameterCovariance"
,
m_currentParameterCovariance
},
{
"m_currentParameterCovariance"
,
m_currentParameterCovariance
},
{
"m_logFile"
,
m_logFile
}
{
"m_logFile"
,
m_logFile
}
};
};
...
@@ -831,12 +835,6 @@ void UsgsAstroFrameSensorModel::replaceModelState(const std::string& stringState
...
@@ -831,12 +835,6 @@ void UsgsAstroFrameSensorModel::replaceModelState(const std::string& stringState
m_collectionIdentifier
=
state
.
at
(
"m_collectionIdentifier"
).
get
<
std
::
string
>
();
m_collectionIdentifier
=
state
.
at
(
"m_collectionIdentifier"
).
get
<
std
::
string
>
();
// Set reference point to the center of the image
// Set reference point to the center of the image
m_referencePointXyz
=
imageToGround
(
csm
::
ImageCoord
(
m_nLines
/
2.0
,
m_nSamples
/
2.0
));
m_referencePointXyz
=
imageToGround
(
csm
::
ImageCoord
(
m_nLines
/
2.0
,
m_nSamples
/
2.0
));
// Compute the pixel ground size at the reference point
csm
::
EcefCoord
nextRefPoint
=
imageToGround
(
csm
::
ImageCoord
(
m_nLines
/
2.0
+
1
,
m_nSamples
/
2.0
+
1
));
double
dx
=
nextRefPoint
.
x
-
m_referencePointXyz
.
x
;
double
dy
=
nextRefPoint
.
y
-
m_referencePointXyz
.
y
;
double
dz
=
nextRefPoint
.
z
-
m_referencePointXyz
.
z
;
m_pixelGroundSize
=
sqrt
((
dx
*
dx
+
dy
*
dy
+
dz
*
dz
)
/
2.0
);
m_currentParameterCovariance
=
state
.
at
(
"m_currentParameterCovariance"
).
get
<
std
::
vector
<
double
>>
();
m_currentParameterCovariance
=
state
.
at
(
"m_currentParameterCovariance"
).
get
<
std
::
vector
<
double
>>
();
m_logFile
=
state
.
at
(
"m_logFile"
).
get
<
std
::
string
>
();
m_logFile
=
state
.
at
(
"m_logFile"
).
get
<
std
::
string
>
();
if
(
m_logFile
.
empty
())
{
if
(
m_logFile
.
empty
())
{
...
...
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