For a rectangular/square pool:
\[ V = l \times w \times \frac{d_1 + d_2}{2} \]
For an oval/circular pool:
\[ V = \pi \times \frac{l \times w}{4} \times \frac{d_1 + d_2}{2} \]