4 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef __FUSION_BASE_H__
20 #define __FUSION_BASE_H__
23 #include "fusion_utils/orientation_filter.h"
25 class fusion_base : public virtual fusion {
28 virtual ~fusion_base();
30 virtual void push_accel(sensor_data_t &data);
31 virtual void push_gyro(sensor_data_t &data);
32 virtual void push_mag(sensor_data_t &data);
33 virtual bool get_rv(unsigned long long ×tamp, float &w, float &x, float &y, float &z);
37 sensor_data<float> m_accel;
38 sensor_data<float> m_gyro;
39 sensor_data<float> m_magnetic;
41 orientation_filter<float> m_orientation_filter;
45 bool m_enable_magnetic;
54 void store_orientation(void);
55 virtual bool get_orientation(void) = 0;
60 #endif /* __FUSION_BASE_H__ */