Adding AK8975 geo-sensor info in sensors.xml.in required by geo-plugin
[platform/core/system/sensord.git] / src / shared / sensor_fusion.h
1 /*
2  * libsensord-share
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 _SENSOR_FUSION_H_
21 #define _SENSOR_FUSION_H_
22
23 #include <array>
24 #include <sensor_base.h>
25
26 typedef std::array<std::array<float, 3> , 3> arr33_t;
27
28 class sensor_fusion : public sensor_base
29 {
30 public:
31         sensor_fusion();
32         virtual ~sensor_fusion();
33
34         virtual void fuse(const sensor_event_t &event) = 0;
35         virtual bool is_data_ready(void);
36         virtual bool add_interval(int client_id, unsigned int interval);
37         virtual bool delete_interval(int client_id);
38         virtual bool get_properties(sensor_properties_t &properties);
39
40         virtual bool get_rotation_matrix(arr33_t &rot);
41         virtual bool get_attitude(float &x, float &y, float &z, float &w);
42         virtual bool get_gyro_bias(float &x, float &y, float &z);
43         virtual bool get_rotation_vector(float &x, float &y, float &z, float &w, float &heading_accuracy);
44         virtual bool get_linear_acceleration(float &x, float &y, float &z);
45         virtual bool get_gravity(float &x, float &y, float &z);
46         virtual bool get_rotation_vector_6axis(float &x, float &y, float &z, float &w, float &heading_accuracy);
47         virtual bool get_geomagnetic_rotation_vector(float &x, float &y, float &z, float &w);
48         virtual bool get_orientation(float &azimuth, float &pitch, float &roll);
49
50         bool is_fusion(void);
51 };
52
53 #endif /*_SENSOR_FUSION_H_*/