Pascal Keller
/
GRT_VC_PIDT1
Regler von Kellep15
LinearCharacteristics.h@0:05dd1de8cc3f, 2019-05-03 (annotated)
- Committer:
- altb2
- Date:
- Fri May 03 09:37:27 2019 +0000
- Revision:
- 0:05dd1de8cc3f
Final Template Version for Lab #7
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
altb2 | 0:05dd1de8cc3f | 1 | // Linear Characteristics for different purposes (map Voltage to acc etc.) |
altb2 | 0:05dd1de8cc3f | 2 | |
altb2 | 0:05dd1de8cc3f | 3 | |
altb2 | 0:05dd1de8cc3f | 4 | #ifndef LINEAR_CHARACTERISTICS_H_ |
altb2 | 0:05dd1de8cc3f | 5 | #define LINEAR_CHARACTERISTICS_H_ |
altb2 | 0:05dd1de8cc3f | 6 | |
altb2 | 0:05dd1de8cc3f | 7 | |
altb2 | 0:05dd1de8cc3f | 8 | class LinearCharacteristics{ |
altb2 | 0:05dd1de8cc3f | 9 | public: |
altb2 | 0:05dd1de8cc3f | 10 | LinearCharacteristics(){}; |
altb2 | 0:05dd1de8cc3f | 11 | LinearCharacteristics(float, float); |
altb2 | 0:05dd1de8cc3f | 12 | LinearCharacteristics(float, float, float, float); |
altb2 | 0:05dd1de8cc3f | 13 | LinearCharacteristics(float, float, float, float, float, float); |
altb2 | 0:05dd1de8cc3f | 14 | float evaluate(float); |
altb2 | 0:05dd1de8cc3f | 15 | void setup(float, float, float, float); |
altb2 | 0:05dd1de8cc3f | 16 | void setup(float, float, float, float, float, float); |
altb2 | 0:05dd1de8cc3f | 17 | float operator()(float x){ |
altb2 | 0:05dd1de8cc3f | 18 | return evaluate(x); |
altb2 | 0:05dd1de8cc3f | 19 | } |
altb2 | 0:05dd1de8cc3f | 20 | //... |
altb2 | 0:05dd1de8cc3f | 21 | virtual ~LinearCharacteristics(); |
altb2 | 0:05dd1de8cc3f | 22 | // here: the calculation function |
altb2 | 0:05dd1de8cc3f | 23 | |
altb2 | 0:05dd1de8cc3f | 24 | private: |
altb2 | 0:05dd1de8cc3f | 25 | // here: private functions and values... |
altb2 | 0:05dd1de8cc3f | 26 | float gain; |
altb2 | 0:05dd1de8cc3f | 27 | float offset; |
altb2 | 0:05dd1de8cc3f | 28 | float ulim; |
altb2 | 0:05dd1de8cc3f | 29 | float llim; |
altb2 | 0:05dd1de8cc3f | 30 | }; |
altb2 | 0:05dd1de8cc3f | 31 | |
altb2 | 0:05dd1de8cc3f | 32 | |
altb2 | 0:05dd1de8cc3f | 33 | #endif // LINEAR_CHARACTERISTICS_H_ |