Isis 3 Programmer Reference
|
Provides interface to user configurable Light Time correction feature. More...
#include <LightTimeCorrectionState.h>
Public Member Functions | |
LightTimeCorrectionState () | |
Default constructor sets default state of light time corrections. More... | |
LightTimeCorrectionState (int ikCode, Spice *spice) | |
Constructor that gathers state of light time correction. More... | |
bool | operator== (const LightTimeCorrectionState &state) const |
Compare two instances of the LightTimeCorrectionState objects. More... | |
bool | checkAberrationCorrection (int ikCode, Spice *spice) |
Apply instrument (team) specific light time/stellar aborration option. More... | |
void | setAberrationCorrection (const QString &correction) |
Sets the aberration correction directly. More... | |
QString | getAberrationCorrection () const |
Returns the value of the current stellar aberration state. More... | |
bool | checkSpkKernelsForAberrationCorrection () |
Check for light time/stellar aberration tag in SPK comments. More... | |
bool | isLightTimeCorrected () const |
Is light time to target corrected? More... | |
bool | checkObserverTargetSwap (int ikCode, Spice *spice) |
Check status of target/observer swap specification. More... | |
bool | isObserverTargetSwapped () const |
Returns state swap observer/target. More... | |
void | setSwapObserverTarget () |
Turns on swapping of observer/target. More... | |
void | setNoSwapObserverTarget () |
Turns off swapping of observer/target (default) More... | |
bool | checkLightTimeToSurfaceCorrect (int ikCode, Spice *spice) |
Determines state of surface to s/c light time correction. More... | |
bool | isLightTimeToSurfaceCorrected () const |
Returns state of light time from surface to center body correction. More... | |
void | setCorrectLightTimeToSurface () |
Sets state of light time from surface to center body for orrection. More... | |
void | setNoCorrectLightTimeToSurface () |
Disables state of light time from surface to center body for correction. More... | |
Private Member Functions | |
void | setDefaultState () |
Set default conditions for light time correction state. More... | |
Private Attributes | |
QString | m_abcorr |
bool | m_swapObserverTarget |
bool | m_sc_to_surf_ltcorr |
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.
2012-10-31 Kris Becker - New class iprovides support for swapping of observer/target and light time correction to surface. Fixes (mostly) #0909, #1136 and #1223.
2012-11-01 Kris Becker - Fixed isLightTimeCorrected() as it was returning exactly opposite what it should be. References #1136.
2012-12-04 Kris Becker - Corrected documentation
2015-07-21 Kristin Berry - Added NaifStatus::CheckErrors() to see if any NAIF errors were signaled. References #2248.
Definition at line 62 of file LightTimeCorrectionState.h.
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.
Definition at line 57 of file LightTimeCorrectionState.cpp.
References setDefaultState().
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.
ikCode | NAIF code for instrument |
spice | Spice object associated with geometry |
Definition at line 75 of file LightTimeCorrectionState.cpp.
References checkAberrationCorrection(), checkLightTimeToSurfaceCorrect(), checkObserverTargetSwap(), and setDefaultState().
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.
ikCode | Instrument code to check for keyword specification of correction |
spice | Spice class is required in order to check kernel pool for keywords |
Definition at line 122 of file LightTimeCorrectionState.cpp.
References Isis::Spice::getString(), and Isis::toString().
Referenced by LightTimeCorrectionState().
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.
ikCode | Code of instrument to check for |
spice | Spice instance to interface virtual NAIF kernel pool |
Definition at line 321 of file LightTimeCorrectionState.cpp.
References Isis::Spice::getString(), and Isis::toString().
Referenced by LightTimeCorrectionState().
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.
ikCode | Instrument code to check for |
spice | Spice class is required in order to check kernel pool for keywords |
Definition at line 269 of file LightTimeCorrectionState.cpp.
References Isis::Spice::getString(), and Isis::toString().
Referenced by LightTimeCorrectionState().
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.
Definition at line 188 of file LightTimeCorrectionState.cpp.
References Isis::NaifStatus::CheckErrors(), Isis::Kernels::Discover(), and Isis::Kernels::getKernelList().
Referenced by Isis::Spice::init().
QString Isis::LightTimeCorrectionState::getAberrationCorrection | ( | ) | const |
Returns the value of the current stellar aberration state.
Definition at line 162 of file LightTimeCorrectionState.cpp.
Referenced by Isis::SpacecraftPosition::GetAberrationCorrection(), and operator==().
bool Isis::LightTimeCorrectionState::isLightTimeCorrected | ( | ) | const |
Is light time to target corrected?
Definition at line 245 of file LightTimeCorrectionState.cpp.
Referenced by Isis::SpacecraftPosition::SetEphemerisTimeSpice().
bool Isis::LightTimeCorrectionState::isLightTimeToSurfaceCorrected | ( | ) | const |
Returns state of light time from surface to center body correction.
Definition at line 338 of file LightTimeCorrectionState.cpp.
Referenced by operator==(), and Isis::SpacecraftPosition::SetEphemerisTimeSpice().
bool Isis::LightTimeCorrectionState::isObserverTargetSwapped | ( | ) | const |
Returns state swap observer/target.
Definition at line 287 of file LightTimeCorrectionState.cpp.
Referenced by operator==().
bool Isis::LightTimeCorrectionState::operator== | ( | const LightTimeCorrectionState & | state | ) | const |
Compare two instances of the LightTimeCorrectionState objects.
state | Other state to compare to |
Definition at line 93 of file LightTimeCorrectionState.cpp.
References getAberrationCorrection(), isLightTimeToSurfaceCorrected(), and isObserverTargetSwapped().
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.
correction | User 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. |
Definition at line 149 of file LightTimeCorrectionState.cpp.
Referenced by Isis::SpacecraftPosition::SetAberrationCorrection().
void Isis::LightTimeCorrectionState::setCorrectLightTimeToSurface | ( | ) |
Sets state of light time from surface to center body for orrection.
Definition at line 343 of file LightTimeCorrectionState.cpp.
|
private |
Set default conditions for light time correction state.
This method sets the default conditions for light time correction. See the default constructor for full description.
Default preserves existing behavior at the time of this implementation.
Definition at line 364 of file LightTimeCorrectionState.cpp.
Referenced by LightTimeCorrectionState().
void Isis::LightTimeCorrectionState::setNoCorrectLightTimeToSurface | ( | ) |
Disables state of light time from surface to center body for correction.
Definition at line 349 of file LightTimeCorrectionState.cpp.
void Isis::LightTimeCorrectionState::setNoSwapObserverTarget | ( | ) |
Turns off swapping of observer/target (default)
Definition at line 297 of file LightTimeCorrectionState.cpp.
void Isis::LightTimeCorrectionState::setSwapObserverTarget | ( | ) |
Turns on swapping of observer/target.
Definition at line 292 of file LightTimeCorrectionState.cpp.