4.0

4.0 | 2 ratings Rate this file 145 downloads (last 30 days) File Size: 3.64 KB File ID: #23051

Solar Azimuth and Elevation Estimation

by Darin Koblick

 

20 Feb 2009

No BSD License  

Predict the topocentric solar position defined by geodetic lat, lon, Alt, and a universal time

Download Now | Watch this File

File Information
Description

Predict the azimuth and elevation of the Sun within +/- 1 degree at any geodetic latitude, longitude and altitude.

Function Call: [Az El] = SolarAzEl('2008/02/18 13:10:00',60,15,0)

Input List:
UTC Date and Time - Use format YYYY/MM/DD hh:mm:ss
Latitude - Site Latitude in degrees -90:90 -> S(-) N(+)
Longitude - Site Longitude in degrees -180:180 W(-) E(+)
Altitude - Site Altitude in km
 
Output List:
Az - Solar Azimuth angle in degrees
El - Solar Elevation/Altitude Angle in degrees

Acknowledgements
This submission has inspired the following:
SPOT--Solar Panel Orientation Toolbox, Right ascension/declination to azimuth/elevation
MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
19 Mar 2009 Anthony Kendall

Excellent function, it's fast, compact, and easily modified for my particular needs. Thank you very much! BTW, I compared it with sun position tables, (http://www.srrb.noaa.gov/highlights/sunrise/azel.html) and it does very well.

27 Aug 2009 Phil

Ropey when using vector times: (line 36 generates a vector eccentricity: line 42 then requires an edit to force array multiply not matrix multiply). Still unable to get vector time version to agree with loop version....
As Mr. Picky, I would prefer time argin to be Matlab datenum, not string.
HOWEVER, this is the only code I've found that gives Azimuth round the full 360: most are 0-180 and it's up to you to find if its in the east or west... due to using code like
http://en.wikipedia.org/wiki/Solar_azimuth_angle
Thanks

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
aerospace Darin Koblick 23 Feb 2009 10:45:46
alt Darin Koblick 23 Feb 2009 10:45:46
altitude Darin Koblick 23 Feb 2009 10:45:46
astronomy Darin Koblick 23 Feb 2009 10:45:46
az Darin Koblick 23 Feb 2009 10:45:46
azimuth Darin Koblick 23 Feb 2009 10:45:46
darin Darin Koblick 23 Feb 2009 10:45:46
el Darin Koblick 23 Feb 2009 10:45:46
elevation Darin Koblick 23 Feb 2009 10:45:46
gmt Darin Koblick 23 Feb 2009 10:45:46
jd Darin Koblick 23 Feb 2009 10:45:46
julian date Darin Koblick 23 Feb 2009 10:45:46
koblick Darin Koblick 23 Feb 2009 10:45:46
lat Darin Koblick 23 Feb 2009 10:45:46
latitude Darin Koblick 23 Feb 2009 10:45:46
lon Darin Koblick 23 Feb 2009 10:45:46
longitude Darin Koblick 23 Feb 2009 10:45:46
solar Darin Koblick 23 Feb 2009 10:45:46
sun Darin Koblick 23 Feb 2009 10:45:46
utc Darin Koblick 23 Feb 2009 10:45:46
geodetic Darin Koblick 23 Feb 2009 10:45:46
ecliptic Darin Koblick 23 Feb 2009 10:45:46
equitorial Darin Koblick 23 Feb 2009 10:45:46
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com