Mercurial > dive4elements > river
changeset 6405:74b8362f6a4c
issue1235: Respect that suspSand values are also measured at "suspended" (Schwebstoff)
measurement stations.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 24 Jun 2013 10:34:55 +0200 |
parents | e6ceab9e3091 |
children | 24b4819ef514 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java |
diffstat | 1 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Mon Jun 24 10:15:34 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Mon Jun 24 10:34:55 2013 +0200 @@ -300,20 +300,20 @@ /** Returns true if all fraction values except SuspSediment are unset. */ private boolean hasOnlySuspValues(SedimentLoadFraction fraction) { return (fraction.getSuspSediment() != 0d && + fraction.getSuspSand() != 0d && fraction.getCoarse() == 0d && fraction.getFineMiddle() == 0d && - fraction.getSand() == 0d && - fraction.getSuspSand() == 0d); + fraction.getSand() == 0d); } /** Returns true if all fraction values except SuspSediment are set. */ private boolean hasButSuspValues(SedimentLoadFraction fraction) { return (fraction.getSuspSediment() == 0d && + fraction.getSuspSand() == 0d && fraction.getCoarse() != 0d && fraction.getFineMiddle() != 0d && - fraction.getSand() != 0d && - fraction.getSuspSand() != 0d); + fraction.getSand() != 0d); } @@ -369,7 +369,7 @@ // Adjust and remember schwebstoffs range and value. lastSuspRange = (Range) fraction.getSuspSedimentRange().clone(); lastSuspRange.setStart(fraction.getCoarseRange().getEnd()); - lastSuspValue = fraction.getSuspSediment(); + lastSuspValue = fraction.getSuspSediment() + fraction.getSuspSand(); lastOtherRange = null; fairLoad.setTotal(km, total, fraction.getCoarseRange()); } @@ -401,7 +401,7 @@ if (suspSedimentRange.getEnd() > lastOtherRange.getEnd()) { lastSuspRange = (Range) suspSedimentRange.clone(); lastSuspRange.setStart(lastOtherRange.getEnd()); - lastSuspValue = fraction.getSuspSediment(); + lastSuspValue = fraction.getSuspSediment() + fraction.getSuspSand(); lastOtherRange = null; } else { @@ -417,7 +417,7 @@ } else { lastSuspRange = suspSedimentRange; - lastSuspValue = fraction.getSuspSediment(); + lastSuspValue = fraction.getSuspSediment() + fraction.getSuspSand(); lastOtherRange = null; } } @@ -426,7 +426,6 @@ double total = fraction.getCoarse() + fraction.getFineMiddle() + fraction.getSand() + - fraction.getSuspSand() + lastSuspValue; double maxStart = Math.max(fraction.getCoarseRange().getStart(), lastSuspRange.getStart());