Go to the documentation of this file.
28 double sec = *gmt * 3600.0e0;
29 float rs, suni[3], sung[3], up[3], ea[3], no[3];
31 double day = *iday + sec / 3600.00 / 24.0;
35 const double ghar = gha / radeg;
37 sung[0] = suni[0] * cos(ghar) + suni[1] * sin(ghar);
38 sung[1] = suni[1] * cos(ghar) - suni[0] * sin(ghar);
42 const double rlon = *
xlon / radeg;
43 const double rlat = *
ylat / radeg;
44 const double cosy = cos(rlat);
45 const double siny = sin(rlat);
46 const double cosx = cos(rlon);
47 const double sinx = sin(rlon);
53 const double upxy = sqrt(up[0] * up[0] + up[1] * up[1]);
54 ea[0] = -up[1] / upxy;
57 no[0] = up[1] * ea[2] - up[2] * ea[1];
58 no[1] = up[2] * ea[0] - up[0] * ea[2];
59 no[2] = up[0] * ea[1] - up[1] * ea[0];
65 for (
int j = 0;
j < 3;
j++) {
66 sunv = sunv + sung[
j] * up[
j];
67 sunn = sunn + sung[
j] * no[
j];
68 sune = sune + sung[
j] * ea[
j];
72 *sunz = radeg * atan2(sqrt(sunn * sunn + sune * sune), sunv);
75 *suna = radeg * atan2(sune, sunn);
79 *suna = *suna + 360.0e0;
float ylat[LAC_PIXEL_NUM]
int gha2000(int32_t iyr, double day, double &gha)
int sun2000(size_t sdim, int32_t iyr, int32_t idy, double *sec, orb_array *sun)
float xlon[LAC_PIXEL_NUM]
void sunangs_(int *iyr, int *iday, float *gmt, float *xlon, float *ylat, float *sunz, float *suna)