Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions imu.go
Original file line number Diff line number Diff line change
@@ -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)
}