Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculation.java @ 9375:a0a2e68a1e11
Fixed: cm rounding in S-Info flow depth/tkh and U-Info salix via BigDecimal, half_even mode
author | mschaefer |
---|---|
date | Fri, 03 Aug 2018 17:00:45 +0200 |
parents | 392745cccede |
children | 8ae7137b67d7 |
comparison
equal
deleted
inserted
replaced
9374:4d61a9642046 | 9375:a0a2e68a1e11 |
---|---|
133 | 133 |
134 final double minBedHeightValue = bedHeight.getMinBedHeight(station); | 134 final double minBedHeightValue = bedHeight.getMinBedHeight(station); |
135 final double maxBedHeightValue = bedHeight.getMaxBedHeight(station); | 135 final double maxBedHeightValue = bedHeight.getMaxBedHeight(station); |
136 final double meanBedHeight = bedHeight.getMeanBedHeight(station); | 136 final double meanBedHeight = bedHeight.getMeanBedHeight(station); |
137 | 137 |
138 final double minFlowDepth = Math.max(Formatter.roundFlowDepth(wst) - Formatter.roundFlowDepth(maxBedHeightValue), 0.0); | 138 final double minFlowDepth = Math.max(Formatter.roundFlowDepth(wst).subtract(Formatter.roundFlowDepth(maxBedHeightValue)).doubleValue(), 0.0); |
139 final double maxFlowDepth = Math.max(Formatter.roundFlowDepth(wst) - Formatter.roundFlowDepth(minBedHeightValue), 0.0); | 139 final double maxFlowDepth = Math.max(Formatter.roundFlowDepth(wst).subtract(Formatter.roundFlowDepth(minBedHeightValue)).doubleValue(), 0.0); |
140 | 140 |
141 // REMARK: access the location once only during calculation | 141 // REMARK: access the location once only during calculation |
142 final String location = riverInfoProvider.getLocation(station); | 142 final String location = riverInfoProvider.getLocation(station); |
143 | 143 |
144 // REMARK: access the gauge once only during calculation | 144 // REMARK: access the gauge once only during calculation |