Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otInertial Class Reference
[Inertial Motion LibraryInertial Motion Library]

Inertial Motion Library.

#include <otInertial.h>


Public Types

enum  ImuReadouts { IR_ACCELEROMETER, IR_GYROSCOPE, IR_MAGNETOMETER }

Public Member Functions

 otInertial ()
void init (otMPU9250 *imu, U8 timer, U32 sampling=100)
bool process (F32 &yaw, F32 &pitch, F32 &roll)
U32 elapsed ()
void readout (U8 who, F32 &x, F32 &y, F32 &z)
void close ()


Member Enumeration Documentation

enum otInertial::ImuReadouts
 

Enumeration values:
IR_ACCELEROMETER  Select accelerometer.
IR_GYROSCOPE  Select gyroscope.
IR_MAGNETOMETER  Select magnetometer.


Constructor & Destructor Documentation

otInertial.otInertial  ) 
 

Create the class


Member Function Documentation

void otInertial.close  ) 
 

Free all allocated memory

U32 otInertial.elapsed  ) 
 

Return process elapsed time as us

void otInertial.init otMPU9250 imu,
U8  timer,
U32  sampling = 100
 

Init the class

Parameters:
imu Pointer to IMU peripheral class
timer Used timer for process sync
sampling Sample time as ms

bool otInertial.process F32 yaw,
F32 pitch,
F32 roll
 

Procedures that must be called continuously but which really take up the processor every 'sampling' milli seconds. Returns the three rotations.

Parameters:
yaw Yaw value as degree
pitch Pitch value as degree
roll Roll value as degree
Returns:
True when new data is available

void otInertial.readout U8  who,
F32 x,
F32 y,
F32 z
 

Read basic IMU raw data

Parameters:
who Select wich data you read, see ImuReadouts
x Return selected measure on X axis
y Return selected measure on Y axis
z Return selected measure on Z axis


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0