Calculating the volume takes two steps.
The volume of a cone is pi/3*r^2*h. But in a conical tank the diameter of the cone changes with fluid height. So we subsitute tan X * h for the radius of the cone.
Thus, volume in the conical portion of your tank is given by
pi/3 * (tan X * h)^2 * h
where X is the angle the conical portion of the tank makes from the vertical axis of the tank, and h is the fluid height in the cone.
For your 34" diameter tank with a six inch conical sectcion, (assuming those are tank interior dimensions, then the angle of the cone from vertical is 70.56 deg. The volume of the cone is given by
pi/3*(tan 70.56 * h)^2 * h
simplifying:
V = 8.4067 * h^3. If the cone angle is something different than 70.56 then you need to recalculate.
To convert that to gallons, 1 gallon is 231 in^3, so
gallons = .03639265 * h^3
For heights above 6" the tank volume is the total volume of the cone + the volume of the cylinder above the cone. The total volume of the cone, from above, is 7.861 gallons. A cylinder volume is given by pi()/4*d^2*L where d is the diameter and L is the cylinder length.
In your tank, pi()/4 and d^2 are fixed values, so combining the constants for your tank we get 907.92 * L. Since we have a six inch cone on the tank, then L which is total fluid column height - 6. Converting to get gallons (1 gal=231 in^3) we have 3.9304 * (h-6).
Summarizing:
If fluid column height is <= 6" then gallons := .03639265 * h^3
If fluid column height is > 6 then gallons := 7.861 + (3.9304*(h-6))
note: h * h * h computes faster than h**3, something to consider when you go to program this.
edit to add: Conical bottom tanks with drains attached at the cone are usually not really conical, but are actually frustrums, that is a cone with a flat instead of a point, then you have an additional cylinder which is the pipe from the bottom of the frustrum to the valve. Keeping in mind the actual physical location of the sensor, it is up to you to determine how this impacts the accuracy of your volume calculations, but hopefully you can see from what we have covered how to do that.