source: flair-src/trunk/lib/FlairFilter/src/AhrsKalman.cpp

Last change on this file was 157, checked in by Sanahuja Guillaume, 5 years ago

iadded isready to iodevice:
avoid problem of imu not ready in ardrone2

File size: 1.1 KB
RevLine 
[18]1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5//  created:    2014/01/15
6//  filename:   AhrsKalman.cpp
7//
8//  author:     Guillaume Sanahuja
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    Class defining an Ahrs Kalman filter
14//
15//
16/*********************************************************************/
17
18#include "AhrsKalman.h"
19#include "AhrsKalman_impl.h"
20#include <Imu.h>
21#include <AhrsData.h>
22
23using std::string;
24using namespace flair::core;
25using namespace flair::sensor;
26
27namespace flair { namespace filter {
28
29AhrsKalman::AhrsKalman(const Imu* parent,string name): Ahrs(parent,name) {
30    AhrsData* ahrsData;
31    GetDatas(&ahrsData);
32    pimpl_=new AhrsKalman_impl(parent->GetLayout(),ahrsData);
[157]33   
34    SetIsReady(true);
[18]35}
36
37AhrsKalman::~AhrsKalman() {
38    delete pimpl_;
39}
40
41void AhrsKalman::UpdateFrom(const io_data *data) {
42    pimpl_->UpdateFrom(data);
43    AhrsData* ahrsData;
44    GetDatas(&ahrsData);
45    ProcessUpdate(ahrsData);
46}
47
48} // end namespace filter
49} // end namespace flair
Note: See TracBrowser for help on using the repository browser.