Skip to content

Commit

Permalink
Fix backwards search on solar returns
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoventura committed Jun 13, 2016
1 parent 4c5c0f5 commit 87c3117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flatlib/ephem/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def solarReturnJD(jd, lon, forward=True):
if forward:
dist = angle.distance(sun, lon)
else:
dist = angle.distance(lon, sun)
dist = -angle.distance(lon, sun)

while abs(dist) > MAX_ERROR:
jd = jd + dist / 0.9833 # Sun mean motion
Expand Down

0 comments on commit 87c3117

Please sign in to comment.