initial commit
-converter .txt -> MatLab matrices
This commit is contained in:
25
workspace/sensors/SensorMagneticField.h
Normal file
25
workspace/sensors/SensorMagneticField.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef SENSORMAGNETICFIELD_H
|
||||
#define SENSORMAGNETICFIELD_H
|
||||
|
||||
struct SensorMagneticField {
|
||||
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
|
||||
/** empty ctor */
|
||||
SensorMagneticField() : x(0), y(0), z(0) {;}
|
||||
|
||||
/** ctor with values */
|
||||
SensorMagneticField(const float x, const float y, const float z) : x(x), y(y), z(z) {;}
|
||||
|
||||
SensorMagneticField operator + (const SensorMagneticField& o) const {
|
||||
return SensorMagneticField(x+o.x, y+o.y, z+o.z);
|
||||
}
|
||||
SensorMagneticField operator * (const float v) const {
|
||||
return SensorMagneticField(x*v, y*v, z*v);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // SENSORMAGNETICFIELD_H
|
||||
Reference in New Issue
Block a user