Skip to content

Commit

Permalink
Fixed redefined functions after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
acpaquette committed Jan 30, 2023
1 parent c77b72c commit 24ccfad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 96 deletions.
93 changes: 0 additions & 93 deletions isis/src/base/objs/CSMCamera/CSMCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,99 +408,6 @@ void sanitize(std::string &input);
}


/**
* Given the ra/dec compute the look direction.
*
* @param ra Right ascension in degrees (sky longitude).
* @param dec Declination in degrees (sky latitude).
*
* @return @b bool True if successful.
*/
bool CSMCamera::SetRightAscensionDeclination(const double ra, const double dec) {
double raRad = ra * DEG2RAD;
double decRad = dec * DEG2RAD;

// Make the radius bigger, some multiple of the body radius -or- use sensor position at the reference point
SensorUtilities::GroundPt3D sphericalPt = {decRad, raRad, 10e12};
SensorUtilities::Vec rectPt = SensorUtilities::sphericalToRect(sphericalPt);

// vector<double> lookC = instrumentRotation()->ReferenceVector(rectPt);
csm::EcefCoord lookPt = {rectPt.x, rectPt.y, rectPt.x};
double achievedPrecision = 0;
csm::WarningList warnings;
bool validBackProject;
csm::ImageCoord imagePt;

try {
imagePt = m_model->groundToImage(lookPt, 0.01, &achievedPrecision, &warnings);
double sample;
double line;
csmToIsisPixel(imagePt, line, sample);
validBackProject = SetImage(sample, line);
}
catch (csm::Error &e) {
validBackProject = false;
}

return validBackProject;
}


/**
* Sets the look direction of the spacecraft. This routine will then attempt to
* intersect the look direction with the target. If successful you can utilize
* the methods which return the lat/lon, phase, incidence, etc. This routine
* returns false if the look direction does not intersect the target.
*
* @param v[] A look vector in camera coordinates. For example, (0,0,1) is
* usually the look direction out of the boresight of a camera.
*
* @return @b bool Indicates whether the given look direction intersects the target.
*
*/
bool CSMCamera::SetLookDirection(const vector<double> lookB) {
// The look vector must be in the bodyfixed coordinate system

// This memcpy does:
// m_lookB[0] = lookB[0];
// m_lookB[1] = lookB[1];
// m_lookB[2] = lookB[2];
memcpy(m_lookB, &lookB[0], sizeof(double) * 3);
m_newLookB = true;
}


/**
* Computes the celestial north clock angle at the current
* line/sample or ra/dec. The reference vector is a vecor from the
* current pixel pointed directly "upward". Celetial North
* is a vector from the current pixel poiting towards celetial north.
* The Celestial North Clock Angle is the angle between these two vectors
* on the image.
*
* @return @b double The resultant Celestial North Clock Angle
*/
double CSMCamera::CelestialNorthClockAngle() {
double orgLine = Line();
double orgSample = Sample();
double orgDec = Declination();
double orgRa = RightAscension();

SetRightAscensionDeclination(orgRa, orgDec + (2 * RaDecResolution()));
double y = Line() - orgLine;
double x = Sample() - orgSample;
double celestialNorthClockAngle = atan2(-y, x) * 180.0 / Isis::PI;
celestialNorthClockAngle = 90.0 - celestialNorthClockAngle;

if (celestialNorthClockAngle < 0.0) {
celestialNorthClockAngle += 360.0;
}

SetImage(orgSample, orgLine);
return celestialNorthClockAngle;
}


/**
* Set the ground point for the Camera Model and then compute the
* corresponding image time, look vector, and image coordinate.
Expand Down
3 changes: 0 additions & 3 deletions isis/src/base/objs/CSMCamera/CSMCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,8 @@ namespace Isis {
csm::RasterGM *m_model; //! CSM sensor model
iTime m_refTime; //! The reference time that all model image times are relative to
SpiceRotation *m_bodyRotation; //!< Body spice rotation
<<<<<<< HEAD
=======
SpiceRotation *m_instrumentRotation; //!< Instrument spice rotation
Longitude *m_solarLongitude;
>>>>>>> msl_camera_jank

void isisToCsmPixel(double line, double sample, csm::ImageCoord &csmPixel) const;
void csmToIsisPixel(csm::ImageCoord csmPixel, double &line, double &sample) const;
Expand Down

0 comments on commit 24ccfad

Please sign in to comment.