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