Netgalleria / arska-node

Smart power manager for optimized solar power usage as well as greenest and cheapest energy purchase
GNU General Public License v3.0
24 stars 1 forks source link

Something strange with "p diff" calculation #19

Closed joe-ave closed 1 year ago

joe-ave commented 2 years ago

Hello Olli,

I just discovered that there is something strange with the "p diff" calculation, price were 6,1 c/Kw and 9h avg was 6,6 and 24h avg was 6,3. The p diff for 24H should have been -0,2 and p diff 9H should have been -0,5, but instead they showed 0,0 and -0,3.

image

//Jonas

Olli69 commented 2 years ago

Thanks Jonas again! There was a rounding error with negative values. Now it should be fixed (in the code pushed to the repo), but I will still test it a bit before publishing a new binary release.

Olli

Olli69 commented 1 year ago

P-diff rounding problem is fixed in latest 0.92.0-stable. There can be still 0.1 differences in rounded values in some cases, because calculations are made with precise values.