-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSensorHelper.h
More file actions
35 lines (27 loc) · 864 Bytes
/
Copy pathSensorHelper.h
File metadata and controls
35 lines (27 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include "CoordSet.h"
#include "K9.h"
#include "Node.h"
#include "Line.h"
#include "Graph.h"
#include "Map.h"
#include "Utilities.h"
#include <vector>
#define MAX_DISTANCE_BETWEEN_MEASUREMENTS 3
#define MAX_SIDEWAYS_DEVIATION 1
class SensorHelper{
public:
SensorHelper(Sensor* sensor);
~SensorHelper();
void addSensorDeviationPoint(CoordSet beforeDeviationPoint, CoordSet deviationPoint);
void addSensorFrontWall(CoordSet frontWallPos);
bool analyze(); // Returns true if analysis can recognize a maze scenario
static void calcMeasurementOperationFromOrientations(Direction sensorOrientation, Direction k9Orientation, bool& plusAxisX, bool& minusAxisX, bool& plusAxisY, bool& minusAxisY);
private:
Sensor* sensor;
std::vector<CoordSet> sensorDeviationPoints;
bool frontWall;
protected:
bool isSimplePath();
bool isWideningPath();
};