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