Miscellaneous Library, read Encoder etc.
PolynomialCharacteristics.h@1:c680da75a614, 2019-03-06 (annotated)
- Committer:
- altb
- Date:
- Wed Mar 06 14:19:10 2019 +0000
- Revision:
- 1:c680da75a614
- Parent:
- 0:3312872854c4
dropped Signal
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
altb | 0:3312872854c4 | 1 | // Polynomial Characteristics for different purposes (map Voltage to acc etc.) |
altb | 0:3312872854c4 | 2 | |
altb | 0:3312872854c4 | 3 | |
altb | 0:3312872854c4 | 4 | #ifndef POLYNOMIALCHARACTERISTICS_H_ |
altb | 0:3312872854c4 | 5 | #define POLYNOMIALCHARACTERISTICS_H_ |
altb | 0:3312872854c4 | 6 | #include "mbed.h" |
altb | 0:3312872854c4 | 7 | |
altb | 0:3312872854c4 | 8 | class PolynomialCharacteristics{ |
altb | 0:3312872854c4 | 9 | public: |
altb | 0:3312872854c4 | 10 | PolynomialCharacteristics(float *, uint8_t, float, float); |
altb | 0:3312872854c4 | 11 | float evaluate(float); |
altb | 0:3312872854c4 | 12 | float operator()(float x){ |
altb | 0:3312872854c4 | 13 | return evaluate(x); |
altb | 0:3312872854c4 | 14 | } |
altb | 0:3312872854c4 | 15 | //... |
altb | 0:3312872854c4 | 16 | virtual ~PolynomialCharacteristics(); |
altb | 0:3312872854c4 | 17 | // here: the calculation function |
altb | 0:3312872854c4 | 18 | |
altb | 0:3312872854c4 | 19 | private: |
altb | 0:3312872854c4 | 20 | // here: private functions and values... |
altb | 0:3312872854c4 | 21 | float *P; |
altb | 0:3312872854c4 | 22 | float degree; |
altb | 0:3312872854c4 | 23 | float ulim; |
altb | 0:3312872854c4 | 24 | float llim; |
altb | 0:3312872854c4 | 25 | }; |
altb | 0:3312872854c4 | 26 | |
altb | 0:3312872854c4 | 27 | |
altb | 0:3312872854c4 | 28 | #endif // LINEAR_CHARACTERISTICS_H_ |