Version 5 Almanac Tags

53 views
Skip to first unread message

Steeple Ian

unread,
Jul 11, 2023, 6:06:58 PM7/11/23
to weewx-development
Checking version 5 with my skin which makes extensive use of the extended almanac tags: -
I am comparing V5.0.0b8 with V4.10.2

The version of ephem on both installations is the latest 4.1.4

I have noticed an issue with the following which I use in a .tmpl file to generate jsondata: -

$almanac.mercury.hlong
$almanac.venus.hlong
$almanac.sun.hlong
$almanac.mars.hlong
$almanac.jupiter.hlong
$almanac.saturn.hlong
$almanac.uranus.hlong
$almanac.neptune.hlong
$almanac.pluto.hlong

With V4.10.2 they resolve (correctly?) as in this excerpt: -
      "mercury hlongitude": {"value": 157.59676596526106},
        "venus hlongitude": {"value": 268.7607311602382},
        "earth hlongitude": {"value": 289.2181312716669},
        "mars hlongitude": {"value": 174.82131459911764},
        "jupiter hlongitude": {"value": 30.08049119910007},
        "saturn hlongitude": {"value": 332.3489727103565},
        "uranus hlongitude": {"value": 49.6533340016879},
        "neptune hlongitude": {"value": 355.8446048891469},
        "pluto hlongitude": {"value": 299.07169001740743},

However with V5.0.0b8 this happens:-
       "mercury hlongitude": {"value": 157:58:24.5},
        "venus hlongitude": {"value": 268:53:14.0},
        "earth hlongitude": {"value": 289:17:39.5},
        "mars hlongitude": {"value": 174:51:23.6},
        "jupiter hlongitude": {"value": 30:05:16.0},
        "saturn hlongitude": {"value": 332:21:05.4},
        "uranus hlongitude": {"value": 49:39:15.2},
        "neptune hlongitude": {"value": 355:50:42.2},
        "pluto hlongitude": {"value": 299:04:19.5},

I am assuming that this is an error or is there a change which requires additional formatting?

Ian      





Tom Keffer

unread,
Jul 11, 2023, 7:41:43 PM7/11/23
to Steeple Ian, weewx-development
Fixed in commit 6a4ab52.

These almanac properties now have new names, which return a ValueHelper. To avoid breaking old skins, the old names, which return a simple number, can continue to be used.

If your skin is targeting many different versions of WeeWX, you should use the old names.

I'll upload a new beta version with the changes once I get to a stable point. In the meantime, you can swap out almanac.py if you wish.



--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/b3b8f67b-02a6-47d7-beac-a50cc325a908n%40googlegroups.com.

Steeple Ian

unread,
Jul 11, 2023, 8:14:01 PM7/11/23
to weewx-development
Thanks Tom.

Steeple Ian

unread,
Jul 12, 2023, 6:04:26 AM7/12/23
to weewx-development
Tom,
I can confirm that the fix works perfectly.
Thanks
Ian

Reply all
Reply to author
Forward
0 new messages