ocssw  1.0
/disk01/web/ocssw/build/inc/osmiinc/InstStatData.h (r8102/r3)
Go to the documentation of this file.
00001 /*
00002  * Instrument Status Datafile header definition
00003  *
00004  * Copyright @1998 Datron/Transco, Inc.
00005  *
00006  * Originator: P.G. Heffernan
00007  *
00008  * "%Z% %M% %I% - %E%"
00009  *
00010  * Description:  This include file provides a set
00011  *  of structures which identify the data
00012  *  contained in an Instrument Status Data (ISD) file
00013  *  produced by the KOMPSAT Mission Control Station.
00014  *  The structure identifies the data contained
00015  *  in one record contained in an ISD per the
00016  *  KOMPSAT MCS-IRPE Interface Control Document.
00017  *
00018  * Version  Date    Programmer  Description
00019  * Orig     10/8/98 PG Heffernan    Original
00020  * 1.1          12/1/99 WD Benton   ISD format change, fix interpretation
00021  *                  of OSMI Band limits
00022  *
00023  */
00024 #ifndef ISD_H_DEFINED
00025 #define ISD_H_DEFINED
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 /*
00032  * Library Defines
00033  */
00034 
00035 /* Sizes */
00036 #define ONE_BIT_SIZE    2
00037 #define TWO_BIT_SIZE    4
00038 #define THREE_BIT_SIZE  8
00039 #define FOUR_BIT_SIZE   16
00040 #define FIVE_BIT_SIZE   32
00041 #define SIX_BIT_SIZE    64
00042 #define SEVEN_BIT_SIZE  128
00043 #define EIGHT_BIT_SIZE  256
00044 
00045 /* Time */
00046 #define NUM_SEC_PER_MIN 60.0
00047 #define NUM_MIN_PER_HOUR 60.0
00048 #define NUM_HOUR_PER_DAY 24.0
00049 #define FRAC_TIME_DIV 16777216.0
00050 
00051 /* ISD Specifics */
00052 #define INST_STAT_DATA_FILE_WC "INSTR_%04s%02s%02s*_S.DAT"
00053 #define ISD_RECORD_SIZE 204
00054 #define ISD_SPACECRAFT_TIME_OFFSET 0
00055 #define ISD_GPS_TIME_SIZE 26
00056 #define ISD_GPS_TIME_OFFSET 11
00057 
00058 /*
00059  * Function Prototypes
00060  */
00061 
00062 /*
00063  * Structure Declarations
00064  */
00065 struct isd_spacecraft_time {
00066     int quarter_sec_week; /* Quarter Seconds of Week, 0-2,419,199 */
00067     int weeks; /* Weeks 0-4,095 */
00068 };
00069 
00070 struct isd_glob_pos_syst_time {
00071     int year; /* Self explanatory */
00072     int month;
00073     int day;
00074     int hour;
00075     int minute;
00076     int second;
00077     int frac_second;
00078 };
00079 
00080 struct inst_stat_data_misc {
00081     char    cover_position[14]; /* Cover position, No units */
00082     int eoc_prim_pwr_stat; /* EOC Primary Power Status, 0:Off, 1:On */
00083     int eoc_red_pwr_stat; /* EOC Redundant Power Status, 0:Off, 1:On */
00084     int eoc_pri_htr_pwr_stat; /* EOC Primary Heater Power Status, 0:Off, 1:On */
00085     int eoc_red_htr_pwr_stat; /* EOC Redundant Heater Power Status, 0:Off, 1:On */
00086     int lrc_htr_pwr_stat; /* LRC Heater Power Status, 0:Off, 1:On */
00087     int lrc_pwr_stat; /* LRC Power Status, 0:Off, 1:On */
00088     char    mirror_position[14]; /* Mirror Position */
00089     int sps_pri_pwr_stat; /* SPS Primary Power Status, 0:Off, 1:On */
00090     int sps_red_pwr_stat; /* SPS Redundant Power Status, 0:Off, 1:On */
00091 };
00092 
00093 struct inst_stat_data_osmi {
00094     int band_1_lo; /* OSMI (LRC) Band 1 Low Edge Frequency Value */
00095     int band_1_hi; /* OSMI (LRC) Band 1 High Edge Frequency Value */
00096     int band_2_lo; /* OSMI (LRC) Band 2 Low Edge Frequency Value */
00097     int band_2_hi; /* OSMI (LRC) Band 2 High Edge Frequency Value */
00098     int band_3_lo; /* OSMI (LRC) Band 3 Low Edge Frequency Value */
00099     int band_3_hi; /* OSMI (LRC) Band 3 High Edge Frequency Value */
00100     int band_4_lo; /* OSMI (LRC) Band 4 Low Edge Frequency Value */
00101     int band_4_hi; /* OSMI (LRC) Band 4 High Edge Frequency Value */
00102     int band_5_lo; /* OSMI (LRC) Band 5 Low Edge Frequency Value */
00103     int band_5_hi; /* OSMI (LRC) Band 5 High Edge Frequency Value */
00104     int band_6_lo; /* OSMI (LRC) Band 6 Low Edge Frequency Value */
00105     int band_6_hi; /* OSMI (LRC) Band 6 High Edge Frequency Value */
00106     int gain;      /* OSMI (LRC) Sensor Gain */
00107     int offset1;   /* OSMI (LRC) Sensor Offset 1 */
00108     int offset2;   /* OSMI (LRC) Sensor Offset 2 */
00109     int offset3;   /* OSMI (LRC) Sensor Offset 3 */
00110     int offset4;   /* OSMI (LRC) Sensor Offset 4 */
00111     int temp;      /* OSMI (LRC) Sensor Temperature */
00112 };
00113 
00114 struct inst_stat_data_earth {
00115     float   magfield_x; /* Earth Magnetic Field X Component */
00116     float   magfield_y; /* Earth Magnetic Field Y Component */
00117     float   magfield_z; /* Earth Magnetic Field Z Component */
00118 };
00119 
00120 struct inst_stat_data {
00121     struct isd_spacecraft_time  sc_time;
00122     struct isd_glob_pos_syst_time   gps_time;
00123     struct inst_stat_data_misc  isd_misc;
00124     struct inst_stat_data_osmi  isd_osmi;
00125     struct inst_stat_data_earth isd_earth;
00126 };
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130 
00131 #endif /* ISD_H_DEFINED */