Michael Ernst Peter / Mbed OS Test_GPS

Dependencies:   Eigen

Committer:
pmic
Date:
Thu Nov 17 22:07:20 2022 +0000
Revision:
74:68c536a821ce
Parent:
43:f459f6efaf5c
Updated Eigen libary with won fork

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pmic 43:f459f6efaf5c 1 #ifndef LINEAR_CHARACTERISTICS_H_
pmic 43:f459f6efaf5c 2 #define LINEAR_CHARACTERISTICS_H_
pmic 43:f459f6efaf5c 3
pmic 43:f459f6efaf5c 4 class LinearCharacteristics
pmic 43:f459f6efaf5c 5 {
pmic 43:f459f6efaf5c 6
pmic 43:f459f6efaf5c 7 public:
pmic 43:f459f6efaf5c 8
pmic 43:f459f6efaf5c 9 LinearCharacteristics(float gain, float offset);
pmic 43:f459f6efaf5c 10 LinearCharacteristics(float x0, float x1, float y0, float y1);
pmic 43:f459f6efaf5c 11 LinearCharacteristics(float x0, float x1, float y0, float y1, float yMin, float yMax);
pmic 43:f459f6efaf5c 12
pmic 43:f459f6efaf5c 13 LinearCharacteristics() {};
pmic 43:f459f6efaf5c 14
pmic 43:f459f6efaf5c 15 virtual ~LinearCharacteristics();
pmic 43:f459f6efaf5c 16
pmic 43:f459f6efaf5c 17 float operator()(float x)
pmic 43:f459f6efaf5c 18 {
pmic 43:f459f6efaf5c 19 return evaluate(x);
pmic 43:f459f6efaf5c 20 }
pmic 43:f459f6efaf5c 21
pmic 43:f459f6efaf5c 22 float evaluate(float x);
pmic 43:f459f6efaf5c 23
pmic 43:f459f6efaf5c 24 void setup(float gain, float offset);
pmic 43:f459f6efaf5c 25 void setup(float x0, float x1, float y0, float y1);
pmic 43:f459f6efaf5c 26 void setup(float x0, float x1, float y0, float y1, float yMin, float yMax);
pmic 43:f459f6efaf5c 27
pmic 43:f459f6efaf5c 28 void correctExistingOffset(float);
pmic 43:f459f6efaf5c 29
pmic 43:f459f6efaf5c 30 private:
pmic 43:f459f6efaf5c 31
pmic 43:f459f6efaf5c 32 float gain;
pmic 43:f459f6efaf5c 33 float offset;
pmic 43:f459f6efaf5c 34 float yMin;
pmic 43:f459f6efaf5c 35 float yMax;
pmic 43:f459f6efaf5c 36
pmic 43:f459f6efaf5c 37 };
pmic 43:f459f6efaf5c 38
pmic 43:f459f6efaf5c 39 #endif