Skip to content

Commit

Permalink
mavextra: cope with nan data in delta
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Apr 15, 2023
1 parent 03c3b67 commit d63c5ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mavextra.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ def diff(var, key):

def delta(var, key, tusec=None):
'''calculate slope'''
if isnan(var):
return None
global last_delta
if tusec is not None:
tnow = tusec * 1.0e-6
Expand Down

0 comments on commit d63c5ba

Please sign in to comment.