From 13b15589f0b98fbd13fa42c31dcfbe2674dd562c Mon Sep 17 00:00:00 2001 From: mleech Date: Sun, 21 Dec 2008 02:11:49 +0000 Subject: [PATCH] Updated Sunset/Sunrise functions to latest PyEphem API git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10147 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-radio-astronomy/src/python/usrp_ra_receiver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gr-radio-astronomy/src/python/usrp_ra_receiver.py b/gr-radio-astronomy/src/python/usrp_ra_receiver.py index bed31f7d..c82598c0 100755 --- a/gr-radio-astronomy/src/python/usrp_ra_receiver.py +++ b/gr-radio-astronomy/src/python/usrp_ra_receiver.py @@ -759,9 +759,11 @@ class app_flow_graph(stdgui2.std_top_block): if (now - self.continuum_then > 20): self.sun.compute(self.locality) enow = ephem.now() + sunset = self.locality.next_setting(self.sun) + sunrise = self.locality.next_rising(self.sun) sun_insky = "Down" self.sunstate = "Dn" - if ((self.sun.rise_time < enow) and (enow < self.sun.set_time)): + if ((sunrise < enow) and (enow < sunset)): sun_insky = "Up" self.sunstate = "Up" self.continuum_then = now -- 2.39.5