Isis Developer Reference
Isis::LightTimeCorrectionState Class Reference

Provides interface to user configurable Light Time correction feature. More...

#include <LightTimeCorrectionState.h>

Collaboration diagram for Isis::LightTimeCorrectionState:
Collaboration graph

Public Member Functions

 LightTimeCorrectionState ()
 Default constructor sets default state of light time corrections.
 
 LightTimeCorrectionState (int ikCode, Spice *spice)
 Constructor that gathers state of light time correction.
 
virtual ~LightTimeCorrectionState ()
 
bool operator== (const LightTimeCorrectionState &state) const
 Compare two instances of the LightTimeCorrectionState objects.
 
bool checkAberrationCorrection (int ikCode, Spice *spice)
 Apply instrument (team) specific light time/stellar aborration option.
 
void setAberrationCorrection (const QString &correction)
 Sets the aberration correction directly.
 
QString getAberrationCorrection () const
 Returns the value of the current stellar aberration state.
 
bool checkSpkKernelsForAberrationCorrection ()
 Check for light time/stellar aberration tag in SPK comments.
 
bool isLightTimeCorrected () const
 Is light time to target corrected?
 
bool checkObserverTargetSwap (int ikCode, Spice *spice)
 Check status of target/observer swap specification.
 
bool isObserverTargetSwapped () const
 Returns state swap observer/target

 
void setSwapObserverTarget ()
 Turns on swapping of observer/target

 
void setNoSwapObserverTarget ()
 Turns off swapping of observer/target (default)
 
bool checkLightTimeToSurfaceCorrect (int ikCode, Spice *spice)
 Determines state of surface to s/c light time correction.
 
bool isLightTimeToSurfaceCorrected () const
 Returns state of light time from surface to center body correction.
 
void setCorrectLightTimeToSurface ()
 Sets state of light time from surface to center body for orrection.
 
void setNoCorrectLightTimeToSurface ()
 Disables state of light time from surface to center body for correction.
 

Detailed Description

Provides interface to user configurable Light Time correction feature.

This class provides a comprehensive container for the state of the observer/target swapping to correct a long term issue that applied the wrong order of observer/target to the NAIF spkez_c/spkezp_c routines that provide body state vectors.

In addition, it also contains parameters that provide determination of the type and extent of stellar aberration and light time correction to the surface of the target body. This is a recent addition to address accuracy issues in determining these vectors.

See also
Spice
SpacecraftPosition
SpicePosition
Author
2012-10-11 Kris Becker

Constructor & Destructor Documentation

◆ LightTimeCorrectionState() [1/2]

Isis::LightTimeCorrectionState::LightTimeCorrectionState ( )

Default constructor sets default state of light time corrections.

The default state of the stellar aberration correction, swap of observer/target and correction of light time to the surface of a target body are set here. The current state of these conditions are set to preserve preexisting behavior.

Initial state of these conditions are "LT+S" for stellar aberration, false for observer/target swap and no light time to surface correction.

Author
2012-10-28 Kris Becker

◆ LightTimeCorrectionState() [2/2]

Isis::LightTimeCorrectionState::LightTimeCorrectionState ( int ikCode,
Spice * spice )

Constructor that gathers state of light time correction.

This constructor checks observer/target swap and light time correction states for an instrument indicated by the ikCode parameter (assumed to be a valid NAIF instrument code). The Spice object is required so these values are properly recorded (in the label) for subsequent use.

Author
2012-10-11 Kris Becker
Parameters
ikCodeNAIF code for instrument
spiceSpice object associated with geometry

References checkAberrationCorrection(), checkLightTimeToSurfaceCorrect(), and checkObserverTargetSwap().

◆ ~LightTimeCorrectionState()

virtual Isis::LightTimeCorrectionState::~LightTimeCorrectionState ( )
inlinevirtual

Member Function Documentation

◆ checkAberrationCorrection()

bool Isis::LightTimeCorrectionState::checkAberrationCorrection ( int ikCode,
Spice * spice )

Apply instrument (team) specific light time/stellar aborration option.

This method checks for the value of the INS-XXXXXX_LIGHTTIME_CORRECTION kernel pool keyword to determine the value (if specified) of the light time and stellar aborration correction parameter provided to NAIF routines.

Author
2012-10-09 Kris Becker
Parameters
ikCodeInstrument code to check for keyword specification of correction
spiceSpice class is required in order to check kernel pool for keywords
Returns
bool True if a value was found and applied

References Isis::Spice::getString(), and Isis::toString().

Referenced by LightTimeCorrectionState().

◆ checkLightTimeToSurfaceCorrect()

bool Isis::LightTimeCorrectionState::checkLightTimeToSurfaceCorrect ( int ikCode,
Spice * spice )

Determines state of surface to s/c light time correction.

This state specifies the radius of the target is to be taken into consideraton when correcting for the time it takes light to travel from surface to center of target body.

This method checks for the value of the INS-XXXXXX_LT_SURFACE_CORRECT kernel pool keyword to determine if correction adjustments for light time from surface to center body are to be applied in the SpicePosition class.

Author
2012-10-28 Kris Becker
Parameters
ikCodeCode of instrument to check for
spiceSpice instance to interface virtual NAIF kernel pool
Returns
bool State of light time from surface to center body correction as determined.

References Isis::Spice::getString(), and Isis::toString().

Referenced by LightTimeCorrectionState().

◆ checkObserverTargetSwap()

bool Isis::LightTimeCorrectionState::checkObserverTargetSwap ( int ikCode,
Spice * spice )

Check status of target/observer swap specification.

This method checks for the value of the INS-XXXXXX_SWAP_OBSERVER_TARGET kernel pool keyword to determine if a swap of the observer/target order in the SpicePosition class is requested/needed by the instrument specified by the ikCode parameter (this is assumed to be a valid NAIF instrument code).

A values of TRUE will result in the switch of the order of the target and observer codes in the SpicePosition constructor.

Author
2012-10-05 Kris Becker
Parameters
ikCodeInstrument code to check for
spiceSpice class is required in order to check kernel pool for keywords
Returns
true if swap of observer/target is requested via kernel pool variables

References Isis::Spice::getString(), and Isis::toString().

Referenced by LightTimeCorrectionState().

◆ checkSpkKernelsForAberrationCorrection()

bool Isis::LightTimeCorrectionState::checkSpkKernelsForAberrationCorrection ( )

Check for light time/stellar aberration tag in SPK comments.

This function will search through all SPK kernel file comments section looking for a specified tag called "ID:USGS_SPK_ABCORR". If the tag is found in any of the loaded SPK files, then true is returned. This is intended to indicate that the light time and stellar aberration correction option needs to be overridden when querying NAIF position states.

This tag is generated by the spkwriter application when recording new SPK kernels from ISIS corrected SPICE tables. The SPKs generated from that application has had all the light time correction states incorporated so we must ensure that if such kernels are loaded, no corrections are applied.

Note that this routine is reentrant and can be called multiple times from multiple sources to make this determination.

Returns
bool Returns true if the tag is found anywhere in the comments section of the SPK, otherwise false if it is not found. When false, the existing value is retained.

References Isis::NaifStatus::CheckErrors(), Isis::Kernels::Discover(), and Isis::Kernels::getKernelList().

◆ getAberrationCorrection()

QString Isis::LightTimeCorrectionState::getAberrationCorrection ( ) const

Returns the value of the current stellar aberration state.

Author
Kris Becker - 10/28/2012
Returns
QString Value of correction

Referenced by Isis::SpacecraftPosition::GetAberrationCorrection(), and operator==().

◆ isLightTimeCorrected()

bool Isis::LightTimeCorrectionState::isLightTimeCorrected ( ) const

Is light time to target corrected?

Referenced by Isis::SpacecraftPosition::SetEphemerisTimeSpice().

◆ isLightTimeToSurfaceCorrected()

bool Isis::LightTimeCorrectionState::isLightTimeToSurfaceCorrected ( ) const

Returns state of light time from surface to center body correction.

Referenced by operator==(), and Isis::SpacecraftPosition::SetEphemerisTimeSpice().

◆ isObserverTargetSwapped()

bool Isis::LightTimeCorrectionState::isObserverTargetSwapped ( ) const

Returns state swap observer/target

Referenced by operator==().

◆ operator==()

bool Isis::LightTimeCorrectionState::operator== ( const LightTimeCorrectionState & state) const

Compare two instances of the LightTimeCorrectionState objects.

Author
Kris Becker - 10/28/2012
Parameters
stateOther state to compare to
Returns
bool false if all values aren't the same, true otherwise.

References getAberrationCorrection(), isLightTimeToSurfaceCorrected(), and isObserverTargetSwapped().

◆ setAberrationCorrection()

void Isis::LightTimeCorrectionState::setAberrationCorrection ( const QString & correction)

Sets the aberration correction directly.

Provides programmer direct setting of this value. This is typically required by camera models that fix this value for a specific reason.

Author
2012-10-28 Kris Becker
Parameters
correctionUser specified abcorr correction option as defined by the NAIF routine found at http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkez_c.html.

Referenced by Isis::SpacecraftPosition::SetAberrationCorrection().

◆ setCorrectLightTimeToSurface()

void Isis::LightTimeCorrectionState::setCorrectLightTimeToSurface ( )

Sets state of light time from surface to center body for orrection.

◆ setNoCorrectLightTimeToSurface()

void Isis::LightTimeCorrectionState::setNoCorrectLightTimeToSurface ( )

Disables state of light time from surface to center body for correction.

◆ setNoSwapObserverTarget()

void Isis::LightTimeCorrectionState::setNoSwapObserverTarget ( )

Turns off swapping of observer/target (default)

◆ setSwapObserverTarget()

void Isis::LightTimeCorrectionState::setSwapObserverTarget ( )

Turns on swapping of observer/target


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