Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
acpaquette committed Oct 4, 2023
1 parent 2bf12a2 commit 9c6b9d3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
12 changes: 6 additions & 6 deletions isis/src/base/apps/skymap/skymap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
PolarRadius = 1.0

LatitudeType = Planetocentric
LongitudeDirection = PositiveWest
LongitudeDirection = PositiveEast
LongitudeDomain = 360

MinimumLatitude = Computed from the input camera cube or map file
Expand Down Expand Up @@ -51,11 +51,11 @@
</p>

<p>
In addition skymap can be used to produce landed mosaics from rovers like MSL. This can be done using ALE to generate an ISD
then that ISD can be attached to the cube via <def link="csminit">csminit</def>. The user would then have to update their map file
to generate a PositiveWest map. This converts the projection from an right ascension/declination projection to azimuth and elevation.
Once that is done, the user would run their ISIS cube through "skymap" and see that the landed rover data would project relative to
other images in the same image sequence.
In addition, skymap can be used to produce landed mosaics from rovers like MSL. This can be done using ALE to generate an ISD
which can be attached to the cube via <def link="csminit">csminit</def>. The user would then have to update the LongitudeDirection
their map file to PositiveWest. This converts the projection from a right ascension/declination projection to an azimuth/elevation
projection. Once that is done, the user would run their ISIS cube through <def link="skymap">skymap</def> and see that the landed
rover data would project relative to other images in the same image sequence.
</p>
</description>

Expand Down
7 changes: 6 additions & 1 deletion isis/src/base/objs/CSMCamera/CSMCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1249,13 +1249,18 @@ void sanitize(std::string &input);
*/
double CSMCamera::RightAscension() {
if (bodyRotation() == NULL || m_model == NULL) {
QString msg = "Image doesn't have attached body rotations, try running csminit again with an ISD";
QString msg = "Image doesn't have attached body rotations, try running csminit " +
"again with an ISD that contains body rotations";
throw IException(IException::Programmer, msg, _FILEINFO_);
}

double precision;
csm::EcefLocus locus = m_model->imageToRemoteImagingLocus(csm::ImageCoord(p_childLine, p_childSample), 0.00001, &precision);
csm::EcefVector v = locus.direction;
// Leaving this line as we may revisit in the future
// Since the ALE isd is being placed at the center of the body we don't have
// to rotate the vector into J2000. If that changes we may need to
// Apply the rotation
// std::vector<double> jvec = m_bodyRotation->J2000Vector({v.x, v.y, v.z});
SensorUtilities::GroundPt3D sphere_v = SensorUtilities::rectToSpherical({v.x, v.y, v.z});
double lon = sphere_v.lon;
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/objs/Camera/Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ namespace Isis {
} // end if set ground (lat, 0)

// Another special test for ground range as we could have the
// -180-180 seam running right through the image so
// 0-360 seam running right through the image so
// test it as well (the increment may not be fine enough !!!)
if (SetGround(lat, Longitude(180.0, Angle::Degrees))) {
if (Sample() >= 0.5 && Line() >= 0.5 &&
Expand Down
1 change: 0 additions & 1 deletion isis/src/base/objs/Sensor/Sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ namespace Isis {
// Convert it to body-fixed
const vector<double> &lookJ = instrumentRotation()->J2000Vector(lookC);
const vector<double> &lookB = bodyRotation()->ReferenceVector(lookJ);
// cout << lookB[0] << ", " << lookB[1] << ", " << lookB[2] << endl;

// This memcpy does:
// m_lookB[0] = lookB[0];
Expand Down
8 changes: 4 additions & 4 deletions isis/tests/CSMCameraTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,8 @@ TEST_F(CSMCameraFixture, RightAscension) {
}
catch(Isis::IException &e)
{
EXPECT_TRUE(e.toString().toLatin1().contains("Image doesn't have attached body rotations,"
" try running csminit again with an ISD")) << e.toString().toStdString();
EXPECT_TRUE(e.toString().toLatin1().contains("Image doesn't have attached body rotations, try running csminit"
" again with an ISD that contains body rotations")) << e.toString().toStdString();
}
catch(...)
{
Expand All @@ -677,8 +677,8 @@ TEST_F(CSMCameraFixture, Declination) {
}
catch(Isis::IException &e)
{
EXPECT_TRUE(e.toString().toLatin1().contains("Image doesn't have attached body rotations,"
" try running csminit again with an ISD")) << e.toString().toStdString();
EXPECT_TRUE(e.toString().toLatin1().contains("Image doesn't have attached body rotations, try running csminit"
" again with an ISD that contains body rotations")) << e.toString().toStdString();
}
catch(...)
{
Expand Down

0 comments on commit 9c6b9d3

Please sign in to comment.