Commit 32ebf6f3 authored by Ian Humphrey's avatar Ian Humphrey
Browse files

PROG Removed code redundancies with spacecraft and instrument name methods and...

PROG Removed code redundancies with spacecraft and instrument name methods and members. References #2335.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6400 41f8697f-d340-4b68-9986-7bafba869bb8
parent 63878abe
Loading
Loading
Loading
Loading
+0 −40
Original line number Diff line number Diff line
@@ -153,46 +153,6 @@ namespace Isis {
    shuttertimes.second = time + (exposureDuration / 2.0);
    return shuttertimes;
  }
  
  
  /**
   * This method returns the full instrument name.
   *
   * @return QString
   */
  QString ApolloMetricCamera::instrumentNameLong() const {
    return m_instrumentNameLong;
  }
  
  
  /**
   * This method returns the shortened instrument name.
   *
   * @return QString
   */
  QString ApolloMetricCamera::instrumentNameShort() const {
    return m_instrumentNameShort;
  }
  
  
  /**
   * This method returns the full spacecraft name.
   * 
   * @return QString
   */
  QString ApolloMetricCamera::spacecraftNameLong() const {
    return m_spacecraftNameLong;
  }
  
  
  /**
   * This method returns the shortened spacecraft name.
   *
   * @return QString
   */
  QString ApolloMetricCamera::spacecraftNameShort() const {
    return m_spacecraftNameShort;
  }
} // End Apollo namespace


+3 −12
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@

#include "FramingCamera.h"

#include <QString>

namespace Isis {
  /**
   * @brief Apollo Metric Camera Model
@@ -57,6 +55,9 @@ namespace Isis {
   *   @history 2015-08-24 Ian Humphrey and Makayla Shepherd - Added new data members and methods
   *                           to get spacecraft and instrument names. Extended unit test to test
   *                           these methods and added test data for Apollo 16 and 17.
   *   @history 2015-10-16 Ian Humphrey - Removed declarations of spacecraft and instrument 
   *                           members and methods and removed implementation of these methods
   *                           since Camera now handles this. References #2335.
   */
  class ApolloMetricCamera : public FramingCamera {
    public:
@@ -111,20 +112,10 @@ namespace Isis {
       */
      virtual int SpkReferenceId() const { return (1); }

      virtual QString instrumentNameLong() const;
      virtual QString instrumentNameShort() const;
      virtual QString spacecraftNameLong() const;
      virtual QString spacecraftNameShort() const;

    private:
      int p_ckFrameId;       //!< "Camera-matrix" Kernel Frame ID
      int p_ckReferenceId;   //!< "Camera-matrix" Kernel Reference ID
      int p_spkTargetId;     //!< Spacecraft Kernel Target ID
      
      QString m_instrumentNameLong; //!< Full instrument name
      QString m_instrumentNameShort; //!< Shortened instrument name
      QString m_spacecraftNameLong; //!< Full spacecraft name
      QString m_spacecraftNameShort; //!< Shortened spacecraft name
  };
};
#endif
+0 −40
Original line number Diff line number Diff line
@@ -132,46 +132,6 @@ namespace Isis {
    
    LoadCache();
  }
    
    
  /**
   * This method returns the full instrument name.
   *
   * @return QString
   */
  QString ApolloPanoramicCamera::instrumentNameLong() const {
    return m_instrumentNameLong;
  }
  
  
  /**
   * This method returns the shortened instrument name.
   *
   * @return QString
   */
  QString ApolloPanoramicCamera::instrumentNameShort() const {
    return m_instrumentNameShort;
  }
  
  
  /**
   * This method returns the full spacecraft name.
   * 
   * @return QString
   */
  QString ApolloPanoramicCamera::spacecraftNameLong() const {
    return m_spacecraftNameLong;
  }
  
  
  /**
   * This method returns the shortened spacecraft name.
   *
   * @return QString
   */
  QString ApolloPanoramicCamera::spacecraftNameShort() const {
    return m_spacecraftNameShort;
  }
}// end Isis namespace


+4 −12
Original line number Diff line number Diff line
@@ -26,8 +26,6 @@

#include "LineScanCamera.h"

#include <QString>

namespace Isis {
  class PvlGroup;
    /**                                                                       
@@ -46,6 +44,10 @@ namespace Isis {
     *   @history 2012-07-10 Orrin Thomas - Updated to current coding standards
     *   @history 2015-09-01 Ian Humphrey and Makayla Shepherd - Added new data members and
     *                           methods to get spacecraft and instrument names.
     *   @history 2015-10-16 Ian Humphrey - Removed declarations of spacecraft and instrument 
     *                           members and methods and removed implementation of these methods
     *                           since Camera now handles this. References #2335. Fixed 
     *                           indentation.
     */        
    class ApolloPanoramicCamera : public LineScanCamera {
    public:
@@ -93,11 +95,6 @@ namespace Isis {
      //! Standard deviation of interior orientation residual vector length, accesor
      double intOriResidualStdev() const { return m_residualStdev; }

      virtual QString instrumentNameLong() const;
      virtual QString instrumentNameShort() const;
      virtual QString spacecraftNameLong() const;
      virtual QString spacecraftNameShort() const;
      
    private:
      //! Max interior orientation residual vector length
      double m_residualMean;
@@ -110,11 +107,6 @@ namespace Isis {

      //! CK "Camera Matrix" kernel frame ID
      int m_CkFrameId;
      
      QString m_instrumentNameLong; //!< Full instrument name
      QString m_instrumentNameShort; //!< Shortened instrument name
      QString m_spacecraftNameLong; //!< Full spacecraft name
      QString m_spacecraftNameShort; //!< Shortened spacecraft name
    };
};

+45 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <QDebug>
#include <QList>
#include <QPair>
#include <QString>
#include <QTime>
#include <QVector>

@@ -63,6 +64,10 @@ namespace Isis {
   * @param lab Pvl label used to create the Camera object
   */
  Camera::Camera(Cube &cube) : Sensor(cube) {
    m_instrumentNameLong = "Unknown";
    m_instrumentNameShort = "Unknown";
    m_spacecraftNameLong = "Unknown";
    m_spacecraftNameShort = "Unknown";
    // Get the image size which can be different than the alpha cube size
    p_lines = cube.lineCount();
    p_samples = cube.sampleCount();
@@ -1165,7 +1170,6 @@ namespace Isis {
    pvl.addGroup(map);
  }


  //! Reads the focal length from the instrument kernel
  void Camera::SetFocalLength() {
    int code = naifIkCode();
@@ -2588,6 +2592,46 @@ namespace Isis {
    return p_skyMap;
  }
  
  
  /**
   * This method returns the full instrument name.
   *
   * @return QString
   */
  QString Camera::instrumentNameLong() const {
    return m_instrumentNameLong;
  }
  
  
  /**
   * This method returns the shortened instrument name.
   *
   * @return QString
   */
  QString Camera::instrumentNameShort() const {
    return m_instrumentNameShort;
  }
  
  
  /**
   * This method returns the full spacecraft name.
   * 
   * @return QString
   */
  QString Camera::spacecraftNameLong() const {
    return m_spacecraftNameLong;
  }
  
  
  /**
   * This method returns the shortened spacecraft name.
   *
   * @return QString
   */
  QString Camera::spacecraftNameShort() const {
    return m_spacecraftNameShort;
  }

  /**
   * Set whether or not the camera should ignore the Projection
   *
Loading