Skip to main content
. 2022 Nov 27;22(23):9230. doi: 10.3390/s22239230
Algorithm 1 Collision Avoidance Algorithm
Input:ψway(t),ψini(t),ψj,k(t),ψj,centre(t),ϕ(t),ϕini(t),Rini(t),Rj(t).
Output:ϕ˙(t).
  1: for each moving intruder UAV i do      12:         [ψj,R,ψj,L]← Equation (8);
  2:     if Rini(t)<RRC,i then           13:     end if
  3:         ρ(t)←Equation (4);           14: end for
  4:         P(t)←Equation (3);          15: I←Equation (10);
  5:         Rp(t)←Equation (6);          16: if ψway(t)I then
  6:         [ψini,R(t),ψini,L(t)]Equation (5);        17:     ψd(t)←Equation (12);
  7:     end if                      18:     ϕ˙(t)←Equation (14);
  8: end for                    19: else
  9: for each fixed obstacle j do         20:     ϕ˙(t)K(ψway(t)ϕ(t))
10:     if Rj(t)<RRC,j then                 21: end if
11:         [kR,kL]←Equation (7);         22: return ϕ˙(t)