Isis 3 Programmer Reference
ThemisIrDistortionMap.cpp
Go to the documentation of this file.
1 
21 #include <cmath>
22 #include "ThemisIrDistortionMap.h"
23 
24 using namespace std;
25 
26 namespace Isis {
30  ThemisIrDistortionMap::ThemisIrDistortionMap(Camera *parent) :
31  CameraDistortionMap(parent, 1.0) {
32  SetBand(1);
33  p_alpha1 = 0.00447623; // Currently not used
34  p_alpha2 = 0.00107556; // Disabled Y portion of optical distortion
35  }
36 
37  void ThemisIrDistortionMap::SetBand(const int band) {
38  if(band < 1 || band > 10) {
39  string msg = "Band number out of array bounds in ThemisIRDistortionMap";
41  }
42  double k[] = { 0.996005, 0.995358, 0.994260, 0.993290, 0.992389,
43  0.991474, 0.990505, 0.989611, 0.988653, 0.9877
44  };
45 
46  p_k = k[band-1];
47  }
48 
49 
51  const double dy) {
52  p_focalPlaneX = dx;
53  p_focalPlaneY = dy;
54 
56 
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;
63 
64  return true;
65  }
66 
68  const double uy) {
71 
73 
75  p_alpha1 * p_undistortedFocalPlaneY +
77 
78  return true;
79  }
80 }
81 
double p_focalPlaneX
Distorted focal plane x.
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.
Namespace for the standard library.
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:162
double p_undistortedFocalPlaneX
Undistorted focal plane x.
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
virtual bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y.
Distort/undistort focal plane coordinates.
double p_focalPlaneY
Distorted focal plane y.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31