-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComp_Input.m
40 lines (35 loc) · 883 Bytes
/
Comp_Input.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
load TrackData.mat %Load ALL Data
L = TrackData.Length;
R = TrackData.CornerRadius;
a =(1:30000);
N = 1;
c = 0;
for j = 1:length(R)
while L(j)>=1-c
if(j>1)
a(N) = R(j)* (1-c) + R(j-1) * c;
L(j) = L(j) - 1 + c;
N = N + 1;
c = 0;
end
if(j == 1 )
a(N) = R(j);
L(j) = L(j) -1;
N = N + 1;
c = 0;
end
end
c = L(j);
end
j = 0;
for j = 1:N
if(a(j) ~= 0)
a(j) = 1/a(j);
end
end
dist = (1:N-1);
rho_v_filter1 = a(1:N-1);%this graph gives the curvature of 1m segments taking distance
%weighted averages of the segment when there are several values in the same
%segment(rare case btw)
N = length(rho_v_filter1);
s_v=1:1:N;%%the length shit used by Novotny