mavlink/mavlink — pull request #302 by blutack (2014-12-15 16:46:45+00:00)
Title: PoC of mavlogdump with non-standard sdlog2 files

Proof of concept showing mavlogdump correctly reading non-standard sdlog2 files (such as those generated by APM). I don't expect (and wouldn't want!) this to be merged in the current form but it does allow the tool to work with sdlog2 files as well. For my use case this was extremely useful as it allowed me to properly sync against a tlog file (the sd2log tool is much more limited). It probably relies on internal details of DFMessage objects which may not be guaranteed to exist. If possible, I'd be happy to add something providing this functionality under a --notmavlink flag or something. Understand if it's out of scope.

Before...
```
python mavlogdump.py APM_LOG.BIN --format csv --types GPS
Traceback (most recent call last):
File "mavlogdump.py", line 67, in
fields += [type + '.' + x for x in inspect.getargspec(getattr(mavutil.mavlink, typeClass).__init__).args[1:]]
AttributeError: 'module' object has no attribute 'MAVLink_gps_message
```

After...
```
python mavlogdump.py APM_LOG.BIN --format csv --types GPS
--snip--
Time,Status,TimeMS,Week,NSats,HDop,Lat,Lng,RelAlt,Alt,Spd,GCrs,VZ,T
1417094907.0,3,394122000,1820,6,378,535822074,-22614695,-4,13536,25,2027,-0.170000001788,173802
```