function y = level_calc(x)
V = x;
h1 = 180; % tinggi kerucut [mm]
r = 150/2;% jari-jari penampang tangki [mm]
Vk = (h1*pi*r^2)/3; % Volume kerucut penuh
Vs = V - Vk; % Volume silinder
if V > 0
    if Vs < 0
        y = ((3*V*h1^2)/(pi*r^2))^(1/3);
    else
        y = h1 + (Vs/(pi*r^2));
    end
else
    y = 0;
end
