75 QString stime = (QString) inst [
"NativeStartTime"];
76 QString intTime = stime.split(
".").first();
77 stime = stime.split(
".").last();
91 QString sampMode = QString((QString)inst [
"SamplingMode"]).toUpper();
94 int sampOffset = inst [
"XOffset"];
95 int lineOffset = inst [
"ZOffset"];
102 if (sampMode ==
"NORMAL") {
109 else if (sampMode ==
"HI-RES") {
119 string msg =
"Unsupported SamplingMode [" +
IString(sampMode) +
"]";
124 if (sampMode ==
"NORMAL") {
130 else if (sampMode ==
"HI-RES") {
139 string msg =
"Unsupported SamplingMode [" +
IString(sampMode) +
"]";
147 p_raMap[line][samp] = Isis::NULL8;
242 SpiceDouble lookC[3];
245 SpiceDouble unitLookC[3];
246 vhat_c(lookC, unitLookC);
259 if(ra < p_minRa || ra >
p_maxRa ||
264 double minDist = 9999.;
271 double mapRa =
p_raMap[line][samp];
272 if(mapRa == Isis::NULL8)
continue;
273 double mapDec =
p_decMap[line][samp];
274 if(mapDec == Isis::NULL8)
continue;
278 if(abs(mapRa - ra) > 180) {
279 if((ra - mapRa) > 0) {
280 mapRa = 360. + mapRa;
282 else if((ra - mapRa) < 0) {
283 mapRa = mapRa - 360.;
286 double dist = ((ra - mapRa) * (ra - mapRa)) +
287 ((dec - mapDec) * (dec - mapDec));
301 if(minDist >= 9999.)
return false;
312 vector<double> known(2);
314 for(
int line = minLine - 1; line < minLine + 2; line++) {
316 for(
int samp = minSamp - 1; samp < minSamp + 2; samp++) {
320 double mapRa =
p_raMap[line][samp];
321 double mapDec =
p_decMap[line][samp];
322 if((mapRa == Isis::NULL8) || (mapDec == Isis::NULL8))
continue;
327 if(abs(mapRa - ra) > 180) {
328 if((ra - mapRa) > 0) {
329 mapRa = 360. + mapRa;
331 else if((ra - mapRa) < 0) {
332 mapRa = mapRa - 360.;
342 if(sampLsq.
Knowns() < 3)
return false;
350 double inSamp = sampLsq.
Evaluate(known);
351 double inLine = lineLsq.
Evaluate(known);
391 v[0] = sin(theta) * cos(phi);
393 v[2] = sin(theta) * sin(phi) / -1.;
double RightAscension()
Returns the right ascension angle (sky longitude).
void LookDirection(double v[3])
Determines the look direction in the camera coordinate system.
double p_decMap[64][64]
Declination map.
double p_focalPlaneY
Undistorted y value for the focal plane.
double p_minRa
Minimum right ascension.
double p_maxDec
Maximum declination.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
virtual bool SetFocalPlane(const double ux, const double uy, const double uz)
Compute ground position from focal plane coordinate.
SpiceDouble p_etStart
Start ephemeris time.
int Knowns() const
The number of knowns (or times AddKnown was invoked) linear combination of the variables.
const double HALFPI
The mathematical constant PI/2.
Nth degree Polynomial with two variables.
double p_uy
Distorted focal plane y, in millimeters.
Namespace for the standard library.
double p_yPixSize
Y pixel size.
double p_interlineDelay
InterlineDelayDuration keyword value from the instrument group of the labels, divided by 1000...
virtual bool SetSky(const double ra, const double dec)
Sets the sky position to the given ra and dec.
bool SetLookDirection(const double v[3])
Sets the look direction of the spacecraft.
double toDouble(const QString &string)
Global function to convert from a string to a double.
This error is for when a programmer made an API call that was illegal.
int ParentLines() const
Returns the number of lines in the parent alphacube.
int p_swathLength
SwathLength keyword value from the instrument group of the labels.
bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
double Evaluate(const std::vector< double > &input)
Invokes the BasisFunction Evaluate method.
int p_swathWidth
SwathWidth keyword value from the instrument group of the labels.
double p_maxRa
Maximum right ascension.
double p_yBore
Y boresight.
int p_camSampOffset
Sample offset.
Contains multiple PvlContainers.
double p_raMap[64][64]
Right ascension map.
#define _FILEINFO_
Macro for the filename and line number.
iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
double p_xBore
X boresight.
int ParentSamples() const
Returns the number of samples in the parent alphacube.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
double p_visExp
VIS exposure duration, divided by 1000.
Generic least square fitting class.
double p_ux
Distorted focal plane x, in millimeters.
Container for cube-like labels.
void Init(Pvl &lab)
Initialize vims sky model.
void AddKnown(const std::vector< double > &input, double expected, double weight=1.0)
Invoke this method for each set of knowns.
QString p_channel
Channel keyword value from the instrument group of the labels.
double p_focalPlaneX
Undistorted x value for the focal plane.
double p_minDec
Minimum declination.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.
Convert between undistorted focal plane and ra/dec coordinates.
Camera * p_camera
The main camera to calculate distortions on.
void IgnoreProjection(bool ignore)
Set whether or not the camera should ignore the Projection.
double p_xPixSize
X pixel size.
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
int Solve(Isis::LeastSquares::SolveMethod method=SVD)
After all the data has been registered through AddKnown, invoke this method to solve the system of eq...
double p_irExp
IR exposure duration, divided by 1000.
double p_uz
Distorted focal plane z, in millimeters.
int p_camLineOffset
Line offset.
double Declination()
Returns the declination angle (sky latitude).