Thank you for clarification. Tom Keffer schrieb am Samstag, 21. November 2020 um 00:56:41 UTC+1:
> As you've discovered, temperature conversion functions are not > distributive. That is, F_to_C(68F - 50F) is not equal to F_to_C(68F) - > F_to_C(50F). > > No, there is no group_temperaturediff. > > The tag $trend has a problem similar to yours. It needs to calculate the > difference between the temperature some time ago, and the current > temperature. It solves the problem the same way you are: perform the > conversion just before use. > > I think your approach is very sensible. > > -tk > > On Fri, Nov 20, 2020 at 11:22 AM Karen K <[email protected]> wrote: > >> I write the driver for Wetternetz Sachsen, and I have to upload some >> temperature differences there. >> >> And I wonder what is the *intended way* to convert those differences >> from one unit to another. >> >> The template for a restful service driver says that I have to put code to >> read or calculate additional values into the "get_record" function, where >> the archive unit system is used. The conversion to the target unit system I >> have to put into the "format_url" function. >> >> Temperatures and temperature differences are converted in a different way >> because of the offset between the units. >> >> But I found no "group_temperaturediff" or "group_temperaturerate" unit >> group, that could cover that. >> >> Because I did not know I put the code to read the start and end >> temperature of the given interval into the "get_record" function. No >> difference is calculated there. In "format_url" function first the data >> record is converted into the target unit system and then the temperature >> difference is calculated. >> >> Shall I do so or is there a better way? >> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-development/d0f8e51c-9474-4287-b067-aae6524fa21cn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-development/d0f8e51c-9474-4287-b067-aae6524fa21cn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/24d520f6-809a-4667-9e84-29ea8b37ee15n%40googlegroups.com.
