Skip to content

Commit

Permalink
Merge pull request #55 from ghulands/fix_issue_21
Browse files Browse the repository at this point in the history
Issue 21: Fix for when altitude is zero
  • Loading branch information
pingswept committed Aug 14, 2017
2 parents e32d755 + 6e008ca commit 7a0a7b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pysolar/radiation.py
Expand Up @@ -42,7 +42,7 @@ def get_optical_depth(day):

def get_radiation_direct(when, altitude_deg):
# from Masters, p. 412
if altitude_deg < 0:
if int(altitude_deg) <= 0:
return 0.0
day = when.utctimetuple().tm_yday
flux = get_apparent_extraterrestrial_flux(day)
Expand Down

0 comments on commit 7a0a7b6

Please sign in to comment.