Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

slcimage.hh

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999-2003 Bert Kampes
00003  * Copyright (c) 1999-2003 Delft University of Technology, The Netherlands
00004  *
00005  * This file is part of Doris, the Delft o-o radar interferometric software.
00006  *
00007  * Doris program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * Doris is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  * Publications that contain results produced by the Doris software should
00022  * contain an acknowledgment. (For example: The interferometric processing
00023  * was performed using the freely available Doris software package developed
00024  * by the Delft Institute for Earth-Oriented Space Research (DEOS), Delft
00025  * University of Technology, or include a reference to: Bert Kampes and
00026  * Stefania Usai. \"Doris: The Delft Object-oriented Radar Interferometric
00027  * software.\" In: proceedings 2nd ITC ORS symposium, August 1999. (cdrom)).
00028  *
00029  */
00030 /****************************************************************
00031  * $Source: /users/kampes/DEVELOP/DORIS/doris/src/RCS/slcimage.hh,v $   *
00032  * $Revision: 3.12 $                                            *
00033  * $Date: 2005/04/11 13:47:45 $                                 *
00034  * $Author: kampes $                                            *
00035  *                                                              *
00036  * The slcimage class contains the definition of the data and   *
00037  * functions for slc images.                                    *
00038  * Data mainly public because this used to be a struct and I    *
00039  * did not want to change the other code.                       *
00040  * functions for updating the data like prf, reading data into  *
00041  * a matrix, etc.                                               *
00042  #%// BK 14-Aug-2000                                            *
00043  ****************************************************************/
00044 
00045 
00046 #ifndef SLCIMAGE_H
00047 #define SLCIMAGE_H
00048 
00049 
00050 #include "constants.hh"                 // typedefs
00051 
00052 
00053 // ====== Define template functions (no member no friend) ======
00054 // ______ (matrix class is declared way below) ______
00055 template <class Type> class matrix;
00056 
00057 
00058 
00059 
00060 // ====== Struct slcimage: information on master/slave ======
00061 class slcimage                          // info per image
00062   {
00063   private:
00064     // copy constructor; copy matrices etc as public.
00065     slcimage(const slcimage& img)
00066       {};// prevent copy constructor usage by privatizing
00067 
00068   public:
00069     char        file[EIGHTY];           // current filename
00070     char        utc1[25];               // string for getorb
00071     int16       sensor;                 // flag for ers/asar/rsat/jers [BK 21.08.2002]
00072     int16       sar_processor;          // VMP or ATLANTIS or TUDELFT [BK 04.2005]
00073     int16       formatflag;             // flag for current file format
00074     cn          approxcentreoriginal;   //  wgs84? sphere x,y,z
00075     window      originalwindow;         // linelo etc. for normalization (master only).
00076     window      currentwindow;          // linelo etc. of current on file.
00077     real8       prf;                    // pulse repetition frequency (Hz)
00078     real8       abw;                    // azimuth band width (Hz)
00079     real8       rsr2x;                  // 2 times range sampling rate (Hz)
00080     real8       rbw;                    // range band width (Hz)
00081     real8       t_azi1;                 // sec. of day of first azimuth line
00082     real8       t_range1;               // one way time (s) to first range pixel
00083     real8       wavelength;             // meters
00084     // real8 hamming_azi;               // weighting function
00085     // real8 hamming_range;             // weighting function
00086     // ______ Xtrack f_DC coefficients from leader, not used for now, ______
00087     // ______ better use matrix for polyval?
00088     real8       f_DC_a0;                // constant term Hz
00089     real8       f_DC_a1;                // linear term Hz/s
00090     real8       f_DC_a2;                // quadratic term Hz/s/s
00091 
00092     // ______ offset = X(l,p) - X(L,P) ______
00093     // ______ Where l,p are in the local slave coordinate system and ______
00094     // ______ where L,P are in the local master coordinate system ______
00095     // ______ These variables are stored in the slaveinfo variable only ______
00096     int32       coarseoffsetL;          // offset in line (azimuth) direction
00097     int32       coarseoffsetP;          // offset in pixel (range) direction
00098 
00099   
00100     // ______ Public functions of class ______
00101     // ___Constructor/Destructor___
00102     slcimage();// set defaults
00103     ~slcimage()
00104       {
00105       TRACE_FUNCTION("~slcimage() (BK 06-Mar-2005)");
00106       ;// nothing to destruct ?
00107       }// dealloc
00108 
00109     // ---- Helper ----
00110     inline void showdata() const
00111       {DEBUG << "\tcurrent file: \t" << file
00112            << "\n\tformatflag:   \t" << formatflag
00113            << "\n\tcurrent win:  \t"
00114            << currentwindow.linelo << " " << currentwindow.linehi << " "
00115            << currentwindow.pixlo  << " " << currentwindow.pixhi; 
00116        DEBUG.print();
00117       }
00118 
00119     // ______ Add a bias 1 way time range ______
00120     inline void add_rg_t_error(const real8 dt) {t_range1+=dt;}
00121     inline void add_az_t_error(const real8 dt) {t_azi1+=dt;}
00122 
00123     // ______ Read readfiles section from resultfile ______
00124     void fillslcimage(const char *file);
00125     void updateslcimage(const char *file, const char *iden);    
00126     //____RaffaeleNutricato START MODIFICATION SECTION 1
00127     void updateslcimageML(const char *file, const char *iden);  
00128     //____RaffaeleNutricato END MODIFICATION SECTION 1
00129     // ______ Read matrix from file (all FORMATS) ______
00130     //void readdata(matrix<complr4> &Result,window win); 
00131     //void readdata(matrix<complr4> &Result,window win) const; 
00132     matrix<complr4> readdata(window win) const; 
00133 
00134     // ______ Convert line number to azimuth time (1 is first line) ______
00135     inline real8 line2ta(const real8 line) const
00136       {return t_azi1+(line-1.0)/prf;}
00137 
00138     // ______ Convert pixel number to range time (1 is first pixel) ______
00139     inline real8 pix2tr(const real8 pixel) const
00140       {return t_range1+(pixel-1.0)/rsr2x;}
00141 
00142     // ______ Convert pixel number to range (1 is first pixel) ______
00143     inline real8 pix2range(const real8 pixel) const
00144       {return SOL*pix2tr(pixel);}
00145 
00146     // ______ Convert azimuth time to line number (1 is first line) ______
00147     inline real8 ta2line(const real8 azitime) const
00148       {return 1.0+prf*(azitime-t_azi1);}
00149 
00150     // ______ Convert range time to pixel number (1 is first pixel) ______
00151     inline real8 tr2pix(const real8 rangetime) const
00152       {return 1.0+rsr2x*(rangetime-t_range1);}
00153 
00154     // ______ Convert range pixel to fDC (1 is first pixel) ______
00155     // Bert Kampes, 03-Mar-2005
00156     inline real8 pix2fdc(const real8 pixel) const
00157       {const real8 tau=(pixel-1.0)/(rsr2x/2.0);// two-way time
00158        return f_DC_a0+f_DC_a1*tau+f_DC_a2*sqr(tau);}
00159 
00160 
00161   }; // END class slcimage
00162 
00163 
00164 #endif // SLCIMAGE_H
00165 
00166 

Generated on Fri Apr 22 15:58:02 2005 for Doris by doxygen 1.3.6