Isis 3 Programmer Reference
Isis::Spice Class Reference

Obtain SPICE information for a spacecraft. More...

#include <Spice.h>

Inheritance diagram for Isis::Spice:
Inheritance graph
Collaboration diagram for Isis::Spice:
Collaboration graph

Public Member Functions

 Spice (Cube &cube)
 Constructs a Spice object and loads SPICE kernels using information from the label object.
 
 Spice (Pvl &lab, nlohmann::json)
 Constructs a Spice Object.
 
virtual ~Spice ()
 Destroys the Spice object.
 
virtual void setTime (const iTime &time)
 Sets the ephemeris time and reads the spacecraft and sun position from the kernels at that instant in time.
 
void instrumentPosition (double p[3]) const
 Returns the spacecraft position in body-fixed frame km units.
 
virtual void instrumentBodyFixedPosition (double p[3]) const
 Returns the spacecraft position in body-fixed frame km units.
 
virtual void sunPosition (double p[3]) const
 Fills the input vector with sun position information, in either body-fixed or J2000 reference frame and km units.
 
virtual double targetCenterDistance () const
 Calculates and returns the distance from the spacecraft to the target center.
 
virtual double sunToBodyDist () const
 
virtual Longitude solarLongitude ()
 Returns the solar longitude.
 
virtual void instrumentBodyFixedVelocity (double v[3]) const
 Returns the spacecraft velocity in body-fixed frame km/sec units.
 
virtual iTime time () const
 Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
 
void radii (Distance r[3]) const
 Returns the radii of the body in km.
 
virtual void createCache (iTime startTime, iTime endTime, const int size, double tol)
 This method creates an internal cache of spacecraft and sun positions over a specified time range.
 
virtual iTime cacheStartTime () const
 Accessor method for the cache start time.
 
virtual iTime cacheEndTime () const
 Accessor method for the cache end time.
 
virtual void subSpacecraftPoint (double &lat, double &lon)
 Returns the sub-spacecraft latitude/longitude in universal coordinates (0-360 positive east, ocentric)
 
virtual void subSolarPoint (double &lat, double &lon)
 Returns the sub-solar latitude/longitude in universal coordinates (0-360 positive east, ocentric)
 
virtual Targettarget () const
 Returns a pointer to the target object.
 
QString targetName () const
 Returns the QString name of the target.
 
virtual iTime getClockTime (QString clockValue, int sclkCode=-1, bool clockTicks=false)
 This converts the spacecraft clock ticks value (clockValue) to an iTime.
 
SpiceDouble getDouble (const QString &key, int index=0)
 This returns a value from the NAIF text pool.
 
SpiceInt getInteger (const QString &key, int index=0)
 This returns a value from the NAIF text pool.
 
QString getString (const QString &key, int index=0)
 This returns a value from the NAIF text pool.
 
virtual SpicePositionsunPosition () const
 Accessor method for the sun position.
 
virtual SpicePositioninstrumentPosition () const
 Accessor method for the instrument position.
 
virtual SpiceRotationbodyRotation () const
 Accessor method for the body rotation.
 
virtual SpiceRotationinstrumentRotation () const
 Accessor method for the instrument rotation.
 
bool isUsingAle ()
 
bool hasKernels (Pvl &lab)
 Returns true if the kernel group has kernel files.
 
bool isTimeSet ()
 Returns true if time has been initialized.
 
SpiceInt naifBodyCode () const
 This returns the NAIF body code of the target indicated in the labels.
 
SpiceInt naifSpkCode () const
 This returns the NAIF SPK code to use when reading from SPK kernels.
 
SpiceInt naifCkCode () const
 This returns the NAIF CK code to use when reading from CK kernels.
 
SpiceInt naifIkCode () const
 This returns the NAIF IK code to use when reading from instrument kernels.
 
SpiceInt naifSclkCode () const
 This returns the NAIF SCLK code to use when reading from instrument kernels.
 
SpiceInt naifBodyFrameCode () const
 This returns the NAIF body frame code.
 
PvlObject getStoredNaifKeywords () const
 This returns the PvlObject that stores all of the requested Naif data and can be a replacement for furnishing text kernels.
 
virtual double resolution ()
 Virtual method that returns the pixel resolution of the sensor in meters/pix.
 

Protected Types

enum  SpiceValueType { SpiceDoubleType , SpiceStringType , SpiceIntType , SpiceByteCodeType }
 NAIF value primitive type. More...
 

Protected Member Functions

QVariant readValue (QString key, SpiceValueType type, int index=0)
 This should be used for reading ALL text naif kernel values.
 
void storeResult (QString name, SpiceValueType type, QVariant value)
 
QVariant getStoredResult (QString name, SpiceValueType type)
 
void storeValue (QString key, int index, SpiceValueType type, QVariant value)
 
QVariant readStoredValue (QString key, SpiceValueType type, int index)
 
virtual void computeSolarLongitude (iTime et)
 Computes the solar longitude for the given ephemeris time.
 

Protected Attributes

SpiceDouble m_uB [3]
 This contains the sun position (u) in the bodyfixed reference frame (B).
 
SpiceDouble m_BJ [3][3]
 This contains the transformation matrix from J2000 (J) to Body fixed (B).
 
Targetm_target
 Target of the observation.
 
iTimem_et
 Ephemeris time (read NAIF documentation for a detailed description)
 
Longitudem_solarLongitude
 Body rotation solar longitude value.
 

Private Member Functions

 Spice (const Spice &other)
 
Spiceoperator= (const Spice &other)
 
void init (Pvl &pvl, bool noTables, nlohmann::json isd=NULL)
 Initialization of Spice object.
 
void csmInit (Cube &cube, Pvl label)
 Initialize the Spice object for a CSMCamera.
 
void defaultInit ()
 Default initialize the members of the SPICE object.
 
void load (PvlKeyword &key, bool notab)
 Loads/furnishes NAIF kernel(s)
 

Private Attributes

QVector< QString > * m_kernels
 Vector containing kernels filenames.
 
iTimem_startTime
 Corrected start (shutter open) time of the observation.
 
iTimem_endTime
 Corrected end (shutter close) time of the observation.
 
SpiceDouble * m_cacheSize
 Cache size. Note: This value is 1 for Framing cameras.
 
SpiceDouble * m_startTimePadding
 Kernels pvl group StartPadding keyword value.
 
SpiceDouble * m_endTimePadding
 Kernels pvl group EndPadding keyword value.
 
SpicePositionm_instrumentPosition
 Instrument spice position.
 
SpiceRotationm_instrumentRotation
 Instrument spice rotation.
 
SpicePositionm_sunPosition
 Sun spice position.
 
SpiceRotationm_bodyRotation
 Body spice rotation.
 
bool m_allowDownsizing
 Indicates whether to allow downsizing.
 
SpiceInt * m_spkCode
 Spacecraft and planet ephemeris kernel (SPK) code.
 
SpiceInt * m_ckCode
 Camera kernel (CK) code.
 
SpiceInt * m_ikCode
 Instrument kernel (IK) code.
 
SpiceInt * m_sclkCode
 Spacecraft clock correlation kernel (SCLK) code.
 
SpiceInt * m_spkBodyCode
 Spacecraft and planet ephemeris kernel (SPK) body code.
 
SpiceInt * m_bodyFrameCode
 Naif's BODY_FRAME_CODE value.
 
PvlObjectm_naifKeywords
 NaifKeywords PvlObject from cube.
 
bool m_usingNaif
 Indicates whether we are reading values from the NaifKeywords PvlObject in cube.
 
bool m_usingAle
 Indicate whether we are reading values from an ISD returned from ALE.
 

Detailed Description

Obtain SPICE information for a spacecraft.

This class initializes standard NAIF SPICE kernels in order to allow queries of a spacecraft's position and attitude at a given time. It also allows for access to the position of the sun and transformation matrices from J2000 to a body-fixed reference frame for a given target (e.g., Mars). The constructor for this class expects a PVL object with the following minimum information:

Group = Instrument
TargetName = Mars
EndGroup
Group = Kernels
NaifFrameCode = -94030
LeapSecond = naif0007.tls
TargetAttitudeShape = pck00006.tpc
TargetPosition = de405.bsp
InstrumentPointing = (mgs_sc_ab1.bc,
Instrument = moc13.ti
SpacecraftClock = MGS_SCLKSCET.00045.tsc
InstrumentPosition = mgs_ab1.bsp
InstrumentAddendum = mocAddendum.ti
EndGroup
Determine SPICE kernels defined in an ISIS file.
Definition Kernels.h:94

This group is typically found in the image labels after it has been run through the program "spiceinit" It is recommended you read NAIF documentation to obtain a better understanding about the various types of SPICE kernels. The NAIF toolkit accesses information from kernels on a last-in-first-out (LIFO) basis. This means that the creation of a second object can cause problems with the first object. To alleviate this problem we have supplied the CreateCache method which should be invoked immediately after the object is constructed. This caches information (spacecraft position, pointing, etc) internally in the object and unloads all NAIF kernels.

Author
2003-03-13 Jeff Anderson
History

2003-05-16 Stuart Sides - Modified schema from astrogeology... isis.astrogeology...

2003-10-15 Jeff Anderson - Added requirement for frame kernel in labels

2003-10-28 Jeff Anderson - Changed SpaceCraft to Spacecraft in labels and method names

2003-11-03 Jeff Anderson - Added SubSolarPoint and SubSpacecraftPoint methods

2003-11-12 Jeff Anderson - Added Target method

2004-01-14 Jeff Anderson - Changed how the SPK, CK, and Instrument codes where handled. The instrument code must be in the labels as NaifFrameCode and then the other two can be automatically computed.

2004-02-18 Jeff Anderson - Modified to ignore kernel labels which were blank

2004-03-25 Jeff Anderson - Modified NaifBodyCode method to convert Jupiter target code of 599 to 5

2004-03-25 Jeff Anderson - Fixed bug in destructor and added GetString method.

2005-02-15 Elizabeth Ribelin - Modified file to support Doxygen documentation

2005-02-24 Jeff Anderson - Modified SubSolarPoint and SubSpacecraftPoint to return positive longitudes only

2005-09-12 Jeff Anderson - Check for case-insensitive values for TargetName of SKY

2005-09-20 Jeff Anderson - Added IsSky method

2006-01-05 Debbie A. Cook - Added units to comments

2006-03-28 Jeff Anderson - Refactored using SpiceRotation and SpicePosition classes. Added Tables and nadir kernel information.

2006-03-31 Elizabeth Miller - Added TargetCenterDistance method

2006-04-19 Elizabeth Miller - Added SolarLongitude method

2007-01-30 Tracie Sucharski - Throw error in the load method before calling furnish if the file does not exist.

2007-07-09 Steven Lambright - Frame kernel is now optional, added Extra kernel support.

2007-07-10 Debbie A. Cook - Modified method ComputeSolarLongitude to use pxform instead of tipbod to get body-fixed to J2000 rotation matrix so that the correct frame will be used. If the frame is different from the default IAU frame, the correct frame should be set in the iak file (see frames.req). Also modified setting of m_bodyRotation frameCode. The old code forced the IAU_ frame. The new code uses the Naif routine cidfrm to get the frame associated with the body id. These change will recognize any frame changes made in the iak file.

2007-08-10 Steven Lambright - Added support for Nadir keyword in InstrumentPointing group to not be the first element in the PvlKeyword.

2007-08-24 Debbie A. Cook - Removed p_sB so it is recalculated every time it is used insuring that any updates to the position or rotation are applied. Also removed p_BP since it is no longer used

2008-02-13 Steven Lambright - Added StartPadding and EndPadding caching capabilties

2008-02-13 Steven Lambright - Added Support Check for StartPadding and EndPadding caching capabilties; An clarified exception is thrown if a framing camera tries to use time padding

2008-02-27 Kris Becker - Modified so that planetary ephemeris SPKs are loaded before spacecraft SPKs so that missions that augment planet ephemerides will take precidence.

2008-06-23 Steven Lambright - Added NaifStatus error checking

2008-06-25 Debbie A. Cook - Added method InstrumentVelocity to support miniRF

2008-11-28 Debbie A. Cook - Added method hasKernels()

2009-03-18 Tracie Sucharski - Cleaned up some unnecessary, obsolete code. Make sure the table is used if the kernel names follow the "Table" keyword value, due to change made to spiceinit to retain kernel names if the spice is written to blob.

2009-06-18 Debbie A. Cook - Modified to downsize instrument rotation table when loading cache

2009-07-01 Debbie A. Cook - Modified to downsize body rotation, and sun position tables when loading cache

2009-08-03 Debbie A. Cook - Added tolerance argument to method CreateCache to allow downsizing of instrument position Spice table.

2009-08-21 Kris Becker - Moved the NAIF code methods to public scope.

2010-01-29 Debbie A. Cook - Redid Tracie's change to make sure the table is loaded instead of the kernels if the kernel keyword value lists "Table" before the kernel files.

2010-03-19 Debbie A. Cook - Added constructor and moved common constructor initialization into new method Init. Also added parameter notab to method Load.

2010-04-09 Debbie A. Cook - Moved the loading of the "extra" kernel(s) from the middle of the loads to the end.

2011-02-08 Jeannie Walldren - Added documentation to methods and private variables. Commented out createCache(double,double) since it appears that this method is not needed. Initialize pointers to NULL in Init() method.

2011-02-09 Steven Lambright - Refactored to use iTime where possible. Changed p_radii to a Distance so the units are no longer ambiguous. These changes were meant for readability and reducing the likelyhood of future code having bugs due to unit mismatches.

2011-02-11 Jeannie Walldren - Changed documentation references to SetEphemerisTime() method (these were replaced with references to setTime()). Added missing documentation to new methods.

2011-05-03 Jeannie Walldren - Added Isis Disclaimer to files.

2011-05-25 Janet Barrett and Steven Lambright - Added API that stores naif values and arbitrary computations so that the text kernels do not have to be furnished. This makes the Camera instantiation much, much quicker. Text kernels are no longer furnished when their data has been stored in the labels.

2011-05-26 Debbie A. Cook - Put back the code for spkwriter that was checked in May 25 but disappeared in the May 26 build. This code turns aberration corrections off for the instrument position if the spk file was created by spkwriter.

2011-07-08 Jeff Anderson - Fixed Init method to record the integer body frame code in the labels of the cube. Vesta exposed this problem because it was not a instrinsic body in the NAIF toolkit version 63.

2011-07-11 Jeff Anderson - Added private copy constructors and operator= methods

2011-09-19 Debbie Cook - Added cubes with Ideal Cameras to the exclusion list for reading instrument keywords from the label. The Ideal Camera has variable values for the affine coefficients that are set in the camera itself and not read from a kernel. The camera puts these values into the Naif kernel pool.

2012-07-06 Debbie A. Cook, Updated Spice members to be more compliant with Isis coding standards. References #972.

2012-09-10 Steven Lambright - Undid Debbie's change from 2011-09-19 because the Ideal camera now supports putting those keywords in the label on the fly. References #1094.

2012-10-11 Debbie A. Cook - Deleted deprecated createCache code already commented out for over a year. Updated to use new Target and ShapeModel classes. Added resolution method needed for Target and its ShapeModel. Changed private member names from p_ to m_ to comply with coding standards. References Mantis tickets #775 and #1114.

2012-10-25 Jeannie Backer - Added accesssor method to return the BODY_FRAME_CODE value found in the init() method. Improved unitTest coverage in all areas. New method has 100% scope, line, function coverage. Improved padding around control statements and indentation of history entries to be more compliant with standards. Moved accessor method implementations to cpp file. Changed Resolution() method to lower camel case. Added documentation. Fixes #1181.

2012-10-31 Kris Becker - Added implementation for swapping of observer/target and light time correction to surface. Fixes (mostly) #0909, #1136 and #1223.

2012-12-10 Kris Becker - A newly designed class, SpacecraftPosition, is now being instantiated instead of SpicePosition specifically to properly order NAIF observer and target codes (to more accurately determine the target body position at the time the observation was initiated) and help determine light time correction to the surface of the target body instead of the center of the body. See the documention in SpacecraftPosition.h for a more detailed description of these changes. References #909, #1136 and #1223.

2013-01-09 Steven Lambright and Mathew Eis - Fixed a possible crash condition that never exhibited any problems, but valgrind caught it. This was discovered when adding support for Mac OSX 10.8. References #1354.

2013-09-26 Tracie Sucharski - If the Target is Saturn and the shape model is the ring plane, load an extra kernel, saturnRings_v001.tpc, which changes the prime meridian to {0, 0, 0}. This insures the longitude values are calculated in the inertial system relative to the ascending node of the ring plane. Fixes #1757.

2013-12-17 Janet Barrett - Added the instrumentBodyFixedPosition and instrumentBodyFixedVelocity methods. Fixes #1684.

2015-04-30 Stuart - Added an error check around the NAIF SPICE call scs2e_c in getClockTime. Avoids a segfault. Fixes #2247.

2015-07-21 Kristin Berry - Added additional NaifStatus::CheckErrors() to see if any NAIF errors were signaled. References #2248.

2016-05-18 Jeannie Backer and Stuart Sides - Moved the construction of the Target after the NAIF kernels have been loaded or the NAIF keywords have been pulled from the cube labels, so we can find target body codes that are defined in kernels and not just body codes build into spicelib. References #3934

2016-10-19 Kristin Berry - Added exception to Spice::time() to throw if m_et is NULL. Also added isTimeSet(), a function that will return true if m_et is set. References #4476.

2016-10-21 Jeannie Backer - Reorder method signatures and member variable declarations to fit ISIS coding standards. References #4476.

2018-06-07 Debbie A Cook - Added BODY_CODE to Naif keywords. This code is used in the target body radii keyword name. Isis retrieves this code from the standard PCK. Because target bodies new to Naif are not included in the standard PCK, missions create a special body-specific PCK to define the new body, including its body code. This PCK is only loaded in spiceinit so the code needs to be saved so that the radii keyword can be created to retrieve the target radii.

2019-04-16 Kristin Berry - Added a parameter to getClockTime called clockTicks which defaults to false. When set to true, this indicates that the input value is in encoded clock ticks, rather than a full spacecraft clock time string. As such, when used sct2e_c is used to convert to an ET rather than scs2e_c.

2021-02-17 Kristin Berry, Jesse Mapel, and Stuart Sides - Made several methods virtual, moved several member variables to protected, and added initialization path for a sensor model without SPICE data.

Definition at line 283 of file Spice.h.

Member Enumeration Documentation

◆ SpiceValueType

NAIF value primitive type.

Enumerator
SpiceDoubleType 

SpiceDouble type.

SpiceStringType 

SpiceString type.

SpiceIntType 

SpiceInt type.

SpiceByteCodeType 

SpiceByteCode type.

Definition at line 348 of file Spice.h.

Constructor & Destructor Documentation

◆ Spice() [1/2]

Isis::Spice::Spice ( Cube & cube)

Constructs a Spice object and loads SPICE kernels using information from the label object.

The constructor expects an Instrument and Kernels group to be in the labels.

Parameters
labLabel containing Instrument and Kernels groups.
History

2005-10-07 Jim Torson - Modified the constructor so it can handle multiple SpacecraftPosition and multiple SpacecraftPointing kernel files

2005-11-29 Debbie A. Cook - Added loop to allow multiple frames kernels and code to initialize Naif codes when no platform is used (landers)

2006-01-03 Debbie A. Cook - Added loop to allow multiple spacecraft clock kernels (for Viking)

2006-02-21 Jeff Anderson/Debbie Cook - Refactor to use SpicePosition and SpiceRotation classes

2009-03-18 Tracie Sucharski - Remove code for old keywords.

Definition at line 64 of file Spice.cpp.

References csmInit(), Isis::Cube::hasBlob(), init(), Isis::Cube::label(), and Isis::PvlObject::Traverse.

◆ Spice() [2/2]

Isis::Spice::Spice ( Pvl & lab,
nlohmann::json isd )

Constructs a Spice Object.

Parameters
labIsis Cube Pvl Lavel
isdALE Json ISD

Definition at line 84 of file Spice.cpp.

References init().

◆ ~Spice()

Member Function Documentation

◆ bodyRotation()

SpiceRotation * Isis::Spice::bodyRotation ( ) const
virtual

◆ cacheEndTime()

iTime Isis::Spice::cacheEndTime ( ) const
virtual

Accessor method for the cache end time.

Returns
iTime End time for the image.
Author
Steven Lambright
History
2011-02-09 Steven Lambright - Original version.

Definition at line 765 of file Spice.cpp.

References m_endTime.

Referenced by LineOffsetFunctor::operator()().

◆ cacheStartTime()

iTime Isis::Spice::cacheStartTime ( ) const
virtual

Accessor method for the cache start time.

Returns
iTime Start time for the image.
Author
Steven Lambright
History
2011-02-09 Steven Lambright - Original version.

Definition at line 750 of file Spice.cpp.

References m_startTime.

Referenced by LineOffsetFunctor::operator()().

◆ computeSolarLongitude()

◆ createCache()

void Isis::Spice::createCache ( iTime startTime,
iTime endTime,
const int size,
double tol )
virtual

This method creates an internal cache of spacecraft and sun positions over a specified time range.

The SPICE kernels are then immediately unloaded. This allows multiple instances of the Spice object to be created as the NAIF toolkit can clash if multiple sets of SPICE kernels are loaded. Note that the cache size is specified as an argument. Therefore, times requested via setTime() which are not directly loaded in the cache will be interpolated. If the instrument position is not cached and cacheSize is greater than 3, the tolerance is passed to the SpicePosition Memcache2HermiteCache() method.

Note: Before this method is called, the private variables m_cacheSize, m_startTime and m_endTime must be set. This is done in the Camera classes using the methods SetCacheSize() and SetStartEndEphemerisTime().

Parameters
startTimeStarting ephemeris time to cache
endTimeEnding ephemeris time to cache
sizeSize of the cache.
tolTolerance.
Exceptions
Isis::IException::Programmer- "Argument cacheSize must be greater than zero"
Isis::IException::Programmer- "Argument startTime must be less than or equal to endTime"
Isis::IException::User- "This instrument does not support time padding"
History
2011-04-10 Debbie A. Cook - Updated to only create cache for instrumentPosition if type is Spice.

Definition at line 649 of file Spice.cpp.

References Isis::SpicePosition::cacheSize(), Isis::NaifStatus::CheckErrors(), computeSolarLongitude(), Isis::iTime::Et(), Isis::SpicePosition::GetSource(), Isis::SpiceRotation::GetSource(), Isis::SpicePosition::HasVelocity(), instrumentPosition(), Isis::SpicePosition::IsCached(), Isis::SpiceRotation::IsCached(), Isis::SpicePosition::LoadCache(), Isis::SpiceRotation::LoadCache(), m_bodyRotation, m_cacheSize, m_endTime, m_endTimePadding, m_et, m_instrumentPosition, m_instrumentRotation, m_kernels, m_startTime, m_startTimePadding, m_sunPosition, Isis::SpicePosition::Memcache, Isis::SpiceRotation::Memcache, Isis::SpicePosition::Memcache2HermiteCache(), Isis::SpiceRotation::MinimizeCache(), Isis::IException::Programmer, Isis::IException::User, and Isis::SpiceRotation::Yes.

Referenced by Isis::CrismCamera::CrismCamera(), Isis::Camera::LoadCache(), and Isis::MiniRF::MiniRF().

◆ csmInit()

void Isis::Spice::csmInit ( Cube & cube,
Pvl label )
private

Initialize the Spice object for a CSMCamera.

This sets up the Spice/Sensor/Camera object to not have any SPICE dependent members initialized.

Parameters
cubeThe Cube containing image data for the camera
labelThe label containing information for the camera

Definition at line 97 of file Spice.cpp.

References Isis::NaifStatus::CheckErrors(), defaultInit(), and m_target.

Referenced by Spice().

◆ defaultInit()

void Isis::Spice::defaultInit ( )
private

◆ getClockTime()

iTime Isis::Spice::getClockTime ( QString clockValue,
int sclkCode = -1,
bool clockTicks = false )
virtual

This converts the spacecraft clock ticks value (clockValue) to an iTime.

If the clock ticks value is provided directly, rather than the spacecraft clock string, set clockTicks=true.

Use this when possible because naif calls (such as scs2e_c) cannot be called when not using naif.

Definition at line 1060 of file Spice.cpp.

References Isis::NaifStatus::CheckErrors(), naifSclkCode(), SpiceDoubleType, and Isis::toString().

Referenced by Isis::Chandrayaan1M3Camera::Chandrayaan1M3Camera(), Isis::CTXCamera::CTXCamera(), Isis::DawnFcCamera::DawnFcCamera(), Isis::HayabusaAmicaCamera::HayabusaAmicaCamera(), Isis::HayabusaNirsCamera::HayabusaNirsCamera(), Isis::HiriseCamera::HiriseCamera(), Isis::Hyb2OncCamera::Hyb2OncCamera(), Isis::VimsGroundMap::Init(), Isis::VimsSkyMap::Init(), Isis::JunoCamera::JunoCamera(), Isis::KaguyaTcCamera::KaguyaTcCamera(), Isis::LroNarrowAngleCamera::LroNarrowAngleCamera(), Isis::LroWideAngleCamera::LroWideAngleCamera(), Isis::MarciCamera::MarciCamera(), Isis::MdisCamera::MdisCamera(), Isis::MocNarrowAngleCamera::MocNarrowAngleCamera(), Isis::MocWideAngleCamera::MocWideAngleCamera(), Isis::MsiCamera::MsiCamera(), Isis::NewHorizonsLeisaCamera::NewHorizonsLeisaCamera(), Isis::NewHorizonsLorriCamera::NewHorizonsLorriCamera(), Isis::NewHorizonsMvicFrameCamera::NewHorizonsMvicFrameCamera(), Isis::NewHorizonsMvicTdiCamera::NewHorizonsMvicTdiCamera(), Isis::OsirisRexOcamsCamera::OsirisRexOcamsCamera(), Isis::DawnVirCamera::readHouseKeeping(), Isis::RosettaVirtisCamera::readHouseKeeping(), Isis::RosettaVirtisCamera::readSCET(), Isis::RosettaOsirisCamera::RosettaOsirisCamera(), Isis::ThemisIrCamera::ThemisIrCamera(), Isis::ThemisVisCamera::ThemisVisCamera(), Isis::VikingCamera::VikingCamera(), and Isis::VimsCamera::VimsCamera().

◆ getDouble()

SpiceDouble Isis::Spice::getDouble ( const QString & key,
int index = 0 )

This returns a value from the NAIF text pool.

It is a static convience method

Parameters
keyName of NAIF keyword to obtain from the pool
indexIf the keyword is an array, the element to obtain. Defaults to 0
Returns
SpiceDouble Spice double from NAIF text pool
Exceptions
Isis::iException::Io- "Can not find key in instrument kernels."

Definition at line 1046 of file Spice.cpp.

References readValue(), and SpiceDoubleType.

Referenced by Isis::LroWideAngleCameraDistortionMap::addFilter(), Isis::LroWideAngleCameraFocalPlaneMap::addFilter(), Isis::ApolloMetricCamera::ApolloMetricCamera(), Isis::ApolloPanoramicCamera::ApolloPanoramicCamera(), Isis::Chandrayaan1M3Camera::Chandrayaan1M3Camera(), Isis::ClipperPushBroomCamera::ClipperPushBroomCamera(), Isis::MdisCamera::computeFocalLength(), Isis::CrismCamera::CrismCamera(), Isis::CTXCamera::CTXCamera(), Isis::DawnFcCamera::DawnFcCamera(), Isis::DawnVirCamera::DawnVirCamera(), Isis::HayabusaAmicaCamera::HayabusaAmicaCamera(), Isis::HayabusaNirsCamera::HayabusaNirsCamera(), Isis::HiresCamera::HiresCamera(), Isis::HrscCamera::HrscCamera(), Isis::Hyb2OncCamera::Hyb2OncCamera(), Isis::CameraFocalPlaneMap::Init(), init(), Isis::RosettaOsirisCamera::initDistortion(), Isis::IssNACamera::IssNACamera(), Isis::IssWACamera::IssWACamera(), Isis::JunoCamera::JunoCamera(), Isis::KaguyaMiCamera::KaguyaMiCamera(), Isis::KaguyaTcCamera::KaguyaTcCamera(), Isis::KaguyaTcCameraDistortionMap::KaguyaTcCameraDistortionMap(), Isis::LroNarrowAngleCamera::LroNarrowAngleCamera(), Isis::LroWideAngleCamera::LroWideAngleCamera(), Isis::LwirCamera::LwirCamera(), Isis::MarciCamera::MarciCamera(), Isis::MarciDistortionMap::MarciDistortionMap(), Isis::Mariner10Camera::Mariner10Camera(), Isis::MdisCamera::MdisCamera(), Isis::MexHrscSrcCamera::MexHrscSrcCamera(), Isis::MsiCamera::MsiCamera(), Isis::NewHorizonsLorriCamera::NewHorizonsLorriCamera(), Isis::NewHorizonsMvicFrameCamera::NewHorizonsMvicFrameCamera(), Isis::NewHorizonsMvicTdiCamera::NewHorizonsMvicTdiCamera(), Isis::NirCamera::NirCamera(), Isis::OsirisRexOcamsCamera::OsirisRexOcamsCamera(), Isis::RosettaOsirisCamera::RosettaOsirisCamera(), Isis::RosettaVirtisCamera::RosettaVirtisCamera(), Isis::KaguyaMiCameraDistortionMap::SetDistortion(), Isis::LroNarrowAngleDistortionMap::SetDistortion(), Isis::TaylorCameraDistortionMap::SetDistortion(), Isis::Camera::SetFocalLength(), Isis::Camera::SetPixelPitch(), Isis::SsiCamera::SsiCamera(), Isis::TgoCassisCamera::TgoCassisCamera(), Isis::TgoCassisDistortionMap::TgoCassisDistortionMap(), and Isis::UvvisCamera::UvvisCamera().

◆ getInteger()

SpiceInt Isis::Spice::getInteger ( const QString & key,
int index = 0 )

This returns a value from the NAIF text pool.

It is a static convience

Parameters
keyName of NAIF keyword to obtain from the pool
indexIf the keyword is an array, the element to obtain. Defaults to 0
Returns
SpiceInt Spice integer from NAIF text pool
Exceptions
Isis::iException::Io- "Can not find key in instrument kernels

Definition at line 1032 of file Spice.cpp.

References readValue(), and SpiceIntType.

Referenced by Isis::DawnVirCamera::getPointingTable(), Isis::RosettaVirtisCamera::getPointingTable(), Isis::LroWideAngleCamera::GetVector(), init(), Isis::IssNACamera::IssNACamera(), Isis::IssWACamera::IssWACamera(), Isis::Target::lookupNaifBodyCode(), and Isis::LroWideAngleCamera::LroWideAngleCamera().

◆ getStoredNaifKeywords()

PvlObject Isis::Spice::getStoredNaifKeywords ( ) const

This returns the PvlObject that stores all of the requested Naif data and can be a replacement for furnishing text kernels.

Definition at line 1005 of file Spice.cpp.

References m_naifKeywords.

Referenced by Isis::LroWideAngleCamera::GetVector().

◆ getStoredResult()

QVariant Isis::Spice::getStoredResult ( QString name,
SpiceValueType type )
protected

Definition at line 1180 of file Spice.cpp.

◆ getString()

QString Isis::Spice::getString ( const QString & key,
int index = 0 )

This returns a value from the NAIF text pool.

It is a static convience method

Parameters
keyName of NAIF keyword to obtain from the pool
indexIf the keyword is an array, the element to obtain. Defaults to 0
Returns
QString Value from the NAIF text pool
Exceptions
Isis::IException::Io- "Can not find key in instrument kernels."

Definition at line 1273 of file Spice.cpp.

References readValue(), and SpiceStringType.

Referenced by Isis::LightTimeCorrectionState::checkAberrationCorrection(), Isis::LightTimeCorrectionState::checkLightTimeToSurfaceCorrect(), Isis::LightTimeCorrectionState::checkObserverTargetSwap(), Isis::MdisCamera::computeFocalLength(), Isis::MdisCamera::MdisCamera(), and Isis::NewHorizonsLorriCamera::NewHorizonsLorriCamera().

◆ hasKernels()

bool Isis::Spice::hasKernels ( Pvl & lab)

Returns true if the kernel group has kernel files.

Parameters
labLabel containing Instrument and Kernels groups.
Returns
bool status of kernel files in the kernel group

Definition at line 1538 of file Spice.cpp.

References Isis::PvlContainer::hasKeyword(), Isis::PvlKeyword::size(), and Isis::PvlObject::Traverse.

◆ init()

void Isis::Spice::init ( Pvl & lab,
bool noTables,
nlohmann::json isd = NULL )
private

Initialization of Spice object.

Parameters
labPvl labels
noTablesIndicates the use of tables.
Exceptions
Isis::IException::Io- "Can not find NAIF code for NAIF target"
Isis::IException::Camera- "No camera pointing available"
Isis::IException::Camera- "No instrument position available"
History
2011-02-08 Jeannie Walldren - Initialize pointers to null.

Definition at line 154 of file Spice.cpp.

References Isis::SpicePosition::cacheSize(), Isis::NaifStatus::CheckErrors(), defaultInit(), Isis::Angle::Degrees, Isis::PvlObject::findObject(), getDouble(), getInteger(), Isis::PvlObject::hasKeyword(), Isis::PvlContainer::hasKeyword(), Isis::IException::Io, Isis::Target::isSky(), Isis::Distance::Kilometers, load(), Isis::SpicePosition::LoadCache(), Isis::SpiceRotation::LoadCache(), Isis::SpiceRotation::LoadTimeCache(), m_bodyFrameCode, m_bodyRotation, m_ckCode, m_endTimePadding, m_ikCode, m_instrumentPosition, m_instrumentRotation, m_naifKeywords, m_sclkCode, m_solarLongitude, m_spkBodyCode, m_spkCode, m_startTimePadding, m_sunPosition, m_target, m_usingAle, m_usingNaif, Isis::SpicePosition::Memcache2HermiteCache(), Isis::SpiceRotation::MinimizeCache(), Isis::Target::naifBodyCode(), Isis::ShapeModel::name(), Isis::Target::name(), Isis::Target::radii(), radii(), Isis::Target::setRadii(), Isis::Target::shape(), solarLongitude(), SpiceIntType, Isis::toDouble(), Isis::toInt(), Isis::toString(), Isis::PvlObject::Traverse, Isis::IException::Unknown, and Isis::SpiceRotation::Yes.

Referenced by Spice(), and Spice().

◆ instrumentBodyFixedPosition()

void Isis::Spice::instrumentBodyFixedPosition ( double p[3]) const
virtual

Returns the spacecraft position in body-fixed frame km units.

Parameters
p[]Spacecraft position
See also
setTime()
Exceptions
Isis::iException::Programmer- "You must call SetTime first"

Reimplemented in Isis::CSMCamera.

Definition at line 842 of file Spice.cpp.

References Isis::SpicePosition::Coordinate(), m_bodyRotation, m_et, m_instrumentPosition, Isis::IException::Programmer, and Isis::SpiceRotation::ReferenceVector().

Referenced by Isis::IsisSensor::getState(), Isis::IsisSensor::getState(), instrumentPosition(), Isis::Camera::LocalPhotometricAngles(), Isis::Sensor::PhaseAngle(), and Isis::Sensor::SlantDistance().

◆ instrumentBodyFixedVelocity()

void Isis::Spice::instrumentBodyFixedVelocity ( double v[3]) const
virtual

Returns the spacecraft velocity in body-fixed frame km/sec units.

Parameters
v[]Spacecraft velocity

Definition at line 860 of file Spice.cpp.

References Isis::SpicePosition::Coordinate(), m_bodyRotation, m_et, m_instrumentPosition, Isis::IException::Programmer, Isis::SpiceRotation::ReferenceVector(), and Isis::SpicePosition::Velocity().

◆ instrumentPosition() [1/2]

◆ instrumentPosition() [2/2]

void Isis::Spice::instrumentPosition ( double p[3]) const

Returns the spacecraft position in body-fixed frame km units.

Parameters
p[]Spacecraft position
See also
setTime()
Exceptions
Isis::iException::Programmer- "You must call SetTime first"

Definition at line 829 of file Spice.cpp.

References instrumentBodyFixedPosition().

Referenced by Isis::CameraGroundMap::GetdXYdPosition(), Isis::CameraPointInfo::GetPointInfo(), and Isis::CameraGroundMap::GetXY().

◆ instrumentRotation()

◆ isTimeSet()

bool Isis::Spice::isTimeSet ( )

Returns true if time has been initialized.

Author
2016-10-19 Kristin Berry
Returns
bool true if time has been set

Definition at line 1589 of file Spice.cpp.

References m_et.

Referenced by Isis::CameraDetectorMap::SetParent(), and Isis::RollingShutterCameraDetectorMap::SetParent().

◆ isUsingAle()

bool Isis::Spice::isUsingAle ( )

Definition at line 1638 of file Spice.cpp.

◆ load()

void Isis::Spice::load ( PvlKeyword & key,
bool noTables )
private

Loads/furnishes NAIF kernel(s)

Parameters
keyPvlKeyword
noTablesIndicates the use of tables.
Exceptions
Isis::IException::Io- "Spice file does not exist."

Definition at line 486 of file Spice.cpp.

References Isis::NaifStatus::CheckErrors(), Isis::IException::Io, m_kernels, and Isis::PvlKeyword::size().

Referenced by init().

◆ naifBodyCode()

SpiceInt Isis::Spice::naifBodyCode ( ) const

This returns the NAIF body code of the target indicated in the labels.

Returns
SpiceInt NAIF body code

Definition at line 948 of file Spice.cpp.

References m_target, and Isis::Target::naifBodyCode().

Referenced by Isis::Camera::SpkCenterId().

◆ naifBodyFrameCode()

SpiceInt Isis::Spice::naifBodyFrameCode ( ) const

This returns the NAIF body frame code.

It is read from the labels, if it exists. Otherwise, it's calculated by the init() method.

Returns
SpiceInt NAIF body frame code

Definition at line 996 of file Spice.cpp.

References m_bodyFrameCode.

◆ naifCkCode()

SpiceInt Isis::Spice::naifCkCode ( ) const

This returns the NAIF CK code to use when reading from CK kernels.

Returns
SpiceInt NAIF CK code

Definition at line 966 of file Spice.cpp.

References m_ckCode.

◆ naifIkCode()

SpiceInt Isis::Spice::naifIkCode ( ) const

This returns the NAIF IK code to use when reading from instrument kernels.

Returns
SpiceInt NAIF IK code

Definition at line 975 of file Spice.cpp.

References m_ikCode.

Referenced by Isis::ApolloMetricCamera::ApolloMetricCamera(), Isis::ApolloPanoramicCamera::ApolloPanoramicCamera(), Isis::Chandrayaan1M3Camera::Chandrayaan1M3Camera(), Isis::ClipperNacRollingShutterCamera::ClipperNacRollingShutterCamera(), Isis::ClipperPushBroomCamera::ClipperPushBroomCamera(), Isis::ClipperWacFcCamera::ClipperWacFcCamera(), Isis::CrismCamera::CrismCamera(), Isis::CTXCamera::CTXCamera(), Isis::DawnFcCamera::DawnFcCamera(), Isis::DawnVirCamera::DawnVirCamera(), Isis::HayabusaAmicaCamera::HayabusaAmicaCamera(), Isis::HayabusaNirsCamera::HayabusaNirsCamera(), Isis::HiresCamera::HiresCamera(), Isis::HiriseCamera::HiriseCamera(), Isis::HrscCamera::HrscCamera(), Isis::Hyb2OncCamera::Hyb2OncCamera(), Isis::IssNACamera::IssNACamera(), Isis::IssWACamera::IssWACamera(), Isis::JunoCamera::JunoCamera(), Isis::KaguyaMiCamera::KaguyaMiCamera(), Isis::KaguyaTcCamera::KaguyaTcCamera(), Isis::LoHighCamera::LoHighCamera(), Isis::LoMediumCamera::LoMediumCamera(), Isis::LroNarrowAngleCamera::LroNarrowAngleCamera(), Isis::LroWideAngleCamera::LroWideAngleCamera(), Isis::LwirCamera::LwirCamera(), Isis::MarciCamera::MarciCamera(), Isis::Mariner10Camera::Mariner10Camera(), Isis::MdisCamera::MdisCamera(), Isis::MexHrscSrcCamera::MexHrscSrcCamera(), Isis::MiniRF::MiniRF(), Isis::MocNarrowAngleCamera::MocNarrowAngleCamera(), Isis::MocWideAngleCamera::MocWideAngleCamera(), Isis::MsiCamera::MsiCamera(), Isis::NewHorizonsLeisaCamera::NewHorizonsLeisaCamera(), Isis::NewHorizonsLorriCamera::NewHorizonsLorriCamera(), Isis::NewHorizonsMvicFrameCamera::NewHorizonsMvicFrameCamera(), Isis::NewHorizonsMvicTdiCamera::NewHorizonsMvicTdiCamera(), Isis::NirCamera::NirCamera(), Isis::OsirisRexOcamsCamera::OsirisRexOcamsCamera(), Isis::RosettaOsirisCamera::RosettaOsirisCamera(), Isis::RosettaVirtisCamera::RosettaVirtisCamera(), Isis::Camera::SetFocalLength(), Isis::Camera::SetPixelPitch(), Isis::SsiCamera::SsiCamera(), Isis::TgoCassisCamera::TgoCassisCamera(), Isis::ThemisIrCamera::ThemisIrCamera(), Isis::ThemisVisCamera::ThemisVisCamera(), Isis::UvvisCamera::UvvisCamera(), Isis::VikingCamera::VikingCamera(), Isis::VimsCamera::VimsCamera(), and Isis::VoyagerCamera::VoyagerCamera().

◆ naifSclkCode()

SpiceInt Isis::Spice::naifSclkCode ( ) const

This returns the NAIF SCLK code to use when reading from instrument kernels.

Returns
SpiceInt NAIF SCLK code

Definition at line 985 of file Spice.cpp.

References m_sclkCode.

Referenced by Isis::CrismCamera::CrismCamera(), and getClockTime().

◆ naifSpkCode()

SpiceInt Isis::Spice::naifSpkCode ( ) const

This returns the NAIF SPK code to use when reading from SPK kernels.

Returns
SpiceInt NAIF SPK code

Definition at line 957 of file Spice.cpp.

References m_spkCode.

Referenced by Isis::DawnVirCamera::readHouseKeeping(), Isis::RosettaVirtisCamera::readHouseKeeping(), Isis::RosettaVirtisCamera::readSCET(), and Isis::Camera::SpkTargetId().

◆ radii()

void Isis::Spice::radii ( Distance r[3]) const

Returns the radii of the body in km.

The radii are obtained from the appropriate SPICE kernel for the body specified by TargetName in the Instrument group of the labels.

Parameters
r[]Radii of the target in kilometers

Definition at line 937 of file Spice.cpp.

References m_target, and Isis::Target::radii().

Referenced by Isis::Camera::BasicMapping(), Isis::CameraPointInfo::GetPointInfo(), Isis::Camera::GroundRange(), Isis::VimsGroundMap::Init(), init(), Isis::MiniRF::MiniRF(), Isis::CSMCamera::setTarget(), subSolarPoint(), and subSpacecraftPoint().

◆ readStoredValue()

QVariant Isis::Spice::readStoredValue ( QString key,
SpiceValueType type,
int index )
protected

Definition at line 1232 of file Spice.cpp.

◆ readValue()

QVariant Isis::Spice::readValue ( QString key,
SpiceValueType type,
int index = 0 )
protected

This should be used for reading ALL text naif kernel values.

This will read it from Naif if we're using naif/not attached kernels. If we have attached kernels and a NaifKeywords label object we will grab it from there instead. This allows us to not furnish kernels after spiceinit.

Parameters
keyThe naif keyword,value name
typeThe naif value's primitive type
indexThe index into the naif keyword array to read

Definition at line 1100 of file Spice.cpp.

References Isis::NaifStatus::CheckErrors(), Isis::IException::Io, m_usingAle, m_usingNaif, SpiceDoubleType, SpiceIntType, SpiceStringType, and Isis::IException::Unknown.

Referenced by getDouble(), getInteger(), getString(), and Isis::IdealCamera::IdealCamera().

◆ resolution()

double Isis::Spice::resolution ( )
virtual

Virtual method that returns the pixel resolution of the sensor in meters/pix.

Returns
double Resolution value of 1.0

Reimplemented in Isis::Camera, and Isis::Sensor.

Definition at line 1016 of file Spice.cpp.

Referenced by Isis::ShapeModel::resolution().

◆ setTime()

void Isis::Spice::setTime ( const iTime & et)
virtual

Sets the ephemeris time and reads the spacecraft and sun position from the kernels at that instant in time.

Parameters
etEphemeris time (read NAIF documentation for a detailed description)
See also
http://naif.jpl.nasa.gov/naif/
History

2005-11-29 Debbie A. Cook - Added alternate code for processing instruments without a platform

2011-02-09 Steven Lambright - Changed name from SetEphemerisTime()

Reimplemented in Isis::CSMCamera, and Isis::Sensor.

Definition at line 787 of file Spice.cpp.

References computeSolarLongitude(), Isis::SpicePosition::Coordinate(), Isis::iTime::Et(), instrumentPosition(), m_bodyRotation, m_cacheSize, m_endTime, m_et, m_instrumentPosition, m_instrumentRotation, m_startTime, m_sunPosition, m_uB, Isis::SpiceRotation::ReferenceVector(), Isis::SpicePosition::SetEphemerisTime(), and Isis::SpiceRotation::SetEphemerisTime().

Referenced by Isis::Sensor::setTime().

◆ solarLongitude()

Longitude Isis::Spice::solarLongitude ( )
virtual

Returns the solar longitude.

Returns
double The Solar Longitude

Definition at line 1521 of file Spice.cpp.

References computeSolarLongitude(), m_et, and m_solarLongitude.

Referenced by Isis::CameraPointInfo::GetPointInfo(), and init().

◆ storeResult()

void Isis::Spice::storeResult ( QString name,
SpiceValueType type,
QVariant value )
protected

Definition at line 1165 of file Spice.cpp.

◆ storeValue()

void Isis::Spice::storeValue ( QString key,
int index,
SpiceValueType type,
QVariant value )
protected

Definition at line 1201 of file Spice.cpp.

◆ subSolarPoint()

void Isis::Spice::subSolarPoint ( double & lat,
double & lon )
virtual

Returns the sub-solar latitude/longitude in universal coordinates (0-360 positive east, ocentric)

Parameters
latSub-solar latitude
lonSub-solar longitude
See also
setTime()
Exceptions
Isis::IException::Programmer- "You must call SetTime first."

Reimplemented in Isis::CSMCamera.

Definition at line 1341 of file Spice.cpp.

References Isis::NaifStatus::CheckErrors(), m_et, m_uB, Isis::PI, Isis::IException::Programmer, radii(), and target().

Referenced by Isis::CameraPointInfo::GetPointInfo(), Isis::Sensor::LocalSolarTime(), and Isis::Camera::SunAzimuth().

◆ subSpacecraftPoint()

void Isis::Spice::subSpacecraftPoint ( double & lat,
double & lon )
virtual

Returns the sub-spacecraft latitude/longitude in universal coordinates (0-360 positive east, ocentric)

Parameters
latSub-spacecraft latitude
lonSub-spacecraft longitude
See also
setTime()
Exceptions
Isis::IException::Programmer- "You must call SetTime first."

Reimplemented in Isis::CSMCamera.

Definition at line 1290 of file Spice.cpp.

References Isis::NaifStatus::CheckErrors(), Isis::SpicePosition::Coordinate(), m_bodyRotation, m_et, m_instrumentPosition, Isis::PI, Isis::IException::Programmer, radii(), Isis::SpiceRotation::ReferenceVector(), and target().

Referenced by Isis::CameraPointInfo::GetPointInfo(), Isis::Camera::GroundRangeResolution(), Isis::Sensor::SpacecraftAltitude(), and Isis::Camera::SpacecraftAzimuth().

◆ sunPosition() [1/2]

SpicePosition * Isis::Spice::sunPosition ( ) const
virtual

Accessor method for the sun position.

Returns
iTime Sun position for the image.
Author
Steven Lambright
History
2011-02-09 Steven Lambright - Original version.

Reimplemented in Isis::CSMCamera.

Definition at line 1601 of file Spice.cpp.

References m_sunPosition.

Referenced by Isis::Sensor::SolarDistance().

◆ sunPosition() [2/2]

void Isis::Spice::sunPosition ( double p[3]) const
virtual

Fills the input vector with sun position information, in either body-fixed or J2000 reference frame and km units.

Parameters
p[]Sun position
See also
setTime()

Reimplemented in Isis::CSMCamera.

Definition at line 909 of file Spice.cpp.

References m_et, m_uB, and Isis::IException::Programmer.

Referenced by Isis::CameraPointInfo::GetPointInfo().

◆ sunToBodyDist()

double Isis::Spice::sunToBodyDist ( ) const
virtual

Definition at line 1395 of file Spice.cpp.

◆ target()

Target * Isis::Spice::target ( ) const
virtual

Returns a pointer to the target object.

Returns
string

Definition at line 1380 of file Spice.cpp.

References m_target.

Referenced by Isis::Camera::BasicMapping(), Isis::Camera::basicRingMapping(), Isis::Sensor::Coordinate(), Isis::FindTool::distancePerPixel(), Isis::CSMCamera::EmissionAngle(), Isis::Sensor::EmissionAngle(), Isis::Sensor::GetLatitude(), Isis::Camera::GetLocalNormal(), Isis::Sensor::GetLongitude(), Isis::Sensor::GetSurfacePoint(), Isis::CameraGroundMap::GetXY(), Isis::UniversalGroundMap::GroundRange(), Isis::Camera::GroundRangeResolution(), Isis::Sensor::HasSurfaceIntersection(), Isis::Sensor::IgnoreElevationModel(), Isis::ImportImagesWorkOrder::importConfirmedImages(), Isis::CSMCamera::IncidenceAngle(), Isis::Sensor::IncidenceAngle(), Isis::Camera::LoadCache(), Isis::Sensor::LocalRadius(), Isis::Sensor::LocalRadius(), Isis::Sensor::LocalRadius(), Isis::Camera::NorthAzimuth(), Isis::CSMCamera::PhaseAngle(), Isis::Camera::RawFocalPlanetoImage(), Isis::CameraGroundMap::SetGround(), Isis::VimsGroundMap::SetGround(), Isis::Camera::SetGround(), Isis::CSMCamera::SetGround(), Isis::Sensor::SetGround(), Isis::Camera::SetGround(), Isis::CSMCamera::SetGround(), Isis::Sensor::SetGroundLocal(), Isis::Camera::SetImage(), Isis::CSMCamera::SetImage(), Isis::Camera::SetImage(), Isis::Sensor::SetLookDirection(), Isis::CSMCamera::SetLookDirection(), Isis::Camera::SetRightAscensionDeclination(), Isis::CSMCamera::setTarget(), Isis::Sensor::setTime(), Isis::Camera::SetUniversalGround(), Isis::Sensor::SetUniversalGround(), Isis::Camera::SetUniversalGround(), Isis::Sensor::SetUniversalGround(), Isis::Sensor::SlantDistance(), Isis::Camera::Slope(), Isis::Sensor::SolarDistance(), subSolarPoint(), and subSpacecraftPoint().

◆ targetCenterDistance()

double Isis::Spice::targetCenterDistance ( ) const
virtual

Calculates and returns the distance from the spacecraft to the target center.

Returns
double Distance to the center of the target from the spacecraft

Reimplemented in Isis::CSMCamera.

Definition at line 925 of file Spice.cpp.

References Isis::SpicePosition::Coordinate(), m_bodyRotation, m_instrumentPosition, and Isis::SpiceRotation::ReferenceVector().

Referenced by Isis::CameraPointInfo::GetPointInfo().

◆ targetName()

QString Isis::Spice::targetName ( ) const

Returns the QString name of the target.

Returns
QString

Definition at line 1390 of file Spice.cpp.

References m_target, and Isis::Target::name().

◆ time()

iTime Isis::Spice::time ( ) const
virtual

Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.

Returns
iTime the currently set ephemeris time
Exceptions
IException::Programmer"Unable to retrieve the time Spice::setTime must be called first."

Definition at line 891 of file Spice.cpp.

References m_et, and Isis::IException::Programmer.

Referenced by Isis::RadarSlantRangeMap::ComputeA(), Isis::CameraPointInfo::GetPointInfo(), Isis::IsisSensor::getState(), Isis::IsisSensor::getState(), Isis::HiresCamera::HiresCamera(), Isis::KaguyaTcCamera::KaguyaTcCamera(), Isis::LoHighCamera::LoHighCamera(), Isis::LoMediumCamera::LoMediumCamera(), Isis::LwirCamera::LwirCamera(), Isis::NewHorizonsMvicFrameCamera::SetBand(), Isis::ApolloPanoramicDetectorMap::SetDetector(), Isis::LineScanCameraDetectorMap::SetDetector(), Isis::RadarPulseMap::SetDetector(), Isis::VariableLineScanCameraDetectorMap::SetDetector(), Isis::RadarSlantRangeMap::SetFocalPlane(), Isis::CameraDetectorMap::SetParent(), Isis::RollingShutterCameraDetectorMap::SetParent(), Isis::Sensor::setTime(), Isis::RadarSlantRangeMap::SetUndistortedFocalPlane(), Isis::ApolloMetricCamera::ShutterOpenCloseTimes(), Isis::IssNACamera::ShutterOpenCloseTimes(), Isis::IssWACamera::ShutterOpenCloseTimes(), Isis::HiresCamera::ShutterOpenCloseTimes(), Isis::LwirCamera::ShutterOpenCloseTimes(), Isis::NirCamera::ShutterOpenCloseTimes(), Isis::UvvisCamera::ShutterOpenCloseTimes(), Isis::ClipperWacFcCamera::ShutterOpenCloseTimes(), Isis::DawnFcCamera::ShutterOpenCloseTimes(), Isis::SsiCamera::ShutterOpenCloseTimes(), Isis::HayabusaAmicaCamera::ShutterOpenCloseTimes(), Isis::HayabusaNirsCamera::ShutterOpenCloseTimes(), Isis::Hyb2OncCamera::ShutterOpenCloseTimes(), Isis::JunoCamera::ShutterOpenCloseTimes(), Isis::LoHighCamera::ShutterOpenCloseTimes(), Isis::LoMediumCamera::ShutterOpenCloseTimes(), Isis::Mariner10Camera::ShutterOpenCloseTimes(), Isis::MdisCamera::ShutterOpenCloseTimes(), Isis::MexHrscSrcCamera::ShutterOpenCloseTimes(), Isis::MsiCamera::ShutterOpenCloseTimes(), Isis::NewHorizonsLorriCamera::ShutterOpenCloseTimes(), Isis::NewHorizonsMvicFrameCamera::ShutterOpenCloseTimes(), Isis::OsirisRexOcamsCamera::ShutterOpenCloseTimes(), Isis::RosettaOsirisCamera::ShutterOpenCloseTimes(), Isis::TgoCassisCamera::ShutterOpenCloseTimes(), Isis::VikingCamera::ShutterOpenCloseTimes(), Isis::VoyagerCamera::ShutterOpenCloseTimes(), Isis::FramingCamera::ShutterOpenCloseTimes(), Isis::Camera::StartEndEphemerisTimes(), and Isis::UvvisCamera::UvvisCamera().

Member Data Documentation

◆ m_allowDownsizing

bool Isis::Spice::m_allowDownsizing
private

Indicates whether to allow downsizing.

Definition at line 411 of file Spice.h.

Referenced by defaultInit().

◆ m_BJ

SpiceDouble Isis::Spice::m_BJ[3][3]
protected

This contains the transformation matrix from J2000 (J) to Body fixed (B).

Recall that the transpose of this matrix JB will convert from body-fixed to J2000. It is left in protected space so that conversions between double and SpiceDouble do not have to occur in inheriting classes.

Definition at line 374 of file Spice.h.

◆ m_bodyFrameCode

SpiceInt* Isis::Spice::m_bodyFrameCode
private

Naif's BODY_FRAME_CODE value.

It is read from the labels, if it exists. Otherwise, it's calculated by the init() method.

Definition at line 423 of file Spice.h.

Referenced by defaultInit(), init(), naifBodyFrameCode(), and ~Spice().

◆ m_bodyRotation

◆ m_cacheSize

SpiceDouble* Isis::Spice::m_cacheSize
private

Cache size. Note: This value is 1 for Framing cameras.

Definition at line 401 of file Spice.h.

Referenced by createCache(), defaultInit(), setTime(), and ~Spice().

◆ m_ckCode

SpiceInt* Isis::Spice::m_ckCode
private

Camera kernel (CK) code.

Definition at line 419 of file Spice.h.

Referenced by defaultInit(), init(), naifCkCode(), and ~Spice().

◆ m_endTime

iTime* Isis::Spice::m_endTime
private

Corrected end (shutter close) time of the observation.

Definition at line 400 of file Spice.h.

Referenced by cacheEndTime(), createCache(), defaultInit(), setTime(), and ~Spice().

◆ m_endTimePadding

SpiceDouble* Isis::Spice::m_endTimePadding
private

Kernels pvl group EndPadding keyword value.

Definition at line 404 of file Spice.h.

Referenced by createCache(), defaultInit(), init(), and ~Spice().

◆ m_et

iTime* Isis::Spice::m_et
protected

◆ m_ikCode

SpiceInt* Isis::Spice::m_ikCode
private

Instrument kernel (IK) code.

Definition at line 420 of file Spice.h.

Referenced by defaultInit(), init(), naifIkCode(), and ~Spice().

◆ m_instrumentPosition

SpicePosition* Isis::Spice::m_instrumentPosition
private

◆ m_instrumentRotation

SpiceRotation* Isis::Spice::m_instrumentRotation
private

Instrument spice rotation.

Definition at line 407 of file Spice.h.

Referenced by createCache(), defaultInit(), init(), instrumentRotation(), setTime(), and ~Spice().

◆ m_kernels

QVector<QString>* Isis::Spice::m_kernels
private

Vector containing kernels filenames.

Definition at line 396 of file Spice.h.

Referenced by createCache(), defaultInit(), load(), and ~Spice().

◆ m_naifKeywords

PvlObject* Isis::Spice::m_naifKeywords
private

NaifKeywords PvlObject from cube.

Definition at line 427 of file Spice.h.

Referenced by getStoredNaifKeywords(), and init().

◆ m_sclkCode

SpiceInt* Isis::Spice::m_sclkCode
private

Spacecraft clock correlation kernel (SCLK) code.

Definition at line 421 of file Spice.h.

Referenced by defaultInit(), init(), naifSclkCode(), and ~Spice().

◆ m_solarLongitude

Longitude* Isis::Spice::m_solarLongitude
protected

Body rotation solar longitude value.

Definition at line 383 of file Spice.h.

Referenced by computeSolarLongitude(), defaultInit(), init(), solarLongitude(), and ~Spice().

◆ m_spkBodyCode

SpiceInt* Isis::Spice::m_spkBodyCode
private

Spacecraft and planet ephemeris kernel (SPK) body code.

Definition at line 422 of file Spice.h.

Referenced by computeSolarLongitude(), defaultInit(), init(), and ~Spice().

◆ m_spkCode

SpiceInt* Isis::Spice::m_spkCode
private

Spacecraft and planet ephemeris kernel (SPK) code.

Definition at line 418 of file Spice.h.

Referenced by defaultInit(), init(), naifSpkCode(), and ~Spice().

◆ m_startTime

iTime* Isis::Spice::m_startTime
private

Corrected start (shutter open) time of the observation.

Definition at line 399 of file Spice.h.

Referenced by cacheStartTime(), createCache(), defaultInit(), setTime(), and ~Spice().

◆ m_startTimePadding

SpiceDouble* Isis::Spice::m_startTimePadding
private

Kernels pvl group StartPadding keyword value.

Definition at line 403 of file Spice.h.

Referenced by createCache(), defaultInit(), init(), and ~Spice().

◆ m_sunPosition

SpicePosition* Isis::Spice::m_sunPosition
private

Sun spice position.

Definition at line 408 of file Spice.h.

Referenced by computeSolarLongitude(), createCache(), defaultInit(), init(), setTime(), sunPosition(), and ~Spice().

◆ m_target

Target* Isis::Spice::m_target
protected

◆ m_uB

SpiceDouble Isis::Spice::m_uB[3]
protected

This contains the sun position (u) in the bodyfixed reference frame (B).

It is left protected so that conversions between double and SpiceDouble do not have to occur in inheriting classes. Units are km

Definition at line 369 of file Spice.h.

Referenced by Isis::Sensor::IncidenceAngle(), Isis::Camera::LocalPhotometricAngles(), Isis::Sensor::PhaseAngle(), setTime(), subSolarPoint(), and sunPosition().

◆ m_usingAle

bool Isis::Spice::m_usingAle
private

Indicate whether we are reading values from an ISD returned from ALE.

Definition at line 432 of file Spice.h.

Referenced by computeSolarLongitude(), init(), and readValue().

◆ m_usingNaif

bool Isis::Spice::m_usingNaif
private

Indicates whether we are reading values from the NaifKeywords PvlObject in cube.

Definition at line 429 of file Spice.h.

Referenced by computeSolarLongitude(), init(), and readValue().


The documentation for this class was generated from the following files: