sensorfw
orientationfilter.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** Copyright (C) 2013 Jolla Ltd
4** Contact: lorn.potter@jollamobile.com
5
6 This file is part of Sensord.
7
8 Sensord is free software; you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License
10 version 2.1 as published by the Free Software Foundation.
11
12 Sensord is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with Sensord. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef ORIENTATIONFILTER_H
22#define ORIENTATIONFILTER_H
23
24#include <QObject>
25#include "ringbuffer.h"
26#include "orientationdata.h"
27#include "filter.h"
28
29class OrientationFilter : public QObject, public FilterBase
30{
31 Q_OBJECT
32
33public:
34
35 static FilterBase* factoryMethod() {
36 return new OrientationFilter;
37 }
38
39protected:
40
42
43private:
44 Source<CompassData> magSource;
45
46 Sink<OrientationFilter, CompassData> orientDataSink;
47 void orientDataAvailable(unsigned, const CompassData*);
48
49 CompassData compassData; //north angle
50
51};
52
53#endif
Datatype for compass measurements.
static FilterBase * factoryMethod()
Datatypes for different filters.