worked on synthetic sensors

worked on grid-walker
minor changes/fixes/improvements
This commit is contained in:
k-a-z-u
2017-10-18 16:54:57 +02:00
parent 72f083d32a
commit 3e31f6da53
8 changed files with 522 additions and 71 deletions

View File

@@ -42,6 +42,14 @@ struct AccelerometerData {
return AccelerometerData(x/val, y/val, z/val);
}
AccelerometerData operator * (const float val) const {
return AccelerometerData(x*val, y*val, z*val);
}
AccelerometerData operator + (const AccelerometerData o) const {
return AccelerometerData(x+o.x, y+o.y, z+o.z);
}
std::string asString() const {
std::stringstream ss;
ss << "(" << x << "," << y << "," << z << ")";