30 ThemisIrDistortionMap::ThemisIrDistortionMap(
Camera *parent) :
33 p_alpha1 = 0.00447623;
34 p_alpha2 = 0.00107556;
37 void ThemisIrDistortionMap::SetBand(
const int band) {
38 if(band < 1 || band > 10) {
39 string msg =
"Band number out of array bounds in ThemisIRDistortionMap";
42 double k[] = { 0.996005, 0.995358, 0.994260, 0.993290, 0.992389,
43 0.991474, 0.990505, 0.989611, 0.988653, 0.9877
55 p_undistortedFocalPlaneX = p_focalPlaneX / p_k;
57 double radical = (1.0 + p_alpha1) * (1.0 + p_alpha1) + 4.0 * p_alpha2 * dy;
58 if(radical < 0.0)
return false;
59 radical = sqrt(radical);
60 double denom = 1.0 + p_alpha1 + radical;
61 if(denom == 0.0)
return false;
62 p_undistortedFocalPlaneY = 2.0 * dy / denom;
69 p_undistortedFocalPlaneX = ux;
70 p_undistortedFocalPlaneY = uy;
72 p_focalPlaneX = p_undistortedFocalPlaneX * p_k;
74 p_focalPlaneY = p_undistortedFocalPlaneY +
75 p_alpha1 * p_undistortedFocalPlaneY +
76 p_alpha2 * p_undistortedFocalPlaneY * p_undistortedFocalPlaneY;
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
virtual bool SetUndistortedFocalPlane(const double ux, const double uy)
Compute distorted focal plane x/y.
This error is for when a programmer made an API call that was illegal.
#define _FILEINFO_
Macro for the filename and line number.
virtual bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y.
Distort/undistort focal plane coordinates.