diff pkg/controllers/bottlenecks.go @ 4860:de7aa9230837

Limit interpolation of time ranges for Available Fairway Depths to 1.5h. This is necessary to prevent interpolation into time ranges where intentionally no data is provided. (When bottlenecks are "inactive" no data is provided and gemma shall assume perfect conditions for that time)
author Sascha Wilde <wilde@intevation.de>
date Wed, 04 Dec 2019 15:28:22 +0100
parents 125cac3c977d
children 2ede9ac26ef2
line wrap: on
line diff
--- a/pkg/controllers/bottlenecks.go	Wed Dec 04 13:35:34 2019 +0100
+++ b/pkg/controllers/bottlenecks.go	Wed Dec 04 15:28:22 2019 +0100
@@ -219,6 +219,11 @@
 			continue
 		}
 
+		if p2.when.Sub(p1.when).Hours() > 1.5 {
+			// Don't interpolate ranges bigger then one hour
+			continue
+		}
+
 		lo, hi := maxTime(p1.when, from), minTime(p2.when, to)
 
 		m1, m2 := access(p1), access(p2)