10#include "VikingCamera.h"
18#include "CameraDetectorMap.h"
19#include "CameraFocalPlaneMap.h"
20#include "CameraGroundMap.h"
21#include "CameraSkyMap.h"
25#include "NaifStatus.h"
26#include "ReseauDistortionMap.h"
52 Pvl &lab = *cube.
label();
53 PvlGroup &inst = lab.findGroup(
"Instrument", Pvl::Traverse);
54 QString spacecraft = inst[
"SPACECRAFTNAME"];
55 QString instId = inst[
"INSTRUMENTID"];
58 double raster, cone, crosscone;
60 if(spacecraft ==
"VIKING_ORBITER_1") {
68 if(instId ==
"VISUAL_IMAGING_SUBSYSTEM_CAMERA_A") {
71 crosscone = -0.707350;
77 else if(instId ==
"VISUAL_IMAGING_SUBSYSTEM_CAMERA_B") {
87 QString msg =
"File does not appear to be a Viking image. InstrumentId ["
88 + instId +
"] is invalid Viking value.";
89 throw IException(IException::User, msg, _FILEINFO_);
92 else if(spacecraft ==
"VIKING_ORBITER_2") {
100 if(instId ==
"VISUAL_IMAGING_SUBSYSTEM_CAMERA_A") {
103 crosscone = -0.679330;
109 else if(instId ==
"VISUAL_IMAGING_SUBSYSTEM_CAMERA_B") {
112 crosscone = 0.663000;
119 QString msg =
"File does not appear to be a Viking image. InstrumentId ["
120 + instId +
"] is invalid Viking value.";
121 throw IException(IException::User, msg, _FILEINFO_);
125 QString msg =
"File does not appear to be a Viking image. SpacecraftName ["
126 + spacecraft +
"] is invalid Viking value.";
127 throw IException(IException::User, msg, _FILEINFO_);
149 QString spacecraftClock = inst[
"SpacecraftClockCount"];
156 SpiceDouble CP[3][3];
157 eul2m_c((SpiceDouble)raster * rpd_c(), (SpiceDouble)cone * rpd_c(),
158 (SpiceDouble) - crosscone * rpd_c(), 3, 2, 1, CP);
167 et2utc_c(centerTime,
"ISOC", 3, 25, timepds);
168 utc2et_c(timepds, ¢erTime);
178 QString fname = FileName(
"$viking" +
toString(spn) +
"/reseaus/vik" + cam
179 +
"MasterReseaus.pvl").expanded();
214 pair<iTime, iTime> shuttertimes;
217 offset1 = 7.0 / 8.0 * 4.48;
220 offset1 = 3.0 / 8.0 * 4.48;
222 double offset2 = 1.0 / 64.0 * 4.48;
225 shuttertimes.first =
time + offset1 + offset2;
Convert between parent image coordinates and detector coordinates.
Convert between distorted focal plane and detector coordinates.
void SetDetectorOrigin(const double sample, const double line)
Set the detector origin.
Convert between undistorted focal plane and ground coordinates.
QString m_spacecraftNameLong
Full spacecraft name.
virtual double exposureDuration() const
Return the exposure duration for the pixel that the camera is set to.
void SetFocalLength()
Reads the focal length from the instrument kernel.
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
void LoadCache()
This loads the spice cache big enough for this image.
QString m_instrumentNameShort
Shortened instrument name.
QString m_spacecraftNameShort
Shortened spacecraft name.
QString m_instrumentNameLong
Full instrument name.
Convert between undistorted focal plane and ra/dec coordinates.
IO Handler for Isis Cubes.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
FramingCamera(Cube &cube)
Constructs the FramingCamera object.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Distort/undistort focal plane coordinates.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
virtual iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
virtual iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
VikingCamera(Cube &cube)
Constructs a Viking Camera Model.
int p_ckFrameId
"Camera-matrix" Kernel Frame ID
virtual std::pair< iTime, iTime > ShutterOpenCloseTimes(double time, double exposureDuration)
Returns the shutter open and close times.
int p_spkTargetId
Spacecraft Kernel Target ID.
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
This is free and unencumbered software released into the public domain.
QString toString(const LinearAlgebra::Vector &vector, int precision)
A global function to format LinearAlgebra::Vector as a QString with the given precision.
Namespace for the standard library.