Browse Source

tools: LogAnalyser if we fall off end of GPS data, return a valid time

Found cases where the loiter test would fail with some flights if
the vehicle never left that mode.  Don't use None in that case
mission-4.1.18
Kevin Hester 11 years ago committed by Andrew Tridgell
parent
commit
ddd24e8135
  1. 3
      Tools/LogAnalyzer/DataflashLog.py

3
Tools/LogAnalyzer/DataflashLog.py

@ -173,6 +173,9 @@ class DataflashLogHelper: @@ -173,6 +173,9 @@ class DataflashLogHelper:
return logdata.channels["GPS"][timeLabel].dictData[lineNumber]
lineNumber = lineNumber + 1
sys.stderr.write("didn't find GPS data for " + str(lineNumber) + " - using maxtime\n")
return logdata.channels["GPS"][timeLabel].max()
@staticmethod
def findLoiterChunks(logdata, minLengthSeconds=0, noRCInputs=True):
'''returns a list of (to,from) pairs defining sections of the log which are in loiter mode. Ordered from longest to shortest in time. If noRCInputs == True it only returns chunks with no control inputs'''

Loading…
Cancel
Save