Python: Added MoonPhase test. Fixed errors.

This commit is contained in:
Don Cross
2019-06-29 23:43:38 -04:00
parent 9d304850df
commit 0ab44ede69
4 changed files with 84 additions and 4 deletions

View File

@@ -2159,14 +2159,14 @@ def EclipticLongitude(body, time):
return eclip.elon
def AngleFromSun(body, time):
if body == EARTH:
if body == BODY_EARTH:
raise EarthNotAllowedError()
sv = GeoVector(BODY_SUN, time, True)
bv = GeoVector(body, time, True)
return _AngleBetween(sv, bv)
def LongitudeFromSun(body, time):
if body == EARTH:
if body == BODY_EARTH:
raise EarthNotAllowedError()
sv = GeoVector(BODY_SUN, time, True)
se = Ecliptic(sv)