forked from rolfeschmidt/muCSense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimpleDataCollector.h
51 lines (36 loc) · 1.61 KB
/
SimpleDataCollector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
# copyright 2012 by Rolfe Schmidt
This file is part of muCSense.
muCSense is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
muCSense is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with muCSense. If not, see <http://www.gnu.org/licenses/>.
*/
/*
SimpleDataCollector.h
This data collector records raw sensor data into an array at a sample rate
and for a time period specified by the client. For example, a user could run this for
10 seconds sampling at 10 Hz while spinning a magnetometer around randomly to collect
100 samples in a variety of directions.
This could be problematic for accelerometer calibrations because it is difficult to move
the accelerometer without accelerating it and adding a false signal to the readings.
*/
#ifndef __SIMPLE_DATA_COLLECTOR_H
#define __SIMPLE_DATA_COLLECTOR_H
#include "DataCollector.h"
class SimpleDataCollector : public DataCollector {
public:
SimpleDataCollector(size_t numSamples, size_t samplingTimeMillis);
virtual ~SimpleDataCollector() {}
virtual void collect();
private:
size_t _numSamples;
size_t _samplingTimeMillis;
};
#endif // __SIMPLE_DATA_COLLECTOR_H