USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::Spice Class Reference
[Spice, Instruments, and Cameras]

#include <Spice.h>

Inheritance diagram for Isis::Spice:

Inheritance graph
[legend]
Collaboration diagram for Isis::Spice:

Collaboration graph
[legend]
List of all members.

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
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

For internal use only.

History:
2003-05-16 Stuart Sides - Modified schema from astrogeology... isis.astrogeology...
History:
2003-10-15 Jeff Anderson - Added requirement for frame kernel in labels
History:
2003-10-28 Jeff Anderson - Changed SpaceCraft to Spacecraft in labels and method names
History:
2003-11-03 Jeff Anderson - Added SubSolarPoint and SubSpacecraftPoint methods
History:
2003-11-12 Jeff Anderson - Added Target method
History:
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.
History:
2004-02-18 Jeff Anderson - Modified to ignore kernel labels which were blank
History:
2004-03-25 Jeff Anderson - Modified NaifBodyCode method to convert Jupiter target code of 599 to 5
History:
2004-03-25 Jeff Anderson - Fixed bug in destructor and added GetString method.
History:
2005-02-15 Elizabeth Ribelin - Modified file to support Doxygen documentation
History:
2005-02-24 Jeff Anderson - Modified SubSolarPoint and SubSpacecraftPoint to return positive longitudes only
History:
2005-09-12 Jeff Anderson - Check for case-insensitive values for TargetName of SKY
History:
2005-09-20 Jeff Anderson - Added IsSky method
History:
2006-01-05 Debbie A. Cook - Added units to comments
History:
2006-03-28 Jeff Anderson - Refactored using SpiceRotation and SpicePosition classes. Added Tables and nadir kernel information.
History:
2006-03-31 Elizabeth Miller - Added TargetCenterDistance method
History:
2006-04-19 Elizabeth Miller - Added SolarLongitude method
History:
2007-01-30 Tracie Sucharski - Throw error in the load method before calling furnish if the file does not exist.
History:
2007-07-09 Steven Lambright - Frame kernel is now optional, added Extra kernel support.
History:
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 p_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.
History:
2007-08-10 Steven Lambright - Added support for Nadir keyword in InstrumentPointing group to not be the first element in the PvlKeyword.
History:
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
History:
2008-02-13 Steven Lambright - Added StartPadding and EndPadding caching capabilties
History:
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
History:
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.
History:
2008-06-23 Steven Lambright - Added NaifStatus error checking
History:
2008-06-25 Debbie A. Cook - Added method InstrumentVelocity to support miniRF
History:
2008-11-28 Debbie A. Cook - Added method HasKernels()
History:
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.
History:
2009-06-18 Debbie A. Cook - Modified to downsize instrument rotation table when loading cache
History:
2009-07-01 Debbie A. Cook - Modified to downsize body rotation, and sun position tables when loading cache
History:
2009-08-03 Debbie A. Cook - Added tolerance argument to method CreateCache to allow downsizing of instrument position Spice table.
History:
2009-08-21 Kris Becker - Moved the NAIF code methods to public scope.

Definition at line 151 of file Spice.h.

Public Member Functions

 Spice (Isis::Pvl &lab)
 Constructs a Spice object and loads SPICE kernels using information from the label object.
 ~Spice ()
 Destroys the Spice object.
void SetEphemerisTime (const double 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.
void SunPosition (double p[3]) const
 Returns the sun position in either body-fixed or J2000 reference frame and km units.
double TargetCenterDistance () const
 Calculates and returns the distance from the spacecraft to the target center.
double SolarLongitude ()
 Returns the solar longitude.
void InstrumentVelocity (double v[3]) const
 Returns the spacecraft velocity in body-fixed frame km/sec units.
double EphemerisTime () const
 Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
void Radii (double r[3]) const
 Returns the radii of the body in km.
void CreateCache (const double startTime, const double endTime, const int size, double tol)
 This method creates an internal cache of spacecraft and sun positions over a specified time range.
void CreateCache (const double time, double tol)
 See previous CreateCache method.
double CacheStartTime () const
double CacheEndTime () const
void SubSpacecraftPoint (double &lat, double &lon)
 Returns the sub-spacecraft latitude/longitude in universal coordinates (0-360 positive east, ocentric).
void SubSolarPoint (double &lat, double &lon)
 Returns the sub-solar latitude/longitude in universal coordinates (0-360 positive east, ocentric).
std::string Target () const
 Returns the string name of the target.
bool IsSky () const
 Return if our target is the sky.
SpicePositionSunPosition () const
SpicePositionInstrumentPosition () const
SpiceRotationBodyRotation () const
SpiceRotationInstrumentRotation () const
bool HasKernels (Isis::Pvl &lab)
 Returns true if the kernel group has kernel files.
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

Static Public Member Functions

static SpiceDouble GetDouble (const std::string &key, int index=0)
 This returns a value from the NAIF text pool.
static SpiceInt GetInteger (const std::string &key, int index=0)
 This returns a value from the NAIF text pool.
static std::string GetString (const std::string &key, int index=0)
 This returns a value from the NAIF text pool.

Protected Attributes

SpiceDouble p_uB [3]
 This contains the sun position (u) in the bodyfixed reference frame (B).
SpiceDouble p_BJ [3][3]
 This contains the transformation matrix from J2000 (J) to Body fixed (B).
SpiceDouble p_radii [3]
 The radii of the target in kilometers.

Private Member Functions

void Load (Isis::PvlKeyword &key)
 Load/furnish NAIF kernel(s).
void ComputeSolarLongitude (double et)

Private Attributes

SpiceDouble p_solarLongitude
SpiceDouble p_et
std::vector< std::string > p_kernels
std::string p_target
SpiceDouble p_startTime
SpiceDouble p_endTime
SpiceDouble p_cacheSize
SpiceDouble p_startTimePadding
SpiceDouble p_endTimePadding
SpicePositionp_instrumentPosition
SpiceRotationp_instrumentRotation
SpicePositionp_sunPosition
SpiceRotationp_bodyRotation
bool p_keepKernelsLoaded
bool p_allowDownsizing
SpiceInt p_bodyCode
SpiceInt p_spkCode
SpiceInt p_ckCode
SpiceInt p_ikCode
SpiceInt p_sclkCode
SpiceInt p_spkBodyCode
bool p_sky


Constructor & Destructor Documentation

Isis::Spice::Spice ( Isis::Pvl lab  ) 

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:
lab Label containing Instrument and Kernels groups.

For internal use only.

History:
2005-10-07 Jim Torson - Modified the constructor so it can handle multiple SpacecraftPosition and multiple SpacecraftPointing kernel files
History:
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)
History:
2006-01-03 Debbie A. Cook - Added loop to allow multiple spacecraft clock kernels (for Viking)
History:
2006-02-21 Jeff Anderson/Debbie Cook - Refactor to use SpicePosition and SpiceRotation classes
History:
2009-03-18 Tracie Sucharski - Remove code for old keywords.

Definition at line 54 of file Spice.cpp.

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), Isis::PvlContainer::Filename(), Isis::PvlObject::FindGroup(), Isis::PvlContainer::HasKeyword(), Load(), Isis::SpicePosition::LoadCache(), Isis::iException::Message(), NaifBodyCode(), p_allowDownsizing, p_bodyCode, p_bodyRotation, p_cacheSize, p_ckCode, p_endTime, p_endTimePadding, p_et, p_ikCode, p_instrumentPosition, p_instrumentRotation, p_radii, p_sclkCode, p_sky, p_solarLongitude, p_spkBodyCode, p_spkCode, p_startTime, p_startTimePadding, p_sunPosition, p_target, SolarLongitude(), and Isis::PvlObject::Traverse.

Isis::Spice::~Spice (  ) 

Destroys the Spice object.

Definition at line 262 of file Spice.cpp.

References Isis::NaifStatus::CheckErrors(), p_bodyRotation, p_instrumentPosition, p_instrumentRotation, p_kernels, and p_sunPosition.


Member Function Documentation

void Isis::Spice::CreateCache ( const double  time,
double  tol 
)

See previous CreateCache method.

This method simply invokes that one with the same start and end time and a cache size of one.

Parameters:
time Ephemeris time to cache

Definition at line 383 of file Spice.cpp.

References CreateCache().

void Isis::Spice::CreateCache ( const double  startTime,
const double  endTime,
const int  size,
double  tol 
)

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 SetEphemerisTime which are not directly loaded in the cache will be interpolated.

Parameters:
startTime Starting ephemeris time to cache
endTime Ending ephemeris time to cache
size Size of the cache.
Exceptions:
Isis::iException::Programmer 

Definition at line 297 of file Spice.cpp.

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), ComputeSolarLongitude(), Isis::SpicePosition::IsCached(), Isis::SpicePosition::LoadCache(), Isis::SpicePosition::Memcache2HermiteCache(), Isis::iException::Message(), p_bodyRotation, p_cacheSize, p_endTime, p_endTimePadding, p_et, p_instrumentPosition, p_instrumentRotation, p_kernels, p_startTime, p_startTimePadding, and p_sunPosition.

Referenced by CreateCache(), Isis::Camera::LoadCache(), Isis::Lro::MiniRF::MiniRF(), and Isis::Cassini::VimsCamera::VimsCamera().

double Isis::Spice::EphemerisTime (  )  const [inline]

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

Returns:
double

Definition at line 175 of file Spice.h.

References p_et.

Referenced by Isis::RadarSlantRangeMap::ComputeA(), Isis::ControlPoint::ComputeApriori(), Isis::LineScanCameraGroundMap::FindFocalPlane(), Isis::CameraPointInfo::GetPointInfo(), Isis::Camera::LoadCache(), Isis::VariableLineScanCameraDetectorMap::SetDetector(), Isis::RadarPulseMap::SetDetector(), Isis::LineScanCameraDetectorMap::SetDetector(), Isis::RadarSlantRangeMap::SetFocalPlane(), Isis::RadarSlantRangeMap::SetUndistortedFocalPlane(), and Qisis::AdvancedTrackTool::updateRow().

SpiceDouble Isis::Spice::GetDouble ( const std::string &  key,
int  index = 0 
) [static]

This returns a value from the NAIF text pool.

It is a static convience method

Parameters:
key Name of NAIF keyword to obtain from the pool
index If the keyword is an array, the element to obtain. Defaults to 0
Returns:
SpiceDouble
Exceptions:
Isis::iException::Io 

Definition at line 581 of file Spice.cpp.

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), Isis::iException::Message(), and value.

Referenced by Isis::Mro::CTXCamera::CTXCamera(), Isis::Mex::HrscCamera::HrscCamera(), Isis::CameraFocalPlaneMap::Init(), Isis::Lro::LroNarrowAngleCamera::LroNarrowAngleCamera(), Isis::Mro::MarciCamera::MarciCamera(), Isis::MarciDistortionMap::MarciDistortionMap(), Isis::Messenger::MdisCamera::MdisCamera(), Isis::TaylorCameraDistortionMap::SetDistortion(), Isis::Lro::LroNarrowAngleDistortionMap::SetDistortion(), Isis::Camera::SetFocalLength(), Isis::Camera::SetPixelPitch(), and Galileo::SsiCamera::SsiCamera().

SpiceInt Isis::Spice::GetInteger ( const std::string &  key,
int  index = 0 
) [static]

This returns a value from the NAIF text pool.

It is a static convience

Parameters:
key Name of NAIF keyword to obtain from the pool
index If the keyword is an array, the element to obtain. Defaults to 0
Returns:
SpiceInt
Exceptions:
Isis::iException::Io 

Definition at line 553 of file Spice.cpp.

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), Isis::iException::Message(), and value.

string Isis::Spice::GetString ( const std::string &  key,
int  index = 0 
) [static]

This returns a value from the NAIF text pool.

It is a static convience method

Parameters:
key Name of NAIF keyword to obtain from the pool
index If the keyword is an array, the element to obtain. Defaults to 0
Returns:
string
Exceptions:
Isis::iException::Io 

Definition at line 610 of file Spice.cpp.

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), and Isis::iException::Message().

Referenced by Isis::Messenger::MdisCamera::MdisCamera().

bool Isis::Spice::HasKernels ( Isis::Pvl lab  ) 

Returns true if the kernel group has kernel files.

Parameters:
lab Label containing Instrument and Kernels groups.
Returns:
bool - status of kernel files in the kernel group

Definition at line 789 of file Spice.cpp.

References Isis::PvlObject::FindGroup(), Isis::PvlContainer::HasKeyword(), Isis::PvlKeyword::Size(), and Isis::PvlObject::Traverse.

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

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

Parameters:
p[] Spacecraft position

Definition at line 420 of file Spice.cpp.

References _FILEINFO_, Isis::SpicePosition::Coordinate(), Isis::iException::Message(), p_bodyRotation, p_et, and p_instrumentPosition.

Referenced by Isis::BundleAdjust::AddPartials(), Isis::RadarGroundMap::ComputeXv(), Isis::LineScanCameraGroundMap::FindFocalPlane(), Isis::CameraPointInfo::GetPointInfo(), Isis::RadarGroundMap::SetFocalPlane(), Isis::RadarGroundMap::SetGround(), Isis::BundleAdjust::Solve(), Isis::BundleAdjust::SpVector(), Isis::BundleAdjust::Update(), and Qisis::AdvancedTrackTool::updateRow().

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

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

Parameters:
p[] Spacecraft velocity

Definition at line 438 of file Spice.cpp.

References _FILEINFO_, Isis::iException::Message(), p_bodyRotation, p_et, p_instrumentPosition, and Isis::SpicePosition::Velocity().

bool Isis::Spice::IsSky (  )  const [inline]

Return if our target is the sky.

Definition at line 196 of file Spice.h.

References p_sky.

Referenced by Isis::Camera::LoadCache(), Isis::Sensor::Sensor(), Isis::Sensor::SetLookDirection(), and Isis::Sensor::SetUniversalGround().

void Isis::Spice::Load ( Isis::PvlKeyword key  )  [private]

Load/furnish NAIF kernel(s).

Definition at line 238 of file Spice.cpp.

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), Isis::Filename::Expanded(), Isis::iException::Message(), p_kernels, and Isis::PvlKeyword::Size().

Referenced by Spice().

SpiceInt Isis::Spice::NaifBodyCode (  )  const

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

Returns:
SpiceInt
Exceptions:
Isis::iException::Io 

Definition at line 497 of file Spice.cpp.

References _FILEINFO_, code, Isis::iException::Message(), and p_target.

Referenced by Spice().

SpiceInt Isis::Spice::NaifCkCode (  )  const

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

Returns:
SpiceInt

Definition at line 524 of file Spice.cpp.

References p_ckCode.

SpiceInt Isis::Spice::NaifIkCode (  )  const

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

Returns:
SpiceInt

Definition at line 533 of file Spice.cpp.

References p_ikCode.

Referenced by Isis::Mro::CTXCamera::CTXCamera(), Clementine::HiresCamera::HiresCamera(), Isis::Mro::HiriseCamera::HiriseCamera(), Isis::Mex::HrscCamera::HrscCamera(), Cassini::IssNACamera::IssNACamera(), Cassini::IssWACamera::IssWACamera(), Isis::Lo::LoHighCamera::LoHighCamera(), Isis::Lo::LoMediumCamera::LoMediumCamera(), Isis::Lro::LroNarrowAngleCamera::LroNarrowAngleCamera(), Isis::Lro::LroWideAngleCamera::LroWideAngleCamera(), Clementine::LwirCamera::LwirCamera(), Isis::Mro::MarciCamera::MarciCamera(), Isis::Messenger::MdisCamera::MdisCamera(), Isis::Lro::MiniRF::MiniRF(), Isis::Mgs::MocNarrowAngleCamera::MocNarrowAngleCamera(), Isis::Mgs::MocWideAngleCamera::MocWideAngleCamera(), Clementine::NirCamera::NirCamera(), Isis::Camera::SetFocalLength(), Isis::Camera::SetPixelPitch(), Galileo::SsiCamera::SsiCamera(), Isis::Odyssey::ThemisIrCamera::ThemisIrCamera(), Isis::Odyssey::ThemisVisCamera::ThemisVisCamera(), Clementine::UvvisCamera::UvvisCamera(), Isis::VikingCamera::VikingCamera(), and Isis::Cassini::VimsCamera::VimsCamera().

SpiceInt Isis::Spice::NaifSpkCode (  )  const

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

Returns:
SpiceInt

Definition at line 515 of file Spice.cpp.

References p_spkCode.

Referenced by Isis::Mro::CTXCamera::CTXCamera(), Isis::Messenger::MdisCamera::MdisCamera(), Isis::Mgs::MocNarrowAngleCamera::MocNarrowAngleCamera(), Isis::Mgs::MocWideAngleCamera::MocWideAngleCamera(), and Isis::Cassini::VimsCamera::VimsCamera().

void Isis::Spice::Radii ( double  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 484 of file Spice.cpp.

References p_radii.

Referenced by Isis::CameraPointInfo::GetPointInfo(), Isis::RadarGroundMap::GetRadius(), Isis::Camera::GroundRange(), Isis::Lro::MiniRF::MiniRF(), Isis::RadarGroundMap::RadarGroundMap(), Isis::RadarGroundMap::SetFocalPlane(), Isis::Cassini::VimsGroundMap::SetGround(), and Qisis::AdvancedTrackTool::updateRow().

void Isis::Spice::SetEphemerisTime ( const double  et  ) 

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

Parameters:
et Ephemeris time(read NAIF documentation for a detailed description)
Exceptions:
Isis::iException::Message 

For internal use only.

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

Reimplemented in Isis::Sensor.

Definition at line 399 of file Spice.cpp.

References ComputeSolarLongitude(), Isis::SpicePosition::Coordinate(), p_bodyRotation, p_et, p_instrumentPosition, p_instrumentRotation, p_sunPosition, p_uB, and Isis::SpicePosition::SetEphemerisTime().

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

double Isis::Spice::SolarLongitude (  ) 

Returns the solar longitude.

Returns:
double - The Solar Longitude

Definition at line 777 of file Spice.cpp.

References ComputeSolarLongitude(), p_et, and p_solarLongitude.

Referenced by Isis::CameraPointInfo::GetPointInfo(), Spice(), and Qisis::AdvancedTrackTool::updateRow().

void Isis::Spice::SubSolarPoint ( double &  lat,
double &  lon 
)

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

Parameters:
lat Sub-solar latitude
lon Sub-solar longitude

Definition at line 679 of file Spice.cpp.

References _FILEINFO_, a, b, c, Isis::NaifStatus::CheckErrors(), dist, Isis::iException::Message(), p_et, p_radii, p_uB, and Isis::PI().

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

void Isis::Spice::SubSpacecraftPoint ( double &  lat,
double &  lon 
)

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

Parameters:
lat Sub-spacecraft latitude
lon Sub-spacecraft longitude

Definition at line 635 of file Spice.cpp.

References _FILEINFO_, a, b, c, Isis::NaifStatus::CheckErrors(), Isis::SpicePosition::Coordinate(), dist, Isis::iException::Message(), p_bodyRotation, p_et, p_instrumentPosition, p_radii, and Isis::PI().

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

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

Returns the sun position in either body-fixed or J2000 reference frame and km units.

Parameters:
p[] Sun position

Definition at line 456 of file Spice.cpp.

References _FILEINFO_, Isis::iException::Message(), p_et, and p_uB.

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

std::string Isis::Spice::Target (  )  const [inline]

Returns the string name of the target.

Returns:
string

Definition at line 193 of file Spice.h.

References p_target.

Referenced by Isis::Camera::BasicMapping(), and ComputeSolarLongitude().

double Isis::Spice::TargetCenterDistance (  )  const

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

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

Definition at line 472 of file Spice.cpp.

References Isis::SpicePosition::Coordinate(), p_bodyRotation, and p_instrumentPosition.

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


Member Data Documentation

SpiceDouble Isis::Spice::p_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 225 of file Spice.h.

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

The radii of the target in kilometers.

Definition at line 232 of file Spice.h.

Referenced by Isis::Camera::BasicMapping(), Isis::Camera::NorthAzimuth(), Radii(), Isis::Sensor::SetLookDirection(), Isis::Sensor::SetUniversalGround(), Isis::Sensor::SpacecraftAltitude(), Spice(), SubSolarPoint(), and SubSpacecraftPoint().

SpiceDouble Isis::Spice::p_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 220 of file Spice.h.

Referenced by Isis::Sensor::IncidenceAngle(), Isis::Sensor::PhaseAngle(), SetEphemerisTime(), SubSolarPoint(), and SunPosition().


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