by Roland Leigh (1 Submission)
Category: Math/Dates
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)
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.
Code Returns
Solar Zenith Angle (the angle between a line straight up, and a line to the sun)