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
6f8edc50
Commit
6f8edc50
authored
6 years ago
by
Kaj Williams
Browse files
Options
Downloads
Patches
Plain Diff
updated frame camera tests for four corners of ccd
parent
36bc2793
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/FrameCameraTests.cpp
+34
-8
34 additions, 8 deletions
tests/FrameCameraTests.cpp
with
34 additions
and
8 deletions
tests/FrameCameraTests.cpp
+
34
−
8
View file @
6f8edc50
...
...
@@ -52,6 +52,10 @@ class FrameSensorModel : public ::testing::Test {
}
};
//NOTE: The imagePt layour is (Lines,Samples)
// Also subtract 0.5 from the lines/samples. Hence Samples=0 and Lines=15 -> 14.5,-0.5
//centered and slightly off-center:
TEST_F
(
FrameSensorModel
,
Center
)
{
csm
::
ImageCoord
imagePt
(
7.0
,
7.0
);
csm
::
EcefCoord
groundPt
=
sensorModel
->
imageToGround
(
imagePt
,
0.0
);
...
...
@@ -59,19 +63,41 @@ TEST_F(FrameSensorModel, Center) {
EXPECT_NEAR
(
groundPt
.
y
,
0
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
z
,
0
,
1e-8
);
}
TEST_F
(
FrameSensorModel
,
SlightlyOffCenter
)
{
csm
::
ImageCoord
imagePt
(
7.0
,
6.0
);
csm
::
EcefCoord
groundPt
=
sensorModel
->
imageToGround
(
imagePt
,
0.0
);
EXPECT_NEAR
(
groundPt
.
x
,
9.80194018
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
y
,
0
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
z
,
1.98039612
,
1e-8
);
}
TEST_F
(
FrameSensorModel
,
OffBody
)
{
//Test all four corners:
TEST_F
(
FrameSensorModel
,
OffBody1
)
{
csm
::
ImageCoord
imagePt
(
14.5
,
-
0.5
);
csm
::
EcefCoord
groundPt
=
sensorModel
->
imageToGround
(
imagePt
,
0.0
);
EXPECT_NEAR
(
groundPt
.
x
,
0.44979759
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
y
,
-
14.99325304
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
z
,
14.99325304
,
1e-8
);
}
TEST_F
(
FrameSensorModel
,
SlightlyOffCenter
)
{
csm
::
ImageCoord
imagePt
(
7.0
,
6.0
);
TEST_F
(
FrameSensorModel
,
OffBody2
)
{
csm
::
ImageCoord
imagePt
(
-
0.5
,
14.5
);
csm
::
EcefCoord
groundPt
=
sensorModel
->
imageToGround
(
imagePt
,
0.0
);
EXPECT_NEAR
(
groundPt
.
x
,
9.80194018
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
y
,
0
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
z
,
1.98039612
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
x
,
0.44979759
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
y
,
14.99325304
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
z
,
-
14.99325304
,
1e-8
);
}
TEST_F
(
FrameSensorModel
,
OffBody3
)
{
csm
::
ImageCoord
imagePt
(
-
0.5
,
-
0.5
);
csm
::
EcefCoord
groundPt
=
sensorModel
->
imageToGround
(
imagePt
,
0.0
);
EXPECT_NEAR
(
groundPt
.
x
,
0.44979759
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
y
,
14.99325304
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
z
,
14.99325304
,
1e-8
);
}
TEST_F
(
FrameSensorModel
,
OffBody4
)
{
csm
::
ImageCoord
imagePt
(
14.5
,
14.5
);
csm
::
EcefCoord
groundPt
=
sensorModel
->
imageToGround
(
imagePt
,
0.0
);
EXPECT_NEAR
(
groundPt
.
x
,
0.44979759
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
y
,
-
14.99325304
,
1e-8
);
EXPECT_NEAR
(
groundPt
.
z
,
-
14.99325304
,
1e-8
);
}
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