You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Your repo is very helpful for me!
But I find one unnecessary action in your code. Your func calcVectorAngle is unnecessary
Your code in line_boundary_check.py:
def calcVectorAngle( point1, point2, point3, point4 ):
u = np.array(line_vectorize(point1, point2))
v = np.array(line_vectorize(point3, point4))
i = np.inner(u, v)
n = LA.norm(u) * LA.norm(v)
c = i / n
a = np.rad2deg(np.arccos(np.clip(c, -1.0, 1.0)))
if u[0]*v[1]-u[1]*v[0]<0:
return a
else:
return 360-a
Your code in test-line-cross-area-intrusion.py:
if intersect == True:
angle = calcVectorAngle(traj_p0, traj_p1, bLine_p0, bLine_p1) # Calculate angle between trajectory and boundary line
if angle<180:
boundary_line.count1 += 1
else:
boundary_line.count2 += 1
Hello! Your repo is very helpful for me!
But I find one unnecessary action in your code. Your func calcVectorAngle is unnecessary
Your code in line_boundary_check.py:
Your code in test-line-cross-area-intrusion.py:
What I suggest:
The text was updated successfully, but these errors were encountered: