Fix EN_settankdata for elevation with SI units

Fix #593
This commit is contained in:
Elad Salomons
2020-04-19 09:42:43 +03:00
parent b259f87782
commit 3f515e7ad4

View File

@@ -2666,11 +2666,11 @@ int DLLEXPORT EN_settankdata(EN_Project p, int index, double elev,
else area = PI * diam * diam / 4.0;
// Assign parameters to tank object
net->Node[Tank[j].Node].El = elevation;
net->Node[Tank[j].Node].El = elevation / Ucf[ELEV];
Tank[j].A = area / Ucf[ELEV] / Ucf[ELEV];
Tank[j].H0 = elevation + initlvl / Ucf[ELEV];
Tank[j].Hmin = elevation + minlvl / Ucf[ELEV];
Tank[j].Hmax = elevation + maxlvl / Ucf[ELEV];
Tank[j].H0 = (elevation + initlvl) / Ucf[ELEV];
Tank[j].Hmin = (elevation + minlvl) / Ucf[ELEV];
Tank[j].Hmax = (elevation + maxlvl) / Ucf[ELEV];
Tank[j].Vcurve = curveIndex;
if (curveIndex == 0)
{