[GRASS-SVN] r43435 - grass-addons/imagery/i.landsat.toar

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 9 04:13:01 EDT 2010


Author: hamish
Date: 2010-09-09 08:13:01 +0000 (Thu, 09 Sep 2010)
New Revision: 43435

Modified:
   grass-addons/imagery/i.landsat.toar/landsat.c
   grass-addons/imagery/i.landsat.toar/landsat_met.c
Log:
rm unused variables, {}

Modified: grass-addons/imagery/i.landsat.toar/landsat.c
===================================================================
--- grass-addons/imagery/i.landsat.toar/landsat.c	2010-09-09 08:06:28 UTC (rev 43434)
+++ grass-addons/imagery/i.landsat.toar/landsat.c	2010-09-09 08:13:01 UTC (rev 43435)
@@ -104,7 +104,7 @@
 								 qcalmin) /
 		    (lsat->band[i].qcalmax - lsat->band[i].qcalmin) +
 		    lsat->band[i].lmin;
-		double tv, Tv = 1.;
+		double Tv = 1.;
 		double Tz = 1.;
 		double Lp = 0.;
 
@@ -116,8 +116,8 @@
 					  PI * Lp) / pi_d2;
 		    Tz = 1 - (4 * pi_d2 * Lp) / (lsat->band[i].esun * sin_e);
 		    Tv = exp(sin_e * log(Tz) / cos_v);
-		    //                                      G_message("TAUv = %.5f (%.5f), TAUz = %.5f (%.5f) and Edown = %.5f\n", TAUv, Tv, TAUz, Tz, PI * Lp );
-		    //                              } while( abs(TAUv - Tv) > 0.0000001 || abs(TAUz - Tz) > 0.0000001);
+		    //  G_message("TAUv = %.5f (%.5f), TAUz = %.5f (%.5f) and Edown = %.5f\n", TAUv, Tv, TAUz, Tz, PI * Lp );
+		    // } while( abs(TAUv - Tv) > 0.0000001 || abs(TAUz - Tz) > 0.0000001);
 		} while (TAUv != Tv && TAUz != Tz);
 		TAUz = (Tz < 1. ? Tz : 1.);
 		TAUv = (Tv < 1. ? Tv : 1.);

Modified: grass-addons/imagery/i.landsat.toar/landsat_met.c
===================================================================
--- grass-addons/imagery/i.landsat.toar/landsat_met.c	2010-09-09 08:06:28 UTC (rev 43434)
+++ grass-addons/imagery/i.landsat.toar/landsat_met.c	2010-09-09 08:13:01 UTC (rev 43435)
@@ -45,7 +45,7 @@
     FILE *f;
     char mettext[ETM_MET_SIZE];
     char name[MAX_STR], value[MAX_STR];
-    int i, j;
+    int i;
 
     static int band[] = { 1, 2, 3, 4, 5, 6, 6, 7, 8 };
     static int code[] = { 1, 2, 3, 4, 5, 61, 62, 7, 8 };
@@ -53,9 +53,9 @@
     static double esun[] =
 	{ 1969., 1840., 1551., 1044., 225.7, 0., 82.07, 1368. };
 
-    if ((f = fopen(metfile, "r")) == NULL) {
+    if ((f = fopen(metfile, "r")) == NULL)
 	G_fatal_error(_(".met file [%s] not found"), metfile);
-    }
+
     fread(mettext, 1, ETM_MET_SIZE, f);
 
     /* --------------------------------------- */
@@ -138,11 +138,12 @@
 {
     FILE *f;
     char mettext[TM5_MET_SIZE];
-    char metdate[MAX_STR], value[MAX_STR];
+    char value[MAX_STR];
+    /* char metdate[MAX_STR]; */
 
-    if ((f = fopen(metfile, "r")) == NULL) {
+    if ((f = fopen(metfile, "r")) == NULL)
 	G_fatal_error(_(".met file [%s] not found"), metfile);
-    }
+
     fread(mettext, 1, TM5_MET_SIZE, f);
 
     /* --------------------------------------- */



More information about the grass-commit mailing list