current code and TeX. code fine?!?!?!
This commit is contained in:
5
plots/PlotErrFunc.h
Normal file → Executable file
5
plots/PlotErrFunc.h
Normal file → Executable file
@@ -49,6 +49,11 @@ class PlotErrFunc {
|
||||
|
||||
public:
|
||||
|
||||
/** empty ctor */
|
||||
PlotErrFunc() {
|
||||
setYRange(0, 90, 5);
|
||||
}
|
||||
|
||||
/** ctor with x-axis label */
|
||||
PlotErrFunc(const std::string& xLabel, const std::string& yLabel) {
|
||||
gplot.getAxisX().setLabel(xLabel);
|
||||
|
||||
14
plots/PlotErrTime.h
Normal file → Executable file
14
plots/PlotErrTime.h
Normal file → Executable file
@@ -23,6 +23,11 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
/** empty ctor */
|
||||
PlotErrTime() {
|
||||
|
||||
}
|
||||
|
||||
/** ctor */
|
||||
PlotErrTime(const std::string& xLabel, const std::string& yLabel, const std::string& y2Label) {
|
||||
|
||||
@@ -41,6 +46,15 @@ public:
|
||||
|
||||
}
|
||||
|
||||
K::Gnuplot& getGP() {
|
||||
return gp;
|
||||
}
|
||||
|
||||
/** write the gnuplot commands to file for later re-use */
|
||||
void writePlotToFile(const std::string& file) {
|
||||
this->gp.writePlotToFile(file);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
for (int i = 0; i < 8; ++i) {lineErr[i].clear();}
|
||||
lineB.clear();
|
||||
|
||||
24
plots/PlotWiFiGroundProb.h
Normal file → Executable file
24
plots/PlotWiFiGroundProb.h
Normal file → Executable file
@@ -67,16 +67,13 @@ public:
|
||||
}
|
||||
|
||||
/** plot the ground-probability for the given measurement */
|
||||
void show(const WiFiObserverFree& prob, const WiFiMeasurements& _mes) {
|
||||
|
||||
VAPGrouper vap(VAPGrouper::Mode::LAST_MAC_DIGIT_TO_ZERO, VAPGrouper::Aggregation::AVERAGE);
|
||||
const WiFiMeasurements mes = vap.group(_mes);
|
||||
void show(const WiFiObserverFree& prob, const WiFiMeasurements& mes, const Timestamp ts) {
|
||||
|
||||
// determine min/max probability
|
||||
double min = +99999;
|
||||
double max = -99999;
|
||||
for (Entry& e : pos) {
|
||||
const double p = prob.getProbability(e.pos, mes.entries.front().getTimestamp(), mes);
|
||||
const double p = prob.getProbability(e.pos, ts, mes);
|
||||
if (p < min) {min = p;}
|
||||
if (p > max) {max = p;}
|
||||
}
|
||||
@@ -84,8 +81,11 @@ public:
|
||||
|
||||
// render
|
||||
for (Entry& e : pos) {
|
||||
const double p = prob.getProbability(e.pos, mes.entries.front().getTimestamp(), mes);
|
||||
const double f = (p-min) / diff * 255;
|
||||
const double p = prob.getProbability(e.pos, ts, mes);
|
||||
double f = (p-min) / diff * 255;
|
||||
if (f < 0) {f = 0;}
|
||||
if (f > 255) {f = 255;}
|
||||
|
||||
e.sum += p;
|
||||
e.cnt++;
|
||||
|
||||
@@ -93,10 +93,14 @@ public:
|
||||
const K::GnuplotColor c = K::GnuplotColor::fromHSV(0, f, 255);
|
||||
e.poly->getFill().setColor(c);
|
||||
e.max = f;
|
||||
|
||||
e.poly->setEnabled(f > 32);
|
||||
//}
|
||||
if (f < 0.1) {
|
||||
e.poly->setEnabled(false);
|
||||
}
|
||||
// if (f < 32) {
|
||||
// e.poly->setEnabled(false);
|
||||
// } else {
|
||||
// e.poly->setEnabled(true);
|
||||
// }
|
||||
|
||||
//plot.cpoints.add(K::GnuplotPoint3(pt.x, pt.y, pt.z), p);
|
||||
}
|
||||
|
||||
0
plots/Plotty.h
Normal file → Executable file
0
plots/Plotty.h
Normal file → Executable file
Reference in New Issue
Block a user