-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMap.h
42 lines (34 loc) · 879 Bytes
/
Map.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
/*
Object: Map
Intent: Manipulate a set of polar coodinates, with different levels of granularity
Interface: distnace in cm, angles in degrees
Usage: create, then addReading/size, then closest/furthest/sum, then reset
Choices:
Open:
Whats the effect of int, does it round
reset();
find out how to do Polar addition (and is there a class I should be using in stead of my own)
how to deal with the potentially empty reading set.
*/
#ifndef Map_h
#define Map_h
#include "Arduino.h"
//#include <ArduinoSTL.h>
#include "Polar.h"
class Map
{
public:
Map(int slices);
Map();
void addReading(int a, int d);
int numberOfReadings();
Polar nearest();
Polar furthest();
Polar sum();
//void reset();
void debug(); // in degrees
private:
Polar _readings[10];
int _number = 0;
};
#endif