Isis 3 Programmer Reference
LineScanCameraDetectorMap.cpp
Go to the documentation of this file.
1 
25 
26 #include "CameraFocalPlaneMap.h"
27 #include "iTime.h"
28 
29 namespace Isis {
30 
40  const double etStart,
41  const double lineRate) :
42  CameraDetectorMap(parent) {
43  p_etStart = etStart;
44  p_lineRate = lineRate;
45  }
46 
47 
50  }
51 
52 
63  void LineScanCameraDetectorMap::SetStartTime(const double etStart) {
64  p_etStart = etStart;
65  }
66 
67 
76  void LineScanCameraDetectorMap::SetLineRate(const double lineRate) {
77  p_lineRate = lineRate;
78  }
79 
80 
87  return p_lineRate;
88  }
89 
90 
102  bool LineScanCameraDetectorMap::SetDetector(const double sample,
103  const double line) {
104 
105  if(!CameraDetectorMap::SetDetector(sample, line)) {
106  return false;
107  }
108  double etDiff = p_camera->time().Et() - p_etStart;
109  p_parentLine = etDiff / p_lineRate + 0.5;
110  return true;
111 
112  }
113 
114 
126  bool LineScanCameraDetectorMap::SetParent(const double sample,
127  const double line) {
128  return SetParent(sample, line, 0.0);
129  }
130 
131 
144  bool LineScanCameraDetectorMap::SetParent(const double sample,
145  const double line,
146  const double deltaT) {
147 
148  if(!CameraDetectorMap::SetParent(sample, line)) {
149  return false;
150  }
152  double etLine = p_etStart + p_lineRate * (line - 0.5);
153  p_camera->setTime(etLine + deltaT);
154  return true;
155 
156  }
157 
158 
166  return p_etStart;
167  }
168 
169 
192  const double line,
193  const int band) const {
194  return LineRate();
195  }
196 
197 }
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
double LineRate() const
Access the time, in seconds, between scan lines.
virtual double exposureDuration(const double sample, const double line, const int band) const
This virtual method is for returning the exposure duration of a pixel.
void SetLineRate(const double lineRate)
Reset the line rate.
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
double p_etStart
Starting time at the top of the first parent line.
Convert between parent image coordinates and detector coordinates.
double p_detectorLine
Detector coordinate line value.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
Definition: Sensor.cpp:112
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
Definition: Camera.cpp:2848
double StartTime() const
Access the starting time at the top edge of the first line in the parent image.
double p_lineRate
Time, in seconds, between lines in parent cube.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
Camera * p_camera
Pointer to the camera.
double p_parentLine
The parent line calculated from the detector.
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition: iTime.h:139
void SetStartTime(const double etStart)
Reset the starting ephemeris time.
LineScanCameraDetectorMap(Camera *parent, const double etStart, const double lineRate)
Construct a detector map for line scan cameras.
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...
Definition: Spice.cpp:809