Loading [MathJax]/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
MocNarrowAngleCamera.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "MocNarrowAngleCamera.h"
10 
11 #include <QString>
12 
13 #include "CameraDistortionMap.h"
14 #include "CameraFocalPlaneMap.h"
15 #include "IException.h"
16 #include "IString.h"
17 #include "iTime.h"
18 #include "LineScanCameraDetectorMap.h"
19 #include "LineScanCameraGroundMap.h"
20 #include "LineScanCameraSkyMap.h"
21 #include "NaifStatus.h"
22 
23 using namespace std;
24 namespace Isis {
33  MocNarrowAngleCamera::MocNarrowAngleCamera(Cube &cube) : LineScanCamera(cube) {
34  m_instrumentNameLong = "Mars Orbiter Camera Narrow Angle";
35  m_instrumentNameShort = "MOC-NA";
36  m_spacecraftNameLong = "Mars Global Surveyor";
37  m_spacecraftNameShort = "MGS";
38 
40  // Set up the camera info from ik/iak kernels
41  // LoadEulerMounting();
43  SetPixelPitch();
45 
46  // Get the start time from labels
47  Pvl &lab = *cube.label();
48  PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse);
49  QString stime = inst["SpacecraftClockCount"];
50  double etStart = getClockTime(stime).Et();
51 
52  // Get other info from labels
53  double csum = inst["CrosstrackSumming"];
54  double dsum = inst["DowntrackSumming"];
55  double lineRate = (double) inst["LineExposureDuration"] / 1000.0;
56  lineRate *= dsum;
57  double ss = inst["FirstLineSample"];
58 
59  // Setup detector map
60  LineScanCameraDetectorMap *detectorMap =
61  new LineScanCameraDetectorMap(this, etStart, lineRate);
62  detectorMap->SetDetectorSampleSumming(csum);
63  detectorMap->SetDetectorLineSumming(dsum);
64  detectorMap->SetStartingDetectorSample(ss);
65 
66  // Setup focal plane map
67  CameraFocalPlaneMap *focalMap =
68  new CameraFocalPlaneMap(this, naifIkCode());
69  focalMap->SetDetectorOrigin(1024.5, 0.0);
70  focalMap->SetDetectorOffset(0.0, 0.0);
71 
72  // Setup distortion map
73  new CameraDistortionMap(this);
74 
75  // Setup the ground and sky map
76  new LineScanCameraGroundMap(this);
77  new LineScanCameraSkyMap(this);
78 
79  LoadCache();
81  }
82 }
83 
84 
94 extern "C" Isis::Camera *MocNarrowAngleCameraPlugin(Isis::Cube &cube) {
95  return new Isis::MocNarrowAngleCamera(cube);
96 }
Isis::LineScanCameraSkyMap
Convert between undistorted focal plane and ra/dec coordinates.
Definition: LineScanCameraSkyMap.h:34
Isis::CameraFocalPlaneMap::SetDetectorOrigin
void SetDetectorOrigin(const double sample, const double line)
Set the detector origin.
Definition: CameraFocalPlaneMap.cpp:293
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::SpiceRotation::SetTimeBias
void SetTimeBias(double timeBias)
Apply a time bias when invoking SetEphemerisTime method.
Definition: SpiceRotation.cpp:242
Isis::Spice::naifIkCode
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
Definition: Spice.cpp:968
Isis::Camera::m_instrumentNameLong
QString m_instrumentNameLong
Full instrument name.
Definition: Camera.h:496
Isis::Spice::getClockTime
virtual iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
Definition: Spice.cpp:1053
Isis::CameraDetectorMap::SetDetectorSampleSumming
void SetDetectorSampleSumming(const double summing)
Set sample summing mode.
Definition: CameraDetectorMap.h:108
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::CameraFocalPlaneMap::SetDetectorOffset
void SetDetectorOffset(const double sampleOffset, const double lineOffset)
Set the detector offset.
Definition: CameraFocalPlaneMap.cpp:324
Isis::NaifStatus::CheckErrors
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Definition: NaifStatus.cpp:28
Isis::Camera
Definition: Camera.h:236
Isis::Spice::instrumentRotation
virtual SpiceRotation * instrumentRotation() const
Accessor method for the instrument rotation.
Definition: Spice.cpp:1622
Isis::CameraDetectorMap::SetDetectorLineSumming
void SetDetectorLineSumming(const double summing)
Set line summing mode.
Definition: CameraDetectorMap.h:123
Isis::PvlObject::Traverse
@ Traverse
Search child objects.
Definition: PvlObject.h:158
Isis::iTime::Et
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition: iTime.h:126
Isis::Camera::SetPixelPitch
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
Definition: Camera.cpp:1418
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::LineScanCamera
Generic class for Line Scan Cameras.
Definition: LineScanCamera.h:36
Isis::LineScanCameraGroundMap
Convert between undistorted focal plane and ground coordinates.
Definition: LineScanCameraGroundMap.h:49
Isis::CameraDistortionMap
Distort/undistort focal plane coordinates.
Definition: CameraDistortionMap.h:41
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::Camera::m_spacecraftNameLong
QString m_spacecraftNameLong
Full spacecraft name.
Definition: Camera.h:498
Isis::CameraDetectorMap::SetStartingDetectorSample
void SetStartingDetectorSample(const double sample)
Set the starting detector sample.
Definition: CameraDetectorMap.h:79
std
Namespace for the standard library.
Isis::Camera::LoadCache
void LoadCache()
This loads the spice cache big enough for this image.
Definition: Camera.cpp:2420
Isis::Camera::m_instrumentNameShort
QString m_instrumentNameShort
Shortened instrument name.
Definition: Camera.h:497
Isis::CameraFocalPlaneMap
Convert between distorted focal plane and detector coordinates.
Definition: CameraFocalPlaneMap.h:85
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis::Camera::m_spacecraftNameShort
QString m_spacecraftNameShort
Shortened spacecraft name.
Definition: Camera.h:499
Isis::Camera::SetFocalLength
void SetFocalLength()
Reads the focal length from the instrument kernel.
Definition: Camera.cpp:1411
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::LineScanCameraDetectorMap
Convert between parent image coordinates and detector coordinates.
Definition: LineScanCameraDetectorMap.h:37
Isis::MocNarrowAngleCamera
MOC Narrow Angle Camera Model.
Definition: MocNarrowAngleCamera.h:46

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:52