Page 1 of 1
Volume of lying cylinder
Posted: 22 Oct 2018, 09:23
by Micha_he
Is it possible to calculate the volume 'V'(from the measured height 'h') of a lying cylinder with ESPEasy ?
Has ESPEasy mathematical functions like ARCCOS ?
Formula: V = r²*l*(arccos(r-h/r) - (r-h)*√(2*r*h - h²)/r²)
Re: Volume of lying cylinder
Posted: 22 Oct 2018, 09:54
by grovkillen
No not currently, could you please add it as a feature request on GitHub?
Re: Volume of lying cylinder
Posted: 22 Oct 2018, 09:59
by Micha_he
Sure...
Re: Volume of lying cylinder
Posted: 22 Oct 2018, 15:36
by HomeJCL
Why not curve fitting in the meantime.
Google for a percentage fill table > curve fit choose adhoc curve fit et voilà accurate enough for at home.
Re: Volume of lying cylinder
Posted: 27 May 2019, 22:07
by rira2005
HI need this too? any news about this request?
many Thanks.
Raphi
Re: Volume of lying cylinder
Posted: 12 Jun 2019, 08:09
by Micha_he
Here's my solution (polynomial function 5. grade instead the ARCCOS-formula):
Device1: JSN-SR04T, Name: Fuellstand, Valuename: WertRelativ, Formula: ([min-cm ]-%value%)/([min-cm]-[max-cm])*100
Device2: Dummy-Device, Name: FuellstandZylinder, ValueName: FuellstandZylinderRelativ
Rule to calcute 0-100% height to 0-100% volume:
Code: Select all
On Fuellstand#WertRelativ do
Taskvalueset 2,1,-0.1428+0.290825*%eventvalue%+0.0285366*%eventvalue%^2-0.000428633*%eventvalue%^3+0.00000356523*%eventvalue%^4-0.00000001419964*%eventvalue%^5
endon
The value from the second device is published via MQTT to my OpenHAB-Server.