Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
LinearCharacteristics.h@21:cef093edb441, 2018-05-17 (annotated)
- Committer:
- altb
- Date:
- Thu May 17 11:15:36 2018 +0000
- Revision:
- 21:cef093edb441
- Parent:
- 2:252a61a7e8f9
- changed LinCharacteristics parametrisation; - changed Prefilter and K-gain according cuboid Lab FS2018
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| altb | 21:cef093edb441 | 1 | // Linear Characteristics for different purposes (map Voltage to acc etc.) |
| altb | 21:cef093edb441 | 2 | |
| altb | 21:cef093edb441 | 3 | |
| altb | 21:cef093edb441 | 4 | #ifndef LINEAR_CHARACTERISTICS_H_ |
| altb | 21:cef093edb441 | 5 | #define LINEAR_CHARACTERISTICS_H_ |
| altb | 21:cef093edb441 | 6 | |
| altb | 21:cef093edb441 | 7 | |
| rtlabor | 0:15be70d21d7c | 8 | class LinearCharacteristics{ |
| rtlabor | 0:15be70d21d7c | 9 | public: |
| altb | 21:cef093edb441 | 10 | LinearCharacteristics(float, float); |
| altb | 21:cef093edb441 | 11 | LinearCharacteristics(float, float, float, float); |
| altb | 21:cef093edb441 | 12 | float evaluate(float); |
| altb | 21:cef093edb441 | 13 | float operator()(float x){ |
| altb | 21:cef093edb441 | 14 | return evaluate(x); |
| altb | 21:cef093edb441 | 15 | } |
| altb | 21:cef093edb441 | 16 | //... |
| altb | 21:cef093edb441 | 17 | virtual ~LinearCharacteristics(); |
| altb | 21:cef093edb441 | 18 | // here: the calculation function |
| rtlabor | 0:15be70d21d7c | 19 | |
| rtlabor | 0:15be70d21d7c | 20 | private: |
| altb | 21:cef093edb441 | 21 | // here: private functions and values... |
| altb | 21:cef093edb441 | 22 | float gain; |
| rtlabor | 0:15be70d21d7c | 23 | float offset; |
| altb | 21:cef093edb441 | 24 | }; |
| altb | 21:cef093edb441 | 25 | |
| altb | 21:cef093edb441 | 26 | |
| altb | 21:cef093edb441 | 27 | #endif // LINEAR_CHARACTERISTICS_H_ |