## Solar Position Calculator

Version 1.0.0.0 (57.6 KB) by
Basic analytical calculation of solar zenith and azimuth without atmospheric refraction.
Updated 26 Jul 2016

%SOLARPOSITION Calculate solar position using most basic algorithm
% This is the most basic algorithm. It is documented in Seinfeld &
% Pandis, Duffie & Beckman and Wikipedia.
%
% [ANGLES,PROJECTION] = SOLARPOSITION(DATE,TIME,LATITUDE,LONGITUDE,TIME_ZONE)
% returns ZENITH & AZIMUTH for all DATE & TIME pairs at LATITUDE, LONGITUDE.
% ANGLES = [ZENITH,AZIMUTH] and PROJECTION = [PHI_X, PHI_Y]
% PHI_X is projection on x-z plane & PHI_Y is projection on y-z plane.
% DATETIME can be string, vector [YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS],
% cellstring or matrix N x [YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS] for N
% times.
% LATITUDE [degrees] and LONGITUDE [degrees] are the coordinates of the site.
% TIME_ZONE [hours] of the site.
% ROTATION [degrees] clockwise rotation of system relative to north.
% DST [logical] flag for daylight savings time, typ. from March to November
% in the northern hemisphere.
%
% References:
% http://en.wikipedia.org/wiki/Solar_azimuth_angle
% http://en.wikipedia.org/wiki/Solar_elevation_angle
%
% Mark A. Mikofski
%

### Cite As

Mark Mikofski (2024). Solar Position Calculator (https://www.mathworks.com/matlabcentral/fileexchange/58405-solar-position-calculator), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2013b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux
##### Categories
Find more on Solar Power in Help Center and MATLAB Answers
##### Acknowledgements

Inspired: SOLAR_GUI

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

#### html/

Version Published Release Notes
1.0.0.0