Coverage Report

Created: 2025-07-23 09:13

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