COSMOS v7.655  COSMOSv7655
(AirShowerMC)
kdir2deg.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine kdir2deg (dx, dy, dz, theta, fai)
 

Function/Subroutine Documentation

◆ kdir2deg()

subroutine kdir2deg ( real*8  dx,
real*8  dy,
real*8  dz,
real*8  theta,
real*8  fai 
)

Definition at line 19 of file kdir2deg.f.

References d0, and parameter().

Referenced by cifcutoff().

19  implicit none
20  real*8 dx ! input direction cos x comp.
21  real*8 dy ! input // y comp.
22  real*8 dz ! input // z comp.
23 
24  real*8 theta ! output. zenith angle in deg. 0 to 180
25  real*8 fai ! output. azimuthal angle in deg. 0 to 360
26 
27 ! constants thru Cosmos
28  real*8 pi,
29  * todeg
30  parameter(pi = 3.141592653589793238d0,
31  * todeg = 180.d0/pi)
32 
33  theta = acos(dz)*todeg
34  if(dx .eq. 0) then
35  fai = 0.
36  else
37  fai = atan2(dy, dx)*todeg
38  if(fai .lt. 0.) then
39  fai = fai + 360.
40  endif
41  endif
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
integer npitbl real *nx dx real dx
Definition: Zcinippxc.h:10
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
! constants thru Cosmos real * pi
Definition: Zglobalc.h:2
latitude latitude this system is used *****************************************************************! type coord sequence union map real z z in m endmap xyz map real ! latitude in deg is to the north ! longitude in deg is to the east *h ! height in m endmap llh map real * theta
Definition: Zcoord.h:25
Here is the call graph for this function:
Here is the caller graph for this function: