|
Isis 3.0 Application Source Code Reference |
Home |
00001 #ifndef PixelOffset_h 00002 #define PixelOffset_h 00003 /** 00004 * @file 00005 * $Revision: 1.1 $ 00006 * $Date: 2008/12/20 05:39:21 $ 00007 * 00008 * Unless noted otherwise, the portions of Isis written by the USGS are public 00009 * domain. See individual third-party library and package descriptions for 00010 * intellectual property information,user agreements, and related information. 00011 * 00012 * Although Isis has been used by the USGS, no warranty, expressed or implied, 00013 * is made by the USGS as to the accuracy and functioning of such software 00014 * and related material nor shall the fact of distribution constitute any such 00015 * warranty, and no responsibility is assumed by the USGS in connection 00016 * therewith. 00017 * 00018 * For additional information, launch 00019 * $ISISROOT/doc//documents/Disclaimers/Disclaimers.html in a browser or see 00020 * the Privacy & Disclaimers page on the Isis website, 00021 * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on 00022 * http://www.usgs.gov/privacy.html. 00023 */ 00024 00025 #include <string> 00026 #include <vector> 00027 #include "PolynomialUnivariate.h" 00028 #include "SpiceUsr.h" 00029 #include "SpiceZfc.h" 00030 #include "SpiceZmc.h" 00031 00032 00033 namespace Isis { 00034 /** 00035 * @brief Obtain rotation angles for a line scan camera pixel offsets 00036 * 00037 * This class will obtain the rotation from existing camera pointing to 00038 * "corrected" camera pointing calculated from a table of pixel offsets 00039 * and time (sample line et) 00040 * 00041 * This class was created to calculate the rotation matrix needed to 00042 * remove jitter from a hirise image based on the table of offsets. 00043 * 00044 * @ingroup SpiceInstrumentsAndCameras 00045 * 00046 * @author 2008-08-20 Debbie A. Cook 00047 * 00048 * @internal 00049 * @history 2008-08-20 Debbie A. Cook Original Version 00050 * @history 2008-12-19 Debbie A. Cook Removed couts to prepare for commiting 00051 */ 00052 class PixelOffset { 00053 public: 00054 //! Constructors 00055 PixelOffset( const std::string &tableList, double fl, double pixPitch, double baseTime, 00056 double timeScale, int degree ); 00057 00058 //! Destructor 00059 virtual ~PixelOffset() { } 00060 00061 //! Load the angles by interpolating the pixel offsets and converting to angles 00062 void LoadAngles ( std::vector<double> cacheTime ); 00063 00064 //! Compute cubic interpolation for current time et 00065 void Interp (); 00066 00067 //! Compute coefficients for a polynomial fit to each angle based on scaled time 00068 void SetPolynomial (); 00069 00070 void SetEphemerisTime(const double et ); 00071 00072 std::vector<double> SetEphemerisTimeHPF(const double et ); 00073 00074 double WrapAngle (double compareAngle, double angle); 00075 // std::vector<double> &Matrix() { return p_TC; }; 00076 00077 00078 00079 private: 00080 std::vector<double> p_samples; 00081 std::vector<double> p_lines; 00082 std::vector<double> p_times; 00083 std::vector<double> p_I; 00084 double p_focalLen; //!< Focal length of instrument in mm 00085 double p_pixPitch; //!< Pixel pitch of instrument in mm/pixel 00086 double p_et; //!< Current ephemeris time 00087 00088 std::vector<double> p_cacheAngle1; //! 00089 std::vector<double> p_cacheAngle2; 00090 std::vector<double> p_cacheTime; 00091 // rotation at et 00092 double p_baseTime; //!< Base time used in fit equations 00093 double p_timeScale; //!< Time scale used in fit equations 00094 std::vector<double> p_ang1Coefficients; 00095 std::vector<double> p_ang2Coefficients; 00096 //!< Coefficients of polynomials fit to 00097 // each of three rotation angles 00098 int p_degree; //!< Degree of fit polynomial for angles 00099 double p_angle1; //!< Angle1 for current et in radians 00100 double p_angle2; //!< Angle2 for current et in radians 00101 double p_angleScale; //!< Scaler to reduce roundoff 00102 double p_sampOff; 00103 double p_sampScale; 00104 double p_lineOff; 00105 double p_lineScale; 00106 }; 00107 }; 00108 00109 #endif 00110