Isis 3 Developer 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... | |
virtual | ~LightTimeCorrectionState () |
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... | |
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.
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.
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 |
References checkAberrationCorrection(), checkLightTimeToSurfaceCorrect(), and checkObserverTargetSwap().
|
inlinevirtual |
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 |
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 |
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 |
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.
References Isis::NaifStatus::CheckErrors(), Isis::Kernels::Discover(), and Isis::Kernels::getKernelList().
QString Isis::LightTimeCorrectionState::getAberrationCorrection | ( | ) | const |
Returns the value of the current stellar aberration state.
Referenced by Isis::SpacecraftPosition::GetAberrationCorrection(), and operator==().
bool Isis::LightTimeCorrectionState::isLightTimeCorrected | ( | ) | const |
Is light time to target corrected?
Referenced by Isis::SpacecraftPosition::SetEphemerisTimeSpice().
bool Isis::LightTimeCorrectionState::isLightTimeToSurfaceCorrected | ( | ) | const |
Returns state of light time from surface to center body correction.
Referenced by operator==(), and Isis::SpacecraftPosition::SetEphemerisTimeSpice().
bool Isis::LightTimeCorrectionState::isObserverTargetSwapped | ( | ) | const |
Returns state swap observer/target.
Referenced by operator==().
bool Isis::LightTimeCorrectionState::operator== | ( | const LightTimeCorrectionState & | state | ) | const |
Compare two instances of the LightTimeCorrectionState objects.
state | Other state to compare to |
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. |
Referenced by Isis::SpacecraftPosition::SetAberrationCorrection().
void Isis::LightTimeCorrectionState::setCorrectLightTimeToSurface | ( | ) |
Sets state of light time from surface to center body for orrection.
void Isis::LightTimeCorrectionState::setNoCorrectLightTimeToSurface | ( | ) |
Disables state of light time from surface to center body for correction.
void Isis::LightTimeCorrectionState::setNoSwapObserverTarget | ( | ) |
Turns off swapping of observer/target (default)
void Isis::LightTimeCorrectionState::setSwapObserverTarget | ( | ) |
Turns on swapping of observer/target.