PX4 / flight_review

web application for flight log analysis & review
https://logs.px4.io/
BSD 3-Clause "New" or "Revised" License
193 stars 190 forks source link

Update vibration metric color thresholds #252

Closed AlexKlimaj closed 1 year ago

AlexKlimaj commented 1 year ago

The current vibration color thresholds are a couple of orders of magnitudes off from what the expected values are in PX4 now.

I set them into the expected range but guessed at the specific values. We will need to determine the actual green, yellow, and red ranges.

The land detector uses these values to detect the last movement.

static constexpr float GYRO_VIBE_METRIC_MAX = 0.02f; // gyro_vibration_metric * dt * 4.0e4f > is_moving_scaler)
static constexpr float ACCEL_VIBE_METRIC_MAX = 1.2f; // accel_vibration_metric * dt * 2.1e2f > is_moving_scaler

if ((imu_status.gyro_vibration_metric > GYRO_VIBE_METRIC_MAX)
          || (imu_status.accel_vibration_metric > ACCEL_VIBE_METRIC_MAX)) {

    _time_last_move_detect_us = imu_status.timestamp;
}

image

dagar commented 1 year ago

For anyone curious this changed because the old metric was dependent on IMU integration timespan which could be different between IMU models, current configuration, or even just jitter. The metrics are now computed on acceleration instead of delta velocity (integrated accel).