

      SUBROUTINE UGEOMETRY  ! including part from geom_cryostat2.f

******Purpose: Define set up geometry and materials***************

      DIMENSION PAR(10), centx(9),centy(9),
     +          P_ANTF(3),P_ANT1(3),P_ANT2(3)
     
      data centx/-7.39902,7.39902,15.400002,-15.400002,8.19912,
     +            -8.19912,0.0000,-5.64896,5.64896/
      data centy/-3.02514,-3.02514,4.97332,4.97332,13.97508,
     +             13.97508,5.77342,-14.92504,-14.92504/

      common/centers/centx,centy

      call hessi_rotms


*** Define VOLUMES ***

****** MOTHER VOLUME = MASTER REFERENCE SYSTEM (MARS)**********
      PAR(1) =  0.0
      PAR(2) =  1000.01
      PAR(3) =  0.
      PAR(4) =  180.
      PAR(5) =  0.
      PAR(6) =  360.
      CALL GSVOLU('MARS', 'SPHE', 1, PAR, 6, IVOL) ! VACUUM

****** HESSI mother volume ******
        PAR(1) = 0.
        PAR(2) = 400.0
        PAR(3) = 250.0
        CALL GSVOLU('HESS', 'TUBE', 1, PAR, 3, IVOL) ! VACUUM
        
****** Tubus  (mass: here: 13.8 kg, real: 14.4 kg)
        PAR(1) = 0.
        PAR(2) = 50.5/2.
        PAR(3) = 142.04/2.
        CALL GSVOLU('TUBU', 'TUBE', 1, PAR, 3, IVOL) ! vacuum
        PAR(1) = 46./2.
        PAR(2) = 46.53/2.
        PAR(3) = 140./2.
        CALL GSVOLU('TUBA', 'TUBE',12, PAR, 3, IVOL) ! Carbon Fiber 8.1 kg
        PAR(1)=21.65  
        PAR(2)=23.45 
        PAR(3)=0.5                 ! mass: here: 1.36 kg, real: 1.37 kg
        CALL GSVOLU('ENRI', 'TUBE', 4, PAR, 3, IVOL) ! Endring bottom
        CALL GSVOLU('FRRI', 'TUBE', 4, PAR, 3, IVOL) ! Endring top
        PAR(1)=23.7 
        PAR(2)=25.2 
        PAR(3)=1.0
        CALL GSVOLU('CER1', 'TUBE', 4, PAR, 3, IVOL) ! Center Ring 1.64 kg
        PAR(1)=23.265 
        PAR(2)=23.7 
        PAR(3)=3.0              
        CALL GSVOLU('CER2', 'TUBE', 4, PAR, 3, IVOL) ! Center Ring 1.37 kg
        ! mass CER1+CER2= here: 3.0 kg real: 3.1 kg
        
****** Imager Support Ring   (mass: here:2.1 kg, real:1.96 kg)
        PAR(1)=0.
        PAR(2)=58.167/2
        PAR(3)=7.01
        call GSVOLU('ISRI', 'TUBE', 1,PAR, 3, IVOL)
        PAR(1)=50.546/2 
        PAR(2)=51.   /2 
        PAR(3)=6.75
        call GSVOLU('ISR1', 'TUBE', 6,PAR, 3, IVOL)
        PAR(1)=50.546/2
        PAR(2)=56.92/2
        PAR(3)=0.125
        call GSVOLU('ISR2', 'TUBE', 6,PAR, 3, IVOL)
        PAR(1)=50.546/2
        PAR(2)=58.166/2 
        PAR(3)=0.125
        call GSVOLU('ISR3', 'TUBE', 6,PAR, 3, IVOL)
        
****** Central Cylinder    (mass: here:3.9 kg, real:3.74 kg)
        PAR(1)=0.
        PAR(2)=56.93/2
        PAR(3)=11.44
        call GSVOLU('CCYL', 'TUBE', 1,PAR, 3, IVOL)
        PAR(1)=50.546/2 
        PAR(2)=51.2  /2 
        PAR(3)=11.18
        call GSVOLU('CCY1', 'TUBE', 6,PAR, 3, IVOL)
        PAR(1)=50.546/2
        PAR(2)=56.92/2
        PAR(3)=0.125
        call GSVOLU('CCY2', 'TUBE', 6,PAR, 3, IVOL)
        PAR(1)=50.546/2
        PAR(2)=56.92/2
        PAR(3)=0.125
        call GSVOLU('CCY3', 'TUBE', 6,PAR, 3, IVOL)

****** Base Ring   (mass: here:4.5 kg, real:4.4 kg)
        PAR(1) = 45.9
        PAR(2) = 49.3
        PAR(3) = .375
        CALL GSVOLU('BRI1', 'TUBE', 6, PAR, 3, IVOL) ! Alu
        PAR(1) = 45.9
        PAR(2) = 46.72
        PAR(3) = 1.79
        CALL GSVOLU('BRI2', 'TUBE', 6, PAR, 3, IVOL) ! Alu

****** Balance masses
        PAR(1) = 1.88516  
        PAR(2) = 2.77813
        PAR(3) = 2.52016
        CALL GSVOLU('BALM', 'BOX ',62, PAR, 3, IVOL) ! Alu (presumably) ! 

****** Honeycomb Deck   (mass: here: 5.6 kg(16E3 ccm), real:5.6 kg)
        PAR(1) = 97./2.
        PAR(2) = 97./2.
        PAR(3) = 2.5/2.
        CALL GSVOLU('HCDE', 'BOX ',13, PAR, 3, IVOL) ! Alu Honeycomb ! 
        PAR(1) = 0./2.
        PAR(2) = 50.5/2.
        PAR(3) = 2.5/2.
        CALL GSVOLU('HCDH', 'TUBE', 1, PAR, 3, IVOL) ! hole in center
        PAR(1) = 29.3/2.
        PAR(2) =  0.0/2.
        PAR(3) =  2.5/2.
        PAR(4) = 14.65/2.
        CALL GSVOLU('HCDC', 'TRD1', 1, PAR, 4, IVOL) ! corner, vacuum

****** Solar panels  (total mass: here: 33 kg, real: 34 kg)
        PAR(1) = 244./2.
        PAR(2) = 48./2.
        PAR(3) = 4./2.
        CALL GSVOLU('SOLP', 'BOX ', 1, PAR, 3, IVOL) ! Vacuum
        PAR(1) = 230./2. ! here: 5.41 kg massive Al
        PAR(2) = 47./2.  ! see critic. design rev. vol II p 114,72 for mass
        PAR(3) = 0.5/2.  ! 5.45 kg honeycomb +...
        CALL GSVOLU('SOLA', 'BOX ', 6, PAR, 3, IVOL) ! 
        PAR(1) = 3./2.
        PAR(2) = 5./2.
        PAR(3) = 3./2.
        CALL GSVOLU('HING', 'BOX ', 3, PAR, 3, IVOL) ! 4x2, 0.35 kg, steel?
        PAR(1) = 10./2.
        PAR(2) = 30./2.
        PAR(3) = 1.06/2.
        CALL GSVOLU('INMA', 'BOX ', 3, PAR, 3, IVOL) ! inertia mass 2.5kg      
*                                                      4x, steel
****** SAS-Box  (mass: here: 0.38 kg, real: 0.39 kg)
        PAR(1) = 17./2.
        PAR(2) = 0.
        PAR(3) = 5.6/2.
        PAR(4) = 9./2.
        CALL GSVOLU('SASB', 'TRD1', 6, PAR, 4, IVOL)  ! SAS-Box-Wall
        PAR(1) = 15./2.
        PAR(2) = 0.
        PAR(3) = 4.8/2.
        PAR(4) = 8./2.
        CALL GSVOLU('SASV', 'TRD1', 1, PAR, 4, IVOL)  ! SAS-Box-Interior

****** RAS
        PAR(1) = 15.5/2.
        PAR(2) = 23./2.
        PAR(3) = 15.5/2.
        CALL GSVOLU('RASC', 'BOX ', 1, PAR, 3, IVOL)  ! "Container"
        PAR(1) = 10./2.
        PAR(2) = 4.5/2.
        PAR(3) = 8./2.
        CALL GSVOLU('RASW', 'BOX ', 6, PAR, 3, IVOL)  ! Box-Wall 164g
        PAR(1) = 9.6/2.
        PAR(2) = 4.1/2.
        PAR(3) = 7.6/2.
        CALL GSVOLU('RASV', 'BOX ', 1, PAR, 3, IVOL)  ! Box-Interior
        PAR(1) = 17./2.
        PAR(2) = 14.6/2.
        PAR(3) = 15./2.
        PAR(4) = 5.6/2.
        PAR(5) = 6./2.
        CALL GSVOLU('RASB', 'CONE',12, PAR, 5, IVOL)  ! Baffle
        PAR(1) = 10./2.
        PAR(2) = 14./2.
        PAR(3) = 2./2.
        CALL GSVOLU('RASF', 'TUBE', 4, PAR, 3, IVOL) ! Ti-Flang 536g

****** Forward Antenna Brackets  (mass: here: 0.37 kg, real: 0.37 kg)
        DATA P_ANTF/5.,7.,13.5/
        CALL GSVOLU('ANTF', 'BOX ', 1, P_ANTF, 3, IVOL)
        DATA P_ANT1/5.,6.,0.125/
        CALL GSVOLU('ANT1', 'BOX ', 6, P_ANT1, 3, IVOL)
        DATA P_ANT2/1.25,0.125,13./
        CALL GSVOLU('ANT2', 'BOX ', 6, P_ANT2, 3, IVOL)
                        

******* Battery & other boxes:
        call sp_battery_assembly
        call sp_ssr_bracket
        call sp_solid_state_recorder
        call sp_instrument_data_processing_unit
        call sp_instrument_power_converter
        call sp_spacecraft_electronics_module

******Positions of volumes********************************************

* HESS
         CALL GSPOS('HESS',1,'MARS', 0.0, 0.0,  20.0 , 0, 'ONLY')

* Tubus
         CALL GSPOS('TUBU',1,'HESS', 0.0 , 0.0, 77.0,  0, 'MANY')
         CALL GSPOS('TUBA',1,'TUBU', 0.0 , 0.0,  0.0,  0, 'ONLY')
         CALL GSPOS('ENRI',1,'TUBU', 0.0 , 0.0,-70.51 ,0, 'ONLY')
         CALL GSPOS('FRRI',1,'TUBU', 0.0 , 0.0, 70.51 ,0, 'ONLY')
         CALL GSPOS('CER1',1,'TUBU', 0.0 , 0.0,  0    ,0, 'ONLY')
         CALL GSPOS('CER2',1,'TUBU', 0.0 , 0.0,  0    ,0, 'ONLY')

* Imager Support Ring
         CALL GSPOS('ISRI',1,'HESS', 0.0 , 0.0, 51.7,  0, 'MANY')
         CALL GSPOS('ISR1',1,'ISRI', 0.0 , 0.0,  0  ,  0, 'ONLY')
         CALL GSPOS('ISR2',1,'ISRI', 0.0 , 0.0,-6.875, 0, 'ONLY')
         CALL GSPOS('ISR3',1,'ISRI', 0.0 , 0.0, 6.875, 0, 'ONLY')
         
* Central Cylinder
         CALL GSPOS('CCYL',1,'HESS', 0.0 , 0.0, 28.79 ,  0, 'MANY')
         CALL GSPOS('CCY1',1,'CCYL', 0.0 , 0.0,  0    ,  0, 'ONLY')
         CALL GSPOS('CCY2',1,'CCYL', 0.0 , 0.0,-11.305,  0, 'ONLY')
         CALL GSPOS('CCY3',1,'CCYL', 0.0 , 0.0, 11.305,  0, 'ONLY')

* Base Ring
         CALL GSPOS('BRI2',1,'HESS', 0.0 , 0.0,-35.4 ,   0, 'ONLY')
         CALL GSPOS('BRI1',1,'HESS',0.0,0.0,-35.4+1.79+.375,0,'ONLY')
         CALL GSPOS('BRI1',2,'HESS',0.0,0.0,-35.4-1.79-.375,0,'ONLY')

* Balance masses:
c;positioning: radial position of center is:
c;     outside of ring - 2.77813 + 3/16" extension beyond outside of ring
c; = 49.3-2.77813+0.47625 = 47.00
c; First one: 1"+ 5/16" + 1.88516 = rout*tan(theta), rout = 49.3+.47625
c;   then theta = 5.985 degrees.  So the coordinates are:
c;   x = 47.00*sin(5.985) = 4.901  y = 46.744  z = -30.340
c; Second one: angle from previous is:
c;   (2.*1.88516cm + 5/8") = rout*tan(dtheta), so dtheta = 6.1435 degrees.

         CALL GSPOS('BALM',1,'HESS',4.901,46.744,-30.3400, 150, 'ONLY')
         CALL GSPOS('BALM',2,'HESS',9.875,45.951,-30.3400, 151, 'ONLY')
         CALL GSPOS('BALM',3,'HESS',23.896,40.472,-30.3400, 152, 'ONLY')
         CALL GSPOS('BALM',4,'HESS',31.961,34.460,-30.3400, 153, 'ONLY')
         CALL GSPOS('BALM',5,'HESS',35.466,30.841,-30.3400, 154, 'ONLY')

* Honeycomb Deck
         CALL GSPOS('HCDE',1,'HESS', 0.0 , 0.0, 42.1 ,   0, 'MANY')
         CALL GSPOS('HCDH',1,'HCDE', 0.0 , 0.0,  0.0 ,   0, 'MANY')
         CALL GSPOS('HCDC',1,'HCDE',-43.32, 43.32, 0.0 ,256, 'MANY')
         CALL GSPOS('HCDC',2,'HCDE',-43.32,-43.32, 0.0 ,257, 'MANY')
         CALL GSPOS('HCDC',3,'HCDE', 43.32,-43.32, 0.0 ,258, 'MANY')
         CALL GSPOS('HCDC',4,'HCDE', 43.32, 43.32, 0.0 ,259, 'MANY')
         
* Solar panels
         CALL GSPOS('SOLA',1,'SOLP',  -3.5,   0.0,    0.0  ,0,'ONLY')
         CALL GSPOS('INMA',1,'SOLP', 116.5,   0.0,    0.0  ,0,'ONLY')
         CALL GSPOS('HING',1,'SOLP',-120.25, 12.0,    0.0  ,0,'ONLY') 
         CALL GSPOS('HING',2,'SOLP',-120.25,-12.0,    0.0  ,0,'ONLY')
         
         CALL GSPOS('SOLP',1,'HESS', 173.0,   0.0,    45.0, 0,'MANY')
         CALL GSPOS('SOLP',2,'HESS',   0.0,  173.0,   45.0,216,'MANY') 
         CALL GSPOS('SOLP',3,'HESS',-173.0,    0.0,   45.0,217,'MANY')
         CALL GSPOS('SOLP',4,'HESS',   0.0 ,-173.0,   45.0,218,'MANY')

* SAS-Box
         CALL GSPOS('SASV',1,'SASB',  0.0 ,  0.0,   0.0 ,  0, 'ONLY')
         CALL GSPOS('SASB',1,'HESS',  0.0  ,18.6,   3.0 , 219, 'ONLY')
         CALL GSPOS('SASB',2,'HESS',-16.1 , -9.3,   3.0 , 228, 'ONLY')
         CALL GSPOS('SASB',3,'HESS', 16.1 , -9.3,   3.0 , 229, 'ONLY')

* RAS
         CALL GSROTM(223, 90.,225.,75.,315.,15.,135.)
         CALL GSPOS('RASC',1,'HESS', 29.0, -29.0, 26.0 , 223, 'MANY')
         CALL GSPOS('RASB',1,'RASC',  0.0,   2.9,  0.0 , 219, 'ONLY')
         CALL GSPOS('RASW',1,'RASC',  0.0,  -9. ,  0.0 ,  0, 'ONLY')
         CALL GSPOS('RASV',1,'RASW',  0.0,   0. ,  0.0 ,  0, 'ONLY')
         CALL GSPOS('RASF',1,'RASC',  0.0,  -6.1,  0.0 , 219, 'ONLY')

* Antennas
         CALL GSROTM(251, 90., 0., 97.7, 90., 7.7, 90.)
         CALL GSPOS('ANT1',1,'ANTF',  0.0,  0.9,  13.1 ,  0, 'ONLY')
         CALL GSPOS('ANT2',1,'ANTF',  0.0, -5.0,  -0.1 , 251, 'ONLY')
         CALL GSPOS('ANTF',1,'HESS',  0.0, 31.0, 155.0 ,  0, 'MANY')
         CALL GSPOS('ANTF',2,'HESS',-31.0,  0.0, 155.0 , 216, 'MANY')
         CALL GSPOS('ANTF',3,'HESS', 31.0,  0.0, 155.0 , 218, 'MANY')


****** Create and place other parts****

* Grids
         CALL grids

* Struts  (Imager to Spacecraft struts, primary struts, sec. str., 
*          solar array suppport struts and ring)
         CALL struts

* Spectrometer

         CALL spectrometer
         
******Close geometry banks. (compulsory system routine)***********
      
*      CALL GPVOLU(-1)  ! Print Volumes
*      CALL GPROTM(0)   ! Print Rot. Mat.
      CALL GGCLOS

      RETURN
      END  ! UGEOM



************************************************************************

      subroutine grids
            
      DIMENSION P_GTC(3), P_GRTR(3),P_GRTW(3),P_GRTT(3),P_GRTB(3),
     +          P_GTH1(3),P_GTH2(3),P_GTH3(3),P_GTH4(3),P_GTH5(3),
     +          P_GTH6(3),P_GTCR(9)
      DIMENSION P_GRH1(3),P_GRH2(3),P_GRH3(3),P_GRH4(3),
     +          P_GRH5(3),P_GRH6(3),P_GRH7(3),P_GRH8(3),P_GRH9(3),
     +          P_GRV1(3),P_GRV2(3),P_GRV3(3),P_GRV4(3),
     +          P_GRV5(3),P_GRV6(3),P_GRV7(3),P_GRV8(3),P_GRV9(3),
     +          P_GRI1(3),P_GRI2(3),P_GRI3(3),P_GRI4(3),
     +          P_GRI5(3),P_GRI6(3),P_GRI7(3),P_GRI8(3),P_GRI9(3)
      DIMENSION P_TRMT(3),P_TRM1(3),P_TRM2(3),P_TRM3(3),P_TRM4(3)
      DIMENSION P_SCAC(3),P_SCAP(3),P_SCAB(3),P_SCAH(3),P_SCAM(3)
      DIMENSION SAS_holes_x(3),SAS_holes_y(3),
     +          small_holes_x(3),small_holes_y(3)
      DIMENSION centx(9),centy(9),gridz(9)
      
      common/centers/centx,centy
      
      INTEGER gridrot(9)
      CHARACTER*4 grnumb(9)
      
      DATA grnumb/'GRH1','GRH2','GRH3','GRH4','GRH5',
     +            'GRH6','GRH7','GRH8','GRH9'/
      DATA gridrot/0,0,0,0,222,222,222,0,0/

      DATA gridz/1.966,1.966,1.93,2.06,2.5,2.5,2.5,2.5,2.5/

* Def Vol

****** Grid-Tray Container
        DATA P_GTC/0., 25., 8.5/
        DATA P_GTCR/0., 360., 2., 
     .             -5.2, 0., 25.,
     .              8.5, 0., 25./ 
        CALL GSVOLU('GTCF','TUBE',1,P_GTC,3,IVOL) ! front
        CALL GSVOLU('GTCR','PCON',1,P_GTCR,9,IVOL) ! rear
        
****** Grid-Tray
        DATA P_GRTR/0.,  22.6, 1.8/
        CALL GSVOLU('GRTR', 'TUBE', 1, P_GRTR, 3, IVOL) ! Grid-Tray
        DATA P_GRTW/21.6,22.0, 1.375/
        CALL GSVOLU('GRTW', 'TUBE', 6, P_GRTW, 3, IVOL) ! Wall
        DATA P_GRTT/0., 22.5, 0.3/
        CALL GSVOLU('GRTT', 'TUBE', 6, P_GRTT, 3, IVOL) ! Top
        DATA P_GRTB/0., 22.0,  0.075/
        CALL GSVOLU('GRTB', 'TUBE', 6, P_GRTB, 3, IVOL) ! Bottom
        DATA P_GTH1/0.,  4.7, 1.75/
        CALL GSVOLU('GTH1', 'TUBE', 1, P_GTH1, 3, IVOL) ! grid-holes(9)
        DATA P_GTH2/4.5, 4.7, 1.75/
        CALL GSVOLU('GTH2', 'TUBE', 6, P_GTH2, 3, IVOL) ! grid-holes-wall(9)
        DATA P_GTH3/0.,  2.6, 1.75/
        CALL GSVOLU('GTH3', 'TUBE', 1, P_GTH3, 3, IVOL) ! SAS-holes(3)
        DATA P_GTH4/2.4, 2.6, 1.75/
        CALL GSVOLU('GTH4', 'TUBE', 6, P_GTH4, 3, IVOL) ! SAS-holes-wall(3)
        DATA P_GTH5/0.,  1.7, 1.75/
        CALL GSVOLU('GTH5', 'TUBE', 1, P_GTH5, 3, IVOL) ! small-holes(3)
        DATA P_GTH6/1.5, 1.7, 1.75/
        CALL GSVOLU('GTH6', 'TUBE', 6, P_GTH6, 3, IVOL) ! small-holes-wall(3)

****** Grid-Holder round
        DATA P_GRH1/0. , 5.5 , 0.215/
        CALL GSVOLU('GRH1', 'TUBE', 4, P_GRH1, 3, IVOL)
        DATA P_GRH2/0. , 5.5 , 0.215/
        CALL GSVOLU('GRH2', 'TUBE', 4, P_GRH2, 3, IVOL)
        DATA P_GRH3/0. , 5.5 ,  0.18/
        CALL GSVOLU('GRH3', 'TUBE', 4, P_GRH3, 3, IVOL)
        DATA P_GRH4/0. , 5.5 ,  0.31/
        CALL GSVOLU('GRH4', 'TUBE', 4, P_GRH4, 3, IVOL)
        
        DATA P_GRV1/0. , 4.41 , 0.215/
        CALL GSVOLU('GRV1', 'TUBE', 1, P_GRV1, 3, IVOL)
        DATA P_GRV2/0. , 4.41 , 0.215/
        CALL GSVOLU('GRV2', 'TUBE', 1, P_GRV2, 3, IVOL)
        DATA P_GRV3/0. , 4.51 ,  0.18/
        CALL GSVOLU('GRV3', 'TUBE', 1, P_GRV3, 3, IVOL)
        DATA P_GRV4/0. , 4.51 ,  0.31/
        CALL GSVOLU('GRV4', 'TUBE', 1, P_GRV4, 3, IVOL)
        
****** Grid-Holder square
        DATA P_GRH5/5. , 5. , 0.5/
        CALL GSVOLU('GRH5', 'BOX ', 6, P_GRH5, 3, IVOL) !approx
        DATA P_GRH6/5. , 5. , 0.5/
        CALL GSVOLU('GRH6', 'BOX ', 6, P_GRH5, 3, IVOL) !approx
        DATA P_GRH7/5. , 5. , 0.5/
        CALL GSVOLU('GRH7', 'BOX ', 6, P_GRH7, 3, IVOL) !approx
        DATA P_GRH8/5. , 5. , 0.5/
        CALL GSVOLU('GRH8', 'BOX ', 6, P_GRH8, 3, IVOL) !approx
        DATA P_GRH9/5. , 5. , 0.5/
        CALL GSVOLU('GRH9', 'BOX ', 6, P_GRH9, 3, IVOL) !approx
        
        DATA P_GRV5/4.01 , 4.01 , 0.5/
        CALL GSVOLU('GRV5', 'BOX ', 1, P_GRV5, 3, IVOL) !approx
        DATA P_GRV6/4.01 , 4.01 , 0.5/
        CALL GSVOLU('GRV6', 'BOX ', 1, P_GRV6, 3, IVOL) !approx
        DATA P_GRV7/4.01 , 4.01 , 0.5/
        CALL GSVOLU('GRV7', 'BOX ', 1, P_GRV7, 3, IVOL) !approx
        DATA P_GRV8/4.01 , 4.01 , 0.5/
        CALL GSVOLU('GRV8', 'BOX ', 1, P_GRV8, 3, IVOL) !approx
        DATA P_GRV9/4.01 , 4.01 , 0.5/
        CALL GSVOLU('GRV9', 'BOX ', 1, P_GRV9, 3, IVOL) !approx

****** Grid number 1
        DATA P_GRI1/0. , 4.4 , 0.215/
        CALL GSVOLU('GRI1', 'TUBE', 3, P_GRI1, 3, IVOL)
        
****** Grid number 2
        DATA P_GRI2/0. , 4.4 , 0.215/
        CALL GSVOLU('GRI2', 'TUBE', 3, P_GRI2, 3, IVOL)

****** Grid number 3
        DATA P_GRI3/0. , 4.5 ,  0.18/
        CALL GSVOLU('GRI3', 'TUBE', 3, P_GRI3, 3, IVOL)

****** Grid number 4
        DATA P_GRI4/0. , 4.5 ,  0.31/
        CALL GSVOLU('GRI4', 'TUBE', 3, P_GRI4, 3, IVOL)

****** Grid number 5
        DATA P_GRI5/4. , 4.  ,   0.5/
        CALL GSVOLU('GRI5', 'BOX ', 3, P_GRI5, 3, IVOL) !approx

****** Grid number 6
        DATA P_GRI6/4. , 4.  ,   0.5/
        CALL GSVOLU('GRI6', 'BOX ', 3, P_GRI6, 3, IVOL) !approx

****** Grid number 7
        DATA P_GRI7/4. , 4.  ,   0.5/
        CALL GSVOLU('GRI7', 'BOX ', 3, P_GRI7, 3, IVOL) !approx

****** Grid number 8
        DATA P_GRI8/4. , 4.  ,   0.5/
        CALL GSVOLU('GRI8', 'BOX ', 3, P_GRI8, 3, IVOL) !approx

****** Grid number 9
        DATA P_GRI9/4. , 4.  ,   0.5/
        CALL GSVOLU('GRI9', 'BOX ', 3, P_GRI9, 3, IVOL) !approx

****** Tray mount  ! (mass: here:  real: kg)
        DATA P_TRMT/5.1, 0.9, 3.5/
        CALL GSVOLU('TRMT', 'BOX ', 1, P_TRMT, 3, IVOL)
        DATA P_TRM1/5.0, 0.85, 0.25/
        CALL GSVOLU('TRM1', 'BOX ', 4, P_TRM1, 3, IVOL)
        DATA P_TRM2/1.5, 0.75, 0.4/
        CALL GSVOLU('TRM2', 'BOX ', 4, P_TRM2, 3, IVOL)
        DATA P_TRM3/0.6, 0.2, 2.2/
        CALL GSVOLU('TRM3', 'BOX ', 4, P_TRM3, 3, IVOL)
        DATA P_TRM4/1.2, 0.2, 0.475/
        CALL GSVOLU('TRM4', 'BOX ', 4, P_TRM4, 3, IVOL)

****** Scaffolding
        DATA P_SCAC/0., 23.8, 6./
        CALL GSVOLU('SCAC', 'TUBE', 1, P_SCAC, 3, IVOL) ! Scaffolding-Container
        DATA P_SCAP/0., 23.2, 0.1/
        CALL GSVOLU('SCAP', 'TUBE',12, P_SCAP, 3, IVOL) ! Plate
        DATA P_SCAB/23.2, 23.3, 0.5/
        CALL GSVOLU('SCAB', 'TUBE',12, P_SCAB, 3, IVOL) ! Border
        DATA P_SCAH/0., 4.7, 0.1/
        CALL GSVOLU('SCAH', 'TUBE', 1, P_SCAH, 3, IVOL) ! Holes
        DATA P_SCAM/1.5, 0.1, 5.2/
        CALL GSVOLU('SCAM', 'BOX ',12, P_SCAM, 3, IVOL) ! Mounts


* Pos Grid Tray Containers
        CALL GSPOS('GTCF',1,'HESS', 0.0 , 0.0, 153.25 ,  0, 'MANY')
        CALL GSPOS('GTCR',1,'HESS', 0.0 , 0.0,   -2.1 ,  0, 'MANY')

* Pos Grid Tray Elements
        CALL GSPOS('GRTW',1,'GRTR', 0.0 , 0.0, -0.225,  0, 'ONLY')
        CALL GSPOS('GRTT',1,'GRTR', 0.0 , 0.0,  1.45 ,  0, 'MANY')
        CALL GSPOS('GRTB',1,'GRTR', 0.0 , 0.0, -1.675,  0, 'MANY')
        do i=1,9
          call gspos('GTH1',i,'GRTR',centx(i),centy(i),0.,0,'MANY')
          call gspos('GTH2',i,'GRTR',centx(i),centy(i),0.,0,'ONLY')
        end do
        DATA SAS_holes_x/     0.0, -15.76, 15.76/
        DATA SAS_holes_y/    18.2,  -9.1,  -9.1/
        DATA small_holes_x/ -17.2,  17.2,   0.0/
        DATA small_holes_y/  -3.2,  -3.2,  -6.4/
        do i=1,3
          call gspos('GTH3',i,'GRTR',SAS_holes_x(i),SAS_holes_y(i),
     +          0.,0,'MANY')
          call gspos('GTH4',i,'GRTR',SAS_holes_x(i),SAS_holes_y(i),
     +          0.,0,'ONLY')      
          call gspos('GTH5',i,'GRTR',small_holes_x(i),small_holes_y(i),
     +          0.,0,'MANY')
          call gspos('GTH6',i,'GRTR',small_holes_x(i),small_holes_y(i),
     +          0.,0,'ONLY')
        end do

* Pos Grid Trays
        CALL GSPOS('GRTR',1,'GTCF', 0.0 , 0.0, 0.0, 0, 'ONLY')
        CALL GSPOS('GRTR',2,'GTCR', 0.0 , 0.0, 0.0, 0, 'ONLY')

* Pos Grid Elements    
        CALL GSPOS('GRV1',1,'GRH1', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI1',1,'GRV1', 0.,0.,0.,0,'ONLY')
        
        CALL GSPOS('GRV2',1,'GRH2', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI2',1,'GRV2', 0.,0.,0.,0,'ONLY')

        CALL GSPOS('GRV3',1,'GRH3', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI3',1,'GRV3', 0.,0.,0.,0,'ONLY')
        
        CALL GSPOS('GRV4',1,'GRH4', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI4',1,'GRV4', 0.,0.,0.,0,'ONLY')
        
        CALL GSPOS('GRV5',1,'GRH5', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI5',1,'GRV5', 0.,0.,0.,0,'ONLY')
        
        CALL GSPOS('GRV6',1,'GRH6', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI6',1,'GRV6', 0.,0.,0.,0,'ONLY')
        
        CALL GSPOS('GRV7',1,'GRH7', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI7',1,'GRV7', 0.,0.,0.,0,'ONLY')
        
        CALL GSPOS('GRV8',1,'GRH8', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI8',1,'GRV8', 0.,0.,0.,0,'ONLY')
        
        CALL GSPOS('GRV9',1,'GRH9', 0.,0.,0.,0,'ONLY')
        CALL GSPOS('GRI9',1,'GRV9', 0.,0.,0.,0,'ONLY')
        
* Pos Front Grids
      do i=1,9
        call gspos(grnumb(i),1,'GTCF',centx(i),centy(i),gridz(i)+3.,
     +             gridrot(i),'ONLY')
      end do

* Pos Rear Grids
      do i=1,9
        call gspos(grnumb(i),2,'GTCR',centx(i),centy(i),gridz(i)+3.,
     +             gridrot(i),'ONLY')
      end do

* Pos Tray Mounts
        CALL GSPOS('TRM1',1,'TRMT', 0.0,  0.0,-3.225, 0,'ONLY')
        CALL GSPOS('TRM2',1,'TRMT', 0.0, -0.1, 2.125, 0,'ONLY')
        CALL GSPOS('TRM3',1,'TRMT',-1.8,-0.65,-0.575,230,'ONLY')
        CALL GSPOS('TRM3',2,'TRMT', 1.8,-0.65,-0.575,231,'ONLY')
        CALL GSPOS('TRM4',1,'TRMT', 0.0,-0.65, 3.0   ,0,'ONLY')
        
        CALL GSPOS('TRMT',1,'GTCF',  0.0,-23.0, -1.55,  0,'MANY')
        CALL GSPOS('TRMT',2,'GTCF', 19.9, 11.5 ,-1.55, 220,'MANY')
        CALL GSPOS('TRMT',3,'GTCF',-19.9, 11.5 ,-1.55, 221,'MANY')
        CALL GSPOS('TRMT',4,'GTCR',  0.0,-22.5,  4.5,  232,'MANY')
        CALL GSPOS('TRMT',5,'GTCR', 19.4, 11.25, 4.5,  233,'MANY')
        CALL GSPOS('TRMT',6,'GTCR',-19.4, 11.25, 4.5,  234,'MANY')
        
* Pos Scaffolding Elements
        CALL GSROTM(252, 90., 36., 90., 126., 0.,  0.)
        CALL GSROTM(253, 90.,144., 90., 234., 0.,  0.)
        CALL GSROTM(254, 90.,216., 90., 306., 0.,  0.)
        CALL GSROTM(255, 90.,324., 90.,  54., 0.,  0.)
        CALL GSPOS('SCAP',1,'SCAC', 0.0 , 0.0 , 5.8 , 0, 'ONLY')
        do i=1,9
          call gspos('SCAH',i,'SCAP',centx(i),centy(i),0.,0,'ONLY')
        end do
        CALL GSPOS('SCAB',1,'SCAC',   0.0,   0.0,  5.1,  0, 'ONLY')
        CALL GSPOS('SCAM',1,'SCAC', -13.7,  18.9, -0.7, 252, 'ONLY')
        CALL GSPOS('SCAM',2,'SCAC', -13.7, -18.9, -0.7, 253, 'ONLY')
        CALL GSPOS('SCAM',3,'SCAC',  13.7, -18.9, -0.7, 254, 'ONLY')
        CALL GSPOS('SCAM',4,'SCAC',  13.7,  18.9, -0.7, 255, 'ONLY')

* Pos Scaffoldings
        CALL GSPOS('SCAC',1,'GTCF', 0.0 , 0.0, 2.0,  0, 'MANY')
        CALL GSPOS('SCAC',2,'GTCR', 0.0 , 0.0, 1.0, 232, 'MANY') 
        
      end ! grids



************************************************************************

      subroutine struts
      
      DIMENSION P_STRC(3),P_STRT(3),P_STTU(3),P_STRI(3),
     +          P_STE1(18),P_STE2(18),P_STRM(4),
     +          P_PSTC(3),P_PST1(3),P_PST2(3),
     +          P_SSTC(3),P_SST1(3),P_SST2(3),
     +          P_SARC(3),P_SAR1(3),P_SAR2(3),P_SAR3(3),
     +          P_SAR4(3),P_SAR5(3),P_SAR6(3),
     +          P_SS1A(3),P_SS2A(3),P_SS1B(3),P_SS2B(3)
     

* Def Struts Space Craft to Imager
        DATA P_STRC/25., 31., 10.5/     ! Struts-Container
        CALL GSVOLU('STRC', 'TUBE', 1, P_STRC, 3, IVOL)
        DATA P_STRT/0. , 1.62 , 11.8/     ! Strut
        CALL GSVOLU('STRT', 'TUBE', 1, P_STRT, 3, IVOL)
        DATA P_STTU/0. , 1.61 , 6.65/     ! Strut-Tube Vespel?
        CALL GSVOLU('STTU', 'TUBE', 12, P_STTU, 3, IVOL)
        DATA P_STRI/0.3, 1.25, 0.8/       ! Strut-Ring   Ti ?
        CALL GSVOLU('STRI', 'TUBE', 4, P_STRI, 3, IVOL)
        DATA P_STE1/0., 360., 5.,         ! Strut-End 1  Ti ?
     +        -2.8, 1.1, 1.15,
     +         0.7, 0.8, 1.2, 
     +         1.0, 0.0, 1.5,
     +         2.8, 0.0, 0.7, 
     +         3.2, 0.0, 0.7/
        CALL GSVOLU('STE1', 'PCON', 4, P_STE1, 18, IVOL)
        DATA P_STE2/0., 360., 5.,         ! Strut-End 2  Ti ?
     +        -3.2, 0.0, 0.7,
     +        -2.8, 0.0, 0.7,
     +        -1.0, 0.0, 1.5,
     +        -0.7, 0.8, 1.2, 
     +         2.8, 1.1, 1.15/
        CALL GSVOLU('STE2', 'PCON', 4, P_STE2, 18, IVOL)
        DATA P_STRM/4.0, 0.0, 1.12, 1.8/   ! Strut-Mount
        CALL GSVOLU('STRM', 'TRD1', 4, P_STRM, 4, IVOL)  !  Ti ?

* Def Primary Struts  (mass: here: 5.3 kg, real: 5.3 kg)
        DATA P_PSTC/22.5, 0.5, 26.5/
        CALL GSVOLU('PSTC', 'BOX ', 1, P_PSTC, 3, IVOL)
        DATA P_PST1/1.5, 0.43, 27./
        CALL GSVOLU('PST1', 'BOX ', 6, P_PST1, 3, IVOL)
        DATA P_PST2/10., 0.43, 1.5/
        CALL GSVOLU('PST2', 'BOX ', 6, P_PST2, 3, IVOL)

* Def Secondary Struts  (mass: here: 4.8 kg, real: 4.8 kg)

* Revised to a "cross" shape with right cross section
         DATA P_SSTC/22., 1.6, 36.0/
         CALL GSVOLU('SSTC', 'BOX ', 1, P_SSTC, 3, IVOL)

         DATA P_SST1/1.59, 1.59, 34.0/
         CALL GSVOLU('SST1', 'BOX ', 6, P_SST1, 3, IVOL)
         DATA P_SST2/1.59, 1.59, 38.0/
         CALL GSVOLU('SST2', 'BOX ', 6, P_SST2, 3, IVOL)

         DATA P_SS1A/0.0762, 1.5876, 34.0/
         CALL GSVOLU('SS1A', 'BOX ', 6, P_SS1A, 3, IVOL)

         DATA P_SS2A/0.0762, 1.5875, 38.0/
         CALL GSVOLU('SS2A', 'BOX ', 6, P_SS2A, 3, IVOL)

         DATA P_SS1B/1.4351, 0.0762, 34.0/
         CALL GSVOLU('SS1B', 'BOX ', 6, P_SS1B, 3, IVOL)

         DATA P_SS2B/1.4351, 0.0762, 38.0/
         CALL GSVOLU('SS2B', 'BOX ', 6, P_SS2B, 3, IVOL)


* Def Solar Array Support Ring and Struts (mass: here: 4.2 kg, real: 4.3 kg)
        DATA P_SARC/33.,20.,45./
        CALL GSVOLU('SARC', 'BOX ', 1, P_SARC, 3, IVOL)
        DATA P_SAR1/20.5,1.27,1.27/
        CALL GSVOLU('SAR1', 'BOX ', 6, P_SAR1, 3, IVOL)
        DATA P_SAR2/20.5,1.07,1.07/
        CALL GSVOLU('SAR2', 'BOX ', 1, P_SAR2, 3, IVOL) ! 207g
        DATA P_SAR3/7.0,1.27,1.27/
        CALL GSVOLU('SAR3', 'BOX ', 6, P_SAR3, 3, IVOL)
        DATA P_SAR4/7.0,0.97,0.97/
        CALL GSVOLU('SAR4', 'BOX ', 1, P_SAR4, 3, IVOL) ! 102g
        DATA P_SAR5/7.,0.3,1.5/
        CALL GSVOLU('SAR5', 'BOX ', 6, P_SAR5, 3, IVOL) ! 68g
        DATA P_SAR6/1.43,1.5875,41.5/
        CALL GSVOLU('SAR6', 'TUBE', 6, P_SAR6, 3, IVOL) ! 335g

********

* Pos elements of SC/I strut        
        CALL GSPOS('STTU',1,'STRT', 0.,0.,  0.,    0,'ONLY')
        CALL GSPOS('STE1',1,'STRT', 0.,0.,  5.95,  0,'ONLY')
        CALL GSPOS('STE2',1,'STRT', 0.,0., -5.95,  0,'ONLY')
        CALL GSPOS('STRI',1,'STRT', 0.,0., 10.5,  224,'ONLY')
        CALL GSPOS('STRI',2,'STRT', 0.,0.,-10.5,  224,'ONLY')
        
* Pos SC/I struts in container
        CALL GSROTM(225, 90.,  0., 60., 90., 30.,270.)
        CALL GSROTM(226, 90.,120., 60.,210., 30., 30.)
        CALL GSROTM(227, 90.,240., 60.,330., 30.,150.)
        CALL GSPOS('STRT',1,'STRC', -26.6,  6.6, 0., 225,'ONLY')
        CALL GSPOS('STRT',2,'STRC',  26.6,  6.6, 0., 225,'ONLY')
        CALL GSPOS('STRT',3,'STRC',   7.8,-26.2, 0., 226,'ONLY')
        CALL GSPOS('STRT',4,'STRC', -19.0, 20.0, 0., 226,'ONLY')
        CALL GSPOS('STRT',5,'STRC',  -7.8,-26.2, 0., 227,'ONLY')
        CALL GSPOS('STRT',6,'STRC',  19.0, 20.0, 0., 227,'ONLY')

* Pos SC/I mounts in container
        CALL GSPOS('STRM',1,'STRC',  0.0,-27.9,-9.0, 219,'ONLY')
        CALL GSPOS('STRM',2,'STRC', 23.9, 14.1,-9.0, 228,'ONLY')
        CALL GSPOS('STRM',3,'STRC',-23.9, 14.1,-9.0, 229,'ONLY')
        
* Pos SC/I container in HESS
        CALL GSPOS('STRC',1,'HESS', 0., 0., 69.1, 0,'MANY')

* Pos Primary Struts
        CALL GSROTM(235, 109.1, 0., 90., 90., 19.1,   0.)
        CALL GSROTM(236,  70.9, 0., 90., 90., 19.1, 180.)
        CALL GSPOS('PST1',1,'PSTC', -10.625, 0.,  0.,   235,'ONLY')
        CALL GSPOS('PST1',2,'PSTC',  10.625, 0.,  0.,   236,'ONLY')
        CALL GSPOS('PST2',1,'PSTC',   0.0  , 0., -6.6 ,  0,'ONLY')
        
        CALL GSROTM(237, 90.,   0., 70., 90., 20., 270.)
        CALL GSROTM(238, 90.,  60., 70.,150., 20., 330.)
        CALL GSROTM(239, 90., 120., 70.,210., 20.,  30.)
        CALL GSROTM(240, 90., 180., 70.,270., 20.,  90.)
        CALL GSROTM(241, 90., 240., 70.,330., 20., 150.)
        CALL GSROTM(242, 90., 300., 70., 30., 20., 210.)
        CALL GSPOS('PSTC',1,'HESS',  0., 38., -7.5, 237,'MANY')
        CALL GSPOS('PSTC',2,'HESS',-33., 19., -7.5, 238,'MANY')
        CALL GSPOS('PSTC',3,'HESS',-33.,-20., -7.5, 239,'MANY')
        CALL GSPOS('PSTC',4,'HESS',  0.,-38., -7.5, 240,'MANY')
        CALL GSPOS('PSTC',5,'HESS', 33.,-19., -7.5, 241,'MANY')
        CALL GSPOS('PSTC',6,'HESS', 33., 19., -7.5, 242,'MANY')

* Pos Secondary Struts
        CALL GSROTM(243,  85.4, 0., 90., 90.,  4.6, 180.)
        CALL GSROTM(244,  94.6, 0., 90., 90.,  4.6,   0.)
        CALL GSROTM(245, 112.8, 0., 90., 90., 22.8,   0.)
        CALL GSROTM(246,  67.2, 0., 90., 90., 22.8, 180.)


        call gspos('SS1A',1,'SSTC', 1.5113-16.6-3.*.0802, 
     .               0.,-4.+3.*.996779, 243, 'ONLY')
        call gspos('SS1A',2,'SSTC', -1.5113-16.6-3.*.0802, 
     .               0.,-4.+3.*.996779, 243, 'ONLY')
        call gspos('SS1B',1,'SSTC', -16.6-3.*.0802, 
     .               0.,-4.+3.*.996779, 243, 'ONLY')

        call gspos('SS1A',3,'SSTC', 1.5113+16.6+3.*.0802, 
     .               0.,-4.+3.*.996779, 244, 'ONLY')
        call gspos('SS1A',4,'SSTC', -1.5113+16.6+3.*.0802, 
     .               0.,-4.+3.*.996779, 244, 'ONLY')
        call gspos('SS1B',2,'SSTC', 16.6+3.*.0802, 
     .               0.,-4.+3.*.996779, 244, 'ONLY')

c 1.39321 = (1.4351+.0762)*cos(22.8)
c 0.58565 = (1.4351+.0762)*sin(22.8)
c Note: we set out to lengthen SS2 by 2x2.5cm and slip it downwards
c by 2.5 cm to compensate, but it was a little too high already in
c the original version, so we're using 2.75cm to slip it down instead:

        call gspos('SS2A',1,'SSTC', 1.39321+4.1-2.75*.387516, 
     .               0.,2.8-2.75*.921863-.58565, 245, 'ONLY')
        call gspos('SS2A',2,'SSTC', -1.39321+4.1-2.75*.387516, 
     .               0.,2.8-2.75*.921863+.58565, 245, 'ONLY')
        call gspos('SS2B',1,'SSTC', 4.1-2.75*.387516, 
     .               0.,2.8-2.75*.921863, 245, 'ONLY')

        call gspos('SS2A',3,'SSTC', 1.39321-4.1+2.75*.387516, 
     .               0.,2.8-2.75*.921863+.58565, 246, 'ONLY')
        call gspos('SS2A',4,'SSTC', -1.39321-4.1+2.75*.387516, 
     .               0.,2.8-2.75*.921863-.58565, 246, 'ONLY')
        call gspos('SS2B',2,'SSTC', -4.1+2.75*.387516, 
     .               0.,2.8-2.75*.921863, 246, 'ONLY')

        
        CALL GSROTM(247, 90.,   0., 92., 90., 2.,  90.)
        CALL GSROTM(248, 90.,  90., 92.,180., 2., 180.)
        CALL GSROTM(249, 90., 180., 92.,270., 2., 270.)
        CALL GSROTM(250, 90., 270., 92.,  0., 2.,   0.)
        CALL GSPOS('SSTC',1,'HESS',  0., 48., 3.5, 247,'MANY')
        CALL GSPOS('SSTC',2,'HESS',-48.,  0., 3.5, 248,'MANY')
        CALL GSPOS('SSTC',3,'HESS',  0.,-48., 3.5, 249,'MANY')
        CALL GSPOS('SSTC',4,'HESS', 48.,  0., 3.5, 250,'MANY')


* Pos Solar Array Ring and Struts
        CALL GSROTM(261, 90.,345., 78., 75., 12., 255.)
        CALL GSROTM(262, 90., 15., 78.,105., 12., 285.)
        CALL GSPOS('SAR1',1,'SARC',   0., -5.5,  40.,  0,'ONLY')
        CALL GSPOS('SAR2',1,'SAR1',   0.,  0.,    0.,  0,'ONLY')
        CALL GSPOS('SAR3',1,'SARC', -27.,-10.0,  40., 222,'ONLY')
        CALL GSPOS('SAR4',1,'SAR3',   0.,  0.,    0.,  0,'ONLY')
        CALL GSPOS('SAR5',1,'SARC',   0., -5.5,  43.,  0,'ONLY')
        CALL GSPOS('SAR6',1,'SARC', -22.5, 2.0,  -3.0,261,'ONLY')
        CALL GSPOS('SAR6',2,'SARC',  22.5, 2.0,  -3.0,262,'ONLY')
        CALL GSPOS('SARC',1,'HESS',   0., 37.0,  88.,  0,'MANY')
        CALL GSPOS('SARC',2,'HESS', -37.0, 0.,   88., 216,'MANY')
        CALL GSPOS('SARC',3,'HESS',   0.,-37.,   88., 217,'MANY')
        CALL GSPOS('SARC',4,'HESS',  37.,  0.,   88., 218,'MANY')
        
      end ! struts

C---------------------------------------------------------------

      subroutine sp_battery_assembly
   
      dimension par_sbat(3),PAR_sba2(3)
      data par_sbat/11.56,13.34,16.8/
      data par_sba2/11.241879, 13.022177, 16.482756/

      call gsvolu('SBAT','BOX ',6,par_sbat,3,ivolu)
      call gsvolu('SBA2','BOX ',1,par_sba2,3,ivolu)   

      call gspos('SBAT',1,'HESS',-30.71,-30.89,23.98,133,'ONLY')
      call gspos('SBA2',1,'SBAT',0.0,0.0,0.0,0,'ONLY')

      end
C-----------------------------------------------------------------

      subroutine sp_ssr_bracket

      dimension par_ssr1(3),par_ssr2(3)
      data par_ssr1/9.78,.13,13.34/
      data par_ssr2/9.78,5.72,.13/

      call gsvolu('SSR1','BOX ',6,par_SSR1,3,ivolu)
      call gsvolu('SSR2','BOX ',6,par_ssr2,3,ivolu)

      call gspos('SSR1',1,'HESS',-20.12,20.12,56.73,133,'ONLY')
      call gspos('SSR2',1,'HESS',-9.75,9.75,43.52,133,'ONLY')

      end

C------------------------------------------------------------------

      subroutine sp_solid_state_recorder

      dimension par_SSSR(3),PAR_SS2R(3)
      data par_sssr/9.75,7.0,13.25/
      DATA PAR_SS2R/8.954322, 6.343040, 12.277771/

      call gsvolu('SSSR','BOX ',6,par_SSSR,3,ivolu)
      call gsvolu('SS2R','BOX ',1,par_SS2R,3,ivolu)
                               

      call gspos('SSSR',1,'HESS',-32.94,33.20,56.64,133,'ONLY')
      call gspos('SS2R',1,'SSSR',0.0,0.0,0.0,0,'ONLY')

      end

C--------------------------------------------------------------

      subroutine  sp_spacecraft_electronics_module

      dimension par_SSEM(3),PAR_SSEN(3)
      data par_SSEM/14.6,9.9,9.7/
      data par_SSEN/14.402627, 9.662267, 9.460549/

      call gsvolu('SSEM','BOX ',6,par_SSEM,3,ivolu)
      call gsvolu('SSEN','BOX ',1,par_SSEN,3,ivolu)      

      call gspos('SSEM',1,'HESS',-27.84,28.27,31.11,133,'ONLY')
      call gspos('SSEN',1,'SSEM',0.0,0.0,0.0,0,'ONLY')

      end

c-----------------------------------------------------------------

      subroutine sp_instrument_data_processing_unit

      dimension par_SIDP(3),par_SIDQ(3)
      data par_SIDP/13.34,13.10,9.68/
      data par_SIDQ/13.011511, 12.771667, 9.353897/

      call gsvolu('SIDP','BOX ',6,par_SIDP,3,ivolu)
      call gsvolu('SIDQ','BOX ',1,PAR_SIDQ,3,ivolu)

      call gspos('SIDP',1,'HESS',28.02,28.4,31.13,133,'ONLY')
      call gspos('SIDQ',1,'SIDP',0.0,0.0,0.0,0,'ONLY')

      end

c-------------------------------------------------------------------

      subroutine sp_instrument_power_converter

      dimension par_SIPC(3),par_SIPD(3)
      data par_SIPC/5.72,13.34,6.67/
      data par_SIPD/5.430813, 13.094295, 6.386234/

      call gsvolu('SIPC','BOX ',6,par_SIPC,3,ivolu)
      call gsvolu('SIPD','BOX ',1,par_SIPD,3,ivolu)

      call gspos('SIPC',1,'HESS',26.09,26.09,50.06,133,'ONLY')
      call gspos('SIPD',1,'SIPC',0.0,0.0,0.0,0,'ONLY')

      end

c-----------------------------------------------------------------

