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"
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.";
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.";
125 QString msg =
"File does not appear to be a Viking image. SpacecraftName ["
126 + spacecraft +
"] is invalid Viking value.";
149 QString spacecraftClock = inst[
"SpacecraftClockCount"];
150 double etClock =
getClockTime(spacecraftClock, altinstcode).Et();
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);
175 focalMap->SetDetectorOrigin(602.0, 528.0);
213 double exposureDuration) {
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.
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.
File name manipulation and expansion.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Generic class for Framing Cameras.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Contains multiple PvlContainers.
Container for cube-like labels.
@ Traverse
Search child objects.
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.
This is free and unencumbered software released into the public domain.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Namespace for the standard library.