PX4 Firmware
PX4 Autopilot Software http://px4.io
control::BlockIntegral Class Reference

A rectangular integrator. More...

#include <BlockIntegral.hpp>

Inheritance diagram for control::BlockIntegral:
Collaboration diagram for control::BlockIntegral:

Public Member Functions

 BlockIntegral (SuperBlock *parent, const char *name)
 
virtual ~BlockIntegral ()=default
 
float update (float input)
 
float getY ()
 
float getMax ()
 
void setY (float y)
 
- Public Member Functions inherited from control::SuperBlock
 SuperBlock (SuperBlock *parent, const char *name)
 
 ~SuperBlock ()=default
 
 SuperBlock (const SuperBlock &)=delete
 
SuperBlockoperator= (const SuperBlock &)=delete
 
 SuperBlock (SuperBlock &&)=delete
 
SuperBlockoperator= (SuperBlock &&)=delete
 
void setDt (float dt) override
 
void updateParams () override
 
- Public Member Functions inherited from control::Block
 Block (SuperBlock *parent, const char *name)
 
virtual ~Block ()=default
 
 Block (const Block &)=delete
 
Blockoperator= (const Block &)=delete
 
 Block (Block &&)=delete
 
Blockoperator= (Block &&)=delete
 
void getName (char *name, size_t n)
 
float getDt ()
 
- Public Member Functions inherited from ListNode< Block *>
void setSibling (Block * sibling)
 
const Block * getSibling () const
 

Protected Attributes

float _y
 previous output More...
 
BlockLimitSym _limit
 limiter More...
 
- Protected Attributes inherited from control::SuperBlock
List< Block * > _children
 
- Protected Attributes inherited from control::Block
const char * _name
 
SuperBlock_parent
 
float _dt {0.0f}
 
List< BlockParamBase * > _params
 
- Protected Attributes inherited from ListNode< Block *>
Block * _list_node_sibling
 

Additional Inherited Members

- Protected Member Functions inherited from control::SuperBlock
List< Block * > & getChildren ()
 
void updateChildParams ()
 
- Protected Member Functions inherited from control::Block
virtual void updateParamsSubclass ()
 
SuperBlockgetParent ()
 
List< BlockParamBase * > & getParams ()
 

Detailed Description

A rectangular integrator.

A limiter is built into the class to bound the integral's internal state. This is important for windup protection.

See also
Limit

Definition at line 59 of file BlockIntegral.hpp.

Constructor & Destructor Documentation

◆ BlockIntegral()

control::BlockIntegral::BlockIntegral ( SuperBlock parent,
const char *  name 
)
inline

Definition at line 63 of file BlockIntegral.hpp.

◆ ~BlockIntegral()

virtual control::BlockIntegral::~BlockIntegral ( )
virtualdefault

Member Function Documentation

◆ getMax()

float control::BlockIntegral::getMax ( )
inline

Definition at line 71 of file BlockIntegral.hpp.

Referenced by control::blockIntegralTest(), blockIntegralTest(), blockPIDTest(), control::blockPIDTest(), control::blockPITest(), and blockPITest().

Here is the caller graph for this function:

◆ getY()

float control::BlockIntegral::getY ( )
inline

Definition at line 70 of file BlockIntegral.hpp.

Referenced by control::blockIntegralTest(), blockIntegralTest(), control::blockPIDTest(), blockPIDTest(), blockPITest(), control::blockPITest(), and update().

Here is the caller graph for this function:

◆ setY()

void control::BlockIntegral::setY ( float  y)
inline

Definition at line 72 of file BlockIntegral.hpp.

Referenced by control::blockIntegralTest(), blockIntegralTest(), control::blockPIDTest(), blockPIDTest(), blockPITest(), control::blockPITest(), and update().

Here is the caller graph for this function:

◆ update()

float control::BlockIntegral::update ( float  input)

Definition at line 48 of file BlockIntegral.cpp.

References _limit, control::Block::getDt(), getY(), setY(), and control::BlockLimitSym::update().

Referenced by control::blockIntegralTest(), and blockIntegralTest().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _limit

BlockLimitSym control::BlockIntegral::_limit
protected

limiter

Definition at line 76 of file BlockIntegral.hpp.

Referenced by update().

◆ _y

float control::BlockIntegral::_y
protected

previous output

Definition at line 75 of file BlockIntegral.hpp.


The documentation for this class was generated from the following files: