-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDrone.m
59 lines (49 loc) · 1.31 KB
/
Drone.m
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
47
48
49
50
51
52
53
54
55
56
57
58
59
classdef Drone
properties
ID;
timeUnit = 1/10;
% Velovity Restrict (use data frome Dji)
yawPerStep;
pitchPerStep;
yawMax;
climbAngleMax;
subAngleMax;
vMax = 3;
accMax = 3;
distTraveled;
% State Info
velocity;
acceleration;
position;
target;
startPt;
waypoints;
arrived;
removed;
goDark;
targetExchangeCounter;
end
methods
function self=Drone(ID, position, target, initV, initA)
self.ID = ID;
% Velovity Restrict (use data frome Dji)
self.yawPerStep = 250/180 * pi * self.timeUnit;
self.pitchPerStep = 250/180 * pi * self.timeUnit;
self.yawMax = 25/180 * pi * self.timeUnit;
self.climbAngleMax = 35/180 * pi;
self.subAngleMax = 35/180 * pi;
self.target = target;
% State Info
self.velocity = initV;
self.acceleration = initA;
self.position = position;
self.distTraveled = 0;
self.startPt = [];
self.waypoints = position;
self.arrived = false;
self.removed = false;
self.targetExchangeCounter = 0;
self.goDark = false;
end
end
end