pingswept/pysolar

Noticed Bad solar elevation coming from pysolar 0.6

Closed this issue · 1 comments

I noticed a bad solar zenith coming from one particular time from the .6 version of pysolar. Below I've attached a time series of solar elevations for a 20 minute period, with the questionable value in bold . .
Datetime SolarZenith
109493 2018-05-22 01:25:00 -7.066446
109494 2018-05-22 01:30:00 -6.078767
109495 2018-05-22 01:35:00 11.184133
109496 2018-05-22 01:40:00 -3.919527
109497 2018-05-22 01:45:00 -2.632823

Here is the line of code and output for both pysolar .6 and pysolar .8.
Value returned from pysolar 0.8 . . .

solar.get_altitude(29.2044, 47.0528, pd.to_datetime(1526952900, unit='s',utc=True))
-5.048541631380446

Value returned from pysolar 0.6

solar.GetAltitude(29.2044, 47.0528, pd.to_datetime(1526952900, unit='s', utc=True))
11.184133489077634

The value from 0.8 looks good, but there is clearly a problem with .6.

Looks like a bug, but given that it's been fixed several releases ago, and nobody seems interested in backporting our newer code to Python 2, I'm closing this.