24#ifndef TAPROOT_DYNAMIC_POSITION_HPP_
25#define TAPROOT_DYNAMIC_POSITION_HPP_
47 : position({
x,
y,
z}),
60 acceleration(acceleration)
68 : position(std::move(position)),
69 velocity(std::move(velocity)),
70 acceleration(std::move(acceleration))
77 this->position + other.position,
78 this->velocity + other.velocity,
79 this->acceleration + other.acceleration);
85 this->position - other.position,
86 this->velocity - other.velocity,
87 this->acceleration - other.acceleration);
92 return DynamicPosition(-this->position, -this->velocity, -this->acceleration);
101 inline float x()
const {
return position.
data[0]; }
103 inline float y()
const {
return position.
data[1]; }
105 inline float z()
const {
return position.
data[2]; }
107 inline float vx()
const {
return velocity.
data[0]; }
109 inline float vy()
const {
return velocity.
data[1]; }
111 inline float vz()
const {
return velocity.
data[2]; }
113 inline float ax()
const {
return acceleration.
data[0]; }
115 inline float ay()
const {
return acceleration.
data[1]; }
117 inline float az()
const {
return acceleration.
data[2]; }
Definition cmsis_mat.hpp:45
std::array< float, ROWS *COLS > data
Definition cmsis_mat.hpp:46