FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
void palDh2e
(
double
az
,
double
el
,
double
phi
,
double *
ha
,
double *
dec
)
Definition at line
96
of file
palDh2e.c
.
Referenced by
t_e2h()
.
96
{
97
98
double
sa;
99
double
ca;
100
double
se;
101
double
ce;
102
double
sp;
103
double
cp;
104
105
double
x;
106
double
y;
107
double
z;
108
double
r;
109
110
/* Useful trig functions */
111
sa = sin(az);
112
ca = cos(az);
113
se = sin(el);
114
ce = cos(el);
115
sp = sin(phi);
116
cp = cos(phi);
117
118
/* HA,Dec as x,y,z */
119
x = -ca * ce * sp + se * cp;
120
y = -sa * ce;
121
z = ca * ce * cp + se * sp;
122
123
/* To HA,Dec */
124
r = sqrt(x * x + y * y);
125
if
(r == 0.) {
126
*ha = 0.;
127
}
else
{
128
*ha = atan2(y, x);
129
}
130
*dec = atan2(z, r);
131
132
return
;
133
}
Here is the caller graph for this function:
pal
pal.h
Generated on Sun Sep 18 2016 20:50:38 for FACT++ by
1.8.11