Simple python sun position calculator. Returns the sun elevation angle (SEA) and azimuth angle (AZ) using the following parameters: latitude, longitude and UTC offset.
You can test it returns the correct values in the following links Keisan or
PVEducation.
Use cases: Align solar panel angle for maximum sun exposure, intelligent curtain that avoids direct sunlight, etc.
Take into account this:
The above equation only gives the correct azimuth in the solar morning so that:
Azimuth = Azi, for LST <12 or HRA < 0
Azimuth = 360° - Azi, for LST > 12 or HRA >0
Algorithm source