Go to the documentation of this file.
15 static double radeg = 57.29577951;
24 double e[3], n[3],
v[3],
r[3],
s[3];
25 double sdvcr, vdr, sdr, sdv;
28 for (
i = 0;
i < 3;
i++)
31 for (ip = 0; ip <
npix; ip++) {
32 slon = sin(
lon[ip] / radeg);
33 clon = cos(
lon[ip] / radeg);
34 slat = sin(
lat[ip] / radeg);
35 clat = cos(
lat[ip] / radeg);
36 szen = sin(
senz[ip] / radeg);
37 czen = cos(
senz[ip] / radeg);
38 sazi = sin(
sena[ip] / radeg);
39 cazi = cos(
sena[ip] / radeg);
55 for (
i = 0;
i < 3;
i++)
56 s[
i] = e[
i] * szen * sazi + n[
i] * szen * cazi +
v[
i] * czen;
60 sdvcr =
s[0] * (
v[1] *
r[2] -
v[2] *
r[1])
61 +
s[1] * (
v[2] *
r[0] -
v[0] *
r[2])
62 +
s[2] * (
v[0] *
r[1] -
v[1] *
r[0]);
64 vdr =
v[0] *
r[0] +
v[1] *
r[1] +
v[2] *
r[2];
65 sdr =
s[0] *
r[0] +
s[1] *
r[1] +
s[2] *
r[2];
66 sdv =
v[0] *
s[0] +
v[1] *
s[1] +
v[2] *
s[2];
69 alpha[ip] = -(radeg * atan2(sdvcr, (vdr - sdr * sdv)) - 90.0);
void compute_alpha(float lon[], float lat[], float senz[], float sena[], double mnorm[3], int npix, float alpha[])