Skip to content

mavlogdump.py discards parameter messages in tlog files unlike in dataflash #1033

@Maarrk

Description

@Maarrk

When trying to reduce the size of a log like this:

mavlogdump.py --reduce-rate 10 INPUT.tlog --output OUTPUT.tlog --quiet --parms

I lose the parameter messages, as verified by

mavlogdump.py --types PARAM_VALUE INPUT.tlog  # as expected
# versus
mavlogdump.py --types PARAM_VALUE OUTPUT.tlog  # no output

I assume this doesn't happen with DataFlash logs, because of these lines:

def reduce_rate_msg(m, reduction_rate):
'''return True if this msg should be discarded by reduction'''
mtype = m.get_type()
if mtype in ['PARM','MSG','FMT','FMTU','MULT','MODE','EVT','UNIT', 'VER']:
return False


I have fixed it locally by adding PARAM_VALUE to the list in line 135. I would be happy to contribute a fix, but since we're here I'd like to ensure that feature parity is the desired behaviour and make it complete for all Dataflash types currently in this list:

  • PARM: PARAM_VALUE
  • MSG: ¿STATUSTEXT?
  • FMT: N/A
  • FMTU: N/A
  • MULT: N/A
  • MODE: HEARTBEAT due to custom_mode field
  • EVT: unsure, I guess it would be mostly covered by STATUSTEXT
  • UNIT: N/A
  • VER: ¿AUTOPILOT_VERSION?

N/A: mavlink (thus tlog) has messages with fields and units fully defined by dialect XML files, unlike self-describing dataflash logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions