Mercurial > dive4elements > river
changeset 6637:65a5deaee769
Subtract PNP before calculating wcm from wMinCM (issue1155)
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 23 Jul 2013 15:09:30 +0200 (2013-07-23) |
parents | 3aa6c1f5ddc3 |
children | 724f9bf7fa9c |
files | artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATWriter.java |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATWriter.java Tue Jul 23 09:49:11 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATWriter.java Tue Jul 23 15:09:30 2013 +0200 @@ -115,7 +115,7 @@ double wMin = minW(invInst, wMax, qMax[0]); - double wMinCM = wMin * 100d; + double wMinCM = wMin * 100d - subtractPNP; double wMaxCM = wMax * 100d; int wRow = ((int)wMinCM / 10) * 10; @@ -124,7 +124,7 @@ wMinCM = (int)wMinCM + 1d; } - double w = wMinCM / 100.0; + double w = (wMinCM + subtractPNP) / 100.0; int wcm = ((int)wMinCM) % 10; @@ -132,9 +132,10 @@ log.debug("wMinCM: " + wMinCM); log.debug("wMaxCM: " + wMaxCM); log.debug("wcm: " + wcm); + log.debug("subtractPNP: " + subtractPNP); } - out.printf(Locale.US, "%8d", wRow - subtractPNP); + out.printf(Locale.US, "%8d", wRow); for (int i = 0; i < wcm; i++) { out.print(ATWriter.EMPTY); @@ -158,7 +159,7 @@ if (w > wMax) { break; } - out.printf(Locale.US, "%8d", (wRow += 10) - subtractPNP); + out.printf(Locale.US, "%8d", (wRow += 10)); wcm = 0; }