00001 //----------------------------------------------------------------------------- 00002 //: 00003 // \file 00004 // \brief Sun illumination direction as a function of location and time of day 00005 // \author J. L. Mundy 00006 // \date December 24, 2009 00007 // 00008 // Adapted from code available at http://www.psa.es/sdg/sunpos.htm 00009 // Posted by The Plataforma Solar de Almerķa (PSA), a solar energy laboratory. 00010 // sun_azimuth is measured in degrees clockwise from north 00011 // sun_elevation is measured in degrees with zero on the local tangent plane 00012 // and 90 degrees when the sun is directly overhead. 00013 // 00014 // The inputs are: 00015 // time in Coordinated Universal Time (UTC) - 00016 // The time at the Greenwich Meridian also 00017 // known as "zulu time" indicated by a Z; 00018 // 00019 // position on the Earth (longitude, latitude) in decimal degrees 00020 // longitudes East of the Greenwich meridan are positive, 0<= lon <= 180 00021 // longitudes West of the Greenwich meridan are negative, 0>= lon >= -180; 00022 // latitudes North of the equator are positive, 0<= lat <= 90; 00023 // latitudes South of the equator are negative, 0>= lon >= -90; 00024 // 00025 //---------------------------------------------------------------------------- 00026 #ifndef __BGEO_SUN_POS_H 00027 #define __BGEO_SUN_POS_H 00028 00029 void bgeo_sun_pos(int year, int month, int day, 00030 int hours, int minutes, int seconds, 00031 double longitude, double latitude, 00032 double& sun_azimuth, double& sun_elevation); 00033 00034 #endif
1.7.5.1