source: flair-src/tags/latest/lib/FlairFilter/src/Ahrs.cpp@ 451

Last change on this file since 451 was 15, checked in by Bayard Gildas, 8 years ago

sources reformatted with flair-format-dir script

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