COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cllh2e_cent_ellips.f
Go to the documentation of this file.
1 !c test cllh2eCent
2 c include '../../Tracking/Zcoord.h'
3 ! record /coord/ a, b
4 ! a.lat = 35.
5 ! a.long =138.
6 ! a.h =0.
7 ! do while (a.lat .le. 90.001)
8 ! read(*, *) a.lat, a.long, a.h
9 ! call cllh2eCent( a, b)
10 ! write(*,*) b.x, b.y, b.z
11 ! enddo
12 ! end
13 ! longitude latitude height to earth center rectangular
14 ! coordinate converstion.
15 !
16  subroutine cllh2ecent(llh, xyz)
17 ! llh: /coord/ structure. input. containing data in latitude,
18 ! longitude, height.
19 ! xyz: /coord/ structue. output. The coordinate system is
20 ! such that the origin is at the center of the earth
21 ! x-axis is directed to (0, 0) latitude and longitude.
22 ! y-axis is directed to (0, 90) latitude and longitude.
23 ! z-axsi is directed to the north pole.
24 !
25 ! xyz.r(1) is x coordinate value in m
26 ! xyz.r(2) is y
27 ! xyz.r(3) is z
28 ! *** note ***
29 ! xyz can be the same as llh. time component is unchanged
30 !
31  implicit none
32 c---- include '../../Zglobalc.h'
33 #include "Zglobalc.h"
34 c---- include '../../Tracking/Zcoord.h'
35 #include "Zcoord.h"
36 c---- include 'Zearth.h'
37 #include "Zearth.h"
38  type(coord)::llh, xyz
39  type(coord):: temp
40 !
41  real*8 n
42 !
43  n = eradius/sqrt(1. -eecen2 * sin(llh%lat*torad)**2)
44  temp%x = (n + llh%h) *cos(llh%lat*torad)* cos(llh%long*torad)
45  temp%y = (n + llh%h) *cos(llh%lat*torad)* sin(llh%long*torad)
46  xyz%r(3) = (n* eone_ecen2 + llh%h)*sin(llh%lat * torad)
47  xyz%r(1) = temp%x
48  xyz%r(2) = temp%y
49  xyz%sys = coord_types(1)
50  end
subroutine cllh2ecent(llh, xyz)
! for length to thickness conversion or v v ! integer maxnodes real Hinf ! This is used when making table for dim simulation ! The slant length for vertical height to km is ! divided by LenStep m steps ! It can cover the slant length of about km for cos
Definition: Zatmos.h:8
integer max_coord_types * coord_types(2)/'llh'/
Definition: Zcoord.h:43