Lib_Misc

Dependents:   IndNav_QK3_T265

Committer:
altb2
Date:
Fri Jan 10 16:01:33 2020 +0000
Revision:
14:d5f47a30ef19
Parent:
3:379208083c74
Small changes in double2float

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb 0:3312872854c4 1 // Linear Characteristics for different purposes (map Voltage to acc etc.)
altb 0:3312872854c4 2
altb 0:3312872854c4 3
altb 0:3312872854c4 4 #ifndef LINEAR_CHARACTERISTICS_H_
altb 0:3312872854c4 5 #define LINEAR_CHARACTERISTICS_H_
altb 0:3312872854c4 6
altb 0:3312872854c4 7
altb 0:3312872854c4 8 class LinearCharacteristics{
altb 0:3312872854c4 9 public:
altb 0:3312872854c4 10 LinearCharacteristics(){};
altb 0:3312872854c4 11 LinearCharacteristics(float, float);
altb 0:3312872854c4 12 LinearCharacteristics(float, float, float, float);
altb 0:3312872854c4 13 LinearCharacteristics(float, float, float, float, float, float);
altb 0:3312872854c4 14 float evaluate(float);
altb2 3:379208083c74 15 void setup(float, float);
altb 0:3312872854c4 16 void setup(float, float, float, float);
altb 0:3312872854c4 17 void setup(float, float, float, float, float, float);
altb 0:3312872854c4 18 float operator()(float x){
altb 0:3312872854c4 19 return evaluate(x);
altb 0:3312872854c4 20 }
altb 0:3312872854c4 21 //...
altb 0:3312872854c4 22 virtual ~LinearCharacteristics();
altb 0:3312872854c4 23 // here: the calculation function
altb 0:3312872854c4 24
altb 0:3312872854c4 25 private:
altb 0:3312872854c4 26 // here: private functions and values...
altb 0:3312872854c4 27 float gain;
altb 0:3312872854c4 28 float offset;
altb 0:3312872854c4 29 float ulim;
altb 0:3312872854c4 30 float llim;
altb 0:3312872854c4 31 };
altb 0:3312872854c4 32
altb 0:3312872854c4 33
altb 0:3312872854c4 34 #endif // LINEAR_CHARACTERISTICS_H_