Isis 3 Programmer Reference
|
Obtain SPICE rotation information for a body. More...
#include <SpiceRotation.h>
Public Types | |
enum | Source { Spice, Nadir, Memcache, PolyFunction, PolyFunctionOverSpice, PckPolyFunction } |
The rotation can come from one of 3 places for an Isis cube. More... | |
enum | PartialType { WRT_RightAscension, WRT_Declination, WRT_Twist } |
This enumeration indicates whether the partial derivative is taken with respect to Right Ascension, Declination, or Twist (or Rotation). More... | |
enum | DownsizeStatus { Yes, Done, No } |
Status of downsizing the cache. More... | |
enum | FrameType { UNKNOWN = 0, INERTL = 1, PCK = 2, CK = 3, TK = 4, DYN = 5, BPC = 6, NOTJ2000PCK = 7 } |
Enumeration for the frame type of the rotation. More... | |
Public Member Functions | |
SpiceRotation (int frameCode) | |
Construct an empty SpiceRotation class using a valid Naif frame code to set up for getting rotation from Spice kernels. More... | |
SpiceRotation (int frameCode, int targetCode) | |
Construct an empty SpiceRotation object using valid Naif frame code and. More... | |
SpiceRotation (const SpiceRotation &rotToCopy) | |
Construct a SpiceRotation object by copying from an existing one. More... | |
virtual | ~SpiceRotation () |
Destructor for SpiceRotation object. More... | |
void | SetFrame (int frameCode) |
Change the frame to the given frame code. More... | |
int | Frame () |
Accessor method that returns the frame code. More... | |
void | SetTimeBias (double timeBias) |
Apply a time bias when invoking SetEphemerisTime method. More... | |
void | SetEphemerisTime (double et) |
Return the J2000 to reference frame quaternion at given time. More... | |
double | EphemerisTime () const |
Accessor method to get current ephemeris time. More... | |
std::vector< double > | GetCenterAngles () |
Return the camera angles at the center time of the observation. More... | |
std::vector< double > | Matrix () |
Return the full rotation TJ as a matrix. More... | |
std::vector< double > | AngularVelocity () |
Accessor method to get the angular velocity. More... | |
std::vector< double > | ConstantRotation () |
Return the constant 3x3 rotation TC matrix as a quaternion. More... | |
std::vector< double > & | ConstantMatrix () |
Return the constant 3x3 rotation TC matrix as a vector of length 9. More... | |
void | SetConstantMatrix (std::vector< double > constantMatrix) |
Set the constant 3x3 rotation TC matrix from a vector of length 9. More... | |
std::vector< double > | TimeBasedRotation () |
Return time-based 3x3 rotation CJ matrix as a quaternion. More... | |
std::vector< double > & | TimeBasedMatrix () |
Return time-based 3x3 rotation CJ matrix as a vector of length 9. More... | |
void | SetTimeBasedMatrix (std::vector< double > timeBasedMatrix) |
Set the time-based 3x3 rotation CJ matrix from a vector of length 9. More... | |
std::vector< double > | J2000Vector (const std::vector< double > &rVec) |
Given a direction vector in the reference frame, return a J2000 direction. More... | |
std::vector< Angle > | poleRaCoefs () |
Return the coefficients used to calculate the target body pole ra. More... | |
std::vector< Angle > | poleDecCoefs () |
Return the coefficients used to calculate the target body pole dec. More... | |
std::vector< Angle > | pmCoefs () |
Return the coefficients used to calculate the target body prime meridian. More... | |
std::vector< double > | poleRaNutPrecCoefs () |
Return the coefficients used to calculate the target body pole ra nut/prec coefficients. More... | |
std::vector< double > | poleDecNutPrecCoefs () |
Return the coefficients used to calculate the target body pole dec nut/prec coefficients. More... | |
std::vector< double > | pmNutPrecCoefs () |
Return the coefficients used to calculate the target body pm nut/prec coefficients. More... | |
std::vector< Angle > | sysNutPrecConstants () |
Return the constants used to calculate the target body system nut/prec angles. More... | |
std::vector< Angle > | sysNutPrecCoefs () |
Return the coefficients used to calculate the target body system nut/prec angles. More... | |
std::vector< double > | ReferenceVector (const std::vector< double > &jVec) |
Given a direction vector in J2000, return a reference frame direction. More... | |
std::vector< double > | EvaluatePolyFunction () |
Evaluate the polynomial fit function for the three pointing angles for the current ephemeris time. More... | |
void | loadPCFromSpice (int CenterBodyCode) |
Initialize planetary orientation constants from Spice PCK. More... | |
void | loadPCFromTable (const PvlObject &Label) |
Initialize planetary orientation constants from an cube body rotation label. More... | |
void | MinimizeCache (DownsizeStatus status) |
Set the downsize status to minimize cache. More... | |
void | LoadCache (double startTime, double endTime, int size) |
Cache J2000 rotation quaternion over a time range. More... | |
void | LoadCache (double time) |
Cache J2000 to frame rotation for a time. More... | |
void | LoadCache (Table &table) |
Cache J2000 rotations using a table file. More... | |
Table | LineCache (const QString &tableName) |
Return a table with J2000 to reference rotations. More... | |
void | ReloadCache () |
Cache J2000 rotation over existing cached time range using polynomials. More... | |
Table | Cache (const QString &tableName) |
Return a table with J2000 to reference rotations. More... | |
void | CacheLabel (Table &table) |
Add labels to a SpiceRotation table. More... | |
void | LoadTimeCache () |
Load the time cache. More... | |
std::vector< double > | Angles (int axis3, int axis2, int axis1) |
Return the camera angles (right ascension, declination, and twist) for the time-based matrix CJ. More... | |
void | SetAngles (std::vector< double > angles, int axis3, int axis2, int axis1) |
Set the rotation angles (phi, delta, and w) for the current time to define the time-based matrix CJ. More... | |
bool | IsCached () const |
Checks if the cache is empty. More... | |
void | SetPolynomial (const Source type=PolyFunction) |
Set the coefficients of a polynomial fit to each of the three camera angles for the time period covered by the cache, angle = a + bt + ct**2, where t = (time - p_baseTime)/ p_timeScale. More... | |
void | SetPolynomial (const std::vector< double > &abcAng1, const std::vector< double > &abcAng2, const std::vector< double > &abcAng3, const Source type=PolyFunction) |
Set the coefficients of a polynomial fit to each of the three camera angles for the time period covered by the cache, angle = c0 + c1*t + c2*t**2 + ... More... | |
void | usePckPolynomial () |
Set the coefficients of a polynomial fit to each of the three planet angles for the time period covered by the cache, ra = ra0 + ra1*t + ra2*t**2 + raTrig, dec = dec0 + dec1*t + dec2*t**2 + decTrig, pm = pm0 + pm1*d + pm2*t**2 + pmTrig, where t = time / (seconds per day). More... | |
void | setPckPolynomial (const std::vector< Angle > &raCoeff, const std::vector< Angle > &decCoeff, const std::vector< Angle > &pmCoeff) |
Set the coefficients of a polynomial fit to each of the three planet angles for the time period covered by the cache, ra = ra0 + ra1*t + ra2*t**2 + raTrig, dec = dec0 + dec1*t + dec2*t**2 + decTrig, pm = pm0 + pm1*d + pm2*t**2 + pmTrig, where t = time / (seconds per day). More... | |
void | GetPolynomial (std::vector< double > &abcAng1, std::vector< double > &abcAng2, std::vector< double > &abcAng3) |
Return the coefficients of a polynomial fit to each of the three camera angles for the time period covered by the cache, angle = c0 + c1*t + c2*t**2 + ... More... | |
void | getPckPolynomial (std::vector< Angle > &raCoeff, std::vector< Angle > &decCoeff, std::vector< Angle > &pmCoeff) |
Return the coefficients of a polynomial fit to each of the three planet angles. More... | |
void | SetPolynomialDegree (int degree) |
Set the degree of the polynomials to be fit to the three camera angles for the time period covered by the cache, angle = c0 + c1*t + c2*t**2 + ... More... | |
Source | GetSource () |
Accessor method to get the rotation source. More... | |
void | SetSource (Source source) |
Resets the source of the rotation to the given value. More... | |
void | ComputeBaseTime () |
Compute the base time using cached times. More... | |
FrameType | getFrameType () |
Accessor method to get the rotation frame type. More... | |
double | GetBaseTime () |
Accessor method to get the rotation base time. More... | |
double | GetTimeScale () |
Accessor method to get the rotation time scale. More... | |
void | SetOverrideBaseTime (double baseTime, double timeScale) |
Set an override base time to be used with observations on scanners to allow all images in an observation to use the save base time and polynomials for the angles. More... | |
void | SetCacheTime (std::vector< double > cacheTime) |
double | DPolynomial (const int coeffIndex) |
Evaluate the derivative of the fit polynomial defined by the given coefficients with respect to the coefficient at the given index, at the current time. More... | |
double | DPckPolynomial (PartialType partialVar, const int coeffIndex) |
Evaluate the derivative of the fit polynomial defined by the given coefficients with respect to the coefficient at the given index, at the current time. More... | |
std::vector< double > | toJ2000Partial (const std::vector< double > &lookT, PartialType partialVar, int coeffIndex) |
Given a direction vector in the reference frame, compute the derivative with respect to one of the coefficients in the angle polynomial fit equation of a vector rotated from the reference frame to J2000. More... | |
std::vector< double > | ToReferencePartial (std::vector< double > &lookJ, PartialType partialVar, int coeffIndex) |
Compute the derivative with respect to one of the coefficients in the angle polynomial fit equation of a vector rotated from J2000 to a reference frame. More... | |
void | DCJdt (std::vector< double > &dRJ) |
Compute the derivative of the 3x3 rotation matrix CJ with respect to time. More... | |
double | WrapAngle (double compareAngle, double angle) |
Wrap the input angle to keep it within 2pi radians of the angle to compare. More... | |
void | SetAxes (int axis1, int axis2, int axis3) |
Set the axes of rotation for decomposition of a rotation matrix into 3 angles. More... | |
std::vector< double > | GetFullCacheTime () |
Return full listing (cache) of original time coverage requested. More... | |
void | FrameTrace (double et) |
Compute frame trace chain from target frame to J2000. More... | |
std::vector< int > | ConstantFrameChain () |
Accessor method to get the frame chain for the constant part of the rotation (ends in target) More... | |
std::vector< int > | TimeFrameChain () |
Accessor method to get the frame chain for the rotation (begins in J2000). More... | |
void | InitConstantRotation (double et) |
Initialize the constant rotation. More... | |
bool | HasAngularVelocity () |
Checks whether the rotation has angular velocities. More... | |
void | ComputeAv () |
Compute the angular velocity from the time-based functions fit to the pointing angles This method computes omega = angular velocity matrix, and extracts the angular velocity. More... | |
std::vector< double > | Extrapolate (double timeEt) |
Extrapolate pointing for a given time assuming a constant angular velocity. More... | |
void | checkForBinaryPck () |
Check loaded pck to see if any are binary and set frame type to indicate binary pck. More... | |
Protected Member Functions | |
void | SetFullCacheParameters (double startTime, double endTime, int cacheSize) |
Set the full cache time parameters. More... | |
void | setEphemerisTimeMemcache () |
Updates rotation state based on the rotation cache. More... | |
void | setEphemerisTimeNadir () |
When setting the ephemeris time, uses spacecraft nadir source to update the rotation state. More... | |
void | setEphemerisTimeSpice () |
When setting the ephemeris time, updates the rotation state based on data read directly from NAIF kernels using NAIF Spice routines. More... | |
void | setEphemerisTimePolyFunction () |
When setting the ephemeris time, updates the rotation according to a polynomial that defines the three camera angles and angular velocity, if available. More... | |
void | setEphemerisTimePolyFunctionOverSpice () |
When setting the ephemeris time, updates the rotation state based on a polynomial fit over spice kernel data. More... | |
void | setEphemerisTimePckPolyFunction () |
When setting the ephemeris time, updates the rotation state based on the PcK polynomial. More... | |
Protected Attributes | |
std::vector< double > | p_cacheTime |
iTime for corresponding rotation More... | |
std::vector< std::vector< double > > | p_cache |
Cached rotations, stored as rotation matrix from J2000 to 1st constant frame (CJ) or coefficients of polynomial fit to rotation angles. More... | |
int | p_degree |
Degree of fit polynomial for angles. More... | |
int | p_axis1 |
Axis of rotation for angle 1 of rotation. More... | |
int | p_axis2 |
Axis of rotation for angle 2 of rotation. More... | |
int | p_axis3 |
Axis of rotation for angle 3 of rotation. More... | |
Private Member Functions | |
void | setFrameType () |
Set the frame type (m_frameType). More... | |
std::vector< double > | StateTJ () |
State matrix (6x6) for rotating state vectors from J2000 to target frame. More... | |
Private Attributes | |
std::vector< int > | p_constantFrames |
Chain of Naif frame codes in constant rotation TC. More... | |
std::vector< int > | p_timeFrames |
Chain of Naif frame codes in time-based rotation CJ. More... | |
double | p_timeBias |
iTime bias when reading kernels More... | |
double | p_et |
Current ephemeris time. More... | |
Quaternion | p_quaternion |
Quaternion for J2000 to reference rotation at et. More... | |
bool | p_matrixSet |
Flag indicating p_TJ has been set. More... | |
bool | m_tOrientationAvailable |
Target orientation constants are available. More... | |
FrameType | m_frameType |
The type of rotation frame. More... | |
Source | p_source |
The source of the rotation data. More... | |
int | p_axisP |
The axis defined by the spacecraft vector for defining a nadir rotation. More... | |
int | p_axisV |
The axis defined by the velocity vector for defining a nadir rotation. More... | |
int | p_targetCode |
For computing Nadir rotation only. More... | |
double | p_baseTime |
Base time used in fit equations. More... | |
double | p_timeScale |
Time scale used in fit equations. More... | |
bool | p_degreeApplied |
Flag indicating whether or not a polynomial of degree p_degree has been created and used to fill the cache. More... | |
std::vector< double > | p_coefficients [3] |
Coefficients defining functions fit to 3 pointing angles. More... | |
bool | p_noOverride |
Flag to compute base time;. More... | |
double | p_overrideBaseTime |
Value set by caller to override computed base time. More... | |
double | p_overrideTimeScale |
Value set by caller to override computed time scale. More... | |
DownsizeStatus | p_minimizeCache |
Status of downsizing the cache (set to No to ignore) More... | |
double | p_fullCacheStartTime |
Initial requested starting time of cache. More... | |
double | p_fullCacheEndTime |
Initial requested ending time of cache. More... | |
int | p_fullCacheSize |
Initial requested cache size. More... | |
std::vector< double > | p_TC |
Rotation matrix from first constant rotation (after all time-based rotations in frame chain from J2000 to target) to the target frame. More... | |
std::vector< double > | p_CJ |
Rotation matrix from J2000 to first constant rotation. More... | |
std::vector< std::vector< double > > | p_cacheAv |
Cached angular velocities for corresponding rotactions in p_cache. More... | |
std::vector< double > | p_av |
Angular velocity for rotation at time p_et. More... | |
bool | p_hasAngularVelocity |
Flag indicating whether the rotation includes angular velocity. More... | |
std::vector< Angle > | m_raPole |
Coefficients of a quadratic polynomial fitting pole ra. More... | |
std::vector< Angle > | m_decPole |
Coefficients of a quadratic polynomial fitting pole dec. More... | |
std::vector< Angle > | m_pm |
Coefficients of a quadratic polynomial fitting pole pm. More... | |
std::vector< double > | m_raNutPrec |
Coefficients of pole right ascension nut/prec terms. More... | |
std::vector< double > | m_decNutPrec |
Coefficients of pole decliniation nut/prec terms. More... | |
std::vector< double > | m_pmNutPrec |
Coefficients of prime meridian nut/prec terms. More... | |
std::vector< Angle > | m_sysNutPrec0 |
Constants of planetary system nut/prec periods. More... | |
std::vector< Angle > | m_sysNutPrec1 |
Linear terms of planetary system nut/prec periods. More... | |
Static Private Attributes | |
static const double | m_centScale |
Seconds per Julian century for scaling time in seconds. More... | |
static const double | m_dayScale |
Seconds per day for scaling time in seconds to get target body w. More... | |
Obtain SPICE rotation information for a body.
This class will obtain the rotation from J2000 to a particular reference frame, for example the rotation from J2000 to MOC NA.
It is essentially used to convert position vectors from one frame to another, making it is a C++ wrapper to the NAIF routines pxform_c and mxv or mtxv. Therefore, appropriate NAIF kernels are expected to be loaded prior to using this class. A position can be returned in either the J2000 frame or the selected reference frame. See NAIF required reading for more information regarding this subject at ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/spk.html
An important functionality of this class is the ability to cache the rotations so they do not have to be constantly read from the NAIF kernels and they can be more conveniently updated. Once the data is cached, the NAIF kernels can be unloaded. If the rotation has a fixed part and a time- based part, the rotation is computed and stored in those two parts.
2005-12-01 Debbie A. Cook Original Version modified from SpicePosition class by Jeff Anderson
2006-03-23 Jeff Anderson modified SetEphemerisTime to return if the time did not change to improve speed.
2006-10-18 Debbie A. Cook Added method, WrapAngle, to wrap angles around 2 pi
2007-12-05 Debbie A. Cook added method SetPolynomialDegree to allow the degree of the polynomials fit to the camera angles to be changed. Also changed the polynomial from a fixed 2nd order polynomial to an nth degree polynomial with one independent variable. PartialType was revised and the calls to SetReferencePartial (has an added argument, coefficient index) and DPolynomial (argument type changed to int) were revised. The function was changed from Parabola to Polynomial1Variable, now called PolynomialUnivariate. New methods GetBaseTime and SetOverrideBaseTime were added
2008-02-15 Debbie A. Cook added a new error message to handle the case where the Naif reference frame code is not recognized.
2008-06-18 Unknown - Fixed documentation, added NaifStatus calls
2008-11-26 Debbie A. Cook Added method to set axes of rotation. Default axes are still 3,1,3 so existing software will not be affected by the change. Also added timeScale to the the class and made some parameters protected instead of private so they are available to inheriting classes.
2008-12-12 Debbie A. Cook Added method to return frame code
2009-01-26 Debbie A. Cook Added wrap of 3rd camera angle when crossing +-180
2009-04-21 Debbie A. Cook Added methods MinimizeCache and LoadTimeCache, variable p_minimizeCache, and enum constants DownsizeStatus
2009-06-29 Debbie A. Cook Fixed memory overwrite problem in LoadTimeCache when reading a type 3 ck
2009-07-24 Debbie A. Cook Removed downsizing for Nadir instrument pointing tables (LoadTimeCache) so that radar instruments will work. Current downsizing code requires sclk and radar has no sclk.
2009-10-01 Debbie A. Cook Divided the rotation into a constant (in time) part and a time-based part and added keywords listing the frame chains for both the constant part and the time-based part.
2009-10-09 Debbie A. Cook Added angular velocity when it is available
2009-10-30 Unknown - Modified J2000Vector and ReferenceVector to work on either length 3 vectors (position only) or lenght 6 vectors (position and velocity) and added private method StateTJ()
2009-12-03 Debbie A. Cook Modified tests in LoadTimeCache to allow observation to cross segment boundary for LRO
2010-03-19 Debbie A. Cook Revised ReloadCache including removing obsolete arguments. Added initialization of members p_fullCacheStartTime, p_fullCacheEndTime, and p_fullCacheSize. Added these same values to the table label in method Cache and the reading of these values to the method LoadCache(table). Improved error message in FrameTrace. Also corrected a comment in StateTJ
2010-09-23 Debbie A. Cook Revised to write out line cache for updated pointing when cache size is 1. If the original pointing had an angular velocity in this case, the original angular velocity is written out along with the updated quaternion. Also added method Extrapolate, to extrapolate pointing assuming a constant angular velocity. This method was designed to compute the pointing at the start and end of the exposure for framing cameras to create a ck that would cover a single framing observation.
2010-12-22 Debbie A. Cook Added new method SetFullCacheParameters to upgrade appjit to current instrument Rotation group labels.
2011-02-17 Debbie A. Cook Fixed bug in method LineCache and fixed computation of angular velocity in method DCJdt (derivative was with respect to scaled et instead of et)
2011-02-22 Debbie A. Cook - Corrected Extrapolation method
2011-03-25 Debbie A. Cook - Added method GetCenterAngles()
2011-07-20 Kris J Becker - Modified SpiceRotation::LoadCache(Table &table) to be reentrant. This mod was necessitated by the Dawn VIR instrument.
2012-05-28 Debbie A. Cook - Programmer notes - A new interpolation algorithm, PolyFunctionOverSpice, was added and new supporting methods: SetEphemerisTimePolyOverSpice, SetEphemerisTimeSpice, SetEphemerisTimeNadir, SetEphemerisTimeMemcache, and SetEphemerisTimePolyFunction. PolyFunctionOverSpice is never output, but is converted to a line cache and reduced. Methods LineCache and ReloadCache were modified to do the reduction and a copy constructor was added to support the reduction. Also an argument was added to SetPolynomial methods for function type, since PolyFunction is no longer the only function supported. These changes help the BundleAdjust applications to better fit line scan images where the pointing was not modeled well with a regular polynomial.
2012-10-25 Jeannie Backer - Brought class closer to Isis3 standards: Ordered includes in cpp file, replaced quotation marks with angle braces in 3rd party includes, fixed history indentation and line length. References #1181.
2013-03-27 Jeannie Backer - Added methods for MsiCamera. Brought class closer to Isis3 standards: moved method implementation to cpp file, fixed documentation. References #1248.
2013-11-12 Ken Edmundson Programmers notes - Commented out cout debug statements on lines 637 and 642 that appeared onscreen during jigsaw runs when images are updated. References #1521.
2014-03-11 Tracie Sucharski - In the LoadTimeCache method, do not throw error if if first segment in kernel is not type 3 or 5. As long as the segment needed is type 3 or 5, we're ok. This was changed for New Horizons which had ck's with both type 2 and type 3 segments.
2014-03-11 Stuart Sides - Programmers notes - Fixed a bug in the copy constructor that was going out of array bounds.
2015-02-20 Jeannie Backer - Improved error messages.
2015-07-21 Kristin Berry - Added additional NaifStatus::CheckErrors() calls to see if any NAIF errors were signaled. References #2248.
2015-08-05 Debbie A. Cook - Programmer notes - Modified LoadCache, and ComputeAv. Added new methods loadPCFromSpice, loadPCFromTable, toJ2000Partial, poleRaCoefs, poleDecCoefs, pmCoefs, poleRaNutPrecCoefs, poleDecNutPrecCoefs, pmNutPrecCoefs, sysNutPrecConstants, sysNutPrecCoefs, usePckPolynomial, setPckPolynomial(raCoef, decCoef, pmCoef), getPckPolynomial, setEphemerisTimePckPolyFunction, getFrameType and members m_frameType, m_tOrientationAvailable, m_raPole, m_decPole, m_pm, m_raNutPrec, m_decNutPrec, m_pmNutPrec, m_sysNutPrec0, m_sysNutPrec1, m_dscale, m_Tscale to support request for solving for target body parameters. Also added a new enumerated value for Source, PckPolyFunction, and PartialType, WRT_RotationRate.
2016-02-15 Debbie A. Cook - Programmer notes - Added private method setFrameType to set the frame type. It also loads the planetary constants for a PCK type.
2016-06-28 Ian Humphrey - Updated documentation and coding standards. Added new tests to unit test. Fixes #3972.
2017-12-13 Ken Edmundson - Added "case DYN:" to methods ToReferencePartial and toJ2000Partial. Fixes #5251. This problem was found when trying to bundle M3 images that had been spiceinited with nadir pointing. The nadir frame is defined as a Dynamic Frame by Naif.
2018-04-21 Jesse Mapel - Modified frametype resolution to check if a body centered frame uses a CK or PCK definition. This only occurs for bodies where a pck cannot accurately define for the duration of a mission. The current example is the comet 67P/CHURYUMOV-GERASIMENKO imaged by Rosetta. Some future comet/astroid missions are expected to use a CK defined body fixed reference frame. Fixes #5408.
Downsize using Hermite cubic spline and allow Nadir tables to be downsized again.
Consider making this a base class with child classes based on frame type or storage type (polynomial, polynomial over cache, cache, etc.)
Definition at line 223 of file SpiceRotation.h.
Status of downsizing the cache.
Enumerator | |
---|---|
Yes | Downsize the cache. |
Done | Cache is downsized. |
No | Do not downsize the cache. |
Definition at line 280 of file SpiceRotation.h.
Enumeration for the frame type of the rotation.
Enumerator | |
---|---|
UNKNOWN | Isis specific code for unknown frame type. |
INERTL | See Naif Frames.req document for. |
PCK | definitions |
BPC | Isis specific code for binary pck. |
NOTJ2000PCK | PCK frame not referenced to J2000. |
Definition at line 289 of file SpiceRotation.h.
This enumeration indicates whether the partial derivative is taken with respect to Right Ascension, Declination, or Twist (or Rotation).
Enumerator | |
---|---|
WRT_RightAscension | With respect to Right Ascension. |
WRT_Declination | With respect to Declination. |
WRT_Twist | With respect to Twist or Prime Meridian Rotation. |
Definition at line 271 of file SpiceRotation.h.
The rotation can come from one of 3 places for an Isis cube.
The class expects function to be after Memcache. Spice - the rotation is calculated by Naif Spice routines with data read directly from Naif kernels. Nadir - the rotation is calculated using the Naif routine twovec with the position and velocity vectors of the spacecraft. Memcache - the rotation is linearly interpolated from time-based values in a table. PolyFunction - the rotation is calculated from an nth degree polynomial in one variable (time in scaled seconds) PolyFunctionOverSpice - the rotation is calculated from an nth degree polynomial fit over the Naif Spice results. PckPolyFunction - The rotation is calculated using the IAU fit polynomials in one variable (time in Julian centuries and days).
Enumerator | |
---|---|
Spice | Directly from the kernels. |
Nadir | Nadir pointing. |
Memcache | From cached table. |
PolyFunction | From nth degree polynomial. |
PolyFunctionOverSpice | Kernels plus nth degree polynomial. |
PckPolyFunction | Quadratic polynomial function with linear trignometric terms. |
Definition at line 258 of file SpiceRotation.h.
Isis::SpiceRotation::SpiceRotation | ( | int | frameCode | ) |
Construct an empty SpiceRotation class using a valid Naif frame code to set up for getting rotation from Spice kernels.
See required reading ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/naif_ids.html
frameCode | Valid naif frame code. |
Definition at line 51 of file SpiceRotation.cpp.
References m_frameType, m_tOrientationAvailable, No, p_av, p_axis1, p_axis2, p_axis3, p_CJ, p_constantFrames, p_degree, p_degreeApplied, p_et, p_fullCacheEndTime, p_fullCacheSize, p_fullCacheStartTime, p_hasAngularVelocity, p_matrixSet, p_minimizeCache, p_noOverride, p_source, p_timeBias, Spice, and UNKNOWN.
Isis::SpiceRotation::SpiceRotation | ( | int | frameCode, |
int | targetCode | ||
) |
Construct an empty SpiceRotation object using valid Naif frame code and.
body code to set up for computing nadir rotation. See required reading ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/naif_ids.html
frameCode | Valid naif frame code. |
targetCode | Valid naif body code. |
IException::Io | "Cannot find [key] in text kernels" |
Definition at line 85 of file SpiceRotation.cpp.
References _FILEINFO_, Isis::NaifStatus::CheckErrors(), Isis::IException::Io, m_frameType, m_tOrientationAvailable, Nadir, No, p_av, p_axis1, p_axis2, p_axis3, p_axisP, p_axisV, p_CJ, p_constantFrames, p_degree, p_degreeApplied, p_et, p_fullCacheEndTime, p_fullCacheSize, p_fullCacheStartTime, p_hasAngularVelocity, p_matrixSet, p_minimizeCache, p_noOverride, p_source, p_targetCode, p_timeBias, and Isis::toString().
Isis::SpiceRotation::SpiceRotation | ( | const SpiceRotation & | rotToCopy | ) |
Construct a SpiceRotation object by copying from an existing one.
rotToCopy | const reference to other SpiceRotation to copy |
Definition at line 137 of file SpiceRotation.cpp.
References m_frameType, p_av, p_axis1, p_axis2, p_axis3, p_axisP, p_axisV, p_baseTime, p_cache, p_cacheAv, p_cacheTime, p_CJ, p_coefficients, p_constantFrames, p_degree, p_degreeApplied, p_et, p_fullCacheEndTime, p_fullCacheSize, p_fullCacheStartTime, p_hasAngularVelocity, p_matrixSet, p_minimizeCache, p_noOverride, p_overrideBaseTime, p_overrideTimeScale, p_quaternion, p_source, p_targetCode, p_TC, p_timeBias, p_timeFrames, and p_timeScale.
|
virtual |
Destructor for SpiceRotation object.
Definition at line 186 of file SpiceRotation.cpp.
std::vector< double > Isis::SpiceRotation::Angles | ( | int | axis3, |
int | axis2, | ||
int | axis1 | ||
) |
Return the camera angles (right ascension, declination, and twist) for the time-based matrix CJ.
axis3 | The rotation axis for the third angle |
axis2 | The rotation axis for the second angle |
axis1 | The rotation axis for the first angle |
Definition at line 1139 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), and p_CJ.
Referenced by DCJdt(), GetCenterAngles(), setEphemerisTimePolyFunctionOverSpice(), SetPolynomial(), toJ2000Partial(), and ToReferencePartial().
std::vector< double > Isis::SpiceRotation::AngularVelocity | ( | ) |
Accessor method to get the angular velocity.
Definition at line 1180 of file SpiceRotation.cpp.
References p_av.
Referenced by ReloadCache().
Table Isis::SpiceRotation::Cache | ( | const QString & | tableName | ) |
Return a table with J2000 to reference rotations.
Return a table containing the cached pointing with the given name. The table will have either five columns (for a list cache) of J2000 to reference quaternions and times, eight columns (if angular velocity is available), or three columns (for a coefficient cache), of J2000 to reference frame rotation angles defined by coefficients of a polynomial function (see SetPolynommial). In the coefficient cache the last row of the table is the base time, time scale, and polynomial degree. Note: In the case of the coefficient cache, the angular velocity is not written to the table since it can be calculated from the polynomials.
tableName | Name of the table to create and return |
IException::Programmer | "To create table source of data must be either Memcache or PolyFunction" |
Definition at line 710 of file SpiceRotation.cpp.
References _FILEINFO_, CacheLabel(), Isis::TableField::Double, Isis::Quaternion::GetQuaternion(), LineCache(), LoadTimeCache(), Memcache, p_baseTime, p_cache, p_cacheAv, p_cacheTime, p_coefficients, p_degree, p_fullCacheSize, p_hasAngularVelocity, p_minimizeCache, p_source, p_timeScale, PolyFunction, PolyFunctionOverSpice, Isis::IException::Programmer, and Yes.
Referenced by Isis::DawnVirCamera::DawnVirCamera(), LineCache(), and Isis::RosettaVirtisCamera::RosettaVirtisCamera().
void Isis::SpiceRotation::CacheLabel | ( | Table & | table | ) |
Add labels to a SpiceRotation table.
Return a table containing the labels defining the rotation.
Definition at line 1012 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), Isis::Blob::Label(), m_decNutPrec, m_decPole, m_frameType, m_pm, m_pmNutPrec, m_raNutPrec, m_raPole, m_sysNutPrec0, m_sysNutPrec1, p_constantFrames, p_fullCacheEndTime, p_fullCacheSize, p_fullCacheStartTime, p_TC, p_timeFrames, PCK, and Isis::toString().
Referenced by Cache().
void Isis::SpiceRotation::checkForBinaryPck | ( | ) |
Check loaded pck to see if any are binary and set frame type to indicate binary pck.
This is strictly a local method to be called only when the source is Spice. Its purpose is to check loaded PCK to see if any are binary. If any loaded PCK is binary, the body rotation label keyword FrameTypeCode is set to BPC (6).
Definition at line 2977 of file SpiceRotation.cpp.
References BPC, and m_frameType.
Referenced by loadPCFromSpice().
void Isis::SpiceRotation::ComputeAv | ( | ) |
Compute the angular velocity from the time-based functions fit to the pointing angles This method computes omega = angular velocity matrix, and extracts the angular velocity.
See comments in the Naif Spicelib routine xf2rav_c.c.
_ _ | | | 0 -av[2] av[1] | | |
omega = | av[2] 0 -av[0] | | | | -av[1] av[0] 0 | |_ _|
IException::Programmer | "The SpiceRotation pointing angles must be fit to polynomials in order to compute angular velocity." |
IException::Programmer | "Planetary angular velocity must be fit computed with PCK polynomials" |
Definition at line 2781 of file SpiceRotation.cpp.
References _FILEINFO_, BPC, Isis::NaifStatus::CheckErrors(), DCJdt(), INERTL, m_frameType, NOTJ2000PCK, p_av, p_CJ, p_source, PCK, PckPolyFunction, PolyFunction, Isis::IException::Programmer, and UNKNOWN.
Referenced by setEphemerisTimePolyFunction().
void Isis::SpiceRotation::ComputeBaseTime | ( | ) |
Compute the base time using cached times.
Definition at line 1903 of file SpiceRotation.cpp.
References p_baseTime, p_cacheTime, p_noOverride, p_overrideBaseTime, p_overrideTimeScale, and p_timeScale.
Referenced by SetPolynomial().
std::vector< int > Isis::SpiceRotation::ConstantFrameChain | ( | ) |
Accessor method to get the frame chain for the constant part of the rotation (ends in target)
Definition at line 1191 of file SpiceRotation.cpp.
References p_constantFrames.
std::vector< double > & Isis::SpiceRotation::ConstantMatrix | ( | ) |
Return the constant 3x3 rotation TC matrix as a vector of length 9.
Definition at line 2694 of file SpiceRotation.cpp.
References p_TC.
std::vector< double > Isis::SpiceRotation::ConstantRotation | ( | ) |
Return the constant 3x3 rotation TC matrix as a quaternion.
Definition at line 2679 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), and p_TC.
void Isis::SpiceRotation::DCJdt | ( | std::vector< double > & | dCJ | ) |
Compute the derivative of the 3x3 rotation matrix CJ with respect to time.
The derivative is computed based on p_CJ (J2000 to first constant frame).
[out] | dCJ | Derivative of p_CJ |
Definition at line 2826 of file SpiceRotation.cpp.
References Angles(), Isis::NaifStatus::CheckErrors(), p_axis1, p_axis2, p_axis3, p_baseTime, p_coefficients, p_degree, p_et, p_timeScale, and Isis::BasisFunction::SetCoefficients().
Referenced by ComputeAv().
double Isis::SpiceRotation::DPckPolynomial | ( | SpiceRotation::PartialType | partialVar, |
const int | coeffIndex | ||
) |
Evaluate the derivative of the fit polynomial defined by the given coefficients with respect to the coefficient at the given index, at the current time.
partialVar | Variable derivative is to be with respect to |
coeffIndex | The index of the coefficient to differentiate |
IException::Programmer | "Unable to evaluate the derivative of the SPICE rotation fit polynomial for the given coefficient index. Index is negative or exceeds degree of polynomial" |
Definition at line 1988 of file SpiceRotation.cpp.
References _FILEINFO_, p_degree, p_et, Isis::IException::Programmer, Isis::toString(), WRT_Declination, WRT_RightAscension, and WRT_Twist.
Referenced by toJ2000Partial(), and ToReferencePartial().
double Isis::SpiceRotation::DPolynomial | ( | const int | coeffIndex | ) |
Evaluate the derivative of the fit polynomial defined by the given coefficients with respect to the coefficient at the given index, at the current time.
coeffIndex | The index of the coefficient to differentiate |
IException::Programmer | "Unable to evaluate the derivative of the SPICE rotation fit polynomial for the given coefficient index. Index is negative or exceeds degree of polynomial" |
Definition at line 1953 of file SpiceRotation.cpp.
References _FILEINFO_, p_baseTime, p_degree, p_et, p_timeScale, Isis::IException::Programmer, and Isis::toString().
Referenced by toJ2000Partial(), and ToReferencePartial().
double Isis::SpiceRotation::EphemerisTime | ( | ) | const |
Accessor method to get current ephemeris time.
Definition at line 288 of file SpiceRotation.cpp.
References p_et.
std::vector< double > Isis::SpiceRotation::EvaluatePolyFunction | ( | ) |
Evaluate the polynomial fit function for the three pointing angles for the current ephemeris time.
Definition at line 3229 of file SpiceRotation.cpp.
References Isis::BasisFunction::Evaluate(), p_baseTime, p_coefficients, p_degree, p_et, p_timeScale, and Isis::BasisFunction::SetCoefficients().
Referenced by setEphemerisTimePolyFunctionOverSpice().
std::vector< double > Isis::SpiceRotation::Extrapolate | ( | double | timeEt | ) |
Extrapolate pointing for a given time assuming a constant angular velocity.
The pointing and angular velocity at the current time will be used to extrapolate pointing at the input time. If angular velocity does not exist, the value at the current time will be output.
[in] | timeEt | The time of the pointing to be extrapolated |
Definition at line 2935 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), p_av, p_CJ, p_et, and p_hasAngularVelocity.
int Isis::SpiceRotation::Frame | ( | ) |
Accessor method that returns the frame code.
This is the first value of the constant frames member variable.
Definition at line 207 of file SpiceRotation.cpp.
References p_constantFrames.
void Isis::SpiceRotation::FrameTrace | ( | double | et | ) |
Compute frame trace chain from target frame to J2000.
et | Ephemeris time |
IException::Programmer | "The frame is not supported by Naif" |
IException::Programmer | "The ck rotation from frame can not be found due to no pointing available at request time or a problem with the frame" |
IException::Programmer | "The frame has a type not supported by your version of Naif Spicelib. You need to update." |
Definition at line 2539 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), and p_constantFrames.
Referenced by InitConstantRotation().
double Isis::SpiceRotation::GetBaseTime | ( | ) |
Accessor method to get the rotation base time.
Definition at line 2239 of file SpiceRotation.cpp.
References p_baseTime.
Referenced by Isis::BundleObservation::initializeExteriorOrientation().
std::vector< double > Isis::SpiceRotation::GetCenterAngles | ( | ) |
Return the camera angles at the center time of the observation.
Definition at line 1120 of file SpiceRotation.cpp.
References Angles(), p_axis1, p_axis2, p_axis3, p_fullCacheEndTime, p_fullCacheStartTime, and SetEphemerisTime().
SpiceRotation::FrameType Isis::SpiceRotation::getFrameType | ( | ) |
Accessor method to get the rotation frame type.
Definition at line 2208 of file SpiceRotation.cpp.
References m_frameType.
std::vector< double > Isis::SpiceRotation::GetFullCacheTime | ( | ) |
Return full listing (cache) of original time coverage requested.
IException::User | "Time cache not availabe -- rerun spiceinit" |
Definition at line 2507 of file SpiceRotation.cpp.
References _FILEINFO_, p_fullCacheEndTime, p_fullCacheSize, p_fullCacheStartTime, and Isis::IException::User.
void Isis::SpiceRotation::getPckPolynomial | ( | std::vector< Angle > & | raCoeff, |
std::vector< Angle > & | decCoeff, | ||
std::vector< Angle > & | pmCoeff | ||
) |
Return the coefficients of a polynomial fit to each of the three planet angles.
See SetPckPolynomial() for more information on the polynomial.
TODO??? Should the other coefficients be returned as well???
[out] | raCoeff | Quadratic coefficients of fit to ra |
[out] | decCoeff | Quadratic coefficients of fit to dec |
[out] | pmcoeff | Quadratic coefficients of fit to pm |
Definition at line 1889 of file SpiceRotation.cpp.
void Isis::SpiceRotation::GetPolynomial | ( | std::vector< double > & | coeffAng1, |
std::vector< double > & | coeffAng2, | ||
std::vector< double > & | coeffAng3 | ||
) |
Return the coefficients of a polynomial fit to each of the three camera angles for the time period covered by the cache, angle = c0 + c1*t + c2*t**2 + ...
[out] | coeffAng1 | Coefficients of fit to Angle 1 |
[out] | coeffAng2 | Coefficients of fit to Angle 2 |
[out] | coeffAng3 | Coefficients of fit to Angle 3 |
Definition at line 1867 of file SpiceRotation.cpp.
References p_coefficients.
Referenced by Isis::BundleObservation::initializeExteriorOrientation().
SpiceRotation::Source Isis::SpiceRotation::GetSource | ( | ) |
Accessor method to get the rotation source.
Definition at line 2218 of file SpiceRotation.cpp.
References p_source.
double Isis::SpiceRotation::GetTimeScale | ( | ) |
Accessor method to get the rotation time scale.
Definition at line 2249 of file SpiceRotation.cpp.
References p_timeScale.
Referenced by Isis::BundleObservation::initializeExteriorOrientation().
bool Isis::SpiceRotation::HasAngularVelocity | ( | ) |
Checks whether the rotation has angular velocities.
Definition at line 1211 of file SpiceRotation.cpp.
References p_hasAngularVelocity.
void Isis::SpiceRotation::InitConstantRotation | ( | double | et | ) |
Initialize the constant rotation.
et | Ephemeris time. |
Definition at line 2750 of file SpiceRotation.cpp.
References FrameTrace(), p_constantFrames, p_TC, and p_timeFrames.
Referenced by LoadCache(), and setEphemerisTimeNadir().
bool Isis::SpiceRotation::IsCached | ( | ) | const |
Checks if the cache is empty.
Definition at line 298 of file SpiceRotation.cpp.
References p_cache.
std::vector< double > Isis::SpiceRotation::J2000Vector | ( | const std::vector< double > & | rVec | ) |
Given a direction vector in the reference frame, return a J2000 direction.
[in] | rVec | A direction vector in the reference frame |
Definition at line 1223 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), p_CJ, p_hasAngularVelocity, p_TC, and StateTJ().
Referenced by Isis::Sensor::computeRaDec(), Isis::CameraGroundMap::GetdXYdPoint(), Isis::CameraGroundMap::GetXY(), Isis::Sensor::lookDirectionJ2000(), Isis::RadarGroundMap::SetFocalPlane(), and Isis::Sensor::SetLookDirection().
Table Isis::SpiceRotation::LineCache | ( | const QString & | tableName | ) |
Return a table with J2000 to reference rotations.
Return a table containing the cached pointing with the given name. The table will have eight columns, quaternion, angular velocity, and time of J2000 to reference frame rotation.
tableName | Name of the table to create and return |
IException::Programmer | "Only cached rotations can be returned as a line cache of quaternions and time" |
Definition at line 674 of file SpiceRotation.cpp.
References _FILEINFO_, Cache(), Memcache, p_source, PolyFunction, Isis::IException::Programmer, and ReloadCache().
Referenced by Cache().
void Isis::SpiceRotation::LoadCache | ( | double | startTime, |
double | endTime, | ||
int | size | ||
) |
Cache J2000 rotation quaternion over a time range.
This method will load an internal cache with frames over a time range. This prevents the NAIF kernels from being read over-and-over again and slowing an application down due to I/O performance. Once the cache has been loaded then the kernels can be unloaded from the NAIF system.
startTime | Starting ephemeris time in seconds for the cache |
endTime | Ending ephemeris time in seconds for the cache |
size | Number of frames to keep in the cache |
IException::Programmer | "Argument cacheSize must not be less than or equal to zero" |
IException::Programmer | "Argument startTime must be less than or equal to endTime" |
IException::Programmer | "Cache size must be more than 1 if startTime and endTime differ" |
IException::Programmer | "A SpiceRotation cache has already men |
Definition at line 331 of file SpiceRotation.cpp.
References _FILEINFO_, InitConstantRotation(), LoadTimeCache(), Memcache, p_av, p_cache, p_cacheAv, p_cacheTime, p_CJ, p_fullCacheEndTime, p_fullCacheSize, p_fullCacheStartTime, p_hasAngularVelocity, p_minimizeCache, p_source, p_timeFrames, Isis::IException::Programmer, SetEphemerisTime(), setFrameType(), and Yes.
Referenced by Isis::DawnVirCamera::DawnVirCamera(), LoadCache(), and Isis::RosettaVirtisCamera::RosettaVirtisCamera().
void Isis::SpiceRotation::LoadCache | ( | double | time | ) |
Cache J2000 to frame rotation for a time.
This method will load an internal cache with a rotation for a single time (e.g. useful for framing cameras). This prevents the NAIF kernels from being read over-and-over again and slowing a application down due to I/O performance. Once the cache has been loaded then the kernels can be unloaded from the NAIF system. This calls the LoadCache(stime,etime,size) method using the time as both the starting and ending time with a size of 1.
time | single ephemeris time in seconds to cache |
Definition at line 400 of file SpiceRotation.cpp.
References LoadCache().
void Isis::SpiceRotation::LoadCache | ( | Table & | table | ) |
Cache J2000 rotations using a table file.
This method will load either an internal cache with rotations (quaternions) or coefficients (for 3 polynomials defining the camera angles) from an ISIS table file. In the first case, the table must have 5 columns and at least one row. The 5 columns contain the following information, J2000 to reference quaternion (q0, q1, q2, q3) and the ephemeris time of that position. If there are multiple rows, it is assumed the quaternions between the rows can be interpolated. In the second case, the table must have three columns and at least two rows. The three columns contain the coefficients for each of the three camera angles. Row one of the table contains coefficient 0 (constant term) for angles 1, 2, and 3. If the degree of the fit equation is greater than 1, row 2 contains coefficient 1 (linear) for each of the three angles. Row n contains coefficient n-1 and the last row contains the time parameters, base time, and time scale, and the degree of the polynomial.
table | An ISIS table blob containing valid J2000 to reference quaternion/time values |
IException::Programmer | "Expecting either three, five, or eight fields in the SpiceRotation table" |
Definition at line 429 of file SpiceRotation.cpp.
References Isis::PvlObject::hasKeyword(), Isis::Blob::Label(), p_cache, p_cacheAv, p_cacheTime, p_constantFrames, p_hasAngularVelocity, p_TC, p_timeFrames, Isis::PvlKeyword::size(), and Isis::toInt().
void Isis::SpiceRotation::loadPCFromSpice | ( | int | centerBody | ) |
Initialize planetary orientation constants from Spice PCK.
Retrieve planetary orientation constants from a Spice PCK and store them in the class.
centerBody | NAIF id for the planetary body to retrieve the PCK for |
Definition at line 821 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), checkForBinaryPck(), Isis::Angle::Degrees, m_decNutPrec, m_decPole, m_frameType, m_pm, m_pmNutPrec, m_raNutPrec, m_raPole, m_sysNutPrec0, m_sysNutPrec1, m_tOrientationAvailable, NOTJ2000PCK, PCK, and Isis::toString().
Referenced by setFrameType().
void Isis::SpiceRotation::loadPCFromTable | ( | const PvlObject & | label | ) |
Initialize planetary orientation constants from an cube body rotation label.
Retrieve planetary orientation constants from a cube body rotation label if they are present.
label | const reference to the cube body rotation pvl label |
Definition at line 933 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), Isis::Angle::Degrees, Isis::PvlObject::hasKeyword(), m_decNutPrec, m_decPole, m_pm, m_pmNutPrec, m_raNutPrec, m_raPole, m_sysNutPrec0, m_sysNutPrec1, m_tOrientationAvailable, Isis::PvlKeyword::size(), and Isis::toDouble().
void Isis::SpiceRotation::LoadTimeCache | ( | ) |
Load the time cache.
This method should works with the LoadCache(startTime, endTime, size) method to load the time cache.
IException::Programmer | "Full cache size does NOT match cache size in LoadTimeCache -- should never happen" |
IException::Programmer | "Observation crosses segment boundary--unable to interpolate pointing" |
IException::User | "No camera kernels loaded...Unable to determine time cache to downsize" |
Definition at line 2288 of file SpiceRotation.cpp.
References _FILEINFO_, Isis::NaifStatus::CheckErrors(), Done, Memcache, Nadir, No, p_cache, p_cacheAv, p_cacheTime, p_constantFrames, p_fullCacheEndTime, p_fullCacheSize, p_fullCacheStartTime, p_hasAngularVelocity, p_minimizeCache, p_source, p_timeBias, Isis::IException::Programmer, Isis::IException::User, and Yes.
Referenced by Cache(), LoadCache(), and ReloadCache().
std::vector< double > Isis::SpiceRotation::Matrix | ( | ) |
Return the full rotation TJ as a matrix.
Definition at line 2664 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), p_CJ, and p_TC.
void Isis::SpiceRotation::MinimizeCache | ( | DownsizeStatus | status | ) |
Set the downsize status to minimize cache.
status | The DownsizeStatus enumeration value. |
Definition at line 308 of file SpiceRotation.cpp.
References p_minimizeCache.
Referenced by Isis::DawnVirCamera::DawnVirCamera(), and Isis::RosettaVirtisCamera::RosettaVirtisCamera().
std::vector< Angle > Isis::SpiceRotation::pmCoefs | ( | ) |
Return the coefficients used to calculate the target body prime meridian.
Return the coefficients used to calculate the target body prime meridian without nutation/precession. The model is a standard quadratic polynomial in time in days from the standard epoch (usually J2000). To match the Naif PCK prime meridian, (usually the same as the most recent IAU Report) the trignometric terms to account for nutation/precession need to be added.
pm = pm0 + pm1*d + pm2*d**2 + sum(pmcoef[i]i*sin(angle[i]))
Definition at line 1313 of file SpiceRotation.cpp.
References m_pm.
std::vector< double > Isis::SpiceRotation::pmNutPrecCoefs | ( | ) |
Return the coefficients used to calculate the target body pm nut/prec coefficients.
Return the coefficients used to calculate the target body prime meridian nutation/precession contribution. The model is the sum of the products of the coefficients returned by this method with the sin of the corresponding angles associated with the barycenter related to the target body.
prime meridian = pm0 + pm1*T + pm2*d**2 + sum(pmCoef[i]i*sin(angle[i]))
Definition at line 1365 of file SpiceRotation.cpp.
References m_pmNutPrec.
std::vector< Angle > Isis::SpiceRotation::poleDecCoefs | ( | ) |
Return the coefficients used to calculate the target body pole dec.
Return the coefficients used to calculate the target body declination without nutation/precession. The model is a standard quadratic polynomial in time in Julian centuries (36525 days) from the standard epoch (usually J2000). To match the Naif PCK pole declination (usually the same as the most recent IAU Report) the trignometric terms to account for nutation/precession need to be added.
pole dec = dec0 + dec1*T + dec2*T**2 + sum(racoef[i]i*sin(angle[i]))
Definition at line 1294 of file SpiceRotation.cpp.
References m_decPole.
std::vector< double > Isis::SpiceRotation::poleDecNutPrecCoefs | ( | ) |
Return the coefficients used to calculate the target body pole dec nut/prec coefficients.
Return the coefficients used to calculate the target body declination nutation/precession contribution. The model is the sum of the products of the coefficients returned by this method with the sin of the corresponding angles associated with the barycenter related to the target body.
pole dec = dec0 + dec1*T + dec2*T**2 + sum(decCoef[i]i*sin(angle[i]))
Definition at line 1348 of file SpiceRotation.cpp.
References m_decNutPrec.
std::vector< Angle > Isis::SpiceRotation::poleRaCoefs | ( | ) |
Return the coefficients used to calculate the target body pole ra.
Return the coefficients used to calculate the target body right ascension without nutation/precession. The model is a standard quadratic polynomial in time in Julian centuries (36525 days) from the standard epoch (usually J2000). To match the Naif PCK pole right ascension (usually the same as the most recent IAU Report) the trignometric terms to account for nutation/precession need to be added.
pole ra = ra0 + ra1*T + ra2*T**2 + sum(racoef[i]i*sin(angle[i]))
Definition at line 1274 of file SpiceRotation.cpp.
References m_raPole.
std::vector< double > Isis::SpiceRotation::poleRaNutPrecCoefs | ( | ) |
Return the coefficients used to calculate the target body pole ra nut/prec coefficients.
Return the coefficients used to calculate the target body right ascension nutation/precession contribution. The model is the sum of the products of the coefficients returned by this method with the sin of the corresponding angles associated with the barycenter related to the target body.
pole ra = ra0 + ra1*T + ra2*T**2 + sum(raCoef[i]i*sin(angle[i]))
Definition at line 1331 of file SpiceRotation.cpp.
References m_raNutPrec.
std::vector< double > Isis::SpiceRotation::ReferenceVector | ( | const std::vector< double > & | jVec | ) |
Given a direction vector in J2000, return a reference frame direction.
[in] | jVec | A direction vector in J2000 |
Definition at line 1517 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), p_CJ, p_hasAngularVelocity, p_TC, and StateTJ().
Referenced by Isis::CameraGroundMap::GetdXYdOrientation(), Isis::CameraGroundMap::GetdXYdPoint(), Isis::CameraGroundMap::GetdXYdPosition(), Isis::RadarGroundMap::GetdXYdPosition(), Isis::CameraGroundMap::GetdXYdTOrientation(), Isis::CameraGroundMap::GetXY(), Isis::RadarGroundMap::GetXY(), Isis::Camera::LocalPhotometricAngles(), Isis::Sensor::LookDirection(), Isis::RadarGroundMap::SetFocalPlane(), Isis::RadarGroundMap::SetGround(), Isis::Sensor::SetGroundLocal(), Isis::Sensor::SetLookDirection(), Isis::Sensor::SetRightAscensionDeclination(), and Isis::Sensor::SlantDistance().
void Isis::SpiceRotation::ReloadCache | ( | ) |
Cache J2000 rotation over existing cached time range using polynomials.
This method will reload an internal cache with matrices formed from rotation angles fit to functions over a time range.
IException::Programmer | "The SpiceRotation has not yet been fit to a function" |
Definition at line 594 of file SpiceRotation.cpp.
References _FILEINFO_, AngularVelocity(), LoadTimeCache(), Memcache, No, p_av, p_cache, p_cacheAv, p_cacheTime, p_CJ, p_degree, p_et, p_fullCacheSize, p_hasAngularVelocity, p_minimizeCache, p_source, PolyFunction, PolyFunctionOverSpice, Isis::IException::Programmer, SetEphemerisTime(), and TimeBasedMatrix().
Referenced by LineCache().
void Isis::SpiceRotation::SetAngles | ( | std::vector< double > | angles, |
int | axis3, | ||
int | axis2, | ||
int | axis1 | ||
) |
Set the rotation angles (phi, delta, and w) for the current time to define the time-based matrix CJ.
This method was created for unitTests and should not be used otherwise. It only works for cached data with a cache size of 1.
[in] | angles | The angles defining the rotation (phi, delta, and w) in radians |
[in] | axis3 | The rotation axis for the third angle |
[in] | axis2 | The rotation axis for the second angle |
[in] | axis1 | The rotation axis for the first angle |
Definition at line 1166 of file SpiceRotation.cpp.
References p_cache, p_CJ, p_et, and SetEphemerisTime().
void Isis::SpiceRotation::SetAxes | ( | int | axis1, |
int | axis2, | ||
int | axis3 | ||
) |
Set the axes of rotation for decomposition of a rotation matrix into 3 angles.
[in] | axis1 | Axes of rotation of first angle applied (right rotation) |
[in] | axis2 | Axes of rotation of second angle applied (center rotation) |
[in] | axis3 | Axes of rotation of third angle applied (left rotation) |
IException::Programmer | "A rotation axis is outside the valid range of 1 to 3" |
Definition at line 2266 of file SpiceRotation.cpp.
References _FILEINFO_, p_axis1, p_axis2, p_axis3, and Isis::IException::Programmer.
void Isis::SpiceRotation::SetConstantMatrix | ( | std::vector< double > | constantMatrix | ) |
Set the constant 3x3 rotation TC matrix from a vector of length 9.
constantMatrix | Constant rotation matrix, TC. |
Definition at line 2704 of file SpiceRotation.cpp.
References p_TC.
void Isis::SpiceRotation::SetEphemerisTime | ( | double | et | ) |
Return the J2000 to reference frame quaternion at given time.
This method returns the J2000 to reference frame rotational matrix at a given et in seconds. The quaternion is obtained from either valid NAIF ck and/or fk, or alternatively from an internal cache loaded from an ISIS Table object. In the first case, the kernels must contain the rotation for the frame specified in the constructor at the given time (as well as all the intermediate frames going from the reference frame to J2000) and they must be loaded using the SpiceKernel class.
et | ephemeris time in seconds |
Definition at line 242 of file SpiceRotation.cpp.
References Memcache, p_et, p_source, PckPolyFunction, PolyFunction, PolyFunctionOverSpice, setEphemerisTimeMemcache(), setEphemerisTimeNadir(), setEphemerisTimePckPolyFunction(), setEphemerisTimePolyFunction(), setEphemerisTimePolyFunctionOverSpice(), and setEphemerisTimeSpice().
Referenced by GetCenterAngles(), LoadCache(), ReloadCache(), SetAngles(), and SetPolynomial().
|
protected |
Updates rotation state based on the rotation cache.
When setting the ephemeris time, this method is used to update the rotation state by reading from the rotation cache
Definition at line 3065 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), p_av, p_cache, p_cacheAv, p_cacheTime, p_CJ, p_et, and p_hasAngularVelocity.
Referenced by SetEphemerisTime(), and setEphemerisTimePolyFunctionOverSpice().
|
protected |
When setting the ephemeris time, uses spacecraft nadir source to update the rotation state.
Definition at line 3131 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), InitConstantRotation(), p_axisP, p_axisV, p_CJ, p_constantFrames, p_et, p_targetCode, and p_timeFrames.
Referenced by SetEphemerisTime().
|
protected |
When setting the ephemeris time, updates the rotation state based on the PcK polynomial.
Definition at line 3354 of file SpiceRotation.cpp.
References Isis::DEG2RAD, Isis::Angle::Degrees, Isis::HALFPI, m_decNutPrec, m_decPole, m_pm, m_pmNutPrec, m_raNutPrec, m_raPole, m_sysNutPrec0, m_sysNutPrec1, p_av, p_axis1, p_axis2, p_axis3, p_CJ, p_et, Isis::Angle::Radians, and Isis::Angle::radians().
Referenced by SetEphemerisTime(), and setPckPolynomial().
|
protected |
When setting the ephemeris time, updates the rotation according to a polynomial that defines the three camera angles and angular velocity, if available.
Definition at line 3263 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), ComputeAv(), Isis::BasisFunction::Evaluate(), p_av, p_axis1, p_axis2, p_axis3, p_baseTime, p_cacheAv, p_CJ, p_coefficients, p_degree, p_et, p_hasAngularVelocity, p_timeScale, and Isis::BasisFunction::SetCoefficients().
Referenced by SetEphemerisTime(), and setEphemerisTimePolyFunctionOverSpice().
|
protected |
When setting the ephemeris time, updates the rotation state based on a polynomial fit over spice kernel data.
Definition at line 3308 of file SpiceRotation.cpp.
References Angles(), Isis::NaifStatus::CheckErrors(), EvaluatePolyFunction(), p_av, p_axis1, p_axis2, p_axis3, p_CJ, setEphemerisTimeMemcache(), and setEphemerisTimePolyFunction().
Referenced by SetEphemerisTime().
|
protected |
When setting the ephemeris time, updates the rotation state based on data read directly from NAIF kernels using NAIF Spice routines.
IException::Io | "[framecode] is an unrecognized reference frame code. Has the mission frames kernel been loaded?" |
IException::Io | "No pointing is availabe at request time for frame code" |
Definition at line 3170 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors().
Referenced by SetEphemerisTime().
void Isis::SpiceRotation::SetFrame | ( | int | frameCode | ) |
Change the frame to the given frame code.
This method has no effect if spice is cached.
frameCode | The integer-valued frame code |
Definition at line 196 of file SpiceRotation.cpp.
References p_constantFrames.
Referenced by Isis::DawnVirCamera::DawnVirCamera(), Isis::HiriseCamera::HiriseCamera(), Isis::HrscCamera::HrscCamera(), Isis::IssNACamera::IssNACamera(), Isis::IssWACamera::IssWACamera(), Isis::JunoCamera::JunoCamera(), Isis::LroWideAngleCamera::LroWideAngleCamera(), Isis::Mariner10Camera::Mariner10Camera(), Isis::RosettaVirtisCamera::RosettaVirtisCamera(), and Isis::TgoCassisCamera::TgoCassisCamera().
|
private |
Set the frame type (m_frameType).
This is strictly a local method to be called only when the source is Spice. Its purpose is to determine the frame type. If the frame type is PCK, this method also loads the planetary constants. See SpiceRotation.h to see the valid frame types.
Definition at line 3013 of file SpiceRotation.cpp.
References INERTL, loadPCFromSpice(), m_frameType, p_constantFrames, PCK, and UNKNOWN.
Referenced by LoadCache().
|
protected |
Set the full cache time parameters.
[in] | startTime | The earliest time of the full cache coverage |
[in] | endTime | The latest time of the full cache coverage |
[in] | cacheSize | The number of epochs in the full (line) cache |
Definition at line 2962 of file SpiceRotation.cpp.
References p_fullCacheEndTime, p_fullCacheSize, and p_fullCacheStartTime.
void Isis::SpiceRotation::SetOverrideBaseTime | ( | double | baseTime, |
double | timeScale | ||
) |
Set an override base time to be used with observations on scanners to allow all images in an observation to use the save base time and polynomials for the angles.
[in] | baseTime | The base time to use and override the computed base time |
[in] | timeScale | The time scale to use and override the computed time scale |
Definition at line 1926 of file SpiceRotation.cpp.
References p_noOverride, p_overrideBaseTime, and p_overrideTimeScale.
Referenced by Isis::BundleObservation::initializeExteriorOrientation().
void Isis::SpiceRotation::setPckPolynomial | ( | const std::vector< Angle > & | raCoeff, |
const std::vector< Angle > & | decCoeff, | ||
const std::vector< Angle > & | pmCoeff | ||
) |
Set the coefficients of a polynomial fit to each of the three planet angles for the time period covered by the cache, ra = ra0 + ra1*t + ra2*t**2 + raTrig, dec = dec0 + dec1*t + dec2*t**2 + decTrig, pm = pm0 + pm1*d + pm2*t**2 + pmTrig, where t = time / (seconds per day).
for time = et d = t / (days per Julian century), and the trig terms are of the form sum(i = 0, numTerms) tcoef[i] * sin(constant[i] + lcoef[i]*t) for ra and pm and sum(i = 0, numTerms) tcoef[i] * cos(constant[i] + lcoef[i]*t) for dec.
[in] | raCoeff | pole ra coefficients to set |
[in] | decCoeff | pole dec coefficients to set |
[in] | pmCoeff | pole pm coefficients to set |
Definition at line 1844 of file SpiceRotation.cpp.
References m_decPole, m_pm, m_raPole, setEphemerisTimePckPolyFunction(), and usePckPolynomial().
void Isis::SpiceRotation::SetPolynomial | ( | const Source | type = PolyFunction | ) |
Set the coefficients of a polynomial fit to each of the three camera angles for the time period covered by the cache, angle = a + bt + ct**2, where t = (time - p_baseTime)/ p_timeScale.
type | Rotation source type |
< Basis function fit to 1st rotation angle
< Basis function fit to 2nd rotation angle
< Basis function fit to 3rd rotation angle
Definition at line 1556 of file SpiceRotation.cpp.
References Isis::LeastSquares::AddKnown(), Angles(), Isis::NaifStatus::CheckErrors(), Isis::BasisFunction::Coefficient(), Isis::BasisFunction::Coefficients(), ComputeBaseTime(), Isis::LineEquation::Intercept(), p_axis1, p_axis2, p_axis3, p_baseTime, p_cache, p_cacheTime, p_degree, p_source, p_timeScale, PolyFunction, PolyFunctionOverSpice, SetEphemerisTime(), Isis::LineEquation::Slope(), Isis::LeastSquares::Solve(), and WrapAngle().
Referenced by Isis::BundleObservation::applyParameterCorrections(), Isis::BundleObservation::initializeExteriorOrientation(), and SetPolynomialDegree().
void Isis::SpiceRotation::SetPolynomial | ( | const std::vector< double > & | coeffAng1, |
const std::vector< double > & | coeffAng2, | ||
const std::vector< double > & | coeffAng3, | ||
const Source | type = PolyFunction |
||
) |
Set the coefficients of a polynomial fit to each of the three camera angles for the time period covered by the cache, angle = c0 + c1*t + c2*t**2 + ...
[in] | coeffAng1 | Coefficients of fit to Angle 1 |
[in] | coeffAng2 | Coefficients of fit to Angle 2 |
[in] | coeffAng3 | Coefficients of fit to Angle 3 |
[in] | type | Rotation source type |
Definition at line 1707 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), ComputeBaseTime(), p_coefficients, p_degree, p_degreeApplied, p_et, p_source, Isis::BasisFunction::SetCoefficients(), and SetEphemerisTime().
void Isis::SpiceRotation::SetPolynomialDegree | ( | int | degree | ) |
Set the degree of the polynomials to be fit to the three camera angles for the time period covered by the cache, angle = c0 + c1*t + c2*t**2 + ...
[in] | degree | Degree of the polynomial to be fit |
Definition at line 2159 of file SpiceRotation.cpp.
References p_coefficients, p_degree, p_degreeApplied, p_fullCacheSize, p_source, and SetPolynomial().
Referenced by Isis::BundleObservation::initializeExteriorOrientation().
void Isis::SpiceRotation::SetSource | ( | Source | source | ) |
Resets the source of the rotation to the given value.
source | The rotation source to be set. |
Definition at line 2228 of file SpiceRotation.cpp.
References p_source.
void Isis::SpiceRotation::SetTimeBasedMatrix | ( | std::vector< double > | timeBasedMatrix | ) |
Set the time-based 3x3 rotation CJ matrix from a vector of length 9.
timeBasedMatrix | Time-based rotation matrix, TC. |
Definition at line 2739 of file SpiceRotation.cpp.
References p_CJ.
void Isis::SpiceRotation::SetTimeBias | ( | double | timeBias | ) |
Apply a time bias when invoking SetEphemerisTime method.
The bias is used only when reading from NAIF kernels. It is added to the ephermeris time passed into SetEphemerisTime and then the body position is read from the NAIF kernels and returned. When the cache is loaded from a table the bias is ignored as it is assumed to have already been applied. If this method is never called the default bias is 0.0 seconds.
timeBias | time bias in seconds |
Definition at line 224 of file SpiceRotation.cpp.
References p_timeBias.
Referenced by Isis::MocNarrowAngleCamera::MocNarrowAngleCamera(), and Isis::MocWideAngleCamera::MocWideAngleCamera().
|
private |
State matrix (6x6) for rotating state vectors from J2000 to target frame.
Compute & return the rotation matrix that rotates vectors from J2000 to the targeted frame.
Definition at line 2892 of file SpiceRotation.cpp.
References p_av, p_CJ, and p_TC.
Referenced by J2000Vector(), and ReferenceVector().
std::vector< Angle > Isis::SpiceRotation::sysNutPrecCoefs | ( | ) |
Return the coefficients used to calculate the target body system nut/prec angles.
Return the linear coefficients used to calculate the target body system (barycenter) nutation/precession angles (periods). The model for the angles is linear in time in Julian centuries since the standard epoch (usually J2000). angles associated with the barycenter related to the target body.
angle[i] = constant[i] + coef[i]*T
Definition at line 1400 of file SpiceRotation.cpp.
References m_sysNutPrec1.
std::vector< Angle > Isis::SpiceRotation::sysNutPrecConstants | ( | ) |
Return the constants used to calculate the target body system nut/prec angles.
Return the constant terms used to calculate the target body system (barycenter) nutation/precession angles (periods). The model for the angles is linear in time in Julian centuries since the standard epoch (usually J2000). angles associated with the barycenter related to the target body.
angle[i] = constant[i] + coef[i]*T
Definition at line 1382 of file SpiceRotation.cpp.
References m_sysNutPrec0.
std::vector< double > & Isis::SpiceRotation::TimeBasedMatrix | ( | ) |
Return time-based 3x3 rotation CJ matrix as a vector of length 9.
Definition at line 2729 of file SpiceRotation.cpp.
References p_CJ.
Referenced by ReloadCache().
std::vector< double > Isis::SpiceRotation::TimeBasedRotation | ( | ) |
Return time-based 3x3 rotation CJ matrix as a quaternion.
Definition at line 2714 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors(), and p_CJ.
std::vector< int > Isis::SpiceRotation::TimeFrameChain | ( | ) |
Accessor method to get the frame chain for the rotation (begins in J2000).
Definition at line 1201 of file SpiceRotation.cpp.
References p_timeFrames.
std::vector< double > Isis::SpiceRotation::toJ2000Partial | ( | const std::vector< double > & | lookT, |
SpiceRotation::PartialType | partialVar, | ||
int | coeffIndex | ||
) |
Given a direction vector in the reference frame, compute the derivative with respect to one of the coefficients in the angle polynomial fit equation of a vector rotated from the reference frame to J2000.
TODO - merge this method with ToReferencePartial
[in] | lookT | A direction vector in the targeted reference frame |
[in] | partialVar | Variable derivative is to be with respect to |
[in] | coeffIndex | Coefficient index in the polynomial fit to the variable (angle) |
IException::User | "Body rotation uses a binary PCK. Solutions for this model are not supported" |
IException::User | "Body rotation uses a PCK not referenced to J2000. Solutions for this model are not supported" |
IException::User | "Solutions are not supported for this frame type." |
Definition at line 1424 of file SpiceRotation.cpp.
References _FILEINFO_, Angles(), BPC, Isis::NaifStatus::CheckErrors(), DPckPolynomial(), DPolynomial(), m_frameType, NOTJ2000PCK, p_axis1, p_axis2, p_axis3, p_TC, PCK, and Isis::IException::User.
Referenced by Isis::CameraGroundMap::GetdXYdTOrientation().
std::vector< double > Isis::SpiceRotation::ToReferencePartial | ( | std::vector< double > & | lookJ, |
SpiceRotation::PartialType | partialVar, | ||
int | coeffIndex | ||
) |
Compute the derivative with respect to one of the coefficients in the angle polynomial fit equation of a vector rotated from J2000 to a reference frame.
The polynomial equation is of the form angle = c0 + c1*t + c2*t**2 + ... cn*t**n, where t = (time - p_basetime) / p_timeScale and n = p_degree (the degree of the equation)
[in] | lookJ | Look vector in J2000 frame |
[in] | partialVar | Variable derivative is to be with respect to |
[in] | coeffIndex | Coefficient index in the polynomial fit to the variable (angle) |
IException::Programmer | "Only CK, DYN, and PCK partials can be calculated" |
Definition at line 2048 of file SpiceRotation.cpp.
References _FILEINFO_, Angles(), Isis::NaifStatus::CheckErrors(), DPckPolynomial(), DPolynomial(), m_frameType, p_axis1, p_axis2, p_axis3, p_TC, PCK, Isis::IException::Programmer, and UNKNOWN.
Referenced by Isis::CameraGroundMap::GetdXYdOrientation().
void Isis::SpiceRotation::usePckPolynomial | ( | ) |
Set the coefficients of a polynomial fit to each of the three planet angles for the time period covered by the cache, ra = ra0 + ra1*t + ra2*t**2 + raTrig, dec = dec0 + dec1*t + dec2*t**2 + decTrig, pm = pm0 + pm1*d + pm2*t**2 + pmTrig, where t = time / (seconds per day).
for time = et d = t / (days per Julian century), and the trig terms are of the form sum(i = 0, numTerms) tcoef[i] * sin(constant[i] + lcoef[i]*t) for ra and pm and sum(i = 0, numTerms) tcoef[i] * cos(constant[i] + lcoef[i]*t) for dec.
IException::User | "Target body orientation information not available. Rerun spiceinit." |
Definition at line 1764 of file SpiceRotation.cpp.
References _FILEINFO_, m_tOrientationAvailable, p_degreeApplied, p_hasAngularVelocity, p_source, PckPolyFunction, and Isis::IException::User.
Referenced by setPckPolynomial().
double Isis::SpiceRotation::WrapAngle | ( | double | compareAngle, |
double | angle | ||
) |
Wrap the input angle to keep it within 2pi radians of the angle to compare.
[in] | compareAngle | Look vector in J2000 frame |
[in] | angle | Angle to be wrapped if needed |
Definition at line 2131 of file SpiceRotation.cpp.
References Isis::NaifStatus::CheckErrors().
Referenced by SetPolynomial().
|
staticprivate |
Seconds per Julian century for scaling time in seconds.
Definition at line 594 of file SpiceRotation.h.
|
staticprivate |
Seconds per day for scaling time in seconds to get target body w.
Definition at line 596 of file SpiceRotation.h.
|
private |
Coefficients of pole decliniation nut/prec terms.
Definition at line 583 of file SpiceRotation.h.
Referenced by CacheLabel(), loadPCFromSpice(), loadPCFromTable(), poleDecNutPrecCoefs(), and setEphemerisTimePckPolyFunction().
|
private |
Coefficients of a quadratic polynomial fitting pole dec.
Definition at line 576 of file SpiceRotation.h.
Referenced by CacheLabel(), getPckPolynomial(), loadPCFromSpice(), loadPCFromTable(), poleDecCoefs(), setEphemerisTimePckPolyFunction(), and setPckPolynomial().
|
private |
The type of rotation frame.
Definition at line 461 of file SpiceRotation.h.
Referenced by CacheLabel(), checkForBinaryPck(), ComputeAv(), getFrameType(), loadPCFromSpice(), setFrameType(), SpiceRotation(), toJ2000Partial(), and ToReferencePartial().
|
private |
Coefficients of a quadratic polynomial fitting pole pm.
Definition at line 577 of file SpiceRotation.h.
Referenced by CacheLabel(), getPckPolynomial(), loadPCFromSpice(), loadPCFromTable(), pmCoefs(), setEphemerisTimePckPolyFunction(), and setPckPolynomial().
|
private |
Coefficients of prime meridian nut/prec terms.
Definition at line 584 of file SpiceRotation.h.
Referenced by CacheLabel(), loadPCFromSpice(), loadPCFromTable(), pmNutPrecCoefs(), and setEphemerisTimePckPolyFunction().
|
private |
Coefficients of pole right ascension nut/prec terms.
Definition at line 582 of file SpiceRotation.h.
Referenced by CacheLabel(), loadPCFromSpice(), loadPCFromTable(), poleRaNutPrecCoefs(), and setEphemerisTimePckPolyFunction().
|
private |
Coefficients of a quadratic polynomial fitting pole ra.
Definition at line 575 of file SpiceRotation.h.
Referenced by CacheLabel(), getPckPolynomial(), loadPCFromSpice(), loadPCFromTable(), poleRaCoefs(), setEphemerisTimePckPolyFunction(), and setPckPolynomial().
|
private |
Constants of planetary system nut/prec periods.
Definition at line 587 of file SpiceRotation.h.
Referenced by CacheLabel(), loadPCFromSpice(), loadPCFromTable(), setEphemerisTimePckPolyFunction(), and sysNutPrecConstants().
|
private |
Linear terms of planetary system nut/prec periods.
Definition at line 588 of file SpiceRotation.h.
Referenced by CacheLabel(), loadPCFromSpice(), loadPCFromTable(), setEphemerisTimePckPolyFunction(), and sysNutPrecCoefs().
|
private |
Target orientation constants are available.
Definition at line 458 of file SpiceRotation.h.
Referenced by loadPCFromSpice(), loadPCFromTable(), SpiceRotation(), and usePckPolynomial().
|
private |
Angular velocity for rotation at time p_et.
Definition at line 490 of file SpiceRotation.h.
Referenced by AngularVelocity(), ComputeAv(), Extrapolate(), LoadCache(), ReloadCache(), setEphemerisTimeMemcache(), setEphemerisTimePckPolyFunction(), setEphemerisTimePolyFunction(), setEphemerisTimePolyFunctionOverSpice(), SpiceRotation(), and StateTJ().
|
protected |
Axis of rotation for angle 1 of rotation.
Definition at line 438 of file SpiceRotation.h.
Referenced by DCJdt(), GetCenterAngles(), SetAxes(), setEphemerisTimePckPolyFunction(), setEphemerisTimePolyFunction(), setEphemerisTimePolyFunctionOverSpice(), SetPolynomial(), SpiceRotation(), toJ2000Partial(), and ToReferencePartial().
|
protected |
Axis of rotation for angle 2 of rotation.
Definition at line 439 of file SpiceRotation.h.
Referenced by DCJdt(), GetCenterAngles(), SetAxes(), setEphemerisTimePckPolyFunction(), setEphemerisTimePolyFunction(), setEphemerisTimePolyFunctionOverSpice(), SetPolynomial(), SpiceRotation(), toJ2000Partial(), and ToReferencePartial().
|
protected |
Axis of rotation for angle 3 of rotation.
Definition at line 440 of file SpiceRotation.h.
Referenced by DCJdt(), GetCenterAngles(), SetAxes(), setEphemerisTimePckPolyFunction(), setEphemerisTimePolyFunction(), setEphemerisTimePolyFunctionOverSpice(), SetPolynomial(), SpiceRotation(), toJ2000Partial(), and ToReferencePartial().
|
private |
The axis defined by the spacecraft vector for defining a nadir rotation.
Definition at line 463 of file SpiceRotation.h.
Referenced by setEphemerisTimeNadir(), and SpiceRotation().
|
private |
The axis defined by the velocity vector for defining a nadir rotation.
Definition at line 465 of file SpiceRotation.h.
Referenced by setEphemerisTimeNadir(), and SpiceRotation().
|
private |
Base time used in fit equations.
Definition at line 469 of file SpiceRotation.h.
Referenced by Cache(), ComputeBaseTime(), DCJdt(), DPolynomial(), EvaluatePolyFunction(), GetBaseTime(), setEphemerisTimePolyFunction(), SetPolynomial(), and SpiceRotation().
|
protected |
Cached rotations, stored as rotation matrix from J2000 to 1st constant frame (CJ) or coefficients of polynomial fit to rotation angles.
Definition at line 432 of file SpiceRotation.h.
Referenced by Cache(), IsCached(), LoadCache(), LoadTimeCache(), ReloadCache(), SetAngles(), setEphemerisTimeMemcache(), SetPolynomial(), and SpiceRotation().
|
private |
Cached angular velocities for corresponding rotactions in p_cache.
Definition at line 488 of file SpiceRotation.h.
Referenced by Cache(), LoadCache(), LoadTimeCache(), ReloadCache(), setEphemerisTimeMemcache(), setEphemerisTimePolyFunction(), and SpiceRotation().
|
protected |
iTime for corresponding rotation
Definition at line 431 of file SpiceRotation.h.
Referenced by Cache(), ComputeBaseTime(), LoadCache(), LoadTimeCache(), ReloadCache(), setEphemerisTimeMemcache(), SetPolynomial(), and SpiceRotation().
|
private |
Rotation matrix from J2000 to first constant rotation.
Definition at line 486 of file SpiceRotation.h.
Referenced by Angles(), ComputeAv(), Extrapolate(), J2000Vector(), LoadCache(), Matrix(), ReferenceVector(), ReloadCache(), SetAngles(), setEphemerisTimeMemcache(), setEphemerisTimeNadir(), setEphemerisTimePckPolyFunction(), setEphemerisTimePolyFunction(), setEphemerisTimePolyFunctionOverSpice(), SetTimeBasedMatrix(), SpiceRotation(), StateTJ(), TimeBasedMatrix(), and TimeBasedRotation().
|
private |
Coefficients defining functions fit to 3 pointing angles.
Definition at line 474 of file SpiceRotation.h.
Referenced by Cache(), DCJdt(), EvaluatePolyFunction(), GetPolynomial(), setEphemerisTimePolyFunction(), SetPolynomial(), SetPolynomialDegree(), and SpiceRotation().
|
private |
Chain of Naif frame codes in constant rotation TC.
The first entry will always be the target frame code
Definition at line 445 of file SpiceRotation.h.
Referenced by CacheLabel(), ConstantFrameChain(), Frame(), FrameTrace(), InitConstantRotation(), LoadCache(), LoadTimeCache(), setEphemerisTimeNadir(), SetFrame(), setFrameType(), and SpiceRotation().
|
protected |
Degree of fit polynomial for angles.
Definition at line 437 of file SpiceRotation.h.
Referenced by Cache(), DCJdt(), DPckPolynomial(), DPolynomial(), EvaluatePolyFunction(), ReloadCache(), setEphemerisTimePolyFunction(), SetPolynomial(), SetPolynomialDegree(), and SpiceRotation().
|
private |
Flag indicating whether or not a polynomial of degree p_degree has been created and used to fill the cache.
Definition at line 471 of file SpiceRotation.h.
Referenced by SetPolynomial(), SetPolynomialDegree(), SpiceRotation(), and usePckPolynomial().
|
private |
Current ephemeris time.
Definition at line 453 of file SpiceRotation.h.
Referenced by DCJdt(), DPckPolynomial(), DPolynomial(), EphemerisTime(), EvaluatePolyFunction(), Extrapolate(), ReloadCache(), SetAngles(), SetEphemerisTime(), setEphemerisTimeMemcache(), setEphemerisTimeNadir(), setEphemerisTimePckPolyFunction(), setEphemerisTimePolyFunction(), SetPolynomial(), and SpiceRotation().
|
private |
Initial requested ending time of cache.
Definition at line 481 of file SpiceRotation.h.
Referenced by CacheLabel(), GetCenterAngles(), GetFullCacheTime(), LoadCache(), LoadTimeCache(), SetFullCacheParameters(), and SpiceRotation().
|
private |
Initial requested cache size.
Definition at line 482 of file SpiceRotation.h.
Referenced by Cache(), CacheLabel(), GetFullCacheTime(), LoadCache(), LoadTimeCache(), ReloadCache(), SetFullCacheParameters(), SetPolynomialDegree(), and SpiceRotation().
|
private |
Initial requested starting time of cache.
Definition at line 480 of file SpiceRotation.h.
Referenced by CacheLabel(), GetCenterAngles(), GetFullCacheTime(), LoadCache(), LoadTimeCache(), SetFullCacheParameters(), and SpiceRotation().
|
private |
Flag indicating whether the rotation includes angular velocity.
Definition at line 491 of file SpiceRotation.h.
Referenced by Cache(), Extrapolate(), HasAngularVelocity(), J2000Vector(), LoadCache(), LoadTimeCache(), ReferenceVector(), ReloadCache(), setEphemerisTimeMemcache(), setEphemerisTimePolyFunction(), SpiceRotation(), and usePckPolynomial().
|
private |
Flag indicating p_TJ has been set.
Definition at line 457 of file SpiceRotation.h.
Referenced by SpiceRotation().
|
private |
Status of downsizing the cache (set to No to ignore)
Definition at line 479 of file SpiceRotation.h.
Referenced by Cache(), LoadCache(), LoadTimeCache(), MinimizeCache(), ReloadCache(), and SpiceRotation().
|
private |
Flag to compute base time;.
Definition at line 476 of file SpiceRotation.h.
Referenced by ComputeBaseTime(), SetOverrideBaseTime(), and SpiceRotation().
|
private |
Value set by caller to override computed base time.
Definition at line 477 of file SpiceRotation.h.
Referenced by ComputeBaseTime(), SetOverrideBaseTime(), and SpiceRotation().
|
private |
Value set by caller to override computed time scale.
Definition at line 478 of file SpiceRotation.h.
Referenced by ComputeBaseTime(), SetOverrideBaseTime(), and SpiceRotation().
|
private |
Quaternion for J2000 to reference rotation at et.
Definition at line 454 of file SpiceRotation.h.
Referenced by SpiceRotation().
|
private |
The source of the rotation data.
Definition at line 462 of file SpiceRotation.h.
Referenced by Cache(), ComputeAv(), GetSource(), LineCache(), LoadCache(), LoadTimeCache(), ReloadCache(), SetEphemerisTime(), SetPolynomial(), SetPolynomialDegree(), SetSource(), SpiceRotation(), and usePckPolynomial().
|
private |
For computing Nadir rotation only.
Definition at line 467 of file SpiceRotation.h.
Referenced by setEphemerisTimeNadir(), and SpiceRotation().
|
private |
Rotation matrix from first constant rotation (after all time-based rotations in frame chain from J2000 to target) to the target frame.
Definition at line 483 of file SpiceRotation.h.
Referenced by CacheLabel(), ConstantMatrix(), ConstantRotation(), InitConstantRotation(), J2000Vector(), LoadCache(), Matrix(), ReferenceVector(), SetConstantMatrix(), SpiceRotation(), StateTJ(), toJ2000Partial(), and ToReferencePartial().
|
private |
iTime bias when reading kernels
Definition at line 451 of file SpiceRotation.h.
Referenced by LoadTimeCache(), SetTimeBias(), and SpiceRotation().
|
private |
Chain of Naif frame codes in time-based rotation CJ.
The last entry will always be 1 (J2000 code)
Definition at line 448 of file SpiceRotation.h.
Referenced by CacheLabel(), InitConstantRotation(), LoadCache(), setEphemerisTimeNadir(), SpiceRotation(), and TimeFrameChain().
|
private |
Time scale used in fit equations.
Definition at line 470 of file SpiceRotation.h.
Referenced by Cache(), ComputeBaseTime(), DCJdt(), DPolynomial(), EvaluatePolyFunction(), GetTimeScale(), setEphemerisTimePolyFunction(), SetPolynomial(), and SpiceRotation().