[PATCH] Deliver historical discharge curves in meter, not centimeter over datum
Wald Commits
scm-commit at wald.intevation.org
Wed Oct 1 14:13:54 CEST 2014
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1412165621 -7200
# Node ID 011e2290e80158283e2ea821125fe15cf5663b69
# Parent 24d044866c2ab513326dbd3980de18118a122f3e
Deliver historical discharge curves in meter, not centimeter over datum.
diff -r 24d044866c2a -r 011e2290e801 artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java Wed Oct 01 13:42:19 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java Wed Oct 01 14:13:41 2014 +0200
@@ -208,11 +208,16 @@
}
protected WQKms prepareWQ(DischargeTable dt, double[][] values) {
+ double datum = dt.getGauge().getDatum().doubleValue();
double km = dt.getGauge().getStation().doubleValue();
- double[] kms = new double[values[0].length];
+ double[] kms = new double[values[1].length];
Arrays.fill(kms, km);
+ for (int i = 0 ; i < values[1].length; i++) {
+ values[1][i] = values[1][i]/100d + datum;
+ }
+
return new HistoricalWQKms(kms, values[0], values[1],
String.valueOf(km), dt.getTimeInterval());
}
More information about the Dive4Elements-commits
mailing list