FlightGear next
|
Roy Ovesen's PID controller. More...
#include <pidcontroller.hxx>
Inherits FGXMLAutopilot::AnalogComponent.
Public Member Functions | |
PIDController () | |
~PIDController () | |
void | update (bool firstTime, double dt) override |
pure virtual function to be implemented by the derived classes. | |
![]() | |
const simgear::PeriodicalValue_ptr | getPeriodicalValue () const |
void | collectDependentProperties (std::set< const SGPropertyNode * > &props) const |
Add to <props> all properties that are used by this component. | |
![]() | |
Component () | |
A constructor for an empty Component. | |
virtual | ~Component () |
virtual destructor to clean up resources | |
void | update (double dt) override |
virtual bool | configure (SGPropertyNode &prop_root, SGPropertyNode &cfg) |
configure this component from a property node. | |
bool | isPropertyEnabled () |
check if this component is enabled as configured in the <enable> section | |
Static Public Member Functions | |
static const char * | staticSubsystemClassId () |
Protected Member Functions | |
virtual bool | configure (SGPropertyNode &cfg_node, const std::string &cfg_name, SGPropertyNode &prop_root) |
This method configures this analog component from a property node. | |
![]() | |
AnalogComponent () | |
A constructor for an analog component. | |
double | clamp (double value) const |
clamp the given value if <min> and/or <max> inputs were given | |
void | disabled (double dt) override |
overideable method being called from the update() method if this component is disabled. | |
double | get_output_value () const |
return the current double value of the output property | |
void | set_output_value (double value) |
Additional Inherited Members | |
![]() | |
simgear::ValueList | _valueInput |
the value input | |
simgear::ValueList | _referenceInput |
the reference input | |
simgear::ValueList | _minInput |
the minimum output clamp input | |
simgear::ValueList | _maxInput |
the maximum output clamp input | |
simgear::PeriodicalValue_ptr | _periodical |
the configuration for periodical outputs | |
simgear::PropertyList | _output_list |
SGPropertyNode_ptr | _passive_mode |
![]() | |
bool | _debug |
debug flag, true if this component should generate some useful output on every iteration | |
bool | _honor_passive |
a (historic) flag signalling the derived class that it should compute it's internal state but shall not set the output properties if /autopilot/locks/passive-mode is true. | |
Roy Ovesen's PID controller.
Definition at line 40 of file pidcontroller.hxx.
PIDController::PIDController | ( | ) |
Definition at line 31 of file pidcontroller.cxx.
|
inline |
Definition at line 84 of file pidcontroller.hxx.
|
protectedvirtual |
This method configures this analog component from a property node.
Gets called multiple times from the base class configure method for every configuration node.
cfg_name | Name of the configuration node provided in cfg_node |
cfg_node | Configuration node itself |
prop_root | Property root for all relative paths |
Reimplemented from FGXMLAutopilot::AnalogComponent.
Definition at line 239 of file pidcontroller.cxx.
|
inlinestatic |
Definition at line 87 of file pidcontroller.hxx.
|
overridevirtual |
pure virtual function to be implemented by the derived classes.
Gets called from the update method if it's not disabled with the firstTime parameter set to true if this is the first call after being enabled
firstTime | set to true if this is the first update call since this component has been enabled. Set to false for every subsequent call. |
dt | the elapsed time since the last call |
Implements FGXMLAutopilot::Component.
Definition at line 99 of file pidcontroller.cxx.