Michael Ernst Peter / Mbed OS Test_GPS

Dependencies:   Eigen

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LinearCharacteristics.h Source File

LinearCharacteristics.h

00001 #ifndef LINEAR_CHARACTERISTICS_H_
00002 #define LINEAR_CHARACTERISTICS_H_
00003 
00004 class LinearCharacteristics
00005 {
00006 
00007 public:
00008 
00009     LinearCharacteristics(float gain, float offset);
00010     LinearCharacteristics(float x0, float x1, float y0, float y1);
00011     LinearCharacteristics(float x0, float x1, float y0, float y1, float yMin, float yMax);
00012 
00013     LinearCharacteristics() {};
00014 
00015     virtual ~LinearCharacteristics();
00016 
00017     float operator()(float x)
00018     {
00019         return evaluate(x);
00020     }
00021 
00022     float evaluate(float x);
00023 
00024     void setup(float gain, float offset);
00025     void setup(float x0, float x1, float y0, float y1);
00026     void setup(float x0, float x1, float y0, float y1, float yMin, float yMax);
00027 
00028     void correctExistingOffset(float);
00029 
00030 private:
00031 
00032     float gain;
00033     float offset;
00034     float yMin;
00035     float yMax;
00036 
00037 };
00038 
00039 #endif