ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/sun2.cal
(Generate patch)

Comparing ray/src/cal/cal/sun2.cal (file contents):
Revision 1.2 by greg, Fri Oct 18 23:42:52 2019 UTC vs.
Revision 1.3 by greg, Sat Oct 19 00:01:33 2019 UTC

# Line 16 | Line 16
16                  YEAR =          Calendar year AD (1950-2050)
17  
18          Outputs:
19 +                STIME =         Solar time (hours past midnight)
20                  SAZI =          Solar altitude (degrees above horizon)
21                  SALT =          Solar azimuth (degrees west of south)
22   }
# Line 51 | Line 52 | dec = asin(sin_dec) / DEG;
52                                  { Greenwich mean sidereal time }
53   gmst = normcir(6.697375 + 0.0657098242*n + UTIME, 24);
54   lmst = normcir(gmst - LON/15, 24);
55 < ha = 15*(normcir(lmst - ra/15 + 12, 24) - 12);
55 > STIME = normcir(lmst - ra/15 + 12, 24);
56 > ha = 15*(STIME - 12);
57                                  { Final solar angles }
58   sin_SALT = sin_dec*sin_LAT + cos_dec*cos(LAT*DEG)*cos(ha*DEG);
59   SALT = asin(sin_SALT) / DEG;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines