Isis 3 Programmer Reference
LineScanCameraDetectorMap.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 
8 #include "LineScanCameraDetectorMap.h"
9 
10 #include "CameraFocalPlaneMap.h"
11 #include "iTime.h"
12 
13 namespace Isis {
14 
24  const double etStart,
25  const double lineRate) :
26  CameraDetectorMap(parent) {
27  p_etStart = etStart;
28  p_lineRate = lineRate;
29  }
30 
31 
34  }
35 
36 
47  void LineScanCameraDetectorMap::SetStartTime(const double etStart) {
48  p_etStart = etStart;
49  }
50 
51 
60  void LineScanCameraDetectorMap::SetLineRate(const double lineRate) {
61  p_lineRate = lineRate;
62  }
63 
64 
71  return p_lineRate;
72  }
73 
74 
86  bool LineScanCameraDetectorMap::SetDetector(const double sample,
87  const double line) {
88 
89  if(!CameraDetectorMap::SetDetector(sample, line)) {
90  return false;
91  }
92  double etDiff = p_camera->time().Et() - p_etStart;
93  p_parentLine = etDiff / p_lineRate + 0.5;
94  return true;
95 
96  }
97 
98 
110  bool LineScanCameraDetectorMap::SetParent(const double sample,
111  const double line) {
112  return SetParent(sample, line, 0.0);
113  }
114 
115 
128  bool LineScanCameraDetectorMap::SetParent(const double sample,
129  const double line,
130  const double deltaT) {
131 
132  if(!CameraDetectorMap::SetParent(sample, line)) {
133  return false;
134  }
136  double etLine = p_etStart + p_lineRate * (line - 0.5);
137  p_camera->setTime(etLine + deltaT);
138  return true;
139 
140  }
141 
142 
150  return p_etStart;
151  }
152 
153 
176  const double line,
177  const int band) const {
178  return LineRate();
179  }
180 
181 }
Isis::Spice::time
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
Definition: Spice.cpp:884
Isis::LineScanCameraDetectorMap::SetParent
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
Definition: LineScanCameraDetectorMap.cpp:110
Isis::CameraDetectorMap::p_parentLine
double p_parentLine
The parent line calculated from the detector.
Definition: CameraDetectorMap.h:141
Isis::CameraDetectorMap
Convert between parent image coordinates and detector coordinates.
Definition: CameraDetectorMap.h:47
Isis::CameraDetectorMap::SetParent
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
Definition: CameraDetectorMap.cpp:63
Isis::LineScanCameraDetectorMap::LineRate
double LineRate() const
Access the time, in seconds, between scan lines.
Definition: LineScanCameraDetectorMap.cpp:70
Isis::Camera
Definition: Camera.h:236
Isis::LineScanCameraDetectorMap::p_etStart
double p_etStart
Starting time at the top of the first parent line.
Definition: LineScanCameraDetectorMap.h:64
Isis::LineScanCameraDetectorMap::SetStartTime
void SetStartTime(const double etStart)
Reset the starting ephemeris time.
Definition: LineScanCameraDetectorMap.cpp:47
Isis::CameraFocalPlaneMap::DetectorLineOffset
double DetectorLineOffset() const
Definition: CameraFocalPlaneMap.cpp:334
Isis::CameraDetectorMap::p_detectorLine
double p_detectorLine
Detector coordinate line value.
Definition: CameraDetectorMap.h:142
Isis::Sensor::setTime
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:97
Isis::iTime::Et
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition: iTime.h:126
Isis::LineScanCameraDetectorMap::~LineScanCameraDetectorMap
virtual ~LineScanCameraDetectorMap()
Destructor.
Definition: LineScanCameraDetectorMap.cpp:33
Isis::LineScanCameraDetectorMap::SetDetector
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
Definition: LineScanCameraDetectorMap.cpp:86
Isis::CameraDetectorMap::SetDetector
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
Definition: CameraDetectorMap.cpp:43
Isis::LineScanCameraDetectorMap::SetLineRate
void SetLineRate(const double lineRate)
Reset the line rate.
Definition: LineScanCameraDetectorMap.cpp:60
Isis::LineScanCameraDetectorMap::StartTime
double StartTime() const
Access the starting time at the top edge of the first line in the parent image.
Definition: LineScanCameraDetectorMap.cpp:149
Isis::LineScanCameraDetectorMap::LineScanCameraDetectorMap
LineScanCameraDetectorMap(Camera *parent, const double etStart, const double lineRate)
Construct a detector map for line scan cameras.
Definition: LineScanCameraDetectorMap.cpp:23
Isis::CameraDetectorMap::p_camera
Camera * p_camera
Pointer to the camera.
Definition: CameraDetectorMap.h:138
Isis::LineScanCameraDetectorMap::exposureDuration
virtual double exposureDuration(const double sample, const double line, const int band) const
@breif This virtual method is for returning the exposure duration of a pixel.
Definition: LineScanCameraDetectorMap.cpp:175
Isis::Camera::FocalPlaneMap
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
Definition: Camera.cpp:2836
Isis::LineScanCameraDetectorMap::p_lineRate
double p_lineRate
Time, in seconds, between lines in parent cube.
Definition: LineScanCameraDetectorMap.h:65
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16