comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Segment.java @ 5117:842026a5a12c

Fixed 'W fuer ungleichwertige AbflussLaengsschnitte'. See TODO!!!
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 27 Feb 2013 15:52:38 +0100
parents a929d9a9fa1e
children 345f3bba6f15
comparison
equal deleted inserted replaced
5112:ae25e23a1546 5117:842026a5a12c
176 // convert to Q if needed 176 // convert to Q if needed
177 if (!isQ && gauge != null) { 177 if (!isQ && gauge != null) {
178 178
179 DischargeTable dt = gauge.fetchMasterDischargeTable(); 179 DischargeTable dt = gauge.fetchMasterDischargeTable();
180 180
181 //TODO: Change scale from 100 to 1 immediately after
182 // discharge table import changed to cm!
181 double [][] table = 183 double [][] table =
182 DischargeTables.loadDischargeTableValues(dt, 1); 184 DischargeTables.loadDischargeTableValues(dt, 100);
183 185
184 // need the original values for naming 186 // need the original values for naming
185 segment.backup(); 187 segment.backup();
186 188
187 for (int i = 0; i < values.length; ++i) { 189 for (int i = 0; i < values.length; ++i) {
188 double w = values[i] / 100.0; 190 //TODO: s.o.
191 double w = values[i]; /* / 100.0; */
189 double [] qs = DischargeTables.getQsForW(table, w); 192 double [] qs = DischargeTables.getQsForW(table, w);
190 if (qs.length == 0) { 193 if (qs.length == 0) {
191 log.warn("No Qs found for W = " + values[i]); 194 log.warn("No Qs found for W = " + values[i]);
192 report.addProblem("cannot.find.w.for.q", values[i]); 195 report.addProblem("cannot.find.q.for.w", values[i]);
193 values[i] = Double.NaN; 196 values[i] = Double.NaN;
194 success = false; 197 success = false;
195 } 198 }
196 else { 199 else {
197 values[i] = qs[0]; 200 values[i] = qs[0];

http://dive4elements.wald.intevation.org