|
ocssw
1.0
|
00001 /* 00002 00003 $Header: /app/shared/RCS/irix-5.2/seawifsd/src/hdfio/Shared.V4.4/L012_Util/util/data/gain_tdi.h,v 4.12 1995/12/07 15:45:45 seawifsd Exp seawifsd $ 00004 $Log: gain_tdi.h,v $ 00005 Revision 4.12 1995/12/07 15:45:45 seawifsd 00006 changed gain setting name<->value mapping(temporary, it is still 00007 not complete clear what mapping should be used. documents are 00008 contradicted each other) and implemented new gain/tdi settings 00009 due to the changes in MOPS command scheduling. 00010 00011 Revision 4.11 1995/08/03 20:45:00 seawifsd 00012 fixed definition of GET_GAIN and GET_TDI. 00013 added definitions of special SOLAR/LUNAR gain settings. 00014 00015 Revision 4.10 1995/01/17 19:58:00 seawifsd 00016 Jan. 17, 1994, V4.10 00017 00018 Revision 4.1 1995/01/17 14:14:18 seawifsd 00019 Jan. 9, 1994, 4.0 00020 00021 Revision 3.3 1994/11/08 18:46:23 seawifsd 00022 Nov. 8, 1994, 3.3a3 00023 00024 Revision 3.3 1994/11/08 15:04:20 seawifsd 00025 Nov. 8, 1994, 3.3a2 00026 00027 Revision 1.1.1.1 1994/10/04 15:03:45 frank 00028 1. added macro definitions for GET_GAIN and GET_TDI 00029 2. changed the definition of the SOLAR_GAIN, SURVEY_GAIN1, SURVEY_GAIN2 00030 values. 00031 3. added macros to label each gain. 00032 00033 Revision 1.2 1994/05/10 18:47:47 seawifst 00034 May 6, 1994 version 1.2 00035 00036 Revision 1.1 1994/04/19 13:30:23 seawifst 00037 Initial revision 00038 00039 00040 */ 00041 00042 00043 #ifndef GAIN_TDI_ 00044 #define GAIN_TDI_ 00045 00046 typedef struct GainTDIBitStruc { 00047 unsigned int spare : 6; 00048 unsigned int gain : 2; 00049 unsigned int tdi1 : 1; 00050 unsigned int tdi2 : 1; 00051 unsigned int tdi3 : 1; 00052 unsigned int tdi4 : 1; 00053 unsigned int tdi5 : 1; 00054 unsigned int tdi6 : 1; 00055 unsigned int tdi7 : 1; 00056 unsigned int tdi8 : 1; 00057 } GainTDIBitType; 00058 00059 typedef struct GainTDIWordStruc { 00060 unsigned int spare : 6; 00061 unsigned int gain : 2; 00062 unsigned int tdi : 8; 00063 } GainTDIWordType; 00064 00065 /* gaintdiword must be a pointer */ 00066 /* 00067 #define GET_GAIN(gaintdiword) (((GainTDIWordType *)(gaintdiword))->gain) 00068 #define GET_TDI(gaintdiword) (((GainTDIWordType *)(gaintdiword))->tdi) 00069 */ 00070 #define GET_GAIN(word) ((0x300 & word) / 256) 00071 #define GET_TDI(word) (0xff & word) 00072 00073 00074 #define FAKEDEF 00075 /* 00076 NAME OF GAIN gain 00077 ------------------------- 00078 SURVEY_GAIN1 00 00079 SURVEY_GAIN2 10 00080 SOLAR_GAIN 01 00081 LUNAR_GAIN 11 00082 */ 00083 #define SURVEY_GAIN1 0 00084 #define SOLAR_GAIN 1 00085 #define SURVEY_GAIN2 2 00086 #define LUNAR_GAIN 3 00087 00088 #define SURVEY_GAIN1_ID "SURVEY GAIN 1" 00089 #define SOLAR_GAIN_ID "SOLAR GAIN" 00090 #define SURVEY_GAIN2_ID "SURVEY GAIN 2" 00091 #define LUNAR_GAIN_ID "LUNAR GAIN" 00092 00093 #define FAKE "GAIN_1, ..., GAIN_4 */ 00094 /* according to simulator code gac_frame.f setgntdi.f */ 00095 #define GAIN_1 0 00096 #define GAIN_2 1 00097 #define GAIN_3 2 00098 #define GAIN_4 3 00099 00100 static int gain_v2n[] = {1,2,3,4}; 00101 /* according to OSC GAINTDI.XLS spreadsheet(Chart revision: 2.0), */ 00102 /* GAIN_1 value is 0, GAIN_2 value is 2, GAIN_3 value is 1, GAIN_4 */ 00103 /* value is 3 */ 00104 /* 00105 #define GAIN_1 0 00106 #define GAIN_2 2 00107 #define GAIN_3 1 00108 #define GAIN_4 3 00109 00110 static int gain_v2n[] = {1,3,2,4}; 00111 */ 00112 00113 #include "gain_tdi_osc.h" 00114 #define GAIN_SETTINGS_MAX TOTAL_GTDI 00115 00116 00117 00118 #endif /* GAIN_TDI_ */
1.7.6.1