#ifndef SENSORREADERACCEL_H
#define SENSORREADERACCEL_H

#include "../reader/SensorReader.h"

#include <cassert>

class SensorReaderAccel {

public:

	/** get wifi observation data from one CSV entry */
	static void read(const SensorEntry& se, float dst[3]) {

		std::string tmp = se.data;

		size_t pos1 = tmp.find(';');
		size_t pos2 = tmp.find(';', pos1+1);
		size_t pos3 = tmp.find(';', pos2+1);

		if (pos1 == std::string::npos) {throw 1;}
		if (pos2 == std::string::npos) {throw 1;}

		dst[0] = std::stof( tmp.substr(0, pos1) );
		dst[1] = std::stof( tmp.substr(pos1+1, pos2-pos1-1) );
		dst[2] = std::stof( tmp.substr(pos2+1, pos3-pos2-1) );

		int j = 0; (void) j;

	}

};


#endif // SENSORREADERACCEL_H
