VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Sun Elevation Calculator (SZA)

Roland Leigh  (1 Submission)   Math/Dates   Visual Basic 5.0   Intermediate   Wed 3rd February 2021

Calculates the Solar Zenith Angle for a given day, time, latitude and longitude. In other words, the elevation angle of the sun at a given time and place. Functionality is included for calculating Dawn, Dusk and Noon times for specified times or periods, and outputting to file.
I originally needed this for some atmospheric research I was doing, and I couldn't find any simple application on the web, so having eventually found the algorithm and coded it, I thought I'd make it into a little VB module, and application, which might be of use to the next person who needs to know how high the sun is.
The application includes examples of:
- Manipulation of Date and Time variables
- Use of Timers to run clocks and updating displays
- Simple outputting of data to screen
- Simple outputting of data to a text file
I hope it's helpful to someone out there :-)

Inputs
Date, Time, latitude, Longitude.

Assumes
Nothing.. explanations in code.

Returns
Solar Zenith Angle (the angle between a line straight up, and a line to the sun)

Rate Sun Elevation Calculator (SZA) (3(3 Vote))

Download Sun Elevation Calculator (SZA)

Sun Elevation Calculator (SZA) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters