File failed to load: https://isis.astrogeology.usgs.gov/9.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
MocWideAngleCamera.cpp
1
6
7/* SPDX-License-Identifier: CC0-1.0 */
8
9#include "MocWideAngleCamera.h"
10#include "MocWideAngleDetectorMap.h"
11#include "MocWideAngleDistortionMap.h"
12#include "MocLabels.h"
13
14#include <QString>
15
16#include "CameraFocalPlaneMap.h"
17#include "IException.h"
18#include "iTime.h"
19#include "LineScanCameraGroundMap.h"
20#include "LineScanCameraSkyMap.h"
21#include "NaifStatus.h"
22
23using namespace std;
24namespace Isis {
25 // constructors
38 m_instrumentNameLong = "Mars Orbiter Camera Wide Angle";
39 m_instrumentNameShort = "MOC-WA";
40 m_spacecraftNameLong = "Mars Global Surveyor";
42
44 // See if we have a moc camera
45 Pvl &lab = *cube.label();
46 MocLabels *moclab = new MocLabels(cube);
47 double lineRate = moclab->LineRate();
48 double csum = moclab->CrosstrackSumming();
49 double dsum = moclab->DowntrackSumming();
50 double ss = moclab->FirstLineSample();
51 bool isRed = moclab->WideAngleRed();
52
53 // Set up the camera info from ik/iak kernels
54 // LoadEulerMounting();
57
58 if(PixelPitch() == 1) {
60 "Cube file needs to be spiceinit'd with updated iak", _FILEINFO_);
61 }
63
64 // Get the start time from labels
65 PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse);
66 QString stime = inst["SpacecraftClockCount"];
67 double etStart = getClockTime(stime).Et();
68
69 // Setup detector map
70 MocWideAngleDetectorMap *detectorMap =
71 new MocWideAngleDetectorMap(this, etStart, lineRate, moclab);
72 detectorMap->SetDetectorSampleSumming(csum);
73 detectorMap->SetDetectorLineSumming(dsum);
74 detectorMap->SetStartingDetectorSample(ss);
75
76 // Setup focal plane map
77 CameraFocalPlaneMap *focalMap =
79 if(isRed) {
80 focalMap->SetDetectorOrigin(1674.65, 0.0);
81 focalMap->SetDetectorOffset(0.0, 6.7785);
82 }
83 else {
84 focalMap->SetDetectorOrigin(1688.58, 0.0);
85 focalMap->SetDetectorOffset(0.0, -0.8486);
86 }
87
88 // Setup distortion map
89 new MocWideAngleDistortionMap(this, isRed);
90
91 // Setup the ground and sky map
93 new LineScanCameraSkyMap(this);
94
95 LoadCache();
97 }
98}
99
100
111extern "C" Isis::Camera *MocWideAngleCameraPlugin(Isis::Cube &cube) {
112 return new Isis::MocWideAngleCamera(cube);
113}
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.
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
double PixelPitch() const
Returns the pixel pitch.
Definition Camera.cpp:2772
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
Isis exception class.
Definition IException.h:91
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition IException.h:126
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.
Read values from MOC labels.
Definition MocLabels.h:50
int CrosstrackSumming() const
Returns value for CrosstrackSumming from the instrument group.
Definition MocLabels.h:92
int FirstLineSample() const
Returns value for FirstLineSample from the instrument group.
Definition MocLabels.h:106
int DowntrackSumming() const
Returns value for DowntrackSumming from the instrument group.
Definition MocLabels.h:99
bool WideAngleRed() const
Indicates whether the camera was red wide angle.
Definition MocLabels.h:76
double LineRate() const
Returns the value for the true line rate.
Definition MocLabels.h:123
MOC Wide Angle Camera Model.
MocWideAngleCamera(Cube &cube)
Constructor for the Mgs MOC Wide Angle Camera Model.
Convert between parent image coordinates and detector coordinates.
Distort/undistort focal plane coordinates.
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.