|
TinyRobotics
|
Represents a 3D angular velocity vector with unit support. More...
#include <AngularVelocity.h>
Public Member Functions | |
| AngularVelocity3D (float x, float y, float z, AngularVelocityUnit unit) | |
| float | getX (AngularVelocityUnit desiredUnit) const |
| float | getY (AngularVelocityUnit desiredUnit) const |
| float | getZ (AngularVelocityUnit desiredUnit) const |
Public Attributes | |
| float | x = 0.0f |
| float | y = 0.0f |
| float | z = 0.0f |
| AngularVelocityUnit | unit = AngularVelocityUnit::RadPerSec |
Represents a 3D angular velocity vector with unit support.
This class encapsulates angular velocity in three dimensions (x, y, z), along with a unit (radians per second or degrees per second). It provides methods to retrieve each component in any supported unit, handling conversion as needed.
AngularVelocity3D is useful for robotics, navigation, and simulation applications where 3D rotational motion must be represented and manipulated in a type-safe and unit-aware manner. It is compatible with the AngularVelocity class for 1D angular velocity.
Example usage: AngularVelocity3D w(0.1, 0.0, 0.0, AngularVelocityUnit::RadPerSecond); // 0.1 rad/s about x float wx_deg = w.getX(AngularVelocityUnit::DegPerSecond); // Convert x to deg/s
Represents a 3D angular velocity vector with unit support.