added main menu added debug display many debug widgets for plotting live data worked on android live sensors added offline-data sensor feeding some dummy data sensors worked on the map display added ui debug for grid-points, particles and weights added a cool dude to display the estimation added real filtering based on the Indoor components c++11 fixes for android compilation online and offline filtering support new resampling technique for testing map loading via dialog
67 lines
1.2 KiB
C++
67 lines
1.2 KiB
C++
#ifndef AXES_H
|
|
#define AXES_H
|
|
|
|
#include "Range.h"
|
|
|
|
class Axes {
|
|
|
|
/** min/max value to display */
|
|
Range range;
|
|
|
|
/** number of available pixels for above range */
|
|
int pixels;
|
|
|
|
/** whether to invert the axes */
|
|
bool invert = false;
|
|
|
|
public:
|
|
|
|
void setMin(const float min) {this->range.min = min;}
|
|
float getMin() const {return this->range.min;}
|
|
|
|
void setMax(const float max) {this->range.max = max;}
|
|
float getMax() const {return this->range.max;}
|
|
|
|
void setRange(const Range& range) {this->range = range;}
|
|
const Range& getRange() const {return this->range;}
|
|
|
|
void setPixels(const int px) {this->pixels = px;}
|
|
int getPixels() const {return this->pixels;}
|
|
|
|
void setInverted(const bool inverted) {this->invert = inverted;}
|
|
bool isInverted() const {return this->invert;}
|
|
|
|
float convert(const float val) const {
|
|
float percent = (val - range.min) / (range.getSize());
|
|
if (invert) {percent = 1-percent;}
|
|
return percent * pixels;
|
|
}
|
|
|
|
};
|
|
|
|
class AxesX : public Axes {
|
|
|
|
public:
|
|
|
|
AxesX() {
|
|
setInverted(false);
|
|
}
|
|
|
|
void setWidth(const int px) {setPixels(px);}
|
|
|
|
};
|
|
|
|
class AxesY : public Axes {
|
|
|
|
public:
|
|
|
|
AxesY() {
|
|
setInverted(true);
|
|
}
|
|
|
|
void setHeight(const int px) {setPixels(px);}
|
|
|
|
};
|
|
|
|
#endif // AXES_H
|