18#include "ShapeModel.h"
19#include "SpicePosition.h"
20#include "SpiceRotation.h"
298 virtual double sunToBodyDist()
const;
307 const int size,
double tol);
319 bool clockTicks=
false);
320 SpiceDouble
getDouble(
const QString &key,
int index = 0);
321 SpiceInt
getInteger(
const QString &key,
int index = 0);
322 QString
getString(
const QString &key,
int index = 0);
357 void storeResult(QString name,
SpiceValueType type, QVariant value);
362 QVariant readStoredValue(QString key,
SpiceValueType type,
int index);
390 void init(
Pvl &pvl,
bool noTables, nlohmann::json isd = NULL);
IO Handler for Isis Cubes.
Distance measurement, usually in meters.
This class is designed to encapsulate the concept of a Longitude.
Container for cube-like labels.
A single keyword-value pair.
Contains Pvl Groups and Pvl Objects.
Obtain SPICE information for a spacecraft.
virtual void setTime(const iTime &time)
Sets the ephemeris time and reads the spacecraft and sun position from the kernels at that instant in...
SpiceDouble m_BJ[3][3]
This contains the transformation matrix from J2000 (J) to Body fixed (B).
QString getString(const QString &key, int index=0)
This returns a value from the NAIF text pool.
virtual iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
SpiceDouble * m_startTimePadding
Kernels pvl group StartPadding keyword value.
Target * m_target
Target of the observation.
bool m_usingNaif
Indicates whether we are reading values from the NaifKeywords PvlObject in cube.
QVariant readValue(QString key, SpiceValueType type, int index=0)
This should be used for reading ALL text naif kernel values.
Longitude * m_solarLongitude
Body rotation solar longitude value.
bool m_usingAle
Indicate whether we are reading values from an ISD returned from ALE.
virtual Longitude solarLongitude()
Returns the solar longitude.
Spice(Cube &cube)
Constructs a Spice object and loads SPICE kernels using information from the label object.
SpiceInt * m_ikCode
Instrument kernel (IK) code.
virtual void instrumentBodyFixedVelocity(double v[3]) const
Returns the spacecraft velocity in body-fixed frame km/sec units.
SpiceRotation * m_instrumentRotation
Instrument spice rotation.
SpiceInt * m_sclkCode
Spacecraft clock correlation kernel (SCLK) code.
void csmInit(Cube &cube, Pvl label)
Initialize the Spice object for a CSMCamera.
virtual void computeSolarLongitude(iTime et)
Computes the solar longitude for the given ephemeris time.
SpicePosition * m_instrumentPosition
Instrument spice position.
bool m_allowDownsizing
Indicates whether to allow downsizing.
SpiceDouble * m_endTimePadding
Kernels pvl group EndPadding keyword value.
SpicePosition * m_sunPosition
Sun spice position.
SpiceInt * m_bodyFrameCode
Naif's BODY_FRAME_CODE value.
virtual SpiceRotation * bodyRotation() const
Accessor method for the body rotation.
virtual double targetCenterDistance() const
Calculates and returns the distance from the spacecraft to the target center.
virtual void subSolarPoint(double &lat, double &lon)
Returns the sub-solar latitude/longitude in universal coordinates (0-360 positive east,...
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 cacheEndTime() const
Accessor method for the cache end time.
virtual ~Spice()
Destroys the Spice object.
void radii(Distance r[3]) const
Returns the radii of the body in km.
SpiceValueType
NAIF value primitive type.
@ SpiceByteCodeType
SpiceByteCode type.
@ SpiceIntType
SpiceInt type.
@ SpiceStringType
SpiceString type.
@ SpiceDoubleType
SpiceDouble type.
PvlObject * m_naifKeywords
NaifKeywords PvlObject from cube.
void init(Pvl &pvl, bool noTables, nlohmann::json isd=NULL)
Initialization of Spice object.
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.
virtual void instrumentBodyFixedPosition(double p[3]) const
Returns the spacecraft position in body-fixed frame km units.
PvlObject getStoredNaifKeywords() const
This returns the PvlObject that stores all of the requested Naif data and can be a replacement for fu...
SpiceInt naifCkCode() const
This returns the NAIF CK code to use when reading from CK kernels.
virtual Target * target() const
Returns a pointer to the target object.
SpiceInt * m_spkBodyCode
Spacecraft and planet ephemeris kernel (SPK) body code.
virtual iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
SpiceInt * m_ckCode
Camera kernel (CK) code.
SpiceInt * m_spkCode
Spacecraft and planet ephemeris kernel (SPK) code.
bool hasKernels(Pvl &lab)
Returns true if the kernel group has kernel files.
virtual SpiceRotation * instrumentRotation() const
Accessor method for the instrument rotation.
SpiceDouble * m_cacheSize
Cache size. Note: This value is 1 for Framing cameras.
void defaultInit()
Default initialize the members of the SPICE object.
virtual SpicePosition * instrumentPosition() const
Accessor method for the instrument position.
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.
QString targetName() const
Returns the QString name of the target.
SpiceInt naifBodyFrameCode() const
This returns the NAIF body frame code.
void load(PvlKeyword &key, bool notab)
Loads/furnishes NAIF kernel(s)
SpiceDouble m_uB[3]
This contains the sun position (u) in the bodyfixed reference frame (B).
virtual iTime cacheStartTime() const
Accessor method for the cache start time.
iTime * m_endTime
Corrected end (shutter close) time of the observation.
iTime * m_et
Ephemeris time (read NAIF documentation for a detailed description)
bool isTimeSet()
Returns true if time has been initialized.
QVector< QString > * m_kernels
Vector containing kernels filenames.
SpiceRotation * m_bodyRotation
Body spice rotation.
iTime * m_startTime
Corrected start (shutter open) time of the observation.
virtual SpicePosition * sunPosition() const
Accessor method for the sun position.
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.
virtual void subSpacecraftPoint(double &lat, double &lon)
Returns the sub-spacecraft latitude/longitude in universal coordinates (0-360 positive east,...
virtual double resolution()
Virtual method that returns the pixel resolution of the sensor in meters/pix.
Obtain SPICE position information for a body.
Obtain SPICE rotation information for a body.
This class is used to create and store valid Isis targets.
Parse and return pieces of a time string.
This is free and unencumbered software released into the public domain.