Sun Position

class pysolorie.sun_position.SunPosition[source]

A class to model sun position.

hour_angle(solar_time: float) float[source]

Calculate the hour angle based on the solar time.

The hour angle is a measure of time, expressed in angular terms, from solar noon.

The formula used to calculate the hour angle is:

\[\omega = (t - 12\times 60 \times 60) \times \frac{\pi}{12\times 60 \times 60}\]
Parameters:

solar_time (float) – The solar time in seconds.

Returns:

The hour angle in radians.

Return type:

float

solar_declination(day_of_year: int) float[source]

Calculate the solar declination angle in radians [1].

The solar declination angle is the angle between the rays of the sun and the plane of the Earth’s equator.

The formula used to calculate the solar declination angle is:

\[\delta = \frac{23.45 \pi}{180} \times \sin \left(\frac{2\pi~(284 + n)}{365}\right)\]
\(n\) is the day of the year (i.e., day_of_year)
Parameters:

day_of_year (int) – The day of the year.

Returns:

The solar declination angle in radians.

Return type:

float

References

solar_time(hour_angle: float) float[source]

Calculate the solar time based on the hour angle.

The solar time is a measure of time, expressed in seconds, from solar noon.

The formula used to calculate the solar time is:

\[t = \omega \times \frac{12 \times 60 \times 60}{\pi} + 12 \times 60 \times 60\]
Parameters:

hour_angle (float) – The hour angle in radians.

Returns:

The solar time in seconds.

Return type:

float