-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPath.cpp
More file actions
46 lines (34 loc) · 1.07 KB
/
Path.cpp
File metadata and controls
46 lines (34 loc) · 1.07 KB
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
43
44
45
46
#include "Path.h"
/*******************************************************************************************/
void Path::addWaypoint(double lat, double lon, int speed)
{
waypoints[store_index].lat = lat;
waypoints[store_index].lon = lon;
waypoints[store_index].speed = speed;
store_index++;
}
/*******************************************************************************************/
double Path::getLat()
{
return waypoints[running_index].lat;
}
/*******************************************************************************************/
double Path::getLon()
{
return waypoints[running_index].lon;
}
/*******************************************************************************************/
int Path::getSpeed()
{
return waypoints[running_index].speed;
}
/*******************************************************************************************/
void Path::nextWaypoint()
{
running_index++;
}
/*******************************************************************************************/
bool Path::hasWaypoints()
{
return running_index < store_index;
}