Just put the code in a template and see, if it does, what you want. Anythings else: step by step :)
[email protected] schrieb am Samstag, 22. März 2025 um 19:53:08 UTC+1: > Thanks, Michael, I’ll work with your suggestion but I’m not sure how to > put this in a template other than the Standard skin. I guess this would be > code in another file that would be called from Standard? Sorry, I’m not > very Python literate—only enough to get myself into trouble. > Cheers, > Bob > > On Saturday, March 22, 2025 at 4:29:23 AM UTC-4 [email protected] wrote: > >> See: >> https://weewx.com/docs/5.1/custom/cheetah-generator/?h=ephem#heavenly-bodies >> >> Note: ephem has to be installed >> >> Assuming the maximum angle of the sun is really when it transits, then >> the maximum height can be calculated like this: set almanac time to transit >> time, and then calculate the altitude for the sun at this time: >> $almanac(almanac_time=$almanac.sun.transit.raw).sun.alt >> >> >> But as far as I know, $almanac.sun.transit doesn't yield today's transit, >> but next transit, which may be tomorrow, if the current time is after >> today's transit. For today's transit, you calculate the next transit from >> today's start of day, and then calculate the sun's altitude for this time: >> $almanac(almanac_time=$almanac(almanac_time=$day.start.raw >> ).sun.transit.raw).sun.alt >> >> >> Then put the above code in a template of your choice (which may arise >> your next question) in a way, it survives a WeeWX update/skin update. >> You also may want to format the result in a way, it doesn't show a dozen >> of decimals and add degrees(°), which requires additional code. >> >> There may be other and/or easier ways. >> [email protected] schrieb am Freitag, 21. März 2025 um 23:58:03 UTC+1: >> >>> Hello, >>> I would like to display (Standard skin) the max sun angle for the day at >>> my latitude. Not being a programmer, I’m not sure how to do this. I have a >>> solar hot water heater. >>> My system is an RPI5 with pip install of the latest weewx. >>> Thanks in advance. >>> Cheers, >>> Bob >>> grattans.org/wx >>> >> -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/6a89eb2c-6c40-4eb4-a0e7-4f5e31522d90n%40googlegroups.com.
