Fixed at commit e8a5015 <https://github.com/weewx/weewx/commit/cb6b923ef52449ec5223b45d1d1d7efd57301900> .
Gary On Tuesday, 30 June 2020 22:55:52 UTC+10, gjr80 wrote: > > Ah, well spotted. This will be a python2/python3 issue. In python 2 / is > integer division if both operands are integers. But in python3 / is > floating point division irrespective of the operands. So the vantage driver > would have worked correctly for WeeWX v3.x as well as for v4.x under > python2. WeeWX v4.x under python3 will exhibit the incorrect behaviour. > Guess a change is in order. > > Gary > > On Tuesday, 30 June 2020 22:47:25 UTC+10, Jacques Terrettaz wrote: >> >> HI, >> >> I checked with my Davis station and I am observing exactly the same kind >> of differences. I think the problem is coming from the vantage weewx driver >> : >> >> Here are my data concerning sunrise : >> >> - the console displays 05:46 for sunrise. This is correct >> - the raw loop data for sunrise, as received by Weewx , is 546 >> - weewx vantage driver is converting the raw loop data into seconds >> using this function >> 'sunrise' : lambda p, k: 3600 * (p[k] / 100) + 60 * (p[k] % >> 100), >> giving : 3600 * (546/100) + 60 * 46 =* 22416*. This is wrong, it >> should be 3600 * (*500*/100) + 60 * 46 = *20760* >> >> Should the right formulas be : >> 'sunrise' : lambda p, k: 3600 * (p[k] // 100) + 60 * (p[k] % 100), >> 'sunset' : lambda p, k: 3600 * (p[k] // 100) + 60 * (p[k] % 100), >> >> >> ? >> > -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8134d389-5c93-4249-938b-0842eef57374o%40googlegroups.com.