LCOV - code coverage report
Current view: top level - frmts/pcidsk/sdk/segment - toutinstructures.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 0 101 0.0 %
Date: 2024-04-27 17:22:41 Functions: 0 4 0.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Purpose: Support for storing and manipulating Toutin information
       4             :  *
       5             :  ******************************************************************************
       6             :  * Copyright (c) 2009
       7             :  * PCI Geomatics, 90 Allstate Parkway, Markham, Ontario, Canada.
       8             :  *
       9             :  * Permission is hereby granted, free of charge, to any person obtaining a
      10             :  * copy of this software and associated documentation files (the "Software"),
      11             :  * to deal in the Software without restriction, including without limitation
      12             :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      13             :  * and/or sell copies of the Software, and to permit persons to whom the
      14             :  * Software is furnished to do so, subject to the following conditions:
      15             :  *
      16             :  * The above copyright notice and this permission notice shall be included
      17             :  * in all copies or substantial portions of the Software.
      18             :  *
      19             :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
      20             :  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      21             :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
      22             :  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      23             :  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
      24             :  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
      25             :  * DEALINGS IN THE SOFTWARE.
      26             :  ****************************************************************************/
      27             : #ifndef INCLUDE_PCIDSK_TOUTIN_INFORMATION_H
      28             : #define INCLUDE_PCIDSK_TOUTIN_INFORMATION_H
      29             : 
      30             : #include <cstring>
      31             : #include "segment/orbitstructures.h"
      32             : 
      33             : namespace PCIDSK
      34             : {
      35             : /* -------------------------------------------------------------------- */
      36             : /*      SRITInfo_t - Satellite Model structure.                         */
      37             : /* -------------------------------------------------------------------- */
      38             : #define AP_MDL   1
      39             : #define SRIT_MDL 2
      40             : #define RF_MDL   6
      41             : #define RTCS_MDL 7
      42             : #define ADS_MDL  9
      43             : #define SRITModele 0
      44             : #define SRITModele1A 1
      45             : #define SRITModele1B 2
      46             : #define SRITModeleSAR 3
      47             : #define SRITModele1AHR 4
      48             : #define SRITModeleEros 5
      49             : 
      50             : #define MAX_SPOT_LINES 30000
      51             : 
      52             :     /**
      53             :      * the SRITInfo_t struct contains all information
      54             :      * for the Toutin Math Model.
      55             :      */
      56             :     struct SRITInfo_t
      57             :     {
      58             :         /**
      59             :          * default constructor
      60             :          */
      61           0 :         SRITInfo_t()
      62           0 :         {
      63           0 :             N0x2 = 0.0;
      64           0 :             aa = 0.0;
      65           0 :             SmALPHA = 0.0;
      66           0 :             bb = 0.0;
      67           0 :             C0 = 0.0;
      68           0 :             cc = 0.0;
      69           0 :             COS_KHI = 0.0;
      70           0 :             DELTA_GAMMA = 0.0;
      71           0 :             GAMMA = 0.0;
      72           0 :             K_1 = 0.0;
      73           0 :             L0 = 0.0;
      74           0 :             P = 0.0;
      75           0 :             Q = 0.0;
      76           0 :             TAU = 0.0;
      77           0 :             THETA = 0.0;
      78           0 :             THETA_SEC = 0.0;
      79           0 :             X0 = 0.0;
      80           0 :             Y0 = 0.0;
      81           0 :             delh = 0.0;
      82           0 :             COEF_Y2 = 0.0;
      83           0 :             delT = 0.0;
      84           0 :             delL = 0.0;
      85           0 :             delTau = 0.0;
      86           0 :             nDownSample = 0;
      87           0 :             nGCPCount = 0;
      88           0 :             nEphemerisSegNo = 0;
      89           0 :             nAttitudeFlag = 0;
      90           0 :             GCPMeanHtFlag = 0;
      91           0 :             dfGCPMeanHt = 0.0;
      92           0 :             dfGCPMinHt = 0.0;
      93           0 :             dfGCPMaxHt = 0.0;
      94           0 :             std::memset(nGCPIds, 0, sizeof(nGCPIds));
      95           0 :             std::memset(nPixel, 0, sizeof(nPixel));
      96           0 :             std::memset(nLine, 0, sizeof(nLine));
      97           0 :             std::memset(dfElev, 0, sizeof(dfElev));
      98           0 :             nSensor = 0;
      99           0 :             nModel = 0;
     100           0 :             RawToGeo = false;
     101           0 :             OrbitPtr = nullptr;
     102           0 :         }
     103             :         /**
     104             :          * destructor
     105             :          */
     106           0 :         ~SRITInfo_t()
     107           0 :         {
     108           0 :             delete OrbitPtr;
     109           0 :         }
     110             : 
     111             :         /**
     112             :          * Copy constructor.
     113             :          * @param oSI the SRITInfo_t to copy
     114             :          */
     115           0 :         SRITInfo_t(const SRITInfo_t& oSI): SRITInfo_t()
     116             :         {
     117           0 :             Copy(oSI);
     118           0 :         }
     119             : 
     120             :         /**
     121             :          * Assignment operator
     122             :          * @param oSI the SRITInfo_t to assign
     123             :          */
     124             :         SRITInfo_t& operator=(const SRITInfo_t& oSI)
     125             :         {
     126             :             Copy(oSI);
     127             :             return *this;
     128             :         }
     129             : 
     130             :         /**
     131             :          * Copy function
     132             :          * @param oSI the SRITInfo_t to copy
     133             :          */
     134           0 :         void Copy(const SRITInfo_t& oSI)
     135             :         {
     136           0 :             if(this == &oSI)
     137             :             {
     138           0 :                 return;
     139             :             }
     140           0 :             delete OrbitPtr;
     141           0 :             OrbitPtr = nullptr;
     142           0 :             if(oSI.OrbitPtr)
     143             :             {
     144           0 :                 OrbitPtr = new EphemerisSeg_t(*oSI.OrbitPtr);
     145             :             }
     146             : 
     147           0 :             for(int i=0 ; i<256 ; i++)
     148             :             {
     149           0 :                 nGCPIds[i] = oSI.nGCPIds[i];
     150           0 :                 nPixel[i] = oSI.nPixel[i];
     151           0 :                 nLine[i] = oSI.nLine[i];
     152           0 :                 dfElev[i] = oSI.dfElev[i];
     153             :             }
     154             : 
     155           0 :             N0x2 = oSI.N0x2;
     156           0 :             aa = oSI.aa;
     157           0 :             SmALPHA = oSI.SmALPHA;
     158           0 :             bb = oSI.bb;
     159           0 :             C0 = oSI.C0;
     160           0 :             cc = oSI.cc;
     161           0 :             COS_KHI = oSI.COS_KHI;
     162           0 :             DELTA_GAMMA = oSI.DELTA_GAMMA;
     163           0 :             GAMMA = oSI.GAMMA;
     164           0 :             K_1 = oSI.K_1;
     165           0 :             L0 = oSI.L0;
     166           0 :             P = oSI.P;
     167           0 :             Q = oSI.Q;
     168           0 :             TAU = oSI.TAU;
     169           0 :             THETA = oSI.THETA;
     170           0 :             THETA_SEC = oSI.THETA_SEC;
     171           0 :             X0 = oSI.X0;
     172           0 :             Y0 = oSI.Y0;
     173           0 :             delh = oSI.delh;
     174           0 :             COEF_Y2 = oSI.COEF_Y2;
     175           0 :             delT = oSI.delT;
     176           0 :             delL = oSI.delL;
     177           0 :             delTau = oSI.delTau;
     178           0 :             nDownSample = oSI.nDownSample;
     179           0 :             nGCPCount = oSI.nGCPCount;
     180           0 :             nEphemerisSegNo = oSI.nEphemerisSegNo;
     181           0 :             nAttitudeFlag = oSI.nAttitudeFlag;
     182           0 :             utmunit = oSI.utmunit;
     183           0 :             GCPUnit = oSI.GCPUnit;
     184           0 :             GCPMeanHtFlag = oSI.GCPMeanHtFlag;
     185           0 :             dfGCPMeanHt = oSI.dfGCPMeanHt;
     186           0 :             dfGCPMinHt = oSI.dfGCPMinHt;
     187           0 :             dfGCPMaxHt = oSI.dfGCPMaxHt;
     188           0 :             Qdeltar = oSI.Qdeltar;
     189           0 :             Hdeltat = oSI.Hdeltat;
     190           0 :             Sensor = oSI.Sensor;
     191           0 :             nSensor = oSI.nSensor;
     192           0 :             nModel = oSI.nModel;
     193           0 :             RawToGeo = oSI.RawToGeo;
     194           0 :             oProjectionInfo = oSI.oProjectionInfo;
     195             :         }
     196             : 
     197             :         double N0x2;
     198             :         double aa;
     199             :         double SmALPHA;
     200             :         double bb;
     201             :         double C0;
     202             :         double cc;
     203             :         double COS_KHI;
     204             :         double DELTA_GAMMA;
     205             :         double GAMMA;
     206             :         double K_1;
     207             :         double L0;
     208             :         double P;
     209             :         double Q;
     210             :         double TAU;
     211             :         double THETA;
     212             :         double THETA_SEC;
     213             :         double X0;
     214             :         double Y0;
     215             :         double delh;
     216             :         double COEF_Y2;
     217             :         double delT;
     218             :         double delL;
     219             :         double delTau;
     220             :         int    nDownSample;
     221             :         int    nGCPCount;
     222             :         int    nEphemerisSegNo;
     223             :         int    nAttitudeFlag;
     224             :         std::string   utmunit;
     225             :         std::string   GCPUnit;
     226             :         char   GCPMeanHtFlag;
     227             :         double dfGCPMeanHt;
     228             :         double dfGCPMinHt;
     229             :         double dfGCPMaxHt;
     230             :         int    nGCPIds[256];
     231             :         int    nPixel[256],nLine[256];
     232             :         double dfElev[256];
     233             :         std::vector<double> Qdeltar;
     234             :         std::vector<double> Hdeltat;
     235             :         std::string   Sensor;
     236             :         int    nSensor;
     237             :         int    nModel;
     238             :         EphemerisSeg_t *OrbitPtr;
     239             :         bool  RawToGeo;
     240             :         std::string oProjectionInfo;
     241             :     } ;
     242             : }
     243             : 
     244             : #endif // INCLUDE_PCIDSK_TOUTIN_INFORMATION_H

Generated by: LCOV version 1.14