-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
double col = imagePt.samp - (m_ccdCenter[0] - 0.5); | ||
double row = imagePt.line - (m_ccdCenter[1] - 0.5); | ||
double col = imagePt.samp - (m_ccdCenter[0]); | ||
double row = imagePt.line - (m_ccdCenter[1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could have sworn this was already merged by #91 weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bet that upstream was not pulled and merged, so we are seeing both.
isdFile.close(); | ||
} | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code copy and paste will be removed once Fixtures.h files gets merged.
tests/FrameCameraTests.cpp
Outdated
class FrameSensorModel : public ::testing::Test { | ||
protected: | ||
|
||
UsgsAstroFrameSensorModel *sensorModel; | ||
|
||
csm::Isd isd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be removed
tests/FrameCameraTests.cpp
Outdated
void SetUp() override { | ||
sensorModel = NULL; | ||
std::ifstream isdFile("data/simpleFramerISD.json"); | ||
json jsonIsd = json::parse(isdFile); | ||
csm::Isd isd; | ||
//csm::Isd isd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks really good.
@@ -57,14 +80,14 @@ class FrameSensorModel : public ::testing::Test { | |||
|
There was a problem hiding this comment.
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.
tests/FrameCameraTests.cpp
Outdated
// Focal Length Tests: | ||
TEST_F(FrameIsdTest, FL500_OffBody4) { | ||
isd.clearParams("focal_length"); | ||
isd.addParam("focal_length","500.0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This super nit picky. Can we use a single variable for the key? std::string key = "focal_length"? This will make refactoring later easier and is better form I think to help maintain these.
double col = imagePt.samp - (m_ccdCenter[0] - 0.5); | ||
double row = imagePt.line - (m_ccdCenter[1] - 0.5); | ||
double col = imagePt.samp - (m_ccdCenter[0]); | ||
double row = imagePt.line - (m_ccdCenter[1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bet that upstream was not pulled and merged, so we are seeing both.
"USGS_ASTRO_FRAME_SENSOR_MODEL"); | ||
|
||
UsgsAstroFrameSensorModel* sensorModel = dynamic_cast<UsgsAstroFrameSensorModel *>(model); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these repeated instantiations look good. We can refactor out once parameterized tests are working the way we want them to.
added focal length tests