source: flair-src/trunk/lib/FlairFilter/src/NestedSat.cpp @ 10

Last change on this file since 10 was 10, checked in by Sanahuja Guillaume, 6 years ago

lic

File size: 1.3 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:    2013/04/15
6//  filename:   NestedSat.cpp
7//
8//  author:     Guillaume Sanahuja
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    Class defining a PID with saturations
14//
15//
16/*********************************************************************/
17
18#include "NestedSat.h"
19#include "NestedSat_impl.h"
20#include <cvmatrix.h>
21#include <Layout.h>
22#include <LayoutPosition.h>
23#include <Euler.h>
24
25using std::string;
26using namespace flair::core;
27using namespace flair::gui;
28
29namespace flair
30{
31namespace filter
32{
33
34NestedSat::NestedSat(const LayoutPosition* position,string name) : ControlLaw(position->getLayout(),name)
35{
36    pimpl_=new NestedSat_impl(this,position,name);
37}
38
39NestedSat::~NestedSat(void)
40{
41    delete pimpl_;
42}
43
44void NestedSat::UpdateFrom(const io_data *data)
45{
46    pimpl_->UpdateFrom(data);
47    ProcessUpdate(output);
48}
49
50void NestedSat::SetValues(float p_ref,float p,float d)
51{
52    input->SetValue(0,0,p_ref);
53    input->SetValue(1,0,p);
54    input->SetValue(2,0,d);
55}
56//TODO: add a combobox to choose between rad and deg
57void NestedSat::ConvertSatFromDegToRad(void)
58{
59    pimpl_->k=Euler::ToRadian(1);
60}
61
62} // end namespace filter
63} // end namespace flair
Note: See TracBrowser for help on using the repository browser.