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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Usgscsm
Commits
342b2168
Unverified
Commit
342b2168
authored
4 years ago
by
Kristin
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
SAR update reference point (#300)
* Add setting of reference height to Sar Sensor Model * Update SarTests
parent
b5bb0f85
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
src/UsgsAstroSarSensorModel.cpp
+18
-0
18 additions, 0 deletions
src/UsgsAstroSarSensorModel.cpp
tests/SarTests.cpp
+6
-6
6 additions, 6 deletions
tests/SarTests.cpp
with
24 additions
and
6 deletions
src/UsgsAstroSarSensorModel.cpp
+
18
−
0
View file @
342b2168
...
...
@@ -275,6 +275,24 @@ void UsgsAstroSarSensorModel::replaceModelState(const string& argState){
m_covariance
=
stateJson
[
"m_covariance"
].
get
<
vector
<
double
>>
();
m_sunPosition
=
stateJson
[
"m_sunPosition"
].
get
<
vector
<
double
>>
();
m_sunVelocity
=
stateJson
[
"m_sunVelocity"
].
get
<
vector
<
double
>>
();
// If sensor model is being created for the first time, this routine will set the reference point
if
(
m_referencePointXyz
.
x
==
0
&&
m_referencePointXyz
.
y
==
0
&&
m_referencePointXyz
.
z
==
0
)
{
MESSAGE_LOG
(
"Updating State"
)
double
lineCtr
=
m_nLines
/
2.0
;
double
sampCtr
=
m_nSamples
/
2.0
;
csm
::
ImageCoord
ip
(
lineCtr
,
sampCtr
);
MESSAGE_LOG
(
"updateState: center image coordinate set to {} {}"
,
lineCtr
,
sampCtr
)
double
refHeight
=
0
;
m_referencePointXyz
=
imageToGround
(
ip
,
refHeight
);
MESSAGE_LOG
(
"updateState: reference point (x, y, z) {} {} {}"
,
m_referencePointXyz
.
x
,
m_referencePointXyz
.
y
,
m_referencePointXyz
.
z
)
}
}
string
UsgsAstroSarSensorModel
::
getModelState
()
const
{
...
...
This diff is collapsed.
Click to expand it.
tests/SarTests.cpp
+
6
−
6
View file @
342b2168
...
...
@@ -84,12 +84,12 @@ TEST_F(SarSensorModel, computeGroundPartials) {
csm
::
EcefCoord
groundPt
(
1737400.0
,
0.0
,
0.0
);
std
::
vector
<
double
>
partials
=
sensorModel
->
computeGroundPartials
(
groundPt
);
ASSERT_EQ
(
partials
.
size
(),
6
);
EXPECT_NEAR
(
partials
[
0
],
-
0.00023385137104424322
,
1e-8
);
EXPECT_NEAR
(
partials
[
1
],
-
3.340826912423544
6e-
0
5
,
1e-8
);
EXPECT_NEAR
(
partials
[
2
],
-
1.0
/
7.
5
,
1e-8
);
EXPECT_NEAR
(
partials
[
3
],
-
33.0576
12335589731
,
1e-8
);
EXPECT_NEAR
(
partials
[
4
],
6.
3906252180458977
e-05
,
1e-8
);
EXPECT_NEAR
(
partials
[
5
],
0.0077
565105242805047
,
1e-8
);
EXPECT_NEAR
(
partials
[
0
],
6.5128150576280552e-09
,
1e-8
);
EXPECT_NEAR
(
partials
[
1
],
-
5.181040781584063
6e-
1
5
,
1e-8
);
EXPECT_NEAR
(
partials
[
2
],
-
0.1330994765468572
5
,
1e-8
);
EXPECT_NEAR
(
partials
[
3
],
-
33.0576
25791698072
,
1e-8
);
EXPECT_NEAR
(
partials
[
4
],
6.
1985123841926308
e-05
,
1e-8
);
EXPECT_NEAR
(
partials
[
5
],
0.0077
43051337209989
,
1e-8
);
}
TEST_F
(
SarSensorModel
,
imageToProximateImagingLocus
)
{
...
...
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