47 LoMediumDistortionMap::LoMediumDistortionMap(
Camera *parent) :
94 QString centkey =
"INS" +
toString(naifIkCode) +
"_POINT_OF_SYMMETRY";
132 if(fabs(dx) > 45.79142767 || fabs(dy) > 35.09)
return false;
145 double origr2 = dists * dists + distl * distl;
146 double sp = sqrt(origr2);
155 double nS = sp / sRef;
156 double dS =
p_odk[0] * nS +
p_odk[1] * pow(nS, 3) +
p_odk[2] * pow(nS, 5);
157 double prevdS = 2 * dS;
158 double pixtol = .000001;
163 while(fabs(dS - prevdS) > pixtol) {
165 if(numit > 14 || fabs(dS) > 1E9) {
180 double ratio = s / sp;
181 double undistortedSample = dists * ratio +
p_sample0;
182 double undistortedLine = distl * ratio +
p_line0;
215 if(fabs(ux) > 45.79142767 || fabs(uy) > 35.09)
return false;
216 if(fabs(ux) > 41.85 || fabs(uy) > 35.09)
return false;
233 double rp2 = (distus * distus + distul * distul);
242 rp2 = rp2 / sRef / sRef;
243 double drOverR = (
p_odk[0] + rp2 *
p_odk[1] + rp2 * rp2 *
p_odk[2]) / sRef;
246 double ds =
p_sample0 + (distus * (1. + drOverR));
247 double dl =
p_line0 + (distul * (1. + drOverR));
double p_focalPlaneX
Distorted focal plane x.
double DetectorSample() const
virtual bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y for Lo Medium Resolution Camera.
double FocalPlaneX() const
virtual bool SetFocalPlane(const double dx, const double dy)
Compute detector position (sample,line) from focal plane coordinates.
Namespace for the standard library.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
virtual void SetDistortion(int naifIkCode)
Load distortion coefficients.
virtual bool SetDetector(const double sample, const double line)
Compute distorted focal plane coordinate from detector position (sampel,line)
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
Camera * p_camera
The camera to distort/undistort.
Distort/undistort focal plane coordinates.
double p_sample0
Center of distortion on sample axis.
const double E
Sets some basic constants for use in ISIS programming.
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
double FocalPlaneY() const
double p_focalPlaneY
Distorted focal plane y.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
double DetectorLine() const
Namespace for ISIS/Bullet specific routines.
virtual bool SetUndistortedFocalPlane(const double ux, const double uy)
Compute distorted focal plane x/y for Lo Medium Resolution Camera.
void SetDistortion(const int naifIkCode)
Load LO Medium Resolution Camera perspective & distortion coefficients.
std::vector< double > p_odk
Vector of distortion coefficients.
double p_line0
Center of distortion on line axis.