On Thu, Jan 20, 2022 at 4:01 PM Seth Ratner <[email protected]> wrote:
> Would you add the step from the xType guide of adding chillHours to > [StdWXCalculate] [[Calculations]]? Or would the "synthetic type" concept > mean it only exists when it is called on. > > As I understand it, adding it to [StdWXCalculate] [[Calculations]] would > add chillHours to the loop, but it would not be in the archive unless I > also added a column for it with the same type name. > It doesn't hurt to add to StdWXCalculate, but it's really only necessary if you want to add the results to the database. And, yes, it will only get added to the database if there's a matching column in the schema. > > So on my Belchertown skin, where I want total Chill Hours from Oct - May > displayed, if I add it to the archive WeeWX will use the database to > calculate the total (just adding them together), whereas if I don't add it > to the archive, WeeWX will have to run the (if outTemp < 45 then chillHours > = archive_interval) for every archive row in that timespan, then sum that? > Maybe. For the ImageGenerator that comes with WeeWX, if a type is not available in the database, it will try to calculate it "on the fly" using xtypes. However, I have no idea what the Belchertown skin does. I kind of doubt it leverages xtypes. -tk -- 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 on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEAdDBGTow7i55XfnGPzncQjdmiH%2BSk%3DL9_ZoE85QXKO%3Dw%40mail.gmail.com.
