pro att_old_struct, ATT_2101_Data = ATT_2101_Data,  $
                     ATT_60E1_Data = ATT_60E1_Data
   
   
;+
;       NAME:
;               ATT_OLD_STRUCT
;       PURPOSE:
;               Define the following ATT specific database structures
;                       * ATT_2101_Data_Rec
;                       * ATT_60E1_Data_Rec
;
;       CALLING SEQUENCE:
;               ATT_OLD_STRUCT
;       HISTORY:
;               written by Mons Morrison, Fall 90.
;
;-
   
   
ATT_2101_Data = { ATT_2101_Data_Rec,              $
                                             ;----- Inertial Reference Unit (IRU) ----------------------
      iru_pow_stat: BYTARR(2),  $            ;  0- IRU Power Status                                          W48 F32
                                             ;       b0 = ??
                                             ;       b1 = Loop??
                                             ;       b2 = X Motor on/off
                                             ;       b3 = Y Motor on/off
                                             ;       b4 = Z Motor on/off
                                             ;       b5 = S Motor on/off
                                             ;       b6 = ??
                                             ;       b7 = 
      iru_LM: BYTARR(5,2),  $                ;  2- IRU ??                                                    W112 F3
                                             ;    (i,j)  j=two values per major frame
                                             ;       (0,*) = X voltage?? (0-3 V)
                                             ;       (1,*) = Y voltage?? (0-3 V)
                                             ;       (2,*) = Z voltage?? (0-3 V)
                                             ;       (3,*) = S voltage?? (0-3 V)
                                             ;       (4,*) = MC??
      iru_temp: BYTE(0),  $                  ; 12- IRU Temperature                                           W32 F52
      iru: LONARR(3,8),  $                   ;  0- X roll?                                                   W17,W18
                                             ;     Y roll?                                                   W17,W18
                                             ;     Z roll?                                                   W17,W18
                                             ;    (i,j)  i=0 is X, i=1 is Y, i=2 is Z
                                             ;           j=eight values per major frame
                                             ;  W17 is high 8 bits of 24 bit value
                                             ;  W18 is middle 8 bits of 24 bit value
                                             ;  W19 is low 8 bits of 24 bit value
                                             ;
                                             ;   24-bit value is the roll/pointing?
                                             ;       LSB (1 DN) = 0.08 arcsec (one "pulse")
                                             ;
                                             ;----- Geomagnetic Attitude Sensor (GAS) ----------------------
      gas_pow_stat: BYTE(0),  $              ; ??- GAS Power Status                                          W48 F24
                                             ;       b5 = GAS on/off
                                             ;       b6 = GAS Sensor SA/SB (set = SB)
      gas_A_HK: BYTE(0),  $                  ; ??- GAS-A Analog house keeping                                W32 F36
      gas_E_HK: BYTE(0),  $                  ; ??- GAS-A Analog house keeping                                W32 F54
      gas: BYTARR(3,4),  $                   ; 96- X position                                                W81 F16
                                             ;     Y position                                                W82 F16
                                             ;     Z position                                                W83 F16
                                             ;    (i,j)  i=0 is X, i=1 is Y
                                             ;           j=four values per major frame
                                             ;   8-bit value is the ?? position 
                                             ;   between 0 and 512 pixels
                                             ;       LSB (1 DN) = .0390625 volts (10,000 nT/volt)
                                             ;
                                             ;----- Two-Dimensional Fine Sun Sensor (TFSS) ----------------
      tfss_pow_stat: BYTE(0),  $             ;???- TFSS Power status                                         W48 F24
                                             ;       b2 = TFSS on/off
                                             ;       b3 = TFSS Cal??
      tfss_v: BYTARR(2),  $                  ;   - TFSS voltages??                                           W32 F13
      tfss_temp: BYTE(0),  $                 ;   - TFSS Temperature                                          W32 F55
      TFSS: INTARR(2,4),  $                  ;108-X Position                                                 W82,W83
                                             ;    Y Position                                                 W82,W83
                                             ;    (i,j)  i=0 is X, i=1 is Y
                                             ;           j=four values per major frame
                                             ;  W82 is high 8 bits of 12 bit value
                                             ;  W83 b0-b3: low 8 bits of 12 bit value
                                             ;   12-bit value is the ?? position 
                                             ;   between 0 and 512 pixels
                                             ;       LSB (1 DN) = 0.00054 deg
                                             ;  W83
                                             ;      b4: x/y sun presence        (1=on, 0=off)
                                             ;      b5: x/y quality flag        (1=on, 0=off)
                                             ;
                                             ;----- Non-Spin Type Attitude Sensor (NSAS) -----------------
      nsas_pow_stat: BYTE(0),  $             ;???- NSAS Power status                                         W48 F24
                                             ;       b0 = NSAS on/off
                                             ;       b1 = NSAS Cal??
      nsas_v: BYTARR(2),  $                  ;   - NSAS voltages??                                           W32 F15
      nsas_temp: BYTE(0),  $                 ;   - NSAS Temperature                                          W32 F56
      nsas: INTARR(2,4),  $                  ;124- NSAS X address?                                           W82,W83
                                             ;     NSAS Y address?                                           W82,W83
                                             ;     (i,j)  i=0 is X, i=1 is Y
                                             ;           j=four values per major frame
                                             ;  W82 is high 8 bits of 12 bit value
                                             ;  W83 b0-b3: low 8 bits of 12 bit value
                                             ;   12-bit value is the ?? position 
                                             ;   between 0 and 512 pixels
                                             ;       LSB (1 DN) = 0.5 pixels)
                                             ;       x=0, y=0 ==> 0.025 deg
                                             ;  W83
                                             ;      b4: x/y sun presence        (1=on, 0=off)
                                             ;      b5: x/y edge flag           (1=on, 0=off)
                                             ;      b6: x/y upper discriminator (1=on, 0=off)
                                             ;      b7: x/y lower discriminator (1=on, 0=off)
                                             ;
                                             ;----- Star Tracker (STT) ----------------------
      stt_pow_stat: BYTE(0),  $              ;???-STT power status                                           W48 F2
                                             ;       b0 = CPU1 on/off
                                             ;       b1 = CPU2 on/off
                                             ;       b2 = 
                                             ;       b3 = 
                                             ;       b4 = 
                                             ;       b5 = 
                                             ;       b6 = 
                                             ;       b7 = 
      stt_stat: BYTARR(3),  $                ;?? - STT Status                                                W48 F18
                                             ;       b0 = 
                                             ;       b1 = 
                                             ;       b2 = 
                                             ;       b3 = 
                                             ;       b4 = 
                                             ;       b5 = 
                                             ;       b6 = 
                                             ;       b7 = 
      stt_v: BYTE(0),  $                     ;?? - STT Voltages                                              
                                             ;       For FI = 0 = STT CCD                                    W32 F17
                                             ;       For FI = 2 = STT REG                                    W32 F17
      stt_temp: BYTARR(2),  $                ;?? - STT Temperatures                                          W32 F56
                                             ;
      stt_H_Pos: INTARR(2),  $               ;140-STT star position (H) - horizontal?                        W82,W83
                                             ;    (j) j=two values per major frame
                                             ;   16-bit value is the star pixel position ?
                                             ;   between 0 and 512 pixels
                                             ;       LSB (1 DN) = 0.007812 pixels
      stt_V_Pos: INTARR(2),  $               ;144-STT star position (V) - vertical?                          W82,W83
                                             ;    (j) j=two values per major frame
      stt_int: INTARR(2),  $                 ;148-STT star intensity                                         W82,W83
                                             ;    (j) j=two values per major frame
      stt_alarm: INTARR(2),  $               ;152-STT alarm signal                                           W82,W83
                                             ;    (j) j=two values per major frame
                                             ;
                                             ;----- HXT 2-D Aspect Sensor ----------------------
      hxa_pow_stat: BYTE(0),  $              ; ??- HXA Power Status                                          W48 F1
                                             ;       b3 = HXA on/off
                                             ;       b4 = HXA cal
      hxa_addr: INTARR(32,2),  $             ;156- Address of positions below discriminator                  W33,W34
                                             ;     (limbs and fiducial)
                                             ;    (j,i) j=32 values per major frame
                                             ;          i=0 is X, i=1 is Y
                                             ;     TODO - reverse order of subscripts?
      hxa_xnum: BYTARR(2),  $                ;284- Number of positions along X below discrim                 W49 F32
      hxa_ynum: BYTARR(2),  $                ;286- Number of positions along Y below discrim                 W49 F32
      hxa_gain: BYTARR(2),  $                ;288- Number of positions along X below discrim                 W49 F32
      HXA_gain_cont: BYTARR(2),  $           ; 80- Gain control commanded                                    W49 F32
                                             ;       Hopefully not changed 
                                             ;
                                             ;----- Processed pointing info ----------------------
      proc_angle: FLTARR(3),  $              ;290- X,Y,Z euler angles in sun pointing coordinates            Derived
                                             ;     1 DN = 0.1 arcsec
      proc_dev: FLTARR(3),  $                ;302- X,Y,Z standard deviation of attitude                      Derived
                                             ;     determination errors
      proc_drift: FLTARR(3),  $              ;314- X,Y,Z estimated drift rates (arcsec/hour)                 Derived
      proc_status: LONG(0),  $               ;326- Status
                                             ;       b0:  TFSS  0=not used, 1=used
                                             ;       b1:  NSAS  0=not used, 1=used
                                             ;       b2:  STT   0=not used, 1=used
                                             ;       b3:  GAS   0=not used, 1=used
                                             ;       b4:  IRU   0=not used, 1=used
                                             ;       b5:  ACP   0=not used, 1=used
                                             ;       b6:  Spec  0=coarse, 1=fine
                                             ;       b7:        0=propagation, 1=renewal
                                             ;       b8:        0=forward, 1=backward
                                             ;       b9:  sun presence 0=night, 1=day
                                             ;       b10: earth occultation 0=occul, 1=not occul
                                             ;
      spare: BYTARR(20) }                    ;330-
   
   
   
ATT_60E1_Data = { ATT_60E1_Data_Rec,              $
                                             ;Retired on 16-Nov-91
                                             ;
                                             ;----- Inertial Reference Unit (IRU) ----------------------
      iru_pow_stat: BYTARR(2),  $            ;  0- IRU Power Status                                          W48 F32
                                             ;       b7 = ??
                                             ;       b6 = Loop??
                                             ;       b5 = X Motor on/off
                                             ;       b4 = Y Motor on/off
                                             ;       b3 = Z Motor on/off
                                             ;       b2 = S Motor on/off
                                             ;       b1 = ??
                                             ;       b0 = 
      iru_LM: BYTARR(5,2),  $                ;  2- IRU ??                                                    W112 F3
                                             ;    (i,j)  j=two values per major frame
                                             ;       (0,*) = X voltage?? (0-3 V)
                                             ;       (1,*) = Y voltage?? (0-3 V)
                                             ;       (2,*) = Z voltage?? (0-3 V)
                                             ;       (3,*) = S voltage?? (0-3 V)
                                             ;       (4,*) = MC??
      iru_temp: BYTE(0),  $                  ; 12- IRU Temperature                                           W32 F52
      iru: LONARR(3,8),  $                   ;  0- X roll?                                                   W17,W18
                                             ;     Y roll?                                                   W17,W18
                                             ;     Z roll?                                                   W17,W18
                                             ;    (i,j)  i=0 is X, i=1 is Y, i=2 is Z
                                             ;           j=eight values per major frame
                                             ;  W17 is high 8 bits of 24 bit value
                                             ;  W18 is middle 8 bits of 24 bit value
                                             ;  W19 is low 8 bits of 24 bit value
                                             ;
                                             ;   24-bit value is the roll/pointing?
                                             ;       LSB (1 DN) = 0.08 arcsec (one "pulse")
                                             ;
                                             ;----- Geomagnetic Attitude Sensor (GAS) ----------------------
      gas_pow_stat: BYTE(0),  $              ; ??- GAS Power Status                                          W48 F24
                                             ;       b2 = GAS on/off
                                             ;       b1 = GAS Sensor SA/SB (set = SB)
      gas_A_HK: BYTE(0),  $                  ; ??- GAS-A Analog house keeping                                W32 F36
      gas_E_HK: BYTE(0),  $                  ; ??- GAS-A Analog house keeping                                W32 F54
      gas: BYTARR(3,4),  $                   ; 96- X position                                                W81 F16
                                             ;     Y position                                                W82 F16
                                             ;     Z position                                                W83 F16
                                             ;    (i,j)  i=0 is X, i=1 is Y
                                             ;           j=four values per major frame
                                             ;   8-bit value is the ?? position 
                                             ;   between 0 and 512 pixels
                                             ;       LSB (1 DN) = .0390625 volts (10,000 nT/volt)
                                             ;
                                             ;----- Two-Dimensional Fine Sun Sensor (TFSS) ----------------
      tfss_pow_stat: BYTE(0),  $             ;???- TFSS Power status                                         W48 F24
                                             ;       b5 = TFSS on/off
                                             ;       b4 = TFSS Cal??
      tfss_v: BYTARR(2),  $                  ;   - TFSS voltages??                                           W32 F13
      tfss_temp: BYTE(0),  $                 ;   - TFSS Temperature                                          W32 F55
      TFSS: INTARR(2,4),  $                  ;108-X Position                                                 W82,W83
                                             ;    Y Position                                                 W82,W83
                                             ;    (i,j)  i=0 is X, i=1 is Y
                                             ;           j=four values per major frame
                                             ;  W82 is high 8 bits of 12 bit value
                                             ;  W83 b4:7 = low 8 bits of 12 bit value
                                             ;   12-bit value is the ?? position 
                                             ;   between 0 and 512 pixels
                                             ;       LSB (1 DN) = 0.00054 deg
                                             ;  W83
                                             ;       b3 = x/y sun presence        (1=on, 0=off)
                                             ;       b2 = x/y quality flag        (1=on, 0=off)
                                             ;
                                             ;----- Non-Spin Type Attitude Sensor (NSAS) -----------------
      nsas_pow_stat: BYTE(0),  $             ;???- NSAS Power status                                         W48 F24
                                             ;       b7 = NSAS on/off
                                             ;       b6 = NSAS Cal??
      nsas_v: BYTARR(2),  $                  ;   - NSAS voltages??                                           W32 F15
      nsas_temp: BYTE(0),  $                 ;   - NSAS Temperature                                          W32 F56
      nsas: INTARR(2,4),  $                  ;124- NSAS X address?                                           W82,W83
                                             ;     NSAS Y address?                                           W82,W83
                                             ;     (i,j)  i=0 is X, i=1 is Y
                                             ;           j=four values per major frame
                                             ;  W82 is high 8 bits of 12 bit value
                                             ;  W83 b4:7 = low 8 bits of 12 bit value
                                             ;   12-bit value is the ?? position 
                                             ;   between 0 and 512 pixels
                                             ;       LSB (1 DN) = 0.5 pixels)
                                             ;       x=0, y=0 ==> 0.025 deg
                                             ;  W83
                                             ;       b3 = x/y sun presence        (1=on, 0=off)
                                             ;       b2 = x/y edge flag           (1=on, 0=off)
                                             ;       b1 = x/y upper discriminator (1=on, 0=off)
                                             ;       b0 = x/y lower discriminator (1=on, 0=off)
                                             ;
                                             ;----- Star Tracker (STT) ----------------------
      stt_pow_stat: BYTE(0),  $              ;???-STT power status                                           W48 F2
                                             ;       b7 = CPU1 on/off
                                             ;       b6 = CPU2 on/off
                                             ;       b5 = 
                                             ;       b4 = 
                                             ;       b3 = 
                                             ;       b2 = 
                                             ;       b1 = 
                                             ;       b0 = 
      stt_stat: BYTARR(3),  $                ;?? - STT Status                                                W48 F18
                                             ;       b7 = 
                                             ;       b6 = 
                                             ;       b5 = 
                                             ;       b4 = 
                                             ;       b3 = 
                                             ;       b2 = 
                                             ;       b1 = 
                                             ;       b0 = 
      stt_v: BYTE(0),  $                     ;?? - STT Voltages                                              
                                             ;       For FI = 0 = STT CCD                                    W32 F17
                                             ;       For FI = 2 = STT REG                                    W32 F17
      stt_temp: BYTARR(2),  $                ;?? - STT Temperatures                                          W32 F56
                                             ;
      stt_H_Pos: INTARR(2),  $               ;140-STT star position (H) - horizontal?                        W82,W83
                                             ;    (j) j=two values per major frame
                                             ;   16-bit value is the star pixel position ?
                                             ;   between 0 and 512 pixels
                                             ;       LSB (1 DN) = 0.007812 pixels
      stt_V_Pos: INTARR(2),  $               ;144-STT star position (V) - vertical?                          W82,W83
                                             ;    (j) j=two values per major frame
      stt_int: INTARR(2),  $                 ;148-STT star intensity                                         W82,W83
                                             ;    (j) j=two values per major frame
      stt_alarm: INTARR(2),  $               ;152-STT alarm signal                                           W82,W83
                                             ;    (j) j=two values per major frame
                                             ;
                                             ;----- HXT 2-D Aspect Sensor ----------------------
      hxa_pow_stat: BYTE(0),  $              ; ??- HXA Power Status                                          W48 F1
                                             ;       b4 = HXA on/off
                                             ;       b3 = HXA cal
      hxa_addr: INTARR(32,2),  $             ;156- Address of positions below discriminator                  W33,W34
                                             ;     (limbs and fiducial)
                                             ;    (j,i) j=32 addresses per major frame
                                             ;          i=0 is two sets of addresses per major frame
                                             ;       The variable "hxa_xnum" tells how many x adresses
                                             ;       there are in "hxa_addr" and "hxa_ynum" tells how
                                             ;       many y addresses.  The y addresses need to have
                                             ;       2048 subtracted from the value.
      hxa_xnum: BYTARR(2),  $                ;284- Number of positions along X below discrim                 W49 F32
                                             ;          Two sets per major frame
      hxa_ynum: BYTARR(2),  $                ;286- Number of positions along Y below discrim                 W49 F32
                                             ;          Two sets per major frame
      hxa_gain: BYTARR(2),  $                ;288- Gain for HXA                                              W49 F32
                                             ;          Two sets per major frame
      HXA_gain_cont: BYTARR(2),  $           ; 80- Gain control commanded                                    W49 F32
                                             ;       Hopefully not changed 
                                             ;       TODO - what is this - same Frame/Word as "hxa_xnum"
                                             ;
                                             ;----- Processed pointing info ----------------------
      pntg_angle: LONARR(3),  $              ;290- X,Y,Z euler angles in sun pointing coordinates            From Ma
                                             ;     1 DN = 0.1 arcsec
      pntg_dev: LONARR(3),  $                ;302- X,Y,Z standard deviation of attitude                      From Ma
                                             ;     determination errors
                                             ;     1 DN = .01"
      pntg_motion: LONARR(3),  $             ;314- X,Y,Z estimated drift rates                               From Ma
                                             ;     1 DN = 1.0"/hour
      pntg_status: LONG(0),  $               ;326- Status                                                    From Ma
                                             ;       b15 = TFSS  0=not used, 1=used
                                             ;       b14 = NSAS  0=not used, 1=used
                                             ;       b13 = STT   0=not used, 1=used
                                             ;       b12 = GAS   0=not used, 1=used
                                             ;       b11 = IRU   0=not used, 1=used
                                             ;       b10 = ACP   0=not used, 1=used
                                             ;       b9  = Spec  0=coarse, 1=fine
                                             ;       b8  =       0=propagation, 1=renewal
                                             ;       b7  =       0=forward, 1=backward
                                             ;       b6  = sun presence 0=night, 1=day
                                             ;       b5  = earth occultation 0=occul, 1=not occul
      pntg_Trace: BYTE(0),  $                ; 30- Information on how pointing was derived                   Ground 
                                             ;     and whether there is data present
                                             ;       0 = No data present
                                             ;       1 = Original Technique used 20-Oct-91 to ??
                                             ;           The data in "pntg_angle" is the average of
                                             ;           8 raw IRU values (there are 8 values per
                                             ;           major frame).  If the time of the data
                                             ;           does not match the time of the IRU data
                                             ;           within 5 minutes, then no data is present.
      pntg_jitter: BYTE(0),  $               ; 32- Magnitude of pointing change over ??sec                   Derived
                                             ;       in ??
                                             ;       scaled - TODO
                                             ;
      spare: BYTARR(18) }                    ;330-
   
   
   
  
  
end
