sunradstruct.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*******************************************************************************
  2. r.sun: sunradstruct.h. This program was writen by Jaro Hofierka in Summer 1993 and re-engineered
  3. in 1996-1999. In cooperation with Marcel Suri and Thomas Huld from JRC in Ispra
  4. a new version of r.sun was prepared using ESRA solar radiation formulas.
  5. See manual pages for details.
  6. (C) 2002 Copyright Jaro Hofierka, Gresaka 22, 085 01 Bardejov, Slovakia,
  7. and GeoModel, s.r.o., Bratislava, Slovakia
  8. email: hofierka@geomodel.sk,marcel.suri@jrc.it,suri@geomodel.sk
  9. *******************************************************************************/
  10. /*
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License
  13. * as published by the Free Software Foundation; either version 2
  14. * of the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the
  23. * Free Software Foundation, Inc.,
  24. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  25. */
  26. /*v. 2.0 July 2002, NULL data handling, JH */
  27. /*v. 2.1 January 2003, code optimization by Thomas Huld, JH */
  28. #define EPS 1.e-4
  29. #define HOURANGLE M_PI/12.
  30. struct SunGeometryConstDay
  31. {
  32. double lum_C11;
  33. double lum_C13;
  34. double lum_C22;
  35. double lum_C31;
  36. double lum_C33;
  37. double sunrise_time;
  38. double sunset_time;
  39. double timeAngle;
  40. double sindecl;
  41. double cosdecl;
  42. };
  43. struct SunGeometryVarDay
  44. {
  45. int isShadow;
  46. double z_orig;
  47. double zmax;
  48. double zp;
  49. double solarAltitude;
  50. double sinSolarAltitude;
  51. double tanSolarAltitude;
  52. double solarAzimuth;
  53. double sunAzimuthAngle;
  54. double stepsinangle;
  55. double stepcosangle;
  56. };
  57. struct SunGeometryVarSlope
  58. {
  59. double longit_l; /* The "longitude" difference between the inclined */
  60. /* and orientated plane and the instantaneous solar position */
  61. double lum_C31_l;
  62. double lum_C33_l;
  63. double slope;
  64. double aspect;
  65. };
  66. struct SolarRadVar
  67. {
  68. double cbh;
  69. double cdh;
  70. double linke;
  71. double G_norm_extra;
  72. double alb;
  73. };
  74. struct GridGeometry
  75. {
  76. double xp;
  77. double yp;
  78. double xx0;
  79. double yy0;
  80. double xg0;
  81. double yg0;
  82. double stepx;
  83. double stepy;
  84. double deltx;
  85. double delty;
  86. double stepxy;
  87. double sinlat;
  88. double coslat;
  89. };