![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
A class for managing the Adafruit BNO055 sensor. More...
#include <BNO055.h>
Public Member Functions | |
BNO055 () | |
Constructs a BNO055 instance. | |
void | Update () |
Updates the sensor data and applies filtering. | |
Vector3D | GetLocalMagneticField () |
Retrieves the local magnetic field vector. | |
Vector3D | GetLocalForce () |
Retrieves the computed local force vector. | |
Vector3D | GetLocalAccelerationFiltered () |
Retrieves the filtered local acceleration vector. | |
Vector3D | GetLocalAngularVelocityFiltered () |
Retrieves the filtered local angular velocity vector. | |
Vector3D | GetLocalAcceleration () |
Retrieves the raw local acceleration vector. | |
Vector3D | GetLocalAngularVelocity () |
Retrieves the raw local angular velocity vector. | |
Quaternion | GetAbsoluteOrientation () |
Retrieves the absolute orientation as a quaternion. | |
Private Member Functions | |
Vector3D | ReadMagneticField () |
Reads the magnetic field vector from the sensor. | |
Vector3D | ReadLocalAcceleration () |
Reads the local acceleration vector from the sensor. | |
Vector3D | ReadLocalAngularVelocity () |
Reads the local angular velocity vector from the sensor. | |
Vector3D | ReadLocalGravityVector () |
Reads the local gravity vector from the sensor. | |
A class for managing the Adafruit BNO055 sensor.
The BNO055 class provides methods for retrieving processed sensor data, including acceleration, angular velocity, magnetic field, gravity vector, and absolute orientation. It uses filters to smooth the data for improved reliability.
BNO055 | ( | ) |
Constructs a BNO055 instance.
Definition at line 3 of file BNO055.cpp.
References bno, and previousMicros.
Quaternion GetAbsoluteOrientation | ( | ) |
Retrieves the absolute orientation as a quaternion.
Definition at line 84 of file BNO055.cpp.
References absoluteOrientation.
Vector3D GetLocalAcceleration | ( | ) |
Retrieves the raw local acceleration vector.
Definition at line 76 of file BNO055.cpp.
References localAcceleration.
Vector3D GetLocalAccelerationFiltered | ( | ) |
Retrieves the filtered local acceleration vector.
Definition at line 68 of file BNO055.cpp.
References VectorRunningAverageFilter< memory >::Filter(), localAcceleration, and localAccelKF.
Vector3D GetLocalAngularVelocity | ( | ) |
Retrieves the raw local angular velocity vector.
Definition at line 80 of file BNO055.cpp.
References localAngularVelocity.
Vector3D GetLocalAngularVelocityFiltered | ( | ) |
Retrieves the filtered local angular velocity vector.
Definition at line 72 of file BNO055.cpp.
References VectorRunningAverageFilter< memory >::Filter(), localAngularVelocity, and localAngulKF.
Vector3D GetLocalForce | ( | ) |
Retrieves the computed local force vector.
Definition at line 64 of file BNO055.cpp.
References localForce.
Vector3D GetLocalMagneticField | ( | ) |
Retrieves the local magnetic field vector.
Definition at line 60 of file BNO055.cpp.
References localMagneticField.
Referenced by Update().
|
private |
Reads the local acceleration vector from the sensor.
Definition at line 26 of file BNO055.cpp.
References accelerometerData, and bno.
|
private |
Reads the local angular velocity vector from the sensor.
Definition at line 31 of file BNO055.cpp.
References angVelocityData, and bno.
|
private |
Reads the local gravity vector from the sensor.
Definition at line 36 of file BNO055.cpp.
References bno, and gravityData.
|
private |
Reads the magnetic field vector from the sensor.
Definition at line 21 of file BNO055.cpp.
References bno, and magnetometerData.
void Update | ( | ) |
Updates the sensor data and applies filtering.
Definition at line 41 of file BNO055.cpp.
References absoluteOrientation, Vector3D::CrossProduct(), Quaternion::DeltaRotation(), VectorRunningAverageFilter< memory >::Filter(), GetLocalMagneticField(), Rotation::GetQuaternion(), localAcceleration, localAngularVelocity, localForce, localGraviKF, localGravityVector, previousMicros, Quaternion::SphericalInterpolation(), Quaternion::UnitQuaternion(), and Vector3D::UnitSphere().
|
private |
Computed absolute orientation.
Definition at line 40 of file BNO055.h.
Referenced by GetAbsoluteOrientation(), and Update().
|
private |
Definition at line 32 of file BNO055.h.
Referenced by ReadLocalAcceleration().
|
private |
Definition at line 32 of file BNO055.h.
Referenced by ReadLocalAngularVelocity().
|
private |
BNO055 sensor instance.
Definition at line 33 of file BNO055.h.
Referenced by BNO055(), ReadLocalAcceleration(), ReadLocalAngularVelocity(), ReadLocalGravityVector(), and ReadMagneticField().
|
private |
|
private |
Raw local acceleration data.
Definition at line 35 of file BNO055.h.
Referenced by GetLocalAcceleration(), GetLocalAccelerationFiltered(), and Update().
|
private |
Filter for acceleration.
Definition at line 44 of file BNO055.h.
Referenced by GetLocalAccelerationFiltered().
|
private |
Raw local angular velocity data.
Definition at line 37 of file BNO055.h.
Referenced by GetLocalAngularVelocity(), GetLocalAngularVelocityFiltered(), and Update().
|
private |
Filter for angular velocity.
Definition at line 43 of file BNO055.h.
Referenced by GetLocalAngularVelocityFiltered().
|
private |
Computed local force.
Definition at line 34 of file BNO055.h.
Referenced by GetLocalForce(), and Update().
|
private |
|
private |
|
private |
Raw local magnetic field data.
Definition at line 36 of file BNO055.h.
Referenced by GetLocalMagneticField().
|
private |
Definition at line 32 of file BNO055.h.
Referenced by ReadMagneticField().
|
private |
|
private |