Adding AK8975 geo-sensor info in sensors.xml.in required by geo-plugin
[platform/core/system/sensord.git] / src / sensor_fusion / lib_sensor_fusion.h
1 /*
2  * sensord
3  *
4  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef _LIB_SENSOR_FUSION_H_
21 #define _LIB_SENSOR_FUSION_H_
22
23 #include <sensor_fusion.h>
24
25 class lib_sensor_fusion : public sensor_fusion
26 {
27 public:
28         lib_sensor_fusion();
29         ~lib_sensor_fusion();
30
31         bool init(void);
32         bool on_start(void);
33         bool on_stop(void);
34
35         bool add_interval(int client_id, unsigned int interval);
36         bool delete_interval(int client_id);
37         bool get_properties(sensor_properties_t &properties);
38
39         void fuse(const sensor_event_t &event);
40         bool get_rotation_matrix(arr33_t &rot);
41         bool get_attitude(float &x, float &y, float &z, float &w);
42         bool get_gyro_bias(float &x, float &y, float &z);
43         bool get_rotation_vector(float &x, float &y, float &z, float &w, float &heading_accuracy);
44         bool get_linear_acceleration(float &x, float &y, float &z);
45         bool get_gravity(float &x, float &y, float &z);
46         bool get_rotation_vector_6axis(float &x, float &y, float &z, float &w, float &heading_accuracy);
47         bool get_geomagnetic_rotation_vector(float &x, float &y, float &z, float &w);
48         bool get_orientation(float &azimuth, float &pitch, float &roll);
49 private:
50         sensor_base *m_accel_sensor;
51         sensor_base *m_gyro_sensor;
52         sensor_base *m_magnetic_sensor;
53 };
54
55 #endif /*_LIB_SENSOR_FUSION_H_*/