-
Notifications
You must be signed in to change notification settings - Fork 9
/
poi.h
42 lines (33 loc) · 772 Bytes
/
poi.h
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
36
37
38
39
40
41
42
#ifndef POI_H
#define POI_H
#include <Arduino.h>
#include "config.h"
struct EDGE {
// First longitude
float lng1;
// Last longitude
float lng2;
// Multiplier
float m;
// Constant
float c;
};
class POI {
public:
// Speed limit
uint16_t limit;
// Number of edges in this poi
uint16_t edgeCount;
// Heading limit, if less than 0, then we don't use this value
float heading;
// Edges of the polygon
EDGE* edges;
/**
* Check if point is inside of the polygon
* @param float latitude
* @param float longitude
* @return true if the point is inside
*/
boolean checkPointInside(float lat, float lng);
};
#endif