Isis 3.0 Object Programmers' Reference
Home
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Chandrayaan1M3Camera.cpp
Go to the documentation of this file.
1
21
#include "
Chandrayaan1M3Camera.h
"
22
23
#include "
Chandrayaan1M3DistortionMap.h
"
24
#include "
CameraDistortionMap.h
"
25
#include "
CameraFocalPlaneMap.h
"
26
#include "
IException.h
"
27
#include "
iTime.h
"
28
#include "
IString.h
"
29
#include "
LineScanCameraDetectorMap.h
"
30
#include "
LineScanCameraGroundMap.h
"
31
#include "
LineScanCameraSkyMap.h
"
32
#include "
NaifStatus.h
"
33
34
using namespace
std;
35
namespace
Isis {
47
Chandrayaan1M3Camera::Chandrayaan1M3Camera(
Cube
&cube) :
LineScanCamera
(cube) {
48
NaifStatus::CheckErrors
();
49
// Set up the camera info from ik/iak kernels
50
SetFocalLength
();
51
SetPixelPitch
();
52
53
// Get the start time from labels
54
Pvl
&lab = *cube.
label
();
55
PvlGroup
&inst = lab.
findGroup
(
"Instrument"
,
Pvl::Traverse
);
56
QString stime = inst[
"SpacecraftClockStartCount"
];
57
double
etStart =
getClockTime
(stime).
Et
();
58
59
// Get other info from labels
60
double
csum = inst[
"SpatialSumming"
];
61
double
lineRate = (double) inst[
"LineExposureDuration"
] / 1000.0;
62
//lineRate *= csum;
63
64
// Setup detector map
65
LineScanCameraDetectorMap
*detectorMap =
66
new
LineScanCameraDetectorMap
(
this
, etStart, lineRate);
67
detectorMap->
SetDetectorSampleSumming
(csum);
68
69
// Setup focal plane map
70
CameraFocalPlaneMap
*focalMap =
new
CameraFocalPlaneMap
(
this
,
naifIkCode
());
71
72
// Retrieve boresight location from instrument kernel (IK) (addendum?)
73
QString ikernKey =
"INS"
+
toString
((
int
)
naifIkCode
()) +
"_BORESIGHT_SAMPLE"
;
74
double
sampleBoreSight =
getDouble
(ikernKey);
75
76
ikernKey =
"INS"
+
toString
((
int
)
naifIkCode
()) +
"_BORESIGHT_LINE"
;
77
double
lineBoreSight =
getDouble
(ikernKey);
78
79
focalMap->
SetDetectorOrigin
(sampleBoreSight, lineBoreSight);
80
focalMap->
SetDetectorOffset
(0.0, 0.0);
81
82
QString ppKey(
"INS"
+
toString
(
naifIkCode
()) +
"_PP"
);
83
QString odKey(
"INS"
+
toString
(
naifIkCode
()) +
"_OD_K"
);
84
QString decenterKey(
"INS"
+
toString
(
naifIkCode
()) +
"_DECENTER"
);
85
86
87
// Setup distortion map
88
new
Chandrayaan1M3DistortionMap
(
this
,
89
getDouble
(ppKey, 0),
getDouble
(ppKey, 1),
90
getDouble
(odKey, 0),
getDouble
(odKey, 1),
getDouble
(odKey, 2),
91
getDouble
(decenterKey, 0),
getDouble
(decenterKey, 1));
92
93
// Setup the ground and sky map
94
new
LineScanCameraGroundMap
(
this
);
95
new
LineScanCameraSkyMap
(
this
);
96
97
LoadCache
();
98
NaifStatus::CheckErrors
();
99
}
100
}
101
110
extern
"C"
Isis::Camera
*
Chandrayaan1M3CameraPlugin
(
Isis::Cube
&cube) {
111
return
new
Isis::Chandrayaan1M3Camera
(cube);
112
}