20 #include "CubeManager.h"
54 demCubeFile = (QString) kernels[
"ElevationModel"];
57 demCubeFile = (QString) kernels[
"ShapeModel"];
130 vector<double> lookDirection) {
138 static const int maxit = 100;
140 double dX, dY, dZ, dist2;
148 SpiceDouble currentIntersectPt[3];
149 SpiceDouble newIntersectPt[3];
157 double tol2 = tol * tol;
171 double t = newIntersectPt[0] * newIntersectPt[0] +
172 newIntersectPt[1] * newIntersectPt[1];
174 latDD = atan2(newIntersectPt[2], sqrt(t)) *
RAD2DEG;
175 lonDD = atan2(newIntersectPt[1], newIntersectPt[0]) *
RAD2DEG;
192 memcpy(currentIntersectPt, newIntersectPt, 3 *
sizeof(
double));
196 surfpt_c((SpiceDouble *) &observerPos[0], &lookDirection[0], r, r, r, newIntersectPt,
197 (SpiceBoolean*) &status);
203 dX = currentIntersectPt[0] - newIntersectPt[0];
204 dY = currentIntersectPt[1] - newIntersectPt[1];
205 dZ = currentIntersectPt[2] - newIntersectPt[2];
206 dist2 = (dX*dX + dY*dY + dZ*dZ) * 1000 * 1000;
297 double topMinusBottom[3];
298 vsub_c(neighborPoints[0], neighborPoints[1], topMinusBottom);
299 double rightMinusLeft[3];
300 vsub_c(neighborPoints[3], neighborPoints [2], rightMinusLeft);
303 std::vector<SpiceDouble>
normal(3);
304 ucrss_c(topMinusBottom, rightMinusLeft, (SpiceDouble *) &normal[0]);
308 unorm_c((SpiceDouble *) &normal[0], (SpiceDouble *) &normal[0], &mag);
325 double centerLookVect[3];
328 unorm_c(pB, centerLookVect, &mag);
329 double dotprod = vdot_c((SpiceDouble *) &normal[0], centerLookVect);
331 vminus_c((SpiceDouble *) &normal[0], (SpiceDouble *) &normal[0]);