Go to the source code of this file.
◆ cecent2llh()
subroutine cecent2llh |
( |
type(coord) |
xyz, |
|
|
type(coord) |
llh |
|
) |
| |
Definition at line 2 of file ceCent2llh.f.
References coord_types().
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
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 ! polar angle ! azimuthal angle *radius ! radial distance endmap sph endunion character *sys ! which system xyz
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 ! polar angle ! azimuthal angle *radius ! radial distance endmap sph endunion character *sys ! which system llh
integer max_coord_types * coord_types(2)/'llh'/