Commit 4675035b authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Changed ocams model to only override the IK code with the polycam focus ID for polycam images.

parent 9a854dbc
Loading
Loading
Loading
Loading
+33 −31
Original line number Diff line number Diff line
@@ -49,6 +49,9 @@ namespace Isis {
    m_spacecraftNameLong = "OSIRIS-REx";
    m_spacecraftNameShort = "OSIRIS-REx";

    Pvl &lab = *cube.label();
    PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse);

    // The general IK code will be used to retrieve the transx,
    // transy, transs and transl from the iak. The focus position specific
    // IK code will be used to find pixel pitch and ccd center in the ik.
@@ -65,6 +68,12 @@ namespace Isis {
    else if (frameCode == -64360) {
      m_instrumentNameLong = "PolyMath Camera";
      m_instrumentNameShort = "PolyCam";
      if (inst.hasKeyword("PolyCamFocusPositionNaifId")) {
        if (QString::compare("NONE", inst["PolyCamFocusPositionNaifId"],
                             Qt::CaseInsensitive) != 0) {
          frameCode == inst["PolyCamFocusPositionNaifId"][0].toInt();
        }
      }
    }
    else {
      QString msg = "Unable to construct OSIRIS-REx camera model. "
@@ -72,14 +81,7 @@ namespace Isis {
      throw IException(IException::User, msg, _FILEINFO_);
    }

    Pvl &lab = *cube.label();
    PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse);
    QString ikCode = toString(frameCode);
    if (inst.hasKeyword("PolyCamFocusPositionNaifId")) {
      if (QString::compare("NONE", inst["PolyCamFocusPositionNaifId"], Qt::CaseInsensitive) != 0) {
        ikCode = inst["PolyCamFocusPositionNaifId"][0];
      }
    }

    QString focalLength = "INS" + ikCode + "_FOCAL_LENGTH";
    SetFocalLength(getDouble(focalLength));
+9 −7
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@ namespace Isis {
   *                           the Instrument group for focus position specific values (such ase
   *                           focal length) and we read NaifFrameId from the Kernels group the
   *                           instrument frame code. Fixes #5127
   *   @history 2018-03-27 Jesse Mapel - Changed to only replace the IK code with the PolyCam focus
   *                                     setting ID if the image is a PolyCam image. Fixes #5213.
   *
   */
  class OsirisRexOcamsCamera : public FramingCamera {