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

Classes

class  Block
 
class  BlockDelay
 
class  BlockDerivative
 A simple derivative approximation. More...
 
class  BlockHighPass
 A high pass filter as described here: http://en.wikipedia.org/wiki/High-pass_filter. More...
 
class  BlockIntegral
 A rectangular integrator. More...
 
class  BlockIntegralTrap
 A trapezoidal integrator. More...
 
class  BlockLimit
 A limiter/ saturation. More...
 
class  BlockLimitSym
 A symmetric limiter/ saturation. More...
 
class  BlockLowPass
 A low pass filter as described here: http://en.wikipedia.org/wiki/Low-pass_filter. More...
 
class  BlockLowPass2
 A 2nd order low pass filter block which uses the default px4 2nd order low pass filter. More...
 
class  BlockLowPassVector
 
class  BlockOutput
 An output trim/ saturation block. More...
 
class  BlockP
 A proportional controller. More...
 
class  BlockParam
 
class  BlockParamBase
 
class  BlockPD
 A proportional-derivative controller. More...
 
class  BlockPI
 A proportional-integral controller. More...
 
class  BlockPID
 A proportional-integral-derivative controller. More...
 
class  BlockRandGauss
 
class  BlockRandUniform
 A uniform random number generator. More...
 
class  BlockStats
 
class  SuperBlock
 

Typedefs

typedef BlockParam< float > BlockParamFloat
 
typedef BlockParam< int32_t > BlockParamInt
 
typedef BlockParam< bool > BlockParamBool
 
typedef BlockParam< float & > BlockParamExtFloat
 
typedef BlockParam< int32_t & > BlockParamExtInt
 

Functions

int basicBlocksTest ()
 
int blockLimitTest ()
 
int blockLimitSymTest ()
 
int blockLowPassTest ()
 
int blockHighPassTest ()
 
int blockLowPass2Test ()
 
int blockIntegralTest ()
 
int blockIntegralTrapTest ()
 
int blockDerivativeTest ()
 
int blockPTest ()
 
int blockPITest ()
 
int blockPDTest ()
 
int blockPIDTest ()
 
int blockOutputTest ()
 
int blockRandUniformTest ()
 
int blockRandGaussTest ()
 
int blockStatsTest ()
 
int blockDelayTest ()
 

Variables

static constexpr uint8_t maxChildrenPerBlock = 100
 
static constexpr uint8_t maxParamsPerBlock = 110
 
static constexpr uint8_t blockNameLengthMax = 40
 

Typedef Documentation

◆ BlockParamBool

Definition at line 109 of file BlockParam.hpp.

◆ BlockParamExtFloat

Definition at line 110 of file BlockParam.hpp.

◆ BlockParamExtInt

Definition at line 111 of file BlockParam.hpp.

◆ BlockParamFloat

Definition at line 107 of file BlockParam.hpp.

◆ BlockParamInt

Definition at line 108 of file BlockParam.hpp.

Function Documentation

◆ basicBlocksTest()

int basicBlocksTest ( )

Definition at line 70 of file blocks.cpp.

References blockDelayTest(), blockDerivativeTest(), blockHighPassTest(), blockIntegralTest(), blockIntegralTrapTest(), blockLimitSymTest(), blockLimitTest(), blockLowPass2Test(), blockLowPassTest(), blockOutputTest(), blockPDTest(), blockPIDTest(), blockPITest(), blockPTest(), and blockStatsTest().

Referenced by controllib_test_main().

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

◆ blockDelayTest()

int blockDelayTest ( )

Definition at line 502 of file blocks.cpp.

References ASSERT_CL, equal(), and control::BlockDelay< Type, M, N, LEN >::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockDerivativeTest()

int blockDerivativeTest ( )

Definition at line 291 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockDerivative::getLP(), control::BlockDerivative::getU(), control::SuperBlock::setDt(), control::BlockDerivative::setU(), and control::BlockDerivative::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockHighPassTest()

int blockHighPassTest ( )

Definition at line 152 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockHighPass::getFCut(), control::BlockHighPass::getU(), control::BlockHighPass::getY(), control::Block::setDt(), control::BlockHighPass::setU(), control::BlockHighPass::setY(), and control::BlockHighPass::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockIntegralTest()

int blockIntegralTest ( )

Definition at line 211 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockIntegral::getMax(), control::BlockIntegral::getY(), control::SuperBlock::setDt(), control::BlockIntegral::setY(), and control::BlockIntegral::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockIntegralTrapTest()

int blockIntegralTrapTest ( )

Definition at line 248 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockIntegralTrap::getMax(), control::BlockIntegralTrap::getU(), control::BlockIntegralTrap::getY(), control::SuperBlock::setDt(), control::BlockIntegralTrap::setU(), control::BlockIntegralTrap::setY(), and control::BlockIntegralTrap::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockLimitSymTest()

int blockLimitSymTest ( )

Definition at line 109 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockLimitSym::getMax(), and control::BlockLimitSym::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockLimitTest()

int blockLimitTest ( )

Definition at line 93 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockLimit::getMax(), control::BlockLimit::getMin(), and control::BlockLimit::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockLowPass2Test()

int blockLowPass2Test ( )

Definition at line 183 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockLowPass2::getFCutParam(), control::BlockLowPass2::getState(), control::Block::setDt(), control::BlockLowPass2::setState(), and control::BlockLowPass2::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockLowPassTest()

int blockLowPassTest ( )

Definition at line 124 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockLowPass::getFCut(), control::BlockLowPass::getState(), control::Block::setDt(), control::BlockLowPass::setState(), and control::BlockLowPass::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockOutputTest()

int blockOutputTest ( )

Definition at line 407 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::BlockOutput::get(), control::Block::getDt(), control::BlockOutput::getMax(), control::BlockOutput::getMin(), and control::BlockOutput::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockPDTest()

int blockPDTest ( )

Definition at line 352 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::BlockPD::getDerivative(), control::Block::getDt(), control::BlockPD::getKD(), control::BlockPD::getKP(), control::BlockDerivative::getLP(), control::BlockDerivative::getU(), control::SuperBlock::setDt(), control::BlockDerivative::setU(), control::BlockPD::update(), and control::BlockDerivative::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockPIDTest()

int blockPIDTest ( )

Definition at line 377 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::BlockPID::getDerivative(), control::Block::getDt(), control::BlockPID::getIntegral(), control::BlockPID::getKD(), control::BlockPID::getKI(), control::BlockPID::getKP(), control::BlockDerivative::getLP(), control::BlockIntegral::getMax(), control::BlockDerivative::getU(), control::BlockIntegral::getY(), control::SuperBlock::setDt(), control::BlockDerivative::setU(), control::BlockIntegral::setY(), control::BlockPID::update(), and control::BlockDerivative::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockPITest()

int blockPITest ( )

Definition at line 330 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockPI::getIntegral(), control::BlockPI::getKI(), control::BlockPI::getKP(), control::BlockIntegral::getMax(), control::BlockIntegral::getY(), control::SuperBlock::setDt(), control::BlockIntegral::setY(), and control::BlockPI::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockPTest()

int blockPTest ( )

Definition at line 314 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockP::getKP(), control::Block::setDt(), and control::BlockP::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

◆ blockRandGaussTest()

int blockRandGaussTest ( )

Definition at line 455 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockRandGauss::getMean(), control::BlockRandGauss::getStdDev(), matrix::sqrt(), and control::BlockRandGauss::update().

Referenced by basicBlocksTest().

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

◆ blockRandUniformTest()

int blockRandUniformTest ( )

Definition at line 429 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::Block::getDt(), control::BlockRandUniform::getMax(), control::BlockRandUniform::getMin(), greater_than_or_equal(), less_than_or_equal(), and control::BlockRandUniform::update().

Referenced by basicBlocksTest().

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

◆ blockStatsTest()

int blockStatsTest ( )

Definition at line 485 of file blocks.cpp.

References ASSERT_CL, equal(), f(), control::BlockStats< Type, M >::getMean(), control::BlockStats< Type, M >::getStdDev(), control::BlockStats< Type, M >::reset(), and control::BlockStats< Type, M >::update().

Referenced by basicBlocksTest(), and basicBlocksTest().

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

Variable Documentation

◆ blockNameLengthMax

constexpr uint8_t control::blockNameLengthMax = 40
static

◆ maxChildrenPerBlock

constexpr uint8_t control::maxChildrenPerBlock = 100
static

Definition at line 49 of file Block.hpp.

Referenced by control::SuperBlock::setDt(), and control::SuperBlock::updateChildParams().

◆ maxParamsPerBlock

constexpr uint8_t control::maxParamsPerBlock = 110
static

Definition at line 50 of file Block.hpp.

Referenced by control::Block::updateParams().