Other Features

Taking input from STDIN

You can also take log information directly from STDIN by specifying a final “-” rather than a filename. Because the log has no file extension you will also need to confirm the log-type using the -i flag (as tlog | df | log):

dronekit-la -i tlog -

So for example, the following two lines are equivalent (on Linux):

cat 1.BIN | dronekit-la -i df -

dronekit-la 1.BIN

Selecting analyzers

All available analysers are run by default.

You can list them using the -l flag. At time of writing (DroneKit-LA 0.3) the set is:

>dronekit-la -l

Any Parameters Seen
Arming Checks
Altitude Estimate Divergence
Attitude Estimate Divergence
Compass Offsets
Compass Vector Length
Compass Offsets
Compass Offsets
Ever Armed
Ever Flew
Good EKF
GPS Fix
Gyro Drift
Attitude Control
AutoPilot Health
Battery
Truncated Log
Position Estimate Divergence
Crash Test
Sensor Health
Vehicle Definition
Velocity Estimate Divergence

If you just want to run a small subset of the analysers use the -a flag.

dronekit-la -a "Ever Flew, Battery" my_log.tlog

Use a config file

You can use a configuration file to specify threshold values past which an event is detected. This allows you to be more selective about the conditions which you consider serious. For example, you can use the configuration file to set that you only care about an attitude control problem if it persists for more than 250ms.

To use a configuration file, specify it with the -c argument:

dronekit-la -c "/full-path-to-config/sample.config" my_log.tlog

A sample configuration file with all current settable fields can be found in the root of the Github repository: sample.config.

A snapshot of sample.config is reproduced below:

[loganalyzer]
altitude_estimate_divergence::delta_warn=4.0 ; metres
altitude_estimate_divergence::delta_fail=5.0 ; metres
altitude_estimate_divergence::duration_min=500000 ; microseconds

attitude_control::delta_warn=5.0 ; degrees
attitude_control::delta_fail=10.0 ; degrees
attitude_control::duration_min=250000 ; microseconds

attitude_estimate_divergence::delta_warn=5.0 ; degrees
attitude_estimate_divergence::delta_fail=10.0 ; degrees
attitude_estimate_divergence::duration_min=500000 ; microseconds

battery::low_battery_threshold=15.0 ; percent

truncated_log::max_last_relative_altitude=5.0 ; metres
truncated_log::low_voltage=4.6 ; volts
truncated_log::max_voltage_delta=0.3 ; volts

compass_offsets::length_warn=100.0 ; vector length
compass_offsets::length_fail=200.0 ; vector length

compass_vector_length::length_short_warn=120.0 ; vector length
compass_vector_length::length_short_fail=100.0 ; vector length
compass_vector_length::length_long_warn=550.0 ; vector length
compass_vector_length::length_long_fail=600.0 ; vector length
compass_vector_length::delta_warn=25.0 ; percent
compass_vector_length::delta_fail=35.0 ; percent

ekf::variance::velocity::threshold_warn=0.5
ekf::variance::velocity::threshold_fail=1.0
ekf::variance::pos_horiz::threshold_warn=0.5
ekf::variance::pos_horiz::threshold_fail=1.0
ekf::variance::pos_vert::threshold_warn=0.5
ekf::variance::pos_vert::threshold_fail=1.0
ekf::variance::compass::threshold_warn=0.5
ekf::variance::compass::threshold_fail=4.0
ekf::variance::terrain_alt::threshold_warn=0.5
ekf::variance::terrain_alt::threshold_fail=1.0

gpsfix::satellites_min=5 ; satellites
gpsfix::hdop_min=5.0
gpsfix::sacc::threshold_warn=1.0
gpsfix::sacc::threshold_fail=1.5

gyro_drift::delta_fail=0.1 ; radians/second
gyro_drift::delta_warn=0.9 ; radians/second
gyro_drift::avg_period=200000 ; microseconds gyro data is averaged over
gyro_drift::duration_min=500000 ; microseconds

position_estimate_divergence::delta_warn=0.0 ; metres
position_estimate_divergence::delta_fail=5.0 ; metres

parameters::check::ANGLE_MAX::enable = 1.0 ; boolean