Isis 3.0 Object Programmers' Reference
Home
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
MocNarrowAngleCamera.cpp
Go to the documentation of this file.
1
20
#include "
MocNarrowAngleCamera.h
"
21
22
#include <QString>
23
24
#include "
CameraDistortionMap.h
"
25
#include "
CameraFocalPlaneMap.h
"
26
#include "
IException.h
"
27
#include "
IString.h
"
28
#include "
iTime.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 {
44
MocNarrowAngleCamera::MocNarrowAngleCamera(
Cube
&cube) :
LineScanCamera
(cube) {
45
m_instrumentNameLong
=
"Mars Orbiter Camera Narrow Angle"
;
46
m_instrumentNameShort
=
"MOC-NA"
;
47
m_spacecraftNameLong
=
"Mars Global Surveyor"
;
48
m_spacecraftNameShort
=
"MGS"
;
49
50
NaifStatus::CheckErrors
();
51
// Set up the camera info from ik/iak kernels
52
// LoadEulerMounting();
53
SetFocalLength
();
54
SetPixelPitch
();
55
instrumentRotation
()->
SetTimeBias
(-1.15);
56
57
// Get the start time from labels
58
Pvl
&lab = *cube.
label
();
59
PvlGroup
&inst = lab.
findGroup
(
"Instrument"
,
Pvl::Traverse
);
60
QString stime = inst[
"SpacecraftClockCount"
];
61
double
etStart =
getClockTime
(stime).
Et
();
62
63
// Get other info from labels
64
double
csum = inst[
"CrosstrackSumming"
];
65
double
dsum = inst[
"DowntrackSumming"
];
66
double
lineRate = (double) inst[
"LineExposureDuration"
] / 1000.0;
67
lineRate *= dsum;
68
double
ss = inst[
"FirstLineSample"
];
69
70
// Setup detector map
71
LineScanCameraDetectorMap
*detectorMap =
72
new
LineScanCameraDetectorMap
(
this
, etStart, lineRate);
73
detectorMap->
SetDetectorSampleSumming
(csum);
74
detectorMap->
SetDetectorLineSumming
(dsum);
75
detectorMap->
SetStartingDetectorSample
(ss);
76
77
// Setup focal plane map
78
CameraFocalPlaneMap
*focalMap =
79
new
CameraFocalPlaneMap
(
this
,
naifIkCode
());
80
focalMap->
SetDetectorOrigin
(1024.5, 0.0);
81
focalMap->
SetDetectorOffset
(0.0, 0.0);
82
83
// Setup distortion map
84
new
CameraDistortionMap
(
this
);
85
86
// Setup the ground and sky map
87
new
LineScanCameraGroundMap
(
this
);
88
new
LineScanCameraSkyMap
(
this
);
89
90
LoadCache
();
91
NaifStatus::CheckErrors
();
92
}
93
}
94
95
105
extern
"C"
Isis::Camera
*
MocNarrowAngleCameraPlugin
(
Isis::Cube
&cube) {
106
return
new
Isis::MocNarrowAngleCamera
(cube);
107
}