COSMOS v7.655  COSMOSv7655
(AirShowerMC)
csetPos.f
Go to the documentation of this file.
1 ! csetPos: use only xyz.
2 ! csetPos2: use input height and depth.
3 !
4 ! set position information for a given xyz
5 ! location: input/output. coord part of location is input.
6 !
7  subroutine csetpos(location)
8 !
9  implicit none
10 #include "Zobs.h"
11 #include "Zcoord.h"
12 #include "Zpos.h"
13 #include "Zearth.h"
14 !
15  type(position)::location
16  real*8 cvh2thick
17  character*70 msg
18 !
19  if(location%xyz%sys .ne. 'xyz') then
20  write(msg, *) ' error coord. sys to csetPos=', location%xyz%sys
21  call cerrormsg(msg, 0)
22  endif
23  location%radiallen =
24  * sqrt(location%xyz%r(1)**2 + location%xyz%r(2)**2 +
25  * location%xyz%r(3)**2)
26  location%height = location%radiallen - eradius
27  location%depth = cvh2thick(location%height)
28  end
29 ! --------------------------------------
30  subroutine csetpos2(h, d, location)
31 ! --------------------------------------
32 !
33  implicit none
34 !---- include 'Zobs.h'
35 #include "Zobs.h"
36 !---- include 'Zcoord.h'
37 #include "Zcoord.h"
38 #include "Zpos.h"
39 !---- include './Atmosphere/Zearth.h'
40 #include "Zearth.h"
41 !
42  real*8 h, d
43  type(position)::location
44 !
45  location%height = h
46  location%radiallen = h + eradius
47  location%depth = d
48  end
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine csetpos2(h, d, location)
Definition: csetPos.f:31
Definition: Zpos.h:16
subroutine csetpos(location)
Definition: csetPos.f:8