source: flair-src/trunk/lib/FlairFilter/src/Ahrs.cpp @ 157

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

sources reformatted with flair-format-dir script

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