From 052e66e315b7eabbbc695006bbef4c88c02eb932 Mon Sep 17 00:00:00 2001 From: soypat Date: Mon, 30 Aug 2021 07:37:01 -0300 Subject: [PATCH] add AHRS interfaces for vehicle attitude control --- imu.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 imu.go diff --git a/imu.go b/imu.go new file mode 100644 index 000000000..02c1aa976 --- /dev/null +++ b/imu.go @@ -0,0 +1,18 @@ +// IMU or inertial measurement units are used to +// estimate the position and orientation of a body +// in 3D space (such as a drone or helicopter). These +// usually consist in an accelerometer and a gyroscope. + +package drivers + +// IMU represents an intertial measurement unit such as +// the MPU6050 with acceleration and angular velocity measurement +// capabilities. +type IMU interface { + // Acceleration returns sensor accelerations in micro gravities + // with respect to the sensor's orientation. + Acceleration() (ax, ay, az int32) + // AngularVelocity returns sensor angular velocity in micro radians + // with respect to the sensor's orientation. + AngularVelocity() (gx, gy, gz int32) +}