/src/gdal/frmts/pcidsk/sdk/segment/toutinstructures.h
Line | Count | Source |
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 | | * SPDX-License-Identifier: MIT |
10 | | ****************************************************************************/ |
11 | | #ifndef INCLUDE_PCIDSK_TOUTIN_INFORMATION_H |
12 | | #define INCLUDE_PCIDSK_TOUTIN_INFORMATION_H |
13 | | |
14 | | #include <cstring> |
15 | | #include "segment/orbitstructures.h" |
16 | | |
17 | | namespace PCIDSK |
18 | | { |
19 | | /* -------------------------------------------------------------------- */ |
20 | | /* SRITInfo_t - Satellite Model structure. */ |
21 | | /* -------------------------------------------------------------------- */ |
22 | | #define AP_MDL 1 |
23 | | #define SRIT_MDL 2 |
24 | | #define RF_MDL 6 |
25 | | #define RTCS_MDL 7 |
26 | | #define ADS_MDL 9 |
27 | 0 | #define SRITModele 0 |
28 | 0 | #define SRITModele1A 1 |
29 | 0 | #define SRITModele1B 2 |
30 | 0 | #define SRITModeleSAR 3 |
31 | 0 | #define SRITModele1AHR 4 |
32 | 0 | #define SRITModeleEros 5 |
33 | | |
34 | | #define MAX_SPOT_LINES 30000 |
35 | | |
36 | | /** |
37 | | * the SRITInfo_t struct contains all information |
38 | | * for the Toutin Math Model. |
39 | | */ |
40 | | struct SRITInfo_t |
41 | | { |
42 | | /** |
43 | | * default constructor |
44 | | */ |
45 | | SRITInfo_t() |
46 | 0 | { |
47 | 0 | N0x2 = 0.0; |
48 | 0 | aa = 0.0; |
49 | 0 | SmALPHA = 0.0; |
50 | 0 | bb = 0.0; |
51 | 0 | C0 = 0.0; |
52 | 0 | cc = 0.0; |
53 | 0 | COS_KHI = 0.0; |
54 | 0 | DELTA_GAMMA = 0.0; |
55 | 0 | GAMMA = 0.0; |
56 | 0 | K_1 = 0.0; |
57 | 0 | L0 = 0.0; |
58 | 0 | P = 0.0; |
59 | 0 | Q = 0.0; |
60 | 0 | TAU = 0.0; |
61 | 0 | THETA = 0.0; |
62 | 0 | THETA_SEC = 0.0; |
63 | 0 | X0 = 0.0; |
64 | 0 | Y0 = 0.0; |
65 | 0 | delh = 0.0; |
66 | 0 | COEF_Y2 = 0.0; |
67 | 0 | delT = 0.0; |
68 | 0 | delL = 0.0; |
69 | 0 | delTau = 0.0; |
70 | 0 | nDownSample = 0; |
71 | 0 | nGCPCount = 0; |
72 | 0 | nEphemerisSegNo = 0; |
73 | 0 | nAttitudeFlag = 0; |
74 | 0 | GCPMeanHtFlag = 0; |
75 | 0 | dfGCPMeanHt = 0.0; |
76 | 0 | dfGCPMinHt = 0.0; |
77 | 0 | dfGCPMaxHt = 0.0; |
78 | 0 | std::memset(nGCPIds, 0, sizeof(nGCPIds)); |
79 | 0 | std::memset(nPixel, 0, sizeof(nPixel)); |
80 | 0 | std::memset(nLine, 0, sizeof(nLine)); |
81 | 0 | std::memset(dfElev, 0, sizeof(dfElev)); |
82 | 0 | nSensor = 0; |
83 | 0 | nModel = 0; |
84 | 0 | RawToGeo = false; |
85 | 0 | OrbitPtr = nullptr; |
86 | 0 | } |
87 | | /** |
88 | | * destructor |
89 | | */ |
90 | | ~SRITInfo_t() |
91 | 0 | { |
92 | 0 | delete OrbitPtr; |
93 | 0 | } |
94 | | |
95 | | /** |
96 | | * Copy constructor. |
97 | | * @param oSI the SRITInfo_t to copy |
98 | | */ |
99 | 0 | SRITInfo_t(const SRITInfo_t& oSI): SRITInfo_t() |
100 | 0 | { |
101 | 0 | Copy(oSI); |
102 | 0 | } |
103 | | |
104 | | /** |
105 | | * Assignment operator |
106 | | * @param oSI the SRITInfo_t to assign |
107 | | */ |
108 | | SRITInfo_t& operator=(const SRITInfo_t& oSI) |
109 | 0 | { |
110 | 0 | Copy(oSI); |
111 | 0 | return *this; |
112 | 0 | } |
113 | | |
114 | | /** |
115 | | * Copy function |
116 | | * @param oSI the SRITInfo_t to copy |
117 | | */ |
118 | | void Copy(const SRITInfo_t& oSI) |
119 | 0 | { |
120 | 0 | if(this == &oSI) |
121 | 0 | { |
122 | 0 | return; |
123 | 0 | } |
124 | 0 | delete OrbitPtr; |
125 | 0 | OrbitPtr = nullptr; |
126 | 0 | if(oSI.OrbitPtr) |
127 | 0 | { |
128 | 0 | OrbitPtr = new EphemerisSeg_t(*oSI.OrbitPtr); |
129 | 0 | } |
130 | |
|
131 | 0 | for(int i=0 ; i<256 ; i++) |
132 | 0 | { |
133 | 0 | nGCPIds[i] = oSI.nGCPIds[i]; |
134 | 0 | nPixel[i] = oSI.nPixel[i]; |
135 | 0 | nLine[i] = oSI.nLine[i]; |
136 | 0 | dfElev[i] = oSI.dfElev[i]; |
137 | 0 | } |
138 | |
|
139 | 0 | N0x2 = oSI.N0x2; |
140 | 0 | aa = oSI.aa; |
141 | 0 | SmALPHA = oSI.SmALPHA; |
142 | 0 | bb = oSI.bb; |
143 | 0 | C0 = oSI.C0; |
144 | 0 | cc = oSI.cc; |
145 | 0 | COS_KHI = oSI.COS_KHI; |
146 | 0 | DELTA_GAMMA = oSI.DELTA_GAMMA; |
147 | 0 | GAMMA = oSI.GAMMA; |
148 | 0 | K_1 = oSI.K_1; |
149 | 0 | L0 = oSI.L0; |
150 | 0 | P = oSI.P; |
151 | 0 | Q = oSI.Q; |
152 | 0 | TAU = oSI.TAU; |
153 | 0 | THETA = oSI.THETA; |
154 | 0 | THETA_SEC = oSI.THETA_SEC; |
155 | 0 | X0 = oSI.X0; |
156 | 0 | Y0 = oSI.Y0; |
157 | 0 | delh = oSI.delh; |
158 | 0 | COEF_Y2 = oSI.COEF_Y2; |
159 | 0 | delT = oSI.delT; |
160 | 0 | delL = oSI.delL; |
161 | 0 | delTau = oSI.delTau; |
162 | 0 | nDownSample = oSI.nDownSample; |
163 | 0 | nGCPCount = oSI.nGCPCount; |
164 | 0 | nEphemerisSegNo = oSI.nEphemerisSegNo; |
165 | 0 | nAttitudeFlag = oSI.nAttitudeFlag; |
166 | 0 | utmunit = oSI.utmunit; |
167 | 0 | GCPUnit = oSI.GCPUnit; |
168 | 0 | GCPMeanHtFlag = oSI.GCPMeanHtFlag; |
169 | 0 | dfGCPMeanHt = oSI.dfGCPMeanHt; |
170 | 0 | dfGCPMinHt = oSI.dfGCPMinHt; |
171 | 0 | dfGCPMaxHt = oSI.dfGCPMaxHt; |
172 | 0 | Qdeltar = oSI.Qdeltar; |
173 | 0 | Hdeltat = oSI.Hdeltat; |
174 | 0 | Sensor = oSI.Sensor; |
175 | 0 | nSensor = oSI.nSensor; |
176 | 0 | nModel = oSI.nModel; |
177 | 0 | RawToGeo = oSI.RawToGeo; |
178 | 0 | oProjectionInfo = oSI.oProjectionInfo; |
179 | 0 | } |
180 | | |
181 | | double N0x2; |
182 | | double aa; |
183 | | double SmALPHA; |
184 | | double bb; |
185 | | double C0; |
186 | | double cc; |
187 | | double COS_KHI; |
188 | | double DELTA_GAMMA; |
189 | | double GAMMA; |
190 | | double K_1; |
191 | | double L0; |
192 | | double P; |
193 | | double Q; |
194 | | double TAU; |
195 | | double THETA; |
196 | | double THETA_SEC; |
197 | | double X0; |
198 | | double Y0; |
199 | | double delh; |
200 | | double COEF_Y2; |
201 | | double delT; |
202 | | double delL; |
203 | | double delTau; |
204 | | int nDownSample; |
205 | | int nGCPCount; |
206 | | int nEphemerisSegNo; |
207 | | int nAttitudeFlag; |
208 | | std::string utmunit; |
209 | | std::string GCPUnit; |
210 | | char GCPMeanHtFlag; |
211 | | double dfGCPMeanHt; |
212 | | double dfGCPMinHt; |
213 | | double dfGCPMaxHt; |
214 | | int nGCPIds[256]; |
215 | | int nPixel[256],nLine[256]; |
216 | | double dfElev[256]; |
217 | | std::vector<double> Qdeltar; |
218 | | std::vector<double> Hdeltat; |
219 | | std::string Sensor; |
220 | | int nSensor; |
221 | | int nModel; |
222 | | EphemerisSeg_t *OrbitPtr; |
223 | | bool RawToGeo; |
224 | | std::string oProjectionInfo; |
225 | | } ; |
226 | | } |
227 | | |
228 | | #endif // INCLUDE_PCIDSK_TOUTIN_INFORMATION_H |