ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/Development/ray/src/gen/gensdaymtx.c
(Generate patch)

Comparing ray/src/gen/gensdaymtx.c (file contents):
Revision 1.6 by greg, Tue Apr 15 20:15:50 2025 UTC vs.
Revision 1.9 by greg, Wed Jul 2 01:56:35 2025 UTC

# Line 40 | Line 40 | enum {
40          NSUNPATCH = 4      /* max. # patches to spread sun into */
41   };
42  
43 char    *progname;
43   double  altitude;          /* Solar altitude (radians) */
44   double  azimuth;                /* Solar azimuth (radians) */
45   int             julian_date;    /* Julian date */
# Line 508 | Line 507 | int main(int argc, char *argv[])
507          int                     i, j;
508          FVECT           view_point      = {0, 0, ER};
509  
510 <        progname = argv[0];
510 >        fixargv0(argv[0]);
511  
512          for (i = 1; i < argc && argv[i][0] == '-'; i++) {
513                  switch (argv[i][1]) {
# Line 648 | Line 647 | int main(int argc, char *argv[])
647                  const int          mo = erec.date.month+1;
648                  const int          da = erec.date.day;
649                  const double    hr = erec.date.hour;
650 <                double aod = erec.optdepth;
650 >                double aod = erec.optdepth * 1e3;
651 >                if (aod >= 999.0) {
652 >                        fprintf(stderr, "aod not set, using default value %.3f\n", AOD0_CA);
653 >                        aod = AOD0_CA;
654 >                }
655                  double cc = erec.skycover;
656 +                if (cc >= 99.0) {
657 +                        fprintf(stderr, "skycover not set, using default value 0.0\n");
658 +                        cc = 0.0;
659 +                }
660                  double            sda, sta, st;
661                  int                      sun_in_sky;
662  
656                if (aod == 0.0) {
657                        aod = AOD0_CA;
658                        fprintf(stderr, "aod is zero, using default value %.3f\n", AOD0_CA);
659                }
663                  /* compute solar position */
664                  if ((mo == 2) & (da == 29)) {
665                          julian_date = 60;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)