File failed to load: https://isis.astrogeology.usgs.gov/9.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
MocNarrowAngleCamera.cpp
1
6
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
23using namespace std;
24namespace Isis {
34 m_instrumentNameLong = "Mars Orbiter Camera Narrow Angle";
35 m_instrumentNameShort = "MOC-NA";
36 m_spacecraftNameLong = "Mars Global Surveyor";
38
40 // Set up the camera info from ik/iak kernels
41 // LoadEulerMounting();
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 =
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
77 new LineScanCameraSkyMap(this);
78
79 LoadCache();
81 }
82}
83
84
94extern "C" Isis::Camera *MocNarrowAngleCameraPlugin(Isis::Cube &cube) {
95 return new Isis::MocNarrowAngleCamera(cube);
96}
void SetDetectorLineSumming(const double summing)
Set line summing mode.
void SetStartingDetectorSample(const double sample)
Set the starting detector sample.
void SetDetectorSampleSumming(const double summing)
Set sample summing mode.
Distort/undistort focal plane coordinates.
Convert between distorted focal plane and detector coordinates.
void SetDetectorOffset(const double sampleOffset, const double lineOffset)
Set the detector offset.
void SetDetectorOrigin(const double sample, const double line)
Set the detector origin.
QString m_spacecraftNameLong
Full spacecraft name.
Definition Camera.h:499
void SetFocalLength()
Reads the focal length from the instrument kernel.
Definition Camera.cpp:1422
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
Definition Camera.cpp:1429
void LoadCache()
This loads the spice cache big enough for this image.
Definition Camera.cpp:2450
QString m_instrumentNameShort
Shortened instrument name.
Definition Camera.h:498
QString m_spacecraftNameShort
Shortened spacecraft name.
Definition Camera.h:500
QString m_instrumentNameLong
Full instrument name.
Definition Camera.h:497
IO Handler for Isis Cubes.
Definition Cube.h:168
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition Cube.cpp:1734
Convert between parent image coordinates and detector coordinates.
Convert between undistorted focal plane and ground coordinates.
LineScanCamera(Isis::Cube &cube)
Constructs the LineScanCamera object.
Convert between undistorted focal plane and ra/dec coordinates.
MOC Narrow Angle Camera Model.
MocNarrowAngleCamera(Cube &cube)
Constructor for the Mgs MOC Narrow Angle Camera Model.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Contains multiple PvlContainers.
Definition PvlGroup.h:41
Container for cube-like labels.
Definition Pvl.h:119
@ Traverse
Search child objects.
Definition PvlObject.h:158
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition PvlObject.h:129
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:1060
virtual SpiceRotation * instrumentRotation() const
Accessor method for the instrument rotation.
Definition Spice.cpp:1634
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
Definition Spice.cpp:975
void SetTimeBias(double timeBias)
Apply a time bias when invoking SetEphemerisTime method.
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition iTime.h:126
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
Namespace for the standard library.