Skip to content

Commit

Permalink
Added alphacube to nac rs fixture (#4573)
Browse files Browse the repository at this point in the history
* Added alphacube to nac rs fixture

* Moved alphacube to proper fixture and updated test

Co-authored-by: Austin Sanders <arsanders@ugs.gov>
  • Loading branch information
AustinSanders and Austin Sanders authored Jul 30, 2021
1 parent 98ebcc8 commit 5aa38ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
16 changes: 8 additions & 8 deletions isis/tests/ClipperNacRollingShutterCameraTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@ TEST_F(ClipperNacRsCube, ClipperNacRsCameraUnitTest) {


EXPECT_TRUE(cam->SetImage(145, 161));
EXPECT_NEAR(cam->UniversalLatitude(), 8.6646548238559333, 0.0001);
EXPECT_NEAR(cam->UniversalLongitude(), 253.93886964420707, 0.0001);
EXPECT_NEAR(cam->UniversalLatitude(), 8.6601675738056922, 0.0001);
EXPECT_NEAR(cam->UniversalLongitude(), 253.94913698482958, 0.0001);
EXPECT_TRUE(cam->SetUniversalGround(cam->UniversalLatitude(), cam->UniversalLongitude()));
EXPECT_NEAR(cam->Sample(), 145, 0.0001);
EXPECT_NEAR(cam->Line(), 161, 0.0001);

EXPECT_TRUE(cam->SetImage(3655, 157));
EXPECT_NEAR(cam->UniversalLatitude(), 12.365243218956246, 0.0001);
EXPECT_NEAR(cam->UniversalLongitude(), 255.86310676733405, 0.0001);
EXPECT_NEAR(cam->UniversalLatitude(), 12.393863983217367, 0.0001);
EXPECT_NEAR(cam->UniversalLongitude(), 255.89185956199307, 0.0001);
EXPECT_TRUE(cam->SetUniversalGround(cam->UniversalLatitude(), cam->UniversalLongitude()));
EXPECT_NEAR(cam->Sample(), 3655, 0.0001);
EXPECT_NEAR(cam->Line(), 157, 0.0001);

EXPECT_TRUE(cam->SetImage(289, 1767));
EXPECT_NEAR(cam->UniversalLatitude(), 7.8856314924390674, 0.0001);
EXPECT_NEAR(cam->UniversalLongitude(), 255.74387203937229, 0.0001);
EXPECT_NEAR(cam->UniversalLatitude(), 7.8819000470364564, 0.0001);
EXPECT_NEAR(cam->UniversalLongitude(), 255.75554569654594, 0.0001);
EXPECT_TRUE(cam->SetUniversalGround(cam->UniversalLatitude(), cam->UniversalLongitude()));
EXPECT_NEAR(cam->Sample(), 289, 0.0001);
EXPECT_NEAR(cam->Line(), 1767, 0.001);

EXPECT_TRUE(cam->SetImage(3767, 1579));
EXPECT_NEAR(cam->UniversalLatitude(), 11.758392399326441, 0.0001);
EXPECT_NEAR(cam->UniversalLongitude(), 257.58926744604787, 0.0001);
EXPECT_NEAR(cam->UniversalLatitude(), 11.788225243842827, 0.0001);
EXPECT_NEAR(cam->UniversalLongitude(), 257.62075252064386, 0.0001);
EXPECT_TRUE(cam->SetUniversalGround(cam->UniversalLatitude(), cam->UniversalLongitude()));
EXPECT_NEAR(cam->Sample(), 3767, 0.0001);
EXPECT_NEAR(cam->Line(), 1579, 0.001);
Expand Down
11 changes: 8 additions & 3 deletions isis/tests/Fixtures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,14 @@ namespace Isis {
QString fileName = testCube->fileName();
delete testCube;
testCube = new Cube(fileName, "rw");

double offset = 10;
AlphaCube aCube(testCube->sampleCount(), testCube->lineCount(),
testCube->sampleCount()-offset, testCube->lineCount() - offset,
0, offset, testCube->sampleCount(), testCube->lineCount());

aCube.UpdateGroup(*testCube);
testCube->reopen("rw");
}

void ClipperNacRsCube::TearDown() {
Expand Down Expand Up @@ -1670,8 +1678,5 @@ namespace Isis {
timesTable += timesRecord;

testCube->write(timesTable);
QString fileName = testCube->fileName();
delete testCube;
testCube = new Cube(fileName, "rw");
}
}

0 comments on commit 5aa38ac

Please sign in to comment.