Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
rtc
Stabilizer
Integrator.h
Go to the documentation of this file.
1
// -*- C++ -*-
10
#ifndef INTEGRATOR_H
11
#define INTEGRATOR_H
12
13
// </rtc-template>
14
15
#include <deque>
16
17
class
Integrator
{
18
public
:
19
// if range = 0, integrate from 0 to t. Otherwise, integrate from t - (range - 1) * dt to t.
20
Integrator
(
double
_dt = 0.005,
unsigned
int
_range = 0);
21
~Integrator
(
void
);
22
void
reset
(
void
);
23
void
setup
(
double
_dt,
unsigned
int
_range);
24
void
update
(
double
_x);
25
double
calculate
(
void
);
26
private
:
27
double
dt
;
// control cycle
28
double
first
,
sum
,
last
;
// for trapezoidal rule calculation
29
bool
init_integration_flag
;
// integration inited flag (true when first value is updated)
30
unsigned
int
range
;
// integration range (from t_now - range * dt to t_now [sec])
31
std::deque<double>
buffer
;
// integration data buffer
32
};
33
34
#endif // TWO_DOF_CONTROLLER_H
Integrator::calculate
double calculate(void)
Definition:
Integrator.cpp:65
Integrator::dt
double dt
Definition:
Integrator.h:27
Integrator::buffer
std::deque< double > buffer
Definition:
Integrator.h:31
Integrator::sum
double sum
Definition:
Integrator.h:28
Integrator::first
double first
Definition:
Integrator.h:28
Integrator::init_integration_flag
bool init_integration_flag
Definition:
Integrator.h:29
Integrator
Definition:
Integrator.h:17
Integrator::~Integrator
~Integrator(void)
Definition:
Integrator.cpp:20
Integrator::range
unsigned int range
Definition:
Integrator.h:30
Integrator::setup
void setup(double _dt, unsigned int _range)
Definition:
Integrator.cpp:32
Integrator::update
void update(double _x)
Definition:
Integrator.cpp:39
Integrator::reset
void reset(void)
Definition:
Integrator.cpp:23
Integrator::last
double last
Definition:
Integrator.h:28
Integrator::Integrator
Integrator(double _dt=0.005, unsigned int _range=0)
Definition:
Integrator.cpp:16
hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:50