Struct IntervalStats

Struct Documentation

struct IntervalStats

Accumulated IMU statistics over the interval between consecutive LiDAR scans.

Public Functions

inline void update(const Eigen::Vector3d &unbiased_ang_vel, const Eigen::Vector3d &uncompensated_unbiased_accel, const Eigen::Vector3d &compensated_accel)

Update accumulated statistics with a new IMU measurement.

Parameters:
  • unbiased_ang_vel – Unbiased angular velocity.

  • uncompensated_unbiased_accel – Uncompensated, unbiased acceleration.

  • compensated_accel – Gravity-compensated acceleration.

inline void reset()

Reset all accumulated statistics to zero.

Public Members

int imu_count = 0

Number of IMU samples accumulated during this interval.

Eigen::Vector3d angular_velocity_sum = Eigen::Vector3d::Zero()

Sum of unbiased angular velocity samples.

Eigen::Vector3d body_acceleration_sum = Eigen::Vector3d::Zero()

Sum of gravity-compensated body-frame accelerations.

Eigen::Vector3d imu_acceleration_sum = Eigen::Vector3d::Zero()

Sum of unbiased raw IMU accelerations.

double imu_accel_mag_mean = 0

Mean magnitude of raw IMU acceleration over the interval.

double welford_sum_of_squares = 0

Variance accumulator for acceleration magnitude using Welford’s method.