Ruprecht Altenburger
/
mirror_actuator_V1
Mirror actuator for RT2 lab
Library_Misc/LinearCharacteristics.h@15:9f32f64eee5b, 2021-05-02 (annotated)
- Committer:
- altb2
- Date:
- Sun May 02 08:17:06 2021 +0000
- Revision:
- 15:9f32f64eee5b
commit for students, 2.5.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
altb2 | 15:9f32f64eee5b | 1 | // Linear Characteristics for different purposes (map Voltage to acc etc.) |
altb2 | 15:9f32f64eee5b | 2 | |
altb2 | 15:9f32f64eee5b | 3 | |
altb2 | 15:9f32f64eee5b | 4 | #ifndef LINEAR_CHARACTERISTICS_H_ |
altb2 | 15:9f32f64eee5b | 5 | #define LINEAR_CHARACTERISTICS_H_ |
altb2 | 15:9f32f64eee5b | 6 | |
altb2 | 15:9f32f64eee5b | 7 | |
altb2 | 15:9f32f64eee5b | 8 | class LinearCharacteristics{ |
altb2 | 15:9f32f64eee5b | 9 | public: |
altb2 | 15:9f32f64eee5b | 10 | LinearCharacteristics(){}; |
altb2 | 15:9f32f64eee5b | 11 | LinearCharacteristics(float, float); |
altb2 | 15:9f32f64eee5b | 12 | LinearCharacteristics(float, float, float, float); |
altb2 | 15:9f32f64eee5b | 13 | LinearCharacteristics(float, float, float, float, float, float); |
altb2 | 15:9f32f64eee5b | 14 | float evaluate(float); |
altb2 | 15:9f32f64eee5b | 15 | void setup(float, float, float, float); |
altb2 | 15:9f32f64eee5b | 16 | void setup(float, float, float, float, float, float); |
altb2 | 15:9f32f64eee5b | 17 | float operator()(float x){ |
altb2 | 15:9f32f64eee5b | 18 | return evaluate(x); |
altb2 | 15:9f32f64eee5b | 19 | } |
altb2 | 15:9f32f64eee5b | 20 | //... |
altb2 | 15:9f32f64eee5b | 21 | virtual ~LinearCharacteristics(); |
altb2 | 15:9f32f64eee5b | 22 | // here: the calculation function |
altb2 | 15:9f32f64eee5b | 23 | |
altb2 | 15:9f32f64eee5b | 24 | private: |
altb2 | 15:9f32f64eee5b | 25 | // here: private functions and values... |
altb2 | 15:9f32f64eee5b | 26 | float gain; |
altb2 | 15:9f32f64eee5b | 27 | float offset; |
altb2 | 15:9f32f64eee5b | 28 | float ulim; |
altb2 | 15:9f32f64eee5b | 29 | float llim; |
altb2 | 15:9f32f64eee5b | 30 | }; |
altb2 | 15:9f32f64eee5b | 31 | |
altb2 | 15:9f32f64eee5b | 32 | |
altb2 | 15:9f32f64eee5b | 33 | #endif // LINEAR_CHARACTERISTICS_H_ |