-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconstraintData.m
45 lines (41 loc) · 860 Bytes
/
constraintData.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
%Only for the quadrotor system
%Position constraints
constraintData_r = zeros(m,k_r,3);
%velocity
if(k_r>=1)
constraintData_r(1,1,1:3) = 0; %At starting position
constraintData_r(2:m,1,1:2) = eps; %x,y velocities
constraintData_r(2:m,1,3) = eps; %z velocity
end
%acceleration
if(k_r>=2)
constraintData_r(1,2,3) = 0; %At starting position
constraintData_r(2:m,2,1:2) = eps; %x,y accelerations
constraintData_r(2:m,2,3) = eps; %z acceleration
end
%jerk
if(k_r>=3)
%all zeros
end
%snap
if(k_r>=4)
%all zeros
end
%Yaw constraints
constraintData_psi = zeros(m,k_psi,1);
%velocity
if(k_psi>=1)
constraintData_psi(1,1,1) = 0; %At starting position
end
%acceleration
if(k_psi>=2)
%all zeros
end
%jerk
if(k_psi>=3)
%all zeros
end
%snap
if(k_psi>=4)
%all zeros
end