solposx.solarposition.sg2_c#
- solposx.solarposition.sg2_c(times, latitude, longitude, elevation=0, *, pressure=101325, temperature=12)#
Calculate solar position using the SG2 Python package.
This function uses the SG2 Python package [1], which wraps the official C-code.
The SG2 algorithm [2] has a stated accuracy of 0.003 degrees from years 1980 to 2030.
- Parameters:
times (
pandas.DatetimeIndex) – Must be localized.latitude (
float) – Latitude in decimal degrees. Positive north of equator, negative to south. [degrees]longitude (
float) – Longitude in decimal degrees. Positive east of prime meridian, negative to west. [degrees]elevation (
float, default :0) – Altitude of the location of interest. [m]pressure (
float, default :101325) – Annual average air pressure. [Pa]temperature (
float, default :12) – Annual average air temperature. [°C]
- Returns:
DataFrame with the following columns (all values in degrees):
elevation : actual sun elevation (not accounting for refraction).
apparent_elevation : sun elevation, accounting for atmospheric refraction.
zenith : actual sun zenith (not accounting for refraction).
apparent_zenith : sun zenith, accounting for atmospheric refraction.
azimuth : sun azimuth, east of north.
- Return type:
See also
References