If you need access to almanac data from within a service, you can do
something like this (NOT TESTED):

import time
from weewx.almanac import Almanac

# Construct an instance for a given time, latitude, and longitude:

almanac = Almanac(time.time(), -31.5, 116)

print "Sunrise today is ", almanac.sun.rise

print "Mars will transit at ", almanac.mars.transit


On Wed, Nov 30, 2016 at 7:23 PM, Graham Gear <graham.g...@gmail.com> wrote:

> Yep, that was the issue, weewx was configured correctly for lat/long but
> not the Vantage, I forgot the South/West designators, I remember being
> confused on setup months ago when I had no ability to ensure negative
> values and then promptly forgot - whoops!
> Thanks Thomas and Gary!
> So it would seem weewx is using its own long/lat config to derive
> sunrise/sunset, is there a nice way to get access to this (and the other
> almanac data) from within a service rather than calculating it multiple
> times on the fly for a weewx downstream service?
> Graham
> On 1 December 2016 at 10:48:52, Thomas Keffer (tkef...@gmail.com) wrote:
> I missed that.
> It seems that the unit is correctly predicting sunrise and sunset in Baja
> California Nord, just outside Ensenada.
> -tk
> On Wed, Nov 30, 2016 at 6:46 PM, gjr80 <gjroder...@gmail.com> wrote:
>> Might want to check longitude as well, I am in Brisbane and have +153, I
>> suspect one of us is wrong.
>> Gary

Reply via email to