Skip to Content
VectorLib

ScalingImu

vectorlib::ScalingImu — fields, methods, parameters and return types.


pub struct ScalingImu<I: ImuDevice = InertialSensor>

TitanTron's ScalingIMU: an inertial sensor whose heading and rotation are multiplied by a constant, to correct an IMU that over- or under-reports turns.




// the IMU reports 360 degrees when the robot has turned 358.6
let imu = ScalingImu::new(InertialSensor::new(peripherals.port_10), 1.00395);
let sensors = OdomSensors::new_custom(None, None, None, None, Some(Box::new(imu)));

View source

Methods

Prop

Type

new

pub const fn new(imu: I, scale: f64) -> Self

Wrap imu, scaling its heading and rotation by scale.

Parameters

Prop

Type

Returns

Self

View source

On this page