Main Page | Class List | File List | Class Members | File Members

libmsg_sp_types.h

Go to the documentation of this file.
00001 /* libmsg_sp_types.h : specific purpose types */
00002 
00003 /* 
00004    Copyright (C) 2005 Fabrice Ducos <fabrice.ducos@icare.univ-lille1.fr>
00005    This file is part of the LibXRIT Library.
00006 
00007    The LibXRIT Library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011 
00012    The LibXRIT Library 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 GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with the LibXRIT Library; if not, write to the Free
00019    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00020    02111-1307 USA.
00021 
00022 */
00023 
00024 /* Fabrice Ducos, CGTD Icare 2005, fabrice.ducos@icare.univ-lille1.fr*/
00025 
00033 #ifndef _LIBMSG_SP_TYPES_H
00034 #define _LIBMSG_SP_TYPES_H
00035 
00036 #include "libmsg_gp_types.h"
00037 
00038 /* SATELLITE STATUS */
00039 typedef struct _SatelliteStatus {
00040   struct /* SatelliteDefinition */ {
00041     GP_SC_ID satelliteID;
00042     REAL nominalLongitude;
00043     ENUMERATED_BYTE satelliteStatus;
00044   } PACKED satelliteDefinition;
00045   
00046   struct /* SatelliteOperations */ {
00047     BOOLEAN_BYTE lastManoeuvreFlag;
00048     TIME_CDS_SHORT lastManoeuvreStartTime;
00049     TIME_CDS_SHORT lastManoeuvreEndTime;
00050     ENUMERATED_BYTE lastManoeuvreType;
00051     
00052     BOOLEAN_BYTE nextManoeuvreFlag;
00053     TIME_CDS_SHORT nextManoeuvreStartTime;
00054     TIME_CDS_SHORT nextManoeuvreEndTime;
00055     ENUMERATED_BYTE nextManoeuvreType;
00056   } PACKED satelliteOperations;
00057 
00058   struct /* Orbit */ {
00059     TIME_CDS_SHORT periodStartTime;
00060     TIME_CDS_SHORT periodEndTime;
00061     struct /* OrbitPolynomial */ {
00062       TIME_CDS_SHORT startTime;
00063       TIME_CDS_SHORT endTime;
00064       REAL_DOUBLE X[8];
00065       REAL_DOUBLE Y[8];
00066       REAL_DOUBLE Z[8];
00067       REAL_DOUBLE VX[8];
00068       REAL_DOUBLE VY[8];
00069       REAL_DOUBLE VZ[8];
00070     } PACKED orbitPolynomial[100];
00071   } PACKED orbit;
00072 
00073   struct /* Attitude */ {
00074     TIME_CDS_SHORT periodStartTime;
00075     TIME_CDS_SHORT periodEndTime;
00076     REAL_DOUBLE principleAxisOffsetAngle;
00077     struct /* AttitudeCoef */ {
00078       TIME_CDS_SHORT startTime;
00079       TIME_CDS_SHORT endTime;
00080       REAL_DOUBLE XofSpinAxis[8];
00081       REAL_DOUBLE YofSpinAxis[8];
00082       REAL_DOUBLE ZofSpinAxis[8];
00083     } PACKED attitudeCoef[100];
00084   } PACKED attitude;
00085 
00086   REAL_DOUBLE spinRateatRCStart;
00087 
00088   struct /* UTCCorrelation */ {
00089     TIME_CDS_SHORT periodStartTime;
00090     TIME_CDS_SHORT periodEndTime;
00091     TIME_CUC_SIZE(4,3) onBoardTimeStart;
00092     REAL_DOUBLE varOnBoardTimeStart;
00093     REAL_DOUBLE A1;
00094     REAL_DOUBLE varA1;
00095     REAL_DOUBLE A2;
00096     REAL_DOUBLE varA2;
00097   } PACKED UTCCorrelation;
00098 
00099 } PACKED SatelliteStatus;
00100 
00101 typedef struct _ImageAcquisition {
00102   struct /* PlannedAcquisitionTime */ {
00103     TIME_CDS_EXPANDED trueRepeatCycleStart;
00104     TIME_CDS_EXPANDED plannedForwardScanEnd;
00105     TIME_CDS_EXPANDED plannedRepeatCycleEnd;
00106   } PACKED plannedAcquisitionTime;
00107 
00108   struct /* RadiometerStatus */ {
00109     ENUMERATED_BYTE channelStatus[12];
00110     ENUMERATED_BYTE detectorStatus[42];
00111   } PACKED radiometerStatus;
00112 
00113   struct /* RadiometerSettings */ {
00114     UNSIGNED_SHORT MDUSamplingDelays[42];
00115     
00116     struct /* HRVFrameOffsets */ {
00117       UNSIGNED_SHORT MDUNomHRVDelay1;
00118       UNSIGNED_SHORT MDUNomHRVDelay2;
00119       BITSTRING_SIZE(16) spare;
00120       UNSIGNED_SHORT MDUNomHRVBreakline;
00121     } PACKED HRVFrameOffsets;
00122     
00123     ENUMERATED_BYTE DHSSSynchSelection;
00124     UNSIGNED_SHORT MDUOutGain[42];
00125     UNSIGNED_BYTE MDUCoarseGain[42]; /* specified as CourseGain (erroneous) in MSG Level 1.5 Image Data Format Description (4 February 2005)  */
00126     UNSIGNED_SHORT MDUFineGain[42];
00127     UNSIGNED_SHORT MDUNumericalOffset[42];
00128     UNSIGNED_SHORT PUGain[42];
00129     UNSIGNED_SHORT PUOffset[27];
00130     UNSIGNED_SHORT PUBias[15];
00131     
00132     struct /* OperationParameters */ {
00133       UNSIGNED_SHORT L0_LineCounter;
00134       UNSIGNED_SHORT K1_RetraceLines;
00135       UNSIGNED_SHORT K2_PauseDeciseconds;
00136       UNSIGNED_SHORT K3_RetraceLines;
00137       UNSIGNED_SHORT K4_PauseDeciseconds;
00138       UNSIGNED_SHORT K5_RetraceLines;
00139       ENUMERATED_BYTE X_DeepSpaceWindowPosition;
00140     } PACKED operationParameters;
00141 
00142     UNSIGNED_SHORT refocusingLines;
00143     ENUMERATED_BYTE refocusingDirection;
00144     UNSIGNED_SHORT refocusingPosition;
00145     BOOLEAN_BYTE scanRefPosFlag;
00146     UNSIGNED_SHORT scanRefPosNumber;
00147     REAL scanRefPotVal;
00148     UNSIGNED_SHORT scanFirstLine;
00149     UNSIGNED_SHORT scanLastLine;
00150     UNSIGNED_SHORT retraceStartLine;
00151   } PACKED radiometerSettings;
00152 
00153   struct /* RadiometerOperations */ {
00154     BOOLEAN_BYTE lastGainChangeFlag;
00155     TIME_CDS_SHORT lastGainChangTime;
00156     struct /* Decontamination */ {
00157       BOOLEAN_BYTE decontaminationNow;
00158       TIME_CDS_SHORT decontaminationStart;
00159       TIME_CDS_SHORT decontaminationEnd;
00160     } PACKED decontamination;
00161     
00162     BOOLEAN_BYTE BBCalScheduled;
00163     ENUMERATED_BYTE BBCalibrationType;
00164     
00165     UNSIGNED_SHORT BBFirstLine;
00166     UNSIGNED_SHORT BBLastLine;
00167     UNSIGNED_SHORT coldFocalPlaneOpTemp;
00168     UNSIGNED_SHORT warmFocalPlaneOpTemp;
00169   } PACKED radiometerOperations;
00170   
00171 } PACKED ImageAcquisition;
00172 
00173 typedef struct _EARTHMOONSUNCOEF {
00174   TIME_CDS_SHORT startTime;
00175   TIME_CDS_SHORT endTime;
00176   REAL_DOUBLE alphaCoef[8];
00177   REAL_DOUBLE betaCoef[8];
00178 } PACKED EARTHMOONSUNCOEF;
00179 
00180 typedef struct _STARCOEF_ELEMENT {
00181   UNSIGNED_SHORT starId;
00182   TIME_CDS_SHORT startTime;
00183   TIME_CDS_SHORT endTime;
00184   REAL_DOUBLE alphaCoef[8];
00185   REAL_DOUBLE betaCoef[8];
00186 } PACKED STARCOEF_ELEMENT;
00187 
00188 typedef struct _STARCOEF {
00189   STARCOEF_ELEMENT element[20];
00190 } PACKED STARCOEF;
00191 
00192 
00193 typedef struct _EPHEMERIS {
00194   TIME_CDS_SHORT periodStartTime;
00195   TIME_CDS_SHORT periodEndTime;
00196   TIME_GENERALIZED relatedOrbitFileTime;
00197   TIME_GENERALIZED relatedAttitudeFileTime;
00198   EARTHMOONSUNCOEF earthEphemeris[100];
00199   EARTHMOONSUNCOEF moonEphemeris[100];
00200   EARTHMOONSUNCOEF sunEphemeris[100];
00201   STARCOEF starEphemeris[100];
00202 } PACKED EPHEMERIS;
00203 
00204 
00205 typedef struct _CelestialEvents {
00206 
00207   EPHEMERIS celestialBodiesPosition;
00208   struct /* RelationToImage */ {
00209     ENUMERATED_BYTE typeofEclipse;
00210     TIME_CDS_SHORT eclipseStartTime;
00211     TIME_CDS_SHORT eclipseEndTime;
00212     ENUMERATED_BYTE visibleBodiesInImage;
00213     ENUMERATED_BYTE bodiesClosetoFOV;
00214     ENUMERATED_BYTE impactOnImageQuality;
00215   } PACKED relationToImage;
00216 } PACKED CelestialEvents;
00217 
00218 typedef struct _IMPF_CAL_Data_Element {
00219   ENUMERATED_BYTE imageQualityFlag;
00220   ENUMERATED_BYTE referenceDataFlag;
00221   ENUMERATED_BYTE absCalMethod;
00222   char Pad1; /* FIXME: should be CHARACTERSTRING_SIZE(1), this type is not yet implemented */
00223   REAL absCalWeightVic;
00224   REAL absCalWeightXsat;
00225   REAL absCalCoeff;
00226   REAL absCalError;
00227   REAL calMonBias;
00228   REAL calMonRMS;
00229   REAL offsetCount;
00230 } PACKED IMPF_CAL_Data_Element;
00231 
00232 typedef struct _IMPF_CAL_Data {
00233   IMPF_CAL_Data_Element element[12];
00234 } PACKED IMPF_CAL_Data;
00235 
00236 typedef struct _ImageDescription {
00237   struct /* ProjectionDescription */ {
00238     ENUMERATED_BYTE typeOfProjection;
00239     REAL longitudeOfSSP;
00240   } PACKED projectionDescription;
00241   struct /* ReferenceGridVIS_IR */ {
00242     INTEGER numberOfLines;
00243     INTEGER numberOfColumns;
00244     REAL lineDirGridStep;
00245     REAL columnDirGridStep;
00246     ENUMERATED_BYTE gridOrigin;
00247   } PACKED referenceGridVIS_IR;
00248   struct /* ReferenceGridHRV */ {
00249     INTEGER numberOfLines;
00250     INTEGER numberOfColumns;
00251     REAL lineDirGridStep;
00252     REAL columnDirGridStep;
00253     ENUMERATED_BYTE gridOrigin;
00254   } PACKED referenceGridHRV;
00255   struct /* PlannedCoverageVIS_IR */ {
00256     INTEGER southernLinePlanned;
00257     INTEGER northernLinePlanned;
00258     INTEGER easternColumnPlanned;
00259     INTEGER westernColumnPlanned;
00260   } PACKED plannedCoverageVIS_IR;
00261   struct /* PlannedCoverageHRV */ {
00262     INTEGER lowerSouthLinePlanned;
00263     INTEGER lowerNorthLinePlanned;
00264     INTEGER lowerEastColumnPlanned;
00265     INTEGER lowerWestColumnPlanned;
00266     INTEGER upperSouthLinePlanned;
00267     INTEGER upperNorthLinePlanned;
00268     INTEGER upperEastColumnPlanned;
00269     INTEGER upperWestColumnPlanned;
00270   } PACKED plannedCoverageHRV;
00271   struct /* Level_1_5_ImageProduction */ {
00272     ENUMERATED_BYTE imageProcDirection;
00273     ENUMERATED_BYTE pixelGenDirection;
00274     BOOLEAN_BYTE plannedChanProcessing[12];
00275   } PACKED level_1_5_ImageProduction;
00276 } PACKED ImageDescription;
00277 
00278 typedef struct _RadiometricProcessing {
00279   struct /* RPSummary  */ {
00280     BOOLEAN_BYTE radianceLinearization[12];
00281     BOOLEAN_BYTE detectorEqualization[12];
00282     BOOLEAN_BYTE onboardCalibrationResult[12];
00283     BOOLEAN_BYTE MPEFCalFeedback[12];
00284     BOOLEAN_BYTE MTFAdaptation[12];
00285     BOOLEAN_BYTE straylightCorrectionFlag[12];
00286   } PACKED RPSummary;
00287 
00288   struct /* Level1_5ImageCalibration */ {
00289     REAL_DOUBLE cal_Slope;
00290     REAL_DOUBLE cal_Offset;
00291   } PACKED level1_5ImageCalibration[12];
00292 
00293   struct /* BlackBodyDataUsed */ {
00294     TIME_CDS_EXPANDED BBObservationUTC;
00295     struct /* BBRelatedData */ {
00296       TIME_CUC_SIZE(4,3) onBoardBBTime;
00297       UNSIGNED_SHORT MDUOutGain[42];
00298       UNSIGNED_BYTE MDUCoarseGain[42];
00299       UNSIGNED_SHORT MDUFineGain[42];
00300       UNSIGNED_SHORT MDUNumericalOffset[42];
00301       UNSIGNED_SHORT PUGain[42];
00302       UNSIGNED_SHORT PUOffset[27];
00303       UNSIGNED_SHORT PUBias[15];
00304       // BITSTRING_SIZE(12) DCRValues[42]; /* CHECKME: maybe portability issues due to the use of BITSTRING (implemented as a bitfield)  */
00305       unsigned char DCRValues[63]; /* should be defined as BITSTRING_SIZE(12), but BITSTRING_SIZE implementation is not yet satisfactory
00306                                     * (each BITSTRING_SIZE(12) occupies 16 bits in memory and not really 12 bits)
00307                                     */
00308       ENUMERATED_BYTE X_DeepSpaceWindowPosition;
00309       struct /* ColdFPTemperature */ {
00310         UNSIGNED_SHORT FCUNominalColdFocalPlaneTemp;
00311         UNSIGNED_SHORT FCURedundantColdFocalPlaneTemp;
00312       } PACKED coldFPTemperature;
00313       struct /* WarmFPTemperature */ {
00314         UNSIGNED_SHORT FCUNominalWarmFocalPlaneVHROTemp;
00315         UNSIGNED_SHORT FCURedundantWarmFocalPlaneVHROTemp;
00316       } PACKED warmFPTemperature;
00317       struct /* ScanMirrorTemperature */ {
00318         UNSIGNED_SHORT FCUNominalScanMirrorSensor1Temp;
00319         UNSIGNED_SHORT FCURedundantScanMirrorSensor1Temp;
00320         UNSIGNED_SHORT FCUNominalScanMirrorSensor2Temp;
00321         UNSIGNED_SHORT FCURedundantScanMirrorSensor2Temp;
00322       } PACKED scanMirrorTemperature;
00323       struct /* M1M2M3Temperature */ {
00324         UNSIGNED_SHORT FCUNominalM1MirrorSensor1Temp;
00325         UNSIGNED_SHORT FCURedundantM1MirrorSensor1Temp;
00326         UNSIGNED_SHORT FCUNominalM1MirrorSensor2Temp;
00327         UNSIGNED_SHORT FCURedundantM1MirrorSensor2Temp;
00328         UNSIGNED_BYTE FCUNominalM23AssemblySensor1Temp;
00329         UNSIGNED_BYTE FCURedundantM23AssemblySensor1Temp;
00330         UNSIGNED_BYTE FCUNominalM23AssemblySensor2Temp;
00331         UNSIGNED_BYTE FCURedundantM23AssemblySensor2Temp;
00332       } PACKED M1M2M3Temperature;
00333       struct /* BaffleTemperature */ {
00334         UNSIGNED_SHORT FCUNominalM1BaffleTemp;
00335         UNSIGNED_SHORT FCURedundantM1BaffleTemp;
00336       } PACKED baffleTemperature;
00337       struct /* BlackBodyTemperature */ {
00338         UNSIGNED_SHORT FCUNominalBlackBodySensorTemp;
00339         UNSIGNED_SHORT FCURedundantBlackBodySensorTemp;
00340       } PACKED blackBodyTemperature;
00341       struct /* FCUMode */ {
00342         BITSTRING_SIZE(16) FCUNominalSMMStatus;
00343         BITSTRING_SIZE(16) FCURedundantSMMStatus;
00344       } PACKED FCUMode;
00345       struct /* ExtractedBBData */ {
00346         UNSIGNED numberOfPixelsUsed;
00347         REAL meanCount;
00348         REAL RMS;
00349         UNSIGNED_SHORT maxCount;
00350         UNSIGNED_SHORT minCount;
00351         REAL_DOUBLE BB_Processing_Slope;
00352         REAL_DOUBLE BB_Processing_Offset;
00353       } PACKED extractedBBData[12];
00354     } PACKED BBRelatedData;
00355   } PACKED blackBodyDataUsed; /* CHECKME: error in Document MSG Level 1.5 Image Data Format Description (closing curly brackets missing in the document) */
00356 
00357   IMPF_CAL_Data MPEFCalFeedback;
00358   REAL radTransform[42][64]; /* CHECKME: check order of dimensions (Fortran and C don't share the same ordering scheme) */
00359   struct /* RadProcMTFAdaptation */ {
00360     REAL VIS_IRMTFCorrectionE_W[33][16]; /* CHECKME: check order of dimensions (Fortran and C don't share the same ordering scheme) */
00361     REAL VIS_IRMTFCorrectionN_S[33][16]; /* CHECKME: check order of dimensions (Fortran and C don't share the same ordering scheme) */
00362     REAL HRVMTFCorrectionE_W[42-34+1][16]; /* CHECKME: check order of dimensions (Fortran and C don't share the same ordering scheme) */
00363     REAL HRVMTFCorrectionN_S[42-34+1][16]; /* CHECKME: check order of dimensions (Fortran and C don't share the same ordering scheme) */
00364     REAL straylightCorrection[12][8][8]; /* CHECKME: check order of dimensions (Fortran and C don't share the same ordering scheme) */
00365   } PACKED radProcMTFAdaptation;
00366 } PACKED RadiometricProcessing;
00367 
00368 typedef struct _GeometricProcessing {
00369   struct /* OptAxisDistances */ {
00370     REAL E_WFocalPlane[42];
00371     REAL N_SFocalPlane[42];
00372   } PACKED optAxisDistances;
00373   struct /* EarthModel */ {
00374     ENUMERATED_BYTE typeOfEarthModel;
00375     REAL_DOUBLE equatorialRadius;
00376     REAL_DOUBLE northPolarRadius;
00377     REAL_DOUBLE southPolarRadius;
00378   } PACKED earthModel;
00379   REAL atmosphericModel[12][360]; /* CHECKME: check order of dimensions (Fortran and C don't share the same ordering scheme) */
00380   ENUMERATED_BYTE resamplingFunctions[12];
00381 } PACKED GeometricProcessing;
00382 
00383 /* FIXME: IMPFConfiguration not yet implemented
00384 struct _IMPFConfiguration {
00385   
00386 } IMPFConfiguration;
00387 */
00388 
00389 typedef struct _MSG_Prologue {
00390   SatelliteStatus satelliteStatus;
00391   ImageAcquisition imageAcquisition;
00392   CelestialEvents celestialEvents;
00393   ImageDescription imageDescription;
00394   RadiometricProcessing radiometricProcessing;
00395   GeometricProcessing geometricProcessing;
00396 } PACKED MSG_Prologue;
00397 
00398 typedef struct _MSG_Epilogue {
00399   char *dont_use_me; /* FIXME: for the time being, this structure is not implemented. */
00400 } PACKED MSG_Epilogue;
00401 
00402 #endif

Generated on Wed Oct 19 13:55:57 2005 for LibXRIT by doxygen 1.3.5