diff --git a/mavextra.py b/mavextra.py index 90e81d26d..a959c28ff 100644 --- a/mavextra.py +++ b/mavextra.py @@ -271,6 +271,8 @@ def second_derivative_9(var, key): def lowpass(var, key, factor): '''a simple lowpass filter''' + if isnan(var): + return None global lowpass_data if not key in lowpass_data: lowpass_data[key] = var