Volume of lying cylinder

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Micha_he
Normal user
Posts: 78
Joined: 07 Feb 2018, 19:14

Volume of lying cylinder

#1 Post by Micha_he » 22 Oct 2018, 09:23

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²)

User avatar
grovkillen
Core team member
Posts: 3300
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Volume of lying cylinder

#2 Post by grovkillen » 22 Oct 2018, 09:54

No not currently, could you please add it as a feature request on GitHub?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Micha_he
Normal user
Posts: 78
Joined: 07 Feb 2018, 19:14

Re: Volume of lying cylinder

#3 Post by Micha_he » 22 Oct 2018, 09:59

Sure...

HomeJCL
Normal user
Posts: 63
Joined: 03 Feb 2018, 10:42

Re: Volume of lying cylinder

#4 Post by HomeJCL » 22 Oct 2018, 15:36

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. 👍
Belgium and land of ESP ... counting :D

rira2005
Normal user
Posts: 15
Joined: 25 Jun 2017, 21:09

Re: Volume of lying cylinder

#5 Post by rira2005 » 27 May 2019, 22:07

HI need this too? any news about this request?
many Thanks.
Raphi

Micha_he
Normal user
Posts: 78
Joined: 07 Feb 2018, 19:14

Re: Volume of lying cylinder

#6 Post by Micha_he » 12 Jun 2019, 08:09

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests