Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java @ 4813:bf2fd9c58ac4
Fixed MINFO SQ calculation.
* Fixed calculation of sieve 8.
* Fixed calculation of 'Geschiebetransport'.
* Fixed calculation of fractions (Sand, gravel, coarse).
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Sun, 20 Jan 2013 15:02:19 +0100 |
parents | d4e39cc5c10c |
children | 9e25c7523485 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java Fri Jan 11 13:57:38 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java Sun Jan 20 15:02:19 2013 +0100 @@ -11,11 +11,11 @@ private static final Log log = LogFactory.getLog(Measurement.class); - public static final double ADD_8 = Math.log(10) - Math.log(8)/Math.log(6.3); - public static final double SCALE_8 = Math.log(6.3); + public static final double LOG_10_8 = Math.log(10) - Math.log(8); + public static final double SCALE_8 = Math.log(10) - Math.log(6.3); - public static final double ADD_4 = Math.log(8) - Math.log(6.3)/Math.log(10); - public static final double SCALE_4 = Math.log(6.3); + public static final double LOG_8_6 = Math.log(8) - Math.log(6.3); + public static final double SCALE_4 = Math.log(10) - Math.log(6.3); protected Map<String, Object> data; @@ -123,6 +123,7 @@ if (sieveArray == null) { sieveArray = calculateSieveArray(); } + adjustSieves(); return sieveArray; } @@ -171,11 +172,15 @@ deleteSieve(6.3); - double eightValue = ADD_8 - SCALE_8*sixValue + tenValue; - double newFourValue = ADD_4 - SCALE_4*sixValue + fourValue; + double eightValue = ((LOG_10_8 / SCALE_8*sixValue) + tenValue); + double newFourValue = ((LOG_8_6 / SCALE_4*sixValue) + fourValue); + deleteSieve(4.0); sieves.add(new Sieve(8d, eightValue)); sieves.add(new Sieve(4d, newFourValue)); + sieveArray.adjust( + eightValue/sieveArray.totalLoad(), + newFourValue/sieveArray.totalLoad()); } protected SieveArray calculateSieveArray() {