forked from LazyFalcon/D_star_PathPlanning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFDSResolve.m
More file actions
38 lines (30 loc) · 863 Bytes
/
FDSResolve.m
File metadata and controls
38 lines (30 loc) · 863 Bytes
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
function funOut = FDSResolve(state)
funOut = resolve();
function out = b(x)
out = x + [state.graph(x(1), x(2), 6); state.graph(x(1), x(2), 7);0;0];
end
function out = g(s) % 1 pozycja
out = state.graph(s(1), s(2),1);
end % 3 pozycja
function out = resolve()
s =state. startPos;
out = [s];
state.graph(s(1), s(2),1) = inf;
uval = g(s);
minval = inf;
while ~isequal(s(1:2), state.endPos(1:2))
% minval = inf;
% it = [];
% for n = state.ucc
% u = s+n;
% uval = g(u);
% if uval < minval && ~isinf(uval) && uval > -1
% minval = uval;
% it = n;
% end
% end
s = b(s)
out = [out, s];
end
end
end