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

Last change on this file since 7 was 7, checked in by Sanahuja Guillaume, 5 years ago

filter and meta

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