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