Line data Source code
1 : /******************************************************************************
2 : *
3 : * Purpose: Support for storing and manipulating Orbit 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_ORBIT_INFORMATION_H
28 : #define INCLUDE_PCIDSK_ORBIT_INFORMATION_H
29 :
30 : #include <string>
31 : #include <cstring>
32 : #include <vector>
33 :
34 : namespace PCIDSK
35 : {
36 : /* -------------------------------------------------------------------- */
37 : /* Structure for ephemeris segment (ORBIT segment, type 160). */
38 : /* -------------------------------------------------------------------- */
39 : #define EPHEMERIS_BLK 8
40 : #define EPHEMERIS_RADAR_BLK 10
41 : #define EPHEMERIS_ATT_BLK 9
42 : /* -------------------------------------------------------------------- */
43 : /* Structure for Satellite Radar segment. */
44 : /* -------------------------------------------------------------------- */
45 : #define ANC_DATA_PER_BLK 16
46 : #define ANC_DATA_SIZE 32
47 : /**
48 : * Ancillary data structure.
49 : */
50 : struct AncillaryData_t
51 : {
52 : /**
53 : * Default constructor
54 : */
55 0 : AncillaryData_t() :
56 : SlantRangeFstPixel(0),
57 : SlantRangeLastPixel(0),
58 : FstPixelLat(0.f),
59 : MidPixelLat(0.f),
60 : LstPixelLat(0.f),
61 : FstPixelLong(0.f),
62 : MidPixelLong(0.f),
63 0 : LstPixelLong(0.f)
64 : {
65 0 : }
66 : /**
67 : * Copy constructor
68 : * @param oAD the ancillary data to copy
69 : */
70 0 : AncillaryData_t(const AncillaryData_t& oAD)
71 0 : {
72 0 : Copy(oAD);
73 0 : }
74 :
75 : /**
76 : * assignment operator
77 : * @param oAD the ancillary data to assign
78 : */
79 0 : AncillaryData_t& operator=(const AncillaryData_t& oAD)
80 : {
81 0 : Copy(oAD);
82 0 : return *this;
83 : }
84 :
85 : /**
86 : * Copy function
87 : * @param oAD the ancillary data to copy
88 : */
89 0 : void Copy(const AncillaryData_t& oAD)
90 : {
91 0 : if(this == &oAD)
92 : {
93 0 : return;
94 : }
95 0 : SlantRangeFstPixel = oAD.SlantRangeFstPixel;
96 0 : SlantRangeLastPixel = oAD.SlantRangeLastPixel;
97 0 : FstPixelLat = oAD.FstPixelLat;
98 0 : MidPixelLat = oAD.MidPixelLat;
99 0 : LstPixelLat = oAD.LstPixelLat;
100 0 : FstPixelLong = oAD.FstPixelLong;
101 0 : MidPixelLong = oAD.MidPixelLong;
102 0 : LstPixelLong = oAD.LstPixelLong;
103 : }
104 :
105 : int SlantRangeFstPixel; /* Slant Range to First Pixel (m) */
106 : int SlantRangeLastPixel; /* Slant Range to Last Pixel (m) */
107 : float FstPixelLat; /* First Pixel Latitude (millionths degrees) */
108 : float MidPixelLat; /* Mid Pixel Latitude (millionths degrees) */
109 : float LstPixelLat; /* Last Pixel Latitude (millionths degrees) */
110 : float FstPixelLong; /* First Pixel Longitude (millionths degrees)*/
111 : float MidPixelLong; /* Mid Pixel Longitude (millionths degrees) */
112 : float LstPixelLong; /* Last Pixel Longitude (millionths degrees) */
113 : } ;
114 :
115 : /**
116 : * Radar segment information
117 : */
118 : struct RadarSeg_t
119 : {
120 : /**
121 : * Default constructor
122 : */
123 0 : RadarSeg_t() :
124 : EquatorialRadius(0.0),
125 : PolarRadius(0.0),
126 : IncidenceAngle(0.0),
127 : PixelSpacing(0.0),
128 : LineSpacing(0.0),
129 : ClockAngle(0.0),
130 : NumberBlockData(0),
131 0 : NumberData(0)
132 : {
133 0 : }
134 : /**
135 : * Copy constructor
136 : * @param oRS the radar segment to copy
137 : */
138 0 : RadarSeg_t(const RadarSeg_t& oRS)
139 0 : {
140 0 : Copy(oRS);
141 0 : }
142 :
143 : /**
144 : * assignment operator
145 : * @param oRS the radar segment to assign
146 : */
147 : RadarSeg_t& operator=(const RadarSeg_t& oRS)
148 : {
149 : Copy(oRS);
150 : return *this;
151 : }
152 :
153 : /**
154 : * Copy function
155 : * @param oRS the radar segment to copy
156 : */
157 0 : void Copy(const RadarSeg_t& oRS)
158 : {
159 0 : if(this == &oRS)
160 : {
161 0 : return;
162 : }
163 0 : Identifier = oRS.Identifier;
164 0 : Facility = oRS.Facility;
165 0 : Ellipsoid = oRS.Ellipsoid;
166 0 : EquatorialRadius = oRS.EquatorialRadius;
167 0 : PolarRadius = oRS.PolarRadius;
168 0 : IncidenceAngle = oRS.IncidenceAngle;
169 0 : PixelSpacing = oRS.PixelSpacing;
170 0 : LineSpacing = oRS.LineSpacing;
171 0 : ClockAngle = oRS.ClockAngle;
172 :
173 0 : NumberBlockData = oRS.NumberBlockData;
174 0 : NumberData = oRS.NumberData;
175 :
176 0 : Line = oRS.Line;
177 : }
178 :
179 : std::string Identifier; /* Product identifier */
180 : std::string Facility; /* Processing facility */
181 : std::string Ellipsoid; /* Ellipsoid designator */
182 : double EquatorialRadius; /* Equatorial radius of earth */
183 : double PolarRadius; /* Polar radius of earth */
184 : double IncidenceAngle; /* Incidence angle */
185 : double PixelSpacing; /* Nominal pixel spacing in metre */
186 : double LineSpacing; /* Nominal line spacing in metre */
187 : double ClockAngle; /* Clock angle in degree */
188 :
189 : int NumberBlockData; /* Number of blocks of ancillary data */
190 : int NumberData; /* Number of ancillary data */
191 :
192 : std::vector<AncillaryData_t> Line; /* Pointer to ancillary line */
193 : } ;
194 :
195 : /* -------------------------------------------------------------------- */
196 : /* Structure for Satellite attitude segment. */
197 : /* -------------------------------------------------------------------- */
198 : #define ATT_SEG_BLK 604
199 : #define ATT_SEG_MAX_LINE 6000
200 : #define ATT_SEG_LINE_PER_BLOCK 10
201 :
202 : /**
203 : * Attitude line information
204 : */
205 : struct AttitudeLine_t
206 : {
207 : /**
208 : * Default constructor
209 : */
210 0 : AttitudeLine_t():
211 : ChangeInAttitude(0.0),
212 0 : ChangeEarthSatelliteDist(0.0)
213 : {
214 0 : }
215 : /**
216 : * Copy constructor
217 : * @param oAL the attitude line to copy
218 : */
219 0 : AttitudeLine_t(const AttitudeLine_t& oAL)
220 0 : {
221 0 : Copy(oAL);
222 0 : }
223 :
224 : /**
225 : * assignment operator
226 : * @param oAL the attitude line to assign
227 : */
228 0 : AttitudeLine_t& operator=(const AttitudeLine_t& oAL)
229 : {
230 0 : Copy(oAL);
231 0 : return *this;
232 : }
233 :
234 : /**
235 : * Copy function
236 : * @param oAL the attitude line to copy
237 : */
238 0 : void Copy(const AttitudeLine_t& oAL)
239 : {
240 0 : if(this == &oAL)
241 : {
242 0 : return;
243 : }
244 0 : ChangeInAttitude = oAL.ChangeInAttitude;
245 0 : ChangeEarthSatelliteDist = oAL.ChangeEarthSatelliteDist;
246 : }
247 :
248 : double ChangeInAttitude; /* Change in satellite attitude (D22.16) */
249 : double ChangeEarthSatelliteDist; /* Change in earth-satellite distance
250 : (D22.16) */
251 : } ;
252 :
253 : /**
254 : * Attitude segment information
255 : */
256 : struct AttitudeSeg_t
257 : {
258 : /**
259 : * Default constructor
260 : */
261 0 : AttitudeSeg_t() :
262 : Roll(0.0),
263 : Pitch(0.0),
264 : Yaw(0.0),
265 : NumberOfLine(0),
266 0 : NumberBlockData(0)
267 : {
268 0 : }
269 : /**
270 : * Copy constructor
271 : * @param oAS the attitude segment to copy
272 : */
273 0 : AttitudeSeg_t(const AttitudeSeg_t& oAS)
274 0 : {
275 0 : Copy(oAS);
276 0 : }
277 :
278 : /**
279 : * assignment operator
280 : * @param oAS the avhrr segment to assign
281 : */
282 : AttitudeSeg_t& operator=(const AttitudeSeg_t& oAS)
283 : {
284 : Copy(oAS);
285 : return *this;
286 : }
287 :
288 : /**
289 : * Copy function
290 : * @param oAS the avhrr segment to copy
291 : */
292 0 : void Copy(const AttitudeSeg_t& oAS)
293 : {
294 0 : if(this == &oAS)
295 : {
296 0 : return;
297 : }
298 0 : Roll = oAS.Roll;
299 0 : Pitch = oAS.Pitch;
300 0 : Yaw = oAS.Yaw;
301 0 : NumberOfLine = oAS.NumberOfLine;
302 0 : NumberBlockData = oAS.NumberBlockData;
303 0 : Line = oAS.Line;
304 : }
305 :
306 : double Roll; /* Roll (D22.16) */
307 : double Pitch; /* Pitch (D22.16) */
308 : double Yaw; /* Yaw (D22.16) */
309 : int NumberOfLine; /* No. of Lines (I22) */
310 :
311 : int NumberBlockData; /* No. of block of data. */
312 : std::vector<AttitudeLine_t> Line;
313 :
314 : } ;
315 :
316 : /* -------------------------------------------------------------------- */
317 : /* AVHRR orbit segment. Composed of 11 blocks plus extra blocks */
318 : /* for holding per-scanline information. */
319 : /* -------------------------------------------------------------------- */
320 : #define AVH_SEG_BASE_NUM_BLK 11
321 :
322 : /**
323 : * Avhrr line information
324 : */
325 : struct AvhrrLine_t
326 : {
327 : /**
328 : * Default constructor
329 : */
330 0 : AvhrrLine_t()
331 0 : {
332 0 : nScanLineNum = 0;
333 0 : nStartScanTimeGMTMsec = 0;
334 0 : std::memset(abyScanLineQuality, 0, sizeof(abyScanLineQuality));
335 0 : std::memset(aabyBadBandIndicators, 0, sizeof(aabyBadBandIndicators));
336 0 : std::memset(abySatelliteTimeCode, 0, sizeof(abySatelliteTimeCode));
337 0 : std::memset(anTargetTempData, 0, sizeof(anTargetTempData));
338 0 : std::memset(anTargetScanData, 0, sizeof(anTargetScanData));
339 0 : std::memset(anSpaceScanData, 0, sizeof(anSpaceScanData));
340 0 : }
341 : /**
342 : * Copy constructor
343 : * @param oAL the avhrr line to copy
344 : */
345 0 : AvhrrLine_t(const AvhrrLine_t& oAL)
346 0 : {
347 0 : Copy(oAL);
348 0 : }
349 :
350 : /**
351 : * assignment operator
352 : * @param oAL the avhrr line to assign
353 : */
354 0 : AvhrrLine_t& operator=(const AvhrrLine_t& oAL)
355 : {
356 0 : Copy(oAL);
357 0 : return *this;
358 : }
359 :
360 : /**
361 : * Copy function
362 : * @param oAL the avhrr line to copy
363 : */
364 0 : void Copy(const AvhrrLine_t& oAL)
365 : {
366 0 : if(this == &oAL)
367 : {
368 0 : return;
369 : }
370 0 : nScanLineNum = oAL.nScanLineNum;
371 0 : nStartScanTimeGMTMsec = oAL.nStartScanTimeGMTMsec;
372 0 : for(int i=0 ; i < 10 ; i++)
373 0 : abyScanLineQuality[i] = oAL.abyScanLineQuality[i];
374 0 : for(int i=0 ; i < 5 ; i++)
375 : {
376 0 : aabyBadBandIndicators[i][0] = oAL.aabyBadBandIndicators[i][0];
377 0 : aabyBadBandIndicators[i][1] = oAL.aabyBadBandIndicators[i][1];
378 0 : anSpaceScanData[i] = oAL.anSpaceScanData[i];
379 : }
380 0 : for(int i=0 ; i < 8 ; i++)
381 0 : abySatelliteTimeCode[i] = oAL.abySatelliteTimeCode[i];
382 0 : for(int i=0 ; i < 3 ; i++)
383 : {
384 0 : anTargetTempData[i] = oAL.anTargetTempData[i];
385 0 : anTargetScanData[i] = oAL.anTargetScanData[i];
386 : }
387 : }
388 :
389 : /* For geocoding */
390 : int nScanLineNum;
391 : int nStartScanTimeGMTMsec;
392 : unsigned char abyScanLineQuality[10];
393 : unsigned char aabyBadBandIndicators[5][2];
394 : unsigned char abySatelliteTimeCode[8];
395 :
396 : /* For thermal/IR calibration */
397 : int anTargetTempData[3];
398 : int anTargetScanData[3];
399 : int anSpaceScanData[5];
400 :
401 : } ;
402 :
403 : /**
404 : * Avhrr segment information.
405 : */
406 : struct AvhrrSeg_t
407 : {
408 : /**
409 : * Default constructor
410 : */
411 0 : AvhrrSeg_t() :
412 : nImageXSize(0),
413 : nImageYSize(0),
414 : bIsAscending(false),
415 : bIsImageRotated(false),
416 : nRecordSize(0),
417 : nBlockSize(0),
418 : nNumRecordsPerBlock(0),
419 : nNumBlocks(0),
420 0 : nNumScanlineRecords(0)
421 : {
422 0 : }
423 : /**
424 : * Copy constructor
425 : * @param oAS the avhrr segment to copy
426 : */
427 0 : AvhrrSeg_t(const AvhrrSeg_t& oAS)
428 0 : {
429 0 : Copy(oAS);
430 0 : }
431 :
432 : /**
433 : * assignment operator
434 : * @param oAS the avhrr segment to assign
435 : */
436 : AvhrrSeg_t& operator=(const AvhrrSeg_t& oAS)
437 : {
438 : Copy(oAS);
439 : return *this;
440 : }
441 :
442 : /**
443 : * Copy function
444 : * @param oAS the avhrr segment to copy
445 : */
446 0 : void Copy(const AvhrrSeg_t& oAS)
447 : {
448 0 : if(this == &oAS)
449 : {
450 0 : return;
451 : }
452 0 : szImageFormat = oAS.szImageFormat;
453 0 : nImageXSize = oAS.nImageXSize;
454 0 : nImageYSize = oAS.nImageYSize;
455 0 : bIsAscending = oAS.bIsAscending;
456 0 : bIsImageRotated = oAS.bIsImageRotated;
457 0 : szOrbitNumber = oAS.szOrbitNumber;
458 0 : szAscendDescendNodeFlag = oAS.szAscendDescendNodeFlag;
459 0 : szEpochYearAndDay = oAS.szEpochYearAndDay;
460 0 : szEpochTimeWithinDay = oAS.szEpochTimeWithinDay;
461 0 : szTimeDiffStationSatelliteMsec = oAS.szTimeDiffStationSatelliteMsec;
462 0 : szActualSensorScanRate = oAS.szActualSensorScanRate;
463 0 : szIdentOfOrbitInfoSource = oAS.szIdentOfOrbitInfoSource;
464 0 : szInternationalDesignator = oAS.szInternationalDesignator;
465 0 : szOrbitNumAtEpoch = oAS.szOrbitNumAtEpoch;
466 0 : szJulianDayAscendNode = oAS.szJulianDayAscendNode;
467 0 : szEpochYear = oAS.szEpochYear;
468 0 : szEpochMonth = oAS.szEpochMonth;
469 0 : szEpochDay = oAS.szEpochDay;
470 0 : szEpochHour = oAS.szEpochHour;
471 0 : szEpochMinute = oAS.szEpochMinute;
472 0 : szEpochSecond = oAS.szEpochSecond;
473 0 : szPointOfAriesDegrees = oAS.szPointOfAriesDegrees;
474 0 : szAnomalisticPeriod = oAS.szAnomalisticPeriod;
475 0 : szNodalPeriod = oAS.szNodalPeriod;
476 0 : szEccentricity = oAS.szEccentricity;
477 0 : szArgumentOfPerigee = oAS.szArgumentOfPerigee;
478 0 : szRAAN = oAS.szRAAN;
479 0 : szInclination = oAS.szInclination;
480 0 : szMeanAnomaly = oAS.szMeanAnomaly;
481 0 : szSemiMajorAxis = oAS.szSemiMajorAxis;
482 0 : nRecordSize = oAS.nRecordSize;
483 0 : nBlockSize = oAS.nBlockSize;
484 0 : nNumRecordsPerBlock = oAS.nNumRecordsPerBlock;
485 0 : nNumBlocks = oAS.nNumBlocks;
486 0 : nNumScanlineRecords = oAS.nNumScanlineRecords;
487 0 : Line = oAS.Line;
488 : }
489 :
490 : /* Ninth Block Part 1 - General/header information */
491 : std::string szImageFormat;
492 : int nImageXSize;
493 : int nImageYSize;
494 : bool bIsAscending;
495 : bool bIsImageRotated;
496 :
497 : /* Ninth Block Part 2 - Ephemeris information */
498 : std::string szOrbitNumber;
499 : std::string szAscendDescendNodeFlag;
500 : std::string szEpochYearAndDay;
501 : std::string szEpochTimeWithinDay;
502 : std::string szTimeDiffStationSatelliteMsec;
503 : std::string szActualSensorScanRate;
504 : std::string szIdentOfOrbitInfoSource;
505 : std::string szInternationalDesignator;
506 : std::string szOrbitNumAtEpoch;
507 : std::string szJulianDayAscendNode;
508 : std::string szEpochYear;
509 : std::string szEpochMonth;
510 : std::string szEpochDay;
511 : std::string szEpochHour;
512 : std::string szEpochMinute;
513 : std::string szEpochSecond;
514 : std::string szPointOfAriesDegrees;
515 : std::string szAnomalisticPeriod;
516 : std::string szNodalPeriod;
517 : std::string szEccentricity;
518 : std::string szArgumentOfPerigee;
519 : std::string szRAAN;
520 : std::string szInclination;
521 : std::string szMeanAnomaly;
522 : std::string szSemiMajorAxis;
523 :
524 : /* 10th Block - Empty, reserved for future use */
525 :
526 : /* 11th Block - Needed for indexing 12th block onwards */
527 : int nRecordSize;
528 : int nBlockSize;
529 : int nNumRecordsPerBlock;
530 : int nNumBlocks;
531 : int nNumScanlineRecords;
532 :
533 : /* 12th Block and onwards - Per-scanline records */
534 : std::vector<AvhrrLine_t> Line;
535 :
536 : } ;
537 :
538 : /**
539 : * Possible orbit types.
540 : */
541 : typedef enum
542 : {
543 : OrbNone,
544 : OrbAttitude,
545 : OrbLatLong,
546 : OrbAvhrr
547 : } OrbitType;
548 :
549 : /**
550 : * Ephemeris segment structure
551 : */
552 : struct EphemerisSeg_t
553 : {
554 : /**
555 : * Default constructor
556 : */
557 0 : EphemerisSeg_t()
558 0 : {
559 0 : SupSegExist = false;
560 0 : FieldOfView = 0.0;
561 0 : ViewAngle = 0.0;
562 0 : NumColCentre = 0.0;
563 0 : RadialSpeed = 0.0;
564 0 : Eccentricity = 0.0;
565 0 : Height = 0.0;
566 0 : Inclination = 0.0;
567 0 : TimeInterval = 0.0;
568 0 : NumLineCentre = 0.0;
569 0 : LongCentre = 0.0;
570 0 : AngularSpd = 0.0;
571 0 : AscNodeLong = 0.0;
572 0 : ArgPerigee = 0.0;
573 0 : LatCentre = 0.0;
574 0 : EarthSatelliteDist = 0.0;
575 0 : NominalPitch = 0.0;
576 0 : TimeAtCentre = 0.0;
577 0 : SatelliteArg = 0.0;
578 0 : XCentre = 0.0;
579 0 : YCentre = 0.0;
580 0 : UtmYCentre = 0.0;
581 0 : UtmXCentre = 0.0;
582 0 : PixelRes = 0.0;
583 0 : LineRes = 0.0;
584 0 : CornerAvail = false;
585 0 : XUL = 0.0;
586 0 : YUL = 0.0;
587 0 : XUR = 0.0;
588 0 : YUR = 0.0;
589 0 : XLR = 0.0;
590 0 : YLR = 0.0;
591 0 : XLL = 0.0;
592 0 : YLL = 0.0;
593 0 : UtmYUL = 0.0;
594 0 : UtmXUL = 0.0;
595 0 : UtmYUR = 0.0;
596 0 : UtmXUR = 0.0;
597 0 : UtmYLR = 0.0;
598 0 : UtmXLR = 0.0;
599 0 : UtmYLL = 0.0;
600 0 : UtmXLL = 0.0;
601 0 : LatCentreDeg = 0.0;
602 0 : LongCentreDeg = 0.0;
603 0 : LatUL = 0.0;
604 0 : LongUL = 0.0;
605 0 : LatUR = 0.0;
606 0 : LongUR = 0.0;
607 0 : LatLR = 0.0;
608 0 : LongLR = 0.0;
609 0 : LatLL = 0.0;
610 0 : LongLL = 0.0;
611 0 : HtCentre = 0.0;
612 0 : HtUL = 0.0;
613 0 : HtUR = 0.0;
614 0 : HtLR = 0.0;
615 0 : HtLL = 0.0;
616 0 : std::memset(SPCoeff1B, 0, sizeof(SPCoeff1B));
617 0 : std::memset(SPCoeffSg, 0, sizeof(SPCoeffSg));
618 0 : ImageRecordLength = 0;
619 0 : NumberImageLine = 0;
620 0 : NumberBytePerPixel = 0;
621 0 : NumberSamplePerLine = 0;
622 0 : NumberPrefixBytes = 0;
623 0 : NumberSuffixBytes = 0;
624 0 : SPNCoeff = 0;
625 0 : bDescending = false;
626 0 : Type = OrbNone;
627 0 : AttitudeSeg = nullptr;
628 0 : RadarSeg = nullptr;
629 0 : AvhrrSeg = nullptr;
630 0 : }
631 :
632 : /**
633 : * Destructor
634 : */
635 0 : ~EphemerisSeg_t()
636 0 : {
637 0 : delete AttitudeSeg;
638 0 : delete RadarSeg;
639 0 : delete AvhrrSeg;
640 0 : }
641 :
642 : /**
643 : * Copy constructor
644 : * @param oES the ephemeris segment to copy
645 : */
646 0 : EphemerisSeg_t(const EphemerisSeg_t& oES): EphemerisSeg_t()
647 : {
648 0 : Copy(oES);
649 0 : }
650 :
651 : /**
652 : * assignment operator
653 : * @param oES the ephemeris segment to assign
654 : */
655 : EphemerisSeg_t& operator=(const EphemerisSeg_t& oES)
656 : {
657 : Copy(oES);
658 : return *this;
659 : }
660 :
661 : /**
662 : * Copy function
663 : * @param oES the ephemeris segment to copy
664 : */
665 0 : void Copy(const EphemerisSeg_t& oES)
666 : {
667 0 : if(this == &oES)
668 : {
669 0 : return;
670 : }
671 0 : delete AttitudeSeg;
672 0 : delete RadarSeg;
673 0 : delete AvhrrSeg;
674 0 : AttitudeSeg = nullptr;
675 0 : RadarSeg = nullptr;
676 0 : AvhrrSeg = nullptr;
677 0 : if(oES.AttitudeSeg)
678 0 : AttitudeSeg = new AttitudeSeg_t(*oES.AttitudeSeg);
679 0 : if(oES.RadarSeg)
680 0 : RadarSeg = new RadarSeg_t(*oES.RadarSeg);
681 0 : if(oES.AvhrrSeg)
682 0 : AvhrrSeg = new AvhrrSeg_t(*oES.AvhrrSeg);
683 :
684 0 : for(int i =0 ; i <39 ; i++)
685 0 : SPCoeff1B[i] = oES.SPCoeff1B[i];
686 0 : for(int i =0 ; i <4 ; i++)
687 0 : SPCoeffSg[i] = oES.SPCoeffSg[i];
688 :
689 0 : SatelliteDesc = oES.SatelliteDesc;
690 0 : SceneID = oES.SceneID;
691 0 : SatelliteSensor = oES.SatelliteSensor;
692 0 : SensorNo = oES.SensorNo;
693 0 : DateImageTaken = oES.DateImageTaken;
694 0 : SupSegExist = oES.SupSegExist;
695 0 : FieldOfView = oES.FieldOfView;
696 0 : ViewAngle = oES.ViewAngle;
697 0 : NumColCentre = oES.NumColCentre;
698 0 : RadialSpeed = oES.RadialSpeed;
699 0 : Eccentricity = oES.Eccentricity;
700 0 : Height = oES.Height;
701 0 : Inclination = oES.Inclination;
702 0 : TimeInterval = oES.TimeInterval;
703 0 : NumLineCentre = oES.NumLineCentre;
704 0 : LongCentre = oES.LongCentre;
705 0 : AngularSpd = oES.AngularSpd;
706 0 : AscNodeLong = oES.AscNodeLong;
707 0 : ArgPerigee = oES.ArgPerigee;
708 0 : LatCentre = oES.LatCentre;
709 0 : EarthSatelliteDist = oES.EarthSatelliteDist;
710 0 : NominalPitch = oES.NominalPitch;
711 0 : TimeAtCentre = oES.TimeAtCentre;
712 0 : SatelliteArg = oES.SatelliteArg;
713 0 : XCentre = oES.XCentre;
714 0 : YCentre = oES.YCentre;
715 0 : UtmYCentre = oES.UtmYCentre;
716 0 : UtmXCentre = oES.UtmXCentre;
717 0 : PixelRes = oES.PixelRes;
718 0 : LineRes = oES.LineRes;
719 0 : CornerAvail = oES.CornerAvail;
720 0 : MapUnit = oES.MapUnit;
721 0 : XUL = oES.XUL;
722 0 : YUL = oES.YUL;
723 0 : XUR = oES.XUR;
724 0 : YUR = oES.YUR;
725 0 : XLR = oES.XLR;
726 0 : YLR = oES.YLR;
727 0 : XLL = oES.XLL;
728 0 : YLL = oES.YLL;
729 0 : UtmYUL = oES.UtmYUL;
730 0 : UtmXUL = oES.UtmXUL;
731 0 : UtmYUR = oES.UtmYUR;
732 0 : UtmXUR = oES.UtmXUR;
733 0 : UtmYLR = oES.UtmYLR;
734 0 : UtmXLR = oES.UtmXLR;
735 0 : UtmYLL = oES.UtmYLL;
736 0 : UtmXLL = oES.UtmXLL;
737 0 : LatCentreDeg = oES.LatCentreDeg;
738 0 : LongCentreDeg = oES.LongCentreDeg;
739 0 : LatUL = oES.LatUL;
740 0 : LongUL = oES.LongUL;
741 0 : LatUR = oES.LatUR;
742 0 : LongUR = oES.LongUR;
743 0 : LatLR = oES.LatLR;
744 0 : LongLR = oES.LongLR;
745 0 : LatLL = oES.LatLL;
746 0 : LongLL = oES.LongLL;
747 0 : HtCentre = oES.HtCentre;
748 0 : HtUL = oES.HtUL;
749 0 : HtUR = oES.HtUR;
750 0 : HtLR = oES.HtLR;
751 0 : HtLL = oES.HtLL;
752 0 : ImageRecordLength = oES.ImageRecordLength;
753 0 : NumberImageLine = oES.NumberImageLine;
754 0 : NumberBytePerPixel = oES.NumberBytePerPixel;
755 0 : NumberSamplePerLine = oES.NumberSamplePerLine;
756 0 : NumberPrefixBytes = oES.NumberPrefixBytes;
757 0 : NumberSuffixBytes = oES.NumberSuffixBytes;
758 0 : SPNCoeff = oES.SPNCoeff;
759 0 : bDescending = oES.bDescending;
760 0 : Type = oES.Type;
761 : }
762 :
763 : /// Satellite description
764 : std::string SatelliteDesc;
765 : /// Scene ID
766 : std::string SceneID;
767 :
768 : /// Satellite sensor
769 : std::string SatelliteSensor;
770 : /// Satellite sensor no.
771 : std::string SensorNo;
772 : /// Date of image taken
773 : std::string DateImageTaken;
774 : /// Flag to indicate supplemental segment
775 : bool SupSegExist;
776 : /// Scanner field of view (ALPHA)
777 : double FieldOfView;
778 : /// Viewing angle (BETA)
779 : double ViewAngle;
780 : /// Number of column at center (C0)
781 : double NumColCentre;
782 : /// Radial speed (DELIRO)
783 : double RadialSpeed;
784 : /// Eccentricity (ES)
785 : double Eccentricity;
786 : /// Height (H0)
787 : double Height;
788 : /// Inclination (I)
789 : double Inclination;
790 : /// Time interval (K)
791 : double TimeInterval;
792 : /// Number of line at center (L0)
793 : double NumLineCentre;
794 : /// Longitude of center (LAMBDA)
795 : double LongCentre;
796 : /// Angular speed (N)
797 : double AngularSpd;
798 : /// Ascending node Longitude (OMEGA-MAJ)
799 : double AscNodeLong;
800 : /// Argument Perigee (OMEGA-MIN)
801 : double ArgPerigee;
802 : /// Latitude of center (PHI)
803 : double LatCentre;
804 : /// Earth Satellite distance (RHO)
805 : double EarthSatelliteDist;
806 : /// Nominal pitch (T)
807 : double NominalPitch;
808 : /// Time at centre (T0)
809 : double TimeAtCentre;
810 : /// Satellite argument (WP)
811 : double SatelliteArg;
812 :
813 : /// Scene center pixel coordinate
814 : double XCentre;
815 : /// Scene center line coordinate
816 : double YCentre;
817 : /// Scene centre UTM northing
818 : double UtmYCentre;
819 : /// Scene centre UTM easting
820 : double UtmXCentre;
821 : /// Pixel resolution in x direction
822 : double PixelRes;
823 : /// Pixel resolution in y direction
824 : double LineRes;
825 : /// Flag to tell corner coordinate available
826 : bool CornerAvail;
827 : /// Map units
828 : std::string MapUnit;
829 : /// Pixel coordinate of upper left corner
830 : double XUL;
831 : /// Line coordinate of upper left corner
832 : double YUL;
833 : /// Pixel coordinate of upper right corner
834 : double XUR;
835 : /// Line coordinate of upper right corner
836 : double YUR;
837 : /// Pixel coordinate of lower right corner
838 : double XLR;
839 : /// Line coordinate of lower right corner
840 : double YLR;
841 : /// Pixel coordinate of lower left corner
842 : double XLL;
843 : /// Line coordinate of lower left corner
844 : double YLL;
845 : /// UTM Northing of upper left corner
846 : double UtmYUL;
847 : /// UTM Easting of upper left corner
848 : double UtmXUL;
849 : /// UTM Northing of upper right corner
850 : double UtmYUR;
851 : /// UTM Easting of upper right corner
852 : double UtmXUR;
853 : /// UTM Northing of lower right corner
854 : double UtmYLR;
855 : /// UTM Easting of lower right corner
856 : double UtmXLR;
857 : /// Utm Northing of lower left corner
858 : double UtmYLL;
859 : /// Utm Easting of lower left corner
860 : double UtmXLL;
861 :
862 : /// Scene centre latitude (deg)
863 : double LatCentreDeg;
864 : /// Scene centre longitude (deg)
865 : double LongCentreDeg;
866 : /// Upper left latitude (deg)
867 : double LatUL;
868 : /// Upper left longitude (deg)
869 : double LongUL;
870 : /// Upper right latitude (deg)
871 : double LatUR;
872 : /// Upper right longitude (deg)
873 : double LongUR;
874 : /// Lower right latitude (deg)
875 : double LatLR;
876 : /// Lower right longitude (deg)
877 : double LongLR;
878 : /// Lower left latitude (deg)
879 : double LatLL;
880 : /// Lower left longitude (deg)
881 : double LongLL;
882 : /// Centre Height (m)
883 : double HtCentre;
884 : /// UL Height (m)
885 : double HtUL;
886 : /// UR Height (m)
887 : double HtUR;
888 : /// LR Height (m)
889 : double HtLR;
890 : /// LL Height (m)
891 : double HtLL;
892 :
893 : /// SPOT 1B coefficients
894 : double SPCoeff1B[39];
895 : /// SPOT 1B segment coefficients
896 : int SPCoeffSg[4];
897 :
898 : /// Image record length
899 : int ImageRecordLength;
900 : /// Number of image line
901 : int NumberImageLine;
902 : /// Number of bytes per pixel
903 : int NumberBytePerPixel;
904 : /// Number of samples per line
905 : int NumberSamplePerLine;
906 : /// Number of prefix bytes
907 : int NumberPrefixBytes;
908 : /// Number of suffix bytes
909 : int NumberSuffixBytes;
910 : /// Number of coefficients for SPOT 1B
911 : int SPNCoeff;
912 :
913 : /// Flag to indicate ascending or descending
914 : bool bDescending;
915 :
916 : /// Orbit type: None, LatLong, Attitude, Avhrr
917 : OrbitType Type;
918 : AttitudeSeg_t *AttitudeSeg;
919 : RadarSeg_t *RadarSeg;
920 : AvhrrSeg_t *AvhrrSeg;
921 : };
922 :
923 : /**
924 : * List of sensor type
925 : */
926 : typedef enum {PLA_1, MLA_1, PLA_2, MLA_2, PLA_3, MLA_3, PLA_4, MLA_4,
927 : ASTER, SAR, LISS_1, LISS_2, LISS_3, LISS_L3, LISS_L3_L2,
928 : LISS_L4, LISS_L4_L2, LISS_P3, LISS_P3_L2, LISS_W3, LISS_W3_L2,
929 : LISS_AWF, LISS_AWF_L2, LISS_M3, EOC, IRS_1, RSAT_FIN,
930 : RSAT_STD, ERS_1, ERS_2, TM, ETM, IKO_PAN, IKO_MULTI,
931 : ORBVIEW_PAN, ORBVIEW_MULTI, OV3_PAN_BASIC, OV3_PAN_GEO,
932 : OV3_MULTI_BASIC, OV3_MULTI_GEO, OV5_PAN_BASIC, OV5_PAN_GEO,
933 : OV5_MULTI_BASIC, OV5_MULTI_GEO, QBIRD_PAN, QBIRD_PAN_STD,
934 : QBIRD_PAN_STH, QBIRD_MULTI, QBIRD_MULTI_STD, QBIRD_MULTI_STH,
935 : FORMOSAT_PAN, FORMOSAT_MULTI, FORMOSAT_PAN_L2,
936 : FORMOSAT_MULTIL2, SPOT5_PAN_2_5, SPOT5_PAN_5, SPOT5_HRS,
937 : SPOT5_MULTI, MERIS_FR, MERIS_RR, MERIS_LR, ASAR, EROS,
938 : MODIS_250, MODIS_500, MODIS_1000, CBERS_HRC, CBERS_HRC_L2,
939 : CBERS_CCD, CBERS_CCD_L2, CBERS_IRM_80, CBERS_IRM_80_L2,
940 : CBERS_IRM_160, CBERS_IRM_160_L2, CBERS_WFI, CBERS_WFI_L2,
941 : CARTOSAT1_L1, CARTOSAT1_L2, ALOS_PRISM_L1, ALOS_PRISM_L2,
942 : ALOS_AVNIR_L1, ALOS_AVNIR_L2, PALSAR, DMC_1R, DMC_1T,
943 : KOMPSAT2_PAN, KOMPSAT2_MULTI, KOMPSAT3_PAN, KOMPSAT3_MS, KOMPSAT3_PSH,
944 : KOMPSAT3A_PAN, KOMPSAT3A_MS, KOMPSAT3A_PSH,
945 : TERRASAR, WVIEW_PAN, WVIEW_PAN_STD, WVIEW_MULTI,
946 : WVIEW_MULTI_STD, RAPIDEYE_L1B, THEOS_PAN_L1, THEOS_PAN_L2,
947 : THEOS_MS_L1, THEOS_MS_L2,
948 : GOSAT_500_L1, GOSAT_500_L2, GOSAT_1500_L1, GOSAT_1500_L2,
949 : HJ_CCD_1A, HJ_CCD_1B, PLEIADES_PAN_L1, PLEIADES_MS_L1,
950 : PLEIADES_PAN_L2, PLEIADES_MS_L2, SSOT_PAN_L1, SSOT_MS_L1,
951 : SSOT_PAN_L2, SSOT_MS_L2,
952 : SPOT1_PAN, SPOT1_MS, SPOT2_PAN, SPOT2_MS,
953 : SPOT3_PAN, SPOT3_MS, SPOT4_PAN, SPOT4_MS,
954 : SPOT6_PAN, SPOT6_MS, SPOT6_PSH, SPOT7_PAN, SPOT7_MS, SPOT7_PSH,
955 : RASAT_PAN, RASAT_MS, TH01_DGP, TH01_GFB, TH01_SXZ,
956 : ZY1_02C_HRC, ZY1_02C_PMS_PAN, ZY1_02C_PMS_MS,
957 : ZY3_NAD, ZY3_FWD, ZY3_BWD, ZY3_MUX, ZY3_TLC, GK2_PAN, GK2_MS, HRC,
958 : MRC_RED, MRC_GRN, MRC_BLU, MRC_NIR, GF1_PMS_PAN, GF1_PMS_MS, GF1_WFV,
959 : GF2_PMS_PAN, GF2_PMS_MS, GF4_PMS_MS, GF4_PMI_Thermal,
960 : GF6_PMS_PAN, GF6_PMS_MS, SJ9_PAN, SJ9_MUX, SJ9_PMS_PAN, SJ9_PMS_MS,
961 : YG2_1, YG8_1, YG14_1, UAVSAR, HI_RES, MED_RES, ALSAT2_PAN_1A, ALSAT2_MS_1A,
962 : ALSAT2_PAN_2A, ALSAT2_MS_2A, DUBAISAT2_PAN, DUBAISAT2_MS,
963 : KAZEOSAT1_PAN_1A, KAZEOSAT1_MS_1A, KAZEOSAT1_PAN_2A, KAZEOSAT1_MS_2A, KAZEOSAT2_MS_1G,
964 : DEIMOS1_MS_1R, DEIMOS2_PAN_1B, DEIMOS2_MS_1B, DEIMOS2_PSH_1B, HJ1C,
965 : TRIPLESAT_PAN, TRIPLESAT_MS, RESOURCESAT, JL101A_PAN, JL101A_MS,
966 : CBERS4_PAN_1, CBERS4_MS_1, CBERS4_PAN_2, CBERS4_MS_2,
967 : CBERS4_THM_1, CBERS4_THM_2, SV1_PAN_L1, SV1_MS_L1, SV1_PAN_L2, SV1_MS_L2,
968 : PER_PAN_2A, PER_MS_2A, FORMOSAT5_PAN, FORMOSAT5_MS,
969 : GEOEYE_PAN, GEOEYE_MULTI, GEOEYE_PAN_STD, GEOEYE_MULTI_STD,
970 : GOKTURK1_PAN, GOKTURK1_MS,
971 : NEW, AVHRR, MSS} TypeDeCapteur;
972 : }
973 :
974 : #endif // INCLUDE_PCIDSK_ORBIT_INFORMATION_H
|