Isis 3.0 Object Programmers' Reference
Home
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
UvvisCamera.cpp
Go to the documentation of this file.
1
21
#include "
UvvisCamera.h
"
22
23
#include "
CameraDetectorMap.h
"
24
#include "
CameraDistortionMap.h
"
25
#include "
CameraFocalPlaneMap.h
"
26
#include "
CameraGroundMap.h
"
27
#include "
CameraSkyMap.h
"
28
#include "
IString.h
"
29
#include "
iTime.h
"
30
#include "
NaifStatus.h
"
31
32
using namespace
std;
33
34
namespace
Isis {
44
UvvisCamera::UvvisCamera(
Cube
&cube) :
FramingCamera
(cube) {
45
NaifStatus::CheckErrors
();
46
// Get the camera characteristics
47
SetFocalLength
();
48
SetPixelPitch
();
49
50
// Get the start time in et
51
Pvl
&lab = *cube.
label
();
52
PvlGroup
inst = lab.
findGroup
(
"Instrument"
,
Pvl::Traverse
);
53
54
// set variables startTime and exposureDuration
55
double
time
=
iTime
((QString)inst[
"StartTime"
]).
Et
();
56
57
// divide exposure duration keyword value by 1000 to convert to seconds
58
double
exposureDuration = ((double) inst[
"ExposureDuration"
]) / 1000.0;
59
pair<iTime, iTime> shuttertimes =
ShutterOpenCloseTimes
(time, exposureDuration);
60
// Add half exposure duration to get time at center of image
61
iTime
centerTime = shuttertimes.first.
Et
() + exposureDuration / 2.0;
62
63
// Setup detector map
64
new
CameraDetectorMap
(
this
);
65
66
// Setup focal plane map
67
CameraFocalPlaneMap
*focalMap =
new
CameraFocalPlaneMap
(
this
,
naifIkCode
());
68
69
focalMap->
SetDetectorOrigin
(
70
Spice::getDouble
(
"INS"
+
toString
(
naifIkCode
()) +
71
"_BORESIGHT_SAMPLE"
),
72
Spice::getDouble
(
"INS"
+
toString
(
naifIkCode
()) +
73
"_BORESIGHT_LINE"
));
74
75
// Setup distortion map
76
new
CameraDistortionMap
(
this
);
77
78
// Setup the ground and sky map
79
new
CameraGroundMap
(
this
);
80
new
CameraSkyMap
(
this
);
81
82
setTime
(centerTime);
83
LoadCache
();
84
NaifStatus::CheckErrors
();
85
}
86
109
pair<iTime, iTime>
UvvisCamera::ShutterOpenCloseTimes
(
double
time,
110
double
exposureDuration) {
111
return
FramingCamera::ShutterOpenCloseTimes
(time, exposureDuration);
112
}
113
}
114
115
127
extern
"C"
Isis::Camera
*
UvvisCameraPlugin
(
Isis::Cube
&cube) {
128
return
new
Isis::UvvisCamera
(cube);
129
}