initial commit
-converter .txt -> MatLab matrices
This commit is contained in:
19
workspace/sensors/Sensors.h
Normal file
19
workspace/sensors/Sensors.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef SENSORS_H
|
||||
#define SENSORS_H
|
||||
|
||||
enum class Sensors {
|
||||
UNKNOWN,
|
||||
TYPE_ACCELEROMETER,
|
||||
TYPE_GYROSCOPE,
|
||||
TYPE_MAGNETIC_FIELD,
|
||||
};
|
||||
|
||||
/** convert string to sensor-enum */
|
||||
static Sensors getSensor(const std::string& s) {
|
||||
if ("TYPE_MAGNETIC_FIELD" == s) {return Sensors::TYPE_MAGNETIC_FIELD;}
|
||||
else if ("TYPE_ACCELEROMETER" == s) {return Sensors::TYPE_ACCELEROMETER;}
|
||||
else if ("TYPE_GYROSCOPE" == s) {return Sensors::TYPE_GYROSCOPE;}
|
||||
else {return Sensors::UNKNOWN;}
|
||||
}
|
||||
|
||||
#endif // SENSORS_H
|
||||
Reference in New Issue
Block a user