Telemetry

Subpackage for parsing telemetry files

gripspy.telemetry.packet_generator(f, verbose=False, raise_exceptions=False)[source]

Generator that yields valid packets from a telemetry-file object. Packets that have invalid checksums are skipped past.

Parameters:
  • f (file object) – e.g., an already open file object
  • verbose (boolean) – If True, output the percentage of the file as a progress indicator
  • raise_exceptions (boolean) – If True, raise exceptions (e.g., if an invalid checksum is encountered)
gripspy.telemetry.parser_generator(f, filter_systemid=None, filter_tmtype=None, verbose=False)[source]

Generator that yields parsed packet contents from a telemetry-file object. Packets that have invalid checksums are skipped past.

Parameters:
  • f (file object) – e.g., an already open file object
  • filter_systemid (int) – If specified, only yield packets that have a matching SystemId
  • filter_tmtype (int) – If specified, only yield packets that have a match TmType
  • verbose (boolean) – If True, output the percentage of the file as a progress indicator
gripspy.telemetry.inspect(filename)[source]

Report top-level information about the contents of one or more telemetry files

Parameters:filename (str or list of str) – One or more telemetry files
gripspy.telemetry.parser(packet, filter_systemid=None, filter_tmtype=None)[source]

Parse a telemetry packet for its contents

Parameters:
  • packet (bytearray-like) – A full telemetry packet including the 16-byte header
  • filter_systemid (int) – If specified, only parse the packet if the SystemID matches
  • filter_tmtype (int) – If specified, only parse the packet if the TmType matches
Returns:

out – The contents of the telemetry packet

Return type:

dict

gripspy.telemetry.print_parsers()[source]

Print the SystemID and TmType pairs that have a parsing function defined. The parsing function may not be fully implemented.