teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5863: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5863: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.model.fixings; christian@3091: teichmann@5831: import org.dive4elements.river.artifacts.model.Parameters; christian@3091: sascha@3094: public final class FixFacetUtils { christian@3091: sascha@3416: public static final String [] MAX_Q_COLUMN = { "max_q" }; sascha@3416: christian@3091: public static double getMaxQ(Parameters params, double km) { sascha@3416: double [] maxQ = params.interpolate("km", km, MAX_Q_COLUMN); christian@3091: if (maxQ == null) { sascha@3096: return 1000d; christian@3091: } sascha@3096: double mQ = Math.min(10000d, Math.abs(maxQ[0])); christian@3091: return mQ + 0.05*mQ; christian@3091: } christian@3091: } sascha@3094: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :