Commit 2d4be773 authored by Jeannie Backer's avatar Jeannie Backer
Browse files

Updated from trunk

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6314 41f8697f-d340-4b68-9986-7bafba869bb8
parent 024f31fc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#include "PolynomialUnivariate.h"
#include "IString.h"
#include "IException.h"

#include "NaifStatus.h"

namespace Isis {
  /**
@@ -306,9 +306,11 @@ namespace Isis {

    std::vector<double> TC(9);

    NaifStatus::CheckErrors();
    eul2m_c((SpiceDouble) 0., (SpiceDouble) angle2, (SpiceDouble) angle1,
            3,                    2,                    1,
            (SpiceDouble( *) [3]) &TC[0]);
    NaifStatus::CheckErrors();

    return (TC);
  }
+2 −0
Original line number Diff line number Diff line
@@ -56,6 +56,8 @@ namespace Isis {
   *           added on each end should be the start and end time of the
   *           observation.  The added points are linearly interpolated from
   *           the beginning and final 2 points of input data.
   *  @history 2015-07-31 Kristin Berry Added NaifStatus::CheckErrors() to see if any NAIF errors
   *           were signaled. References #2248.
   */
  class PixelOffset {
    public:
+5 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ namespace Isis {

 void CkKernelWriter::open(const QString &kfile,
                           const QString &intCkName) {
   NaifStatus::CheckErrors();
   FileName kf(kfile);
   if ( kf.fileExists() ) {
     QString full_kf = kf.expanded();
@@ -99,6 +100,8 @@ namespace Isis {
   SpiceInt  myHandle;
   ckopn_c(kf.expanded().toAscii().data(), intCkName.toAscii().data(), _comSize, &myHandle);
   _handle = myHandle;

   NaifStatus::CheckErrors();
   return;
 }

@@ -164,7 +167,9 @@ namespace Isis {
 /** Close an opened kernel file */
 void CkKernelWriter::close() {
   if ( _handle != 0 ) {
     NaifStatus::CheckErrors();
     ckcls_c(_handle);
     NaifStatus::CheckErrors();
     _handle = 0;
   }
   return;
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ class SpiceSegment;
 * @author 2010-11-25 Kris Becker
 *
 * @internal 
 *     @history 2015-07-21 Kristin Berry - Added NaifStatus::CheckErrors() to see if any NAIF errors
 *                         were signaled. References #2248.
 */
class CkKernelWriter {
  public:
+20 −0
Original line number Diff line number Diff line
@@ -436,7 +436,9 @@ bool SpiceSegment::getFrameChains(Table &table, const int &leftBase,

QString SpiceSegment::getFrameName(int frameid) const {
  SpiceChar frameBuf[40];
  NaifStatus::CheckErrors();
  frmnam_c ( (SpiceInt) frameid, sizeof(frameBuf), frameBuf);
  NaifStatus::CheckErrors();
  return (QString(frameBuf));
}

@@ -548,7 +550,9 @@ SpiceSegment::SMatrix SpiceSegment::computeChainRotation(
     QString CtoId = getFrameName(toId);
//     cout << "FromFrame: " << CfromId << ", ToFrame: " << CtoId << "\n";
     SMatrix left = computeStateRotation(CtoId, CfromId, etTime);
     NaifStatus::CheckErrors();
     mxmg_c(left[0], state[0], 6, 6, 6, state[0]);
     NaifStatus::CheckErrors();
     toId = fromId;
   }
  }
@@ -615,6 +619,7 @@ SpiceSegment::SVector SpiceSegment::convertTimes(
                                          int sclkCode,
                                          const SpiceSegment::SVector &etTimes
                                                ) {
  NaifStatus::CheckErrors();
  SVector sclks(size(etTimes));
  for ( int i  = 0 ; i < size(etTimes) ; i++ ) {
    sce2c_c(sclkCode, etTimes[i], &sclks[i]);
@@ -629,6 +634,7 @@ SpiceSegment::SVector SpiceSegment::convertTimes(
  _utcStartTime = toUTC(startTime());
  _utcEndTime   = toUTC(endTime());

  NaifStatus::CheckErrors();
  return (sclks);
}

@@ -659,6 +665,7 @@ void SpiceSegment::convert(const SpiceSegment::SMatrix &quats,
      avOut = ckAvvs[i];
    }

    NaifStatus::CheckErrors();
    // Convert quaternion to rotation and then to state matrix
    q2m_c(quats[i], m);
    rav2xf_c(m, avIn, xform);
@@ -670,6 +677,7 @@ void SpiceSegment::convert(const SpiceSegment::SMatrix &quats,
    // Transform to output format
    xf2rav_c(xform, m, avOut);  // Transfers AV to output ckAvvs
    m2q_c(m, ckQuats[i]);       // Transfers quaternion
    NaifStatus::CheckErrors();
  }
  return;
}
@@ -866,20 +874,32 @@ SpiceSegment::SVector SpiceSegment::expand(int ntop, int nbot,

double SpiceSegment::SCLKtoET(SpiceInt scCode, double sclk) const {
  SpiceDouble et;

  NaifStatus::CheckErrors();
  sct2e_c(scCode, sclk, &et);
  NaifStatus::CheckErrors();

  return (et);
}

double SpiceSegment::ETtoSCLK(SpiceInt scCode, double et) const {
  SpiceDouble sclk;

  NaifStatus::CheckErrors();
  sce2c_c(scCode, et, &sclk);
  NaifStatus::CheckErrors();

  return (sclk);
}

QString SpiceSegment::toUTC(const double &et) const {
  const int UTCLEN = 80;
  char utcout[UTCLEN];

  NaifStatus::CheckErrors();
  et2utc_c(et, "ISOC", 3, UTCLEN, utcout);
  NaifStatus::CheckErrors();

  return (QString(utcout));
}

Loading