Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test camera model #95

Merged
merged 6 commits into from
Aug 22, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cleaned up key/newValue and comments
  • Loading branch information
AstroKEW78 committed Aug 22, 2018
commit 28b2ee6920091f4861108194e516f836efd8df9e
27 changes: 17 additions & 10 deletions tests/FrameCameraTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ 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
//NOTE: The imagePt format is (Lines,Samples)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can yank this comment, since this is fixed.

//centered and slightly off-center:
TEST_F(FrameSensorModel, Center) {
Expand Down Expand Up @@ -127,8 +126,10 @@ TEST_F(FrameSensorModel, OffBody4) {

// Focal Length Tests:
TEST_F(FrameIsdTest, FL500_OffBody4) {
isd.clearParams("focal_length");
isd.addParam("focal_length","500.0");
std::string key = "focal_length";
std::string newValue = "500.0";
isd.clearParams(key);
isd.addParam(key,newValue);
UsgsAstroFramePlugin frameCameraPlugin;

csm::Model *model = frameCameraPlugin.constructModelFromISD(
Expand All @@ -145,8 +146,10 @@ TEST_F(FrameIsdTest, FL500_OffBody4) {
EXPECT_NEAR(groundPt.z, -1.48533467, 1e-8);
}
TEST_F(FrameIsdTest, FL500_OffBody3) {
isd.clearParams("focal_length");
isd.addParam("focal_length","500.0");
std::string key = "focal_length";
std::string newValue = "500.0";
isd.clearParams(key);
isd.addParam(key,newValue);
UsgsAstroFramePlugin frameCameraPlugin;

csm::Model *model = frameCameraPlugin.constructModelFromISD(
Expand All @@ -163,8 +166,10 @@ TEST_F(FrameIsdTest, FL500_OffBody3) {
EXPECT_NEAR(groundPt.z, 1.48533467, 1e-8);
}
TEST_F(FrameIsdTest, FL500_Center) {
isd.clearParams("focal_length");
isd.addParam("focal_length","500.0");
std::string key = "focal_length";
std::string newValue = "500.0";
isd.clearParams(key);
isd.addParam(key,newValue);
UsgsAstroFramePlugin frameCameraPlugin;

csm::Model *model = frameCameraPlugin.constructModelFromISD(
Expand All @@ -181,8 +186,10 @@ TEST_F(FrameIsdTest, FL500_Center) {
EXPECT_NEAR(groundPt.z, 0.0, 1e-8);
}
TEST_F(FrameIsdTest, FL500_SlightlyOffCenter) {
isd.clearParams("focal_length");
isd.addParam("focal_length","500.0");
std::string key = "focal_length";
std::string newValue = "500.0";
isd.clearParams(key);
isd.addParam(key,newValue);
UsgsAstroFramePlugin frameCameraPlugin;

csm::Model *model = frameCameraPlugin.constructModelFromISD(
Expand Down