source: flair-src/trunk/lib/FlairFilter/src/Ahrs.cpp @ 10

Last change on this file since 10 was 10, checked in by Sanahuja Guillaume, 6 years ago

lic

File size: 1.9 KB
Line 
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/14
6//  filename:   Ahrs.cpp
7//
8//  author:     Guillaume Sanahuja
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    Virtual class for AHRS
14//
15//
16/*********************************************************************/
17
18#include "Ahrs.h"
19#include "Ahrs_impl.h"
20#include <Imu.h>
21#include <DataPlot1D.h>
22#include <AhrsData.h>
23
24using std::string;
25using namespace flair::core;
26using namespace flair::gui;
27using namespace flair::sensor;
28
29namespace flair { namespace filter {
30
31Ahrs::Ahrs(const Imu* parent,string name) : IODevice(parent,name) {
32    pimpl_=new Ahrs_impl(this);
33    AddDataToLog(pimpl_->ahrsData);
34}
35
36Ahrs::~Ahrs() {
37    delete pimpl_;
38}
39
40const Imu *Ahrs::GetImu(void) const {
41    return (Imu*)Parent();
42}
43
44const AhrsData *Ahrs::GetDatas(void) const {
45    return pimpl_->ahrsData;
46}
47
48void Ahrs::GetDatas(core::AhrsData **ahrsData) const {
49    *ahrsData=pimpl_->ahrsData;
50}
51
52void Ahrs::LockUserInterface(void) const {
53    //((Imu*)Parent())->LockUserInterface();
54}
55
56void Ahrs::UnlockUserInterface(void) const {
57    //((Imu*)Parent())->UnlockUserInterface();
58}
59
60void Ahrs::UseDefaultPlot(void) {
61    pimpl_->UseDefaultPlot();
62    ((Imu*)Parent())->UseDefaultPlot();
63}
64
65void Ahrs::AddPlot(const AhrsData *ahrsData,DataPlot::Color_t color) {
66    pimpl_->AddPlot(ahrsData,color);
67}
68
69DataPlot1D *Ahrs::RollPlot(void) const {
70    return pimpl_->rollPlot;
71}
72
73DataPlot1D *Ahrs::PitchPlot(void) const {
74    return pimpl_->pitchPlot;
75}
76
77DataPlot1D *Ahrs::YawPlot(void) const {
78    return pimpl_->yawPlot;
79}
80
81DataPlot1D *Ahrs::WXPlot(void) const {
82    return pimpl_->wXPlot;
83}
84
85DataPlot1D *Ahrs::WYPlot(void) const {
86    return pimpl_->wYPlot;
87}
88
89DataPlot1D *Ahrs::WZPlot(void) const {
90    return pimpl_->wZPlot;
91}
92
93} // end namespace filter
94} // end namespace flair
Note: See TracBrowser for help on using the repository browser.