21 real*8 n, cosphi, sinphi, cosl, sinl
22 #include "Zcoordtype.h" 27 temp%h = sqrt( xyz%r(1)**2 + xyz%r(2)**2 +xyz%r(3)**2)
29 cosphi = sqrt( (xyz%r(1)/(n+temp%h))**2 +
30 * (xyz%r(2)/(n+temp%h))**2 )
32 sinphi = xyz%r(3)/(n + temp%h)
34 cosl = xyz%r(1)/(n+temp%h)/cosphi
35 sinl = xyz%r(2)/(n+temp%h)/cosphi
36 temp%lat = atan2(sinphi, cosphi)*todeg
37 temp%long = atan2(sinl, cosl)*todeg
42 temp%r(3) = sqrt( xyz%r(1)**2 + xyz%r(2)**2 +xyz%r(3)**2)
44 cosphi = sqrt( (xyz%r(1)/(n+temp%r(3)))**2 +
45 * (xyz%r(2)/(n+temp%r(3)))**2 )
47 sinphi = xyz%r(3)/(n + temp%r(3))
49 cosl = xyz%r(1)/(n+temp%r(3))/cosphi
50 sinl = xyz%r(2)/(n+temp%r(3))/cosphi
51 temp%r(1) = atan2(sinphi, cosphi)*todeg
52 temp%r(2) = atan2(sinl, cosl)*todeg
subroutine cecent2llh(xyz, llh)
integer max_coord_types * coord_types(2)/'llh'/