[GRASS-SVN] r48204 - grass/trunk/raster/r.sun

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 8 04:24:47 EDT 2011


Author: hamish
Date: 2011-09-08 01:24:46 -0700 (Thu, 08 Sep 2011)
New Revision: 48204

Modified:
   grass/trunk/raster/r.sun/rsunlib.c
Log:
cosmetic whitespace, comment re. the meaning of a hardcoded number

Modified: grass/trunk/raster/r.sun/rsunlib.c
===================================================================
--- grass/trunk/raster/r.sun/rsunlib.c	2011-09-08 08:24:40 UTC (rev 48203)
+++ grass/trunk/raster/r.sun/rsunlib.c	2011-09-08 08:24:46 UTC (rev 48204)
@@ -1,13 +1,13 @@
+/****************************************************************************
+ r.sun: rsunlib.c. This program was writen by Jaro Hofierka in Summer 1993
+   and re-engineered in 1996-1999. In cooperation with Marcel Suri and
+   Thomas Huld from JRC in Ispra a new version of r.sun was prepared using
+   ESRA solar radiation formulas.  See the manual page for details.
 
-/*******************************************************************************
-r.sun: rsunlib.c. This program was writen by Jaro Hofierka in Summer 1993 and re-engineered
-in 1996-1999. In cooperation with Marcel Suri and Thomas Huld from JRC in Ispra
-a new version of r.sun was prepared using ESRA solar radiation formulas.
-See manual pages for details.
-(C) 2002 Copyright Jaro Hofierka, Gresaka 22, 085 01 Bardejov, Slovakia, 
-              and GeoModel, s.r.o., Bratislava, Slovakia
-email: hofierka at geomodel.sk, marcel.suri at jrc.it, suri at geomodel.sk
-*******************************************************************************/
+  (C) 2002 Copyright Jaro Hofierka, Gresaka 22, 085 01 Bardejov, Slovakia, 
+               and GeoModel, s.r.o., Bratislava, Slovakia
+  email: hofierka at geomodel.sk, marcel.suri at jrc.it, suri at geomodel.sk
+****************************************************************************/
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -187,10 +187,8 @@
 	     struct GridGeometry *gridGeom, double latitude, double longitude)
 {
     double pom, xpom, ypom;
-
     double costimeAngle;
     double lum_Lx, lum_Ly;
-
     double newLatitude, newLongitude;
     double inputAngle;
     double delt_lat, delt_lon;
@@ -246,7 +244,6 @@
     }
 
 
-
     if (sunVarGeom->solarAzimuth < 0.5 * M_PI)
 	sunVarGeom->sunAzimuthAngle = 0.5 * M_PI - sunVarGeom->solarAzimuth;
     else
@@ -256,7 +253,7 @@
     inputAngle = sunVarGeom->sunAzimuthAngle + pihalf;
     inputAngle = (inputAngle >= pi2) ? inputAngle - pi2 : inputAngle;
 
-
+    /* 1852m * 60 * 0.0001rad * 180/pi= 636.67m */
     delt_lat = -0.0001 * cos(inputAngle);  /* Arbitrary small distance in latitude */
     delt_lon = 0.0001 * sin(inputAngle) / cos(latitude);
 



More information about the grass-commit mailing list