Analytics

The Analytics package is designed for custom analysis of recorded simulation data. Since each project has its own specific data to analyze, it’s not packaged as an application with a user interface, but rather as a Python library and command-line tool that you can use to compose your own data analysis pipeline.

With a few lines of Python or shell scripting, you can achieve a customized flow that:

  • extracts data (entity states, positions, measurements, etc) from simulation log files
  • filters/aggregates/combines/transforms data
  • saves the data in a spreadsheet for viewing in Excel et al
  • plots line graphs

Analytics requires a license before you can download and install it. Contact us if you need one.

Installing

Download the .whl package.

Then install with pip:

pip install inhumate_analytics*.whl

Quick Start

TODO to describe something useful. In the meantime, here’s the output of analyze --help:

usage: analyze [-D DELIMITER] [-T TERMINATOR] [-F]

optional arguments:
  -D DELIMITER, --delimiter DELIMITER
                        Column delimiter, e.g. 'tab' or ','
  -T TERMINATOR, --terminator TERMINATOR
                        Line terminator, e.g. 'cr' or 'lf' or 'crlf'
  -F, --flush           Flush output after each row

Available subcommands:
  bundle_measurements
  bundle_messages
  extract
  filter
  parse
  plot
  sqlite_log
  sqlite_lookup
  sqlite_measurements
  sqlite_messages
  subscribe_measurements
  subscribe_messages
  without
Try 'analyze <subcommand> --help' for more info.

Usage Examples

TODO

Example shell script

Example of a shell script that extracts and processes some information from a recorded logfile:

#!/bin/bash
analyze sqlite_messages $1 traffic track rti/position > data/traffic_track_position.tsv
cat data/traffic_track_position.tsv | analyze \
    -- parse -p data/proto -t Traffic -c traffic \
    -- parse -c position -t EntityPosition \
    -- parse -p data/proto -c track \
    -- extract -c traffic id latitude longitude ias=indicated_air_speed \
    -- extract -c position id latitude=geodetic.latitude longitude=geodetic.longitude hdg=euler_rotation.yaw \
    -- extract -c track id latitude longitude gs=ground_speed

Copyright © Inhumate AB 2024