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

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

filter and meta

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