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 |
|
---|
24 | using std::string;
|
---|
25 | using namespace flair::core;
|
---|
26 | using namespace flair::gui;
|
---|
27 | using namespace flair::sensor;
|
---|
28 |
|
---|
29 | namespace flair { namespace filter {
|
---|
30 |
|
---|
31 | Ahrs::Ahrs(const Imu* parent,string name) : IODevice(parent,name) {
|
---|
32 | pimpl_=new Ahrs_impl(this);
|
---|
33 | AddDataToLog(pimpl_->ahrsData);
|
---|
34 | }
|
---|
35 |
|
---|
36 | Ahrs::~Ahrs() {
|
---|
37 | delete pimpl_;
|
---|
38 | }
|
---|
39 |
|
---|
40 | const Imu *Ahrs::GetImu(void) const {
|
---|
41 | return (Imu*)Parent();
|
---|
42 | }
|
---|
43 |
|
---|
44 | const AhrsData *Ahrs::GetDatas(void) const {
|
---|
45 | return pimpl_->ahrsData;
|
---|
46 | }
|
---|
47 |
|
---|
48 | void Ahrs::GetDatas(core::AhrsData **ahrsData) const {
|
---|
49 | *ahrsData=pimpl_->ahrsData;
|
---|
50 | }
|
---|
51 |
|
---|
52 | void Ahrs::LockUserInterface(void) const {
|
---|
53 | //((Imu*)Parent())->LockUserInterface();
|
---|
54 | }
|
---|
55 |
|
---|
56 | void Ahrs::UnlockUserInterface(void) const {
|
---|
57 | //((Imu*)Parent())->UnlockUserInterface();
|
---|
58 | }
|
---|
59 |
|
---|
60 | void Ahrs::UseDefaultPlot(void) {
|
---|
61 | pimpl_->UseDefaultPlot();
|
---|
62 | ((Imu*)Parent())->UseDefaultPlot();
|
---|
63 | }
|
---|
64 |
|
---|
65 | void Ahrs::AddPlot(const AhrsData *ahrsData,DataPlot::Color_t color) {
|
---|
66 | pimpl_->AddPlot(ahrsData,color);
|
---|
67 | }
|
---|
68 |
|
---|
69 | DataPlot1D *Ahrs::RollPlot(void) const {
|
---|
70 | return pimpl_->rollPlot;
|
---|
71 | }
|
---|
72 |
|
---|
73 | DataPlot1D *Ahrs::PitchPlot(void) const {
|
---|
74 | return pimpl_->pitchPlot;
|
---|
75 | }
|
---|
76 |
|
---|
77 | DataPlot1D *Ahrs::YawPlot(void) const {
|
---|
78 | return pimpl_->yawPlot;
|
---|
79 | }
|
---|
80 |
|
---|
81 | DataPlot1D *Ahrs::WXPlot(void) const {
|
---|
82 | return pimpl_->wXPlot;
|
---|
83 | }
|
---|
84 |
|
---|
85 | DataPlot1D *Ahrs::WYPlot(void) const {
|
---|
86 | return pimpl_->wYPlot;
|
---|
87 | }
|
---|
88 |
|
---|
89 | DataPlot1D *Ahrs::WZPlot(void) const {
|
---|
90 | return pimpl_->wZPlot;
|
---|
91 | }
|
---|
92 |
|
---|
93 | } // end namespace filter
|
---|
94 | } // end namespace flair
|
---|