Skip to content
Snippets Groups Projects
Unverified Commit 24ac6f74 authored by Kelvin Rodriguez's avatar Kelvin Rodriguez Committed by GitHub
Browse files

ctxcal now uses cam (#4304)

* ctxcal now uses cam

* added checkerror calls

* removed some check status

* import NaifStatus
parent f44ca6bd
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,8 @@ find files of those names at the top level of this repository. **/ ...@@ -15,6 +15,8 @@ find files of those names at the top level of this repository. **/
#include "LineManager.h" #include "LineManager.h"
#include "Brick.h" #include "Brick.h"
#include "Table.h" #include "Table.h"
#include "Camera.h"
#include "NaifStatus.h"
using namespace std; using namespace std;
using namespace Isis; using namespace Isis;
...@@ -139,20 +141,39 @@ void IsisMain() { ...@@ -139,20 +141,39 @@ void IsisMain() {
// iof = conversion factor from counts/ms to i/f // iof = conversion factor from counts/ms to i/f
bool convertIOF = ui.GetBoolean("IOF"); bool convertIOF = ui.GetBoolean("IOF");
if(convertIOF) { if(convertIOF) {
double dist1 = 1;
try {
Camera *cam;
cam = icube->camera();
cam->setTime(startTime);
dist1 = cam->sunToBodyDist();
}
catch(IException &e) {
// Get the distance between Mars and the Sun at the given time in // Get the distance between Mars and the Sun at the given time in
// Astronomical Units (AU) // Astronomical Units (AU)
QString bspKernel = p.MissionData("base", "/kernels/spk/de???.bsp", true); QString bspKernel = p.MissionData("base", "/kernels/spk/de???.bsp", true);
NaifStatus::CheckErrors();
furnsh_c(bspKernel.toLatin1().data()); furnsh_c(bspKernel.toLatin1().data());
NaifStatus::CheckErrors();
QString satKernel = p.MissionData("base", "/kernels/spk/mar???.bsp", true); QString satKernel = p.MissionData("base", "/kernels/spk/mar???.bsp", true);
furnsh_c(satKernel.toLatin1().data()); furnsh_c(satKernel.toLatin1().data());
NaifStatus::CheckErrors();
QString pckKernel = p.MissionData("base", "/kernels/pck/pck?????.tpc", true); QString pckKernel = p.MissionData("base", "/kernels/pck/pck?????.tpc", true);
furnsh_c(pckKernel.toLatin1().data()); furnsh_c(pckKernel.toLatin1().data());
NaifStatus::CheckErrors();
double sunpos[6], lt; double sunpos[6], lt;
spkezr_c("sun", etStart, "iau_mars", "LT+S", "mars", sunpos, &lt); spkezr_c("sun", etStart, "iau_mars", "LT+S", "mars", sunpos, &lt);
double dist1 = vnorm_c(sunpos); NaifStatus::CheckErrors();
dist1 = vnorm_c(sunpos);
NaifStatus::CheckErrors();
unload_c(bspKernel.toLatin1().data()); unload_c(bspKernel.toLatin1().data());
unload_c(satKernel.toLatin1().data()); unload_c(satKernel.toLatin1().data());
unload_c(pckKernel.toLatin1().data()); unload_c(pckKernel.toLatin1().data());
NaifStatus::CheckErrors();
}
double dist = 2.07E8; double dist = 2.07E8;
double w0 = 3660.5; double w0 = 3660.5;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment