Commit 5eccee51 by Oleksandr Barabash

syntax fix

parent c9227ee8
......@@ -1057,28 +1057,28 @@ def run_receiver(receivers):
for x in range(receivers_len):
y_receiver_id = x + 1
for y in range(y_receiver_id, receivers_len):
if (receivers[x].confidence >= ms.min_conf and
receivers[y].confidence >= ms.min_conf and
receivers[x].power >= ms.min_power and
receivers[y].power >= ms.min_power and
abs(receivers[x].doa_time - receivers[y].doa_time) <= max_age and
receivers[x].frequency == receivers[y].frequency):
intersection = plot_intersects(receivers[x].latitude, receivers[x].longitude,
receivers[x].doa, receivers[y].latitude, receivers[y].longitude, receivers[y].doa)
if intersection:
print(intersection)
receivers[x].d_2_last_intersection.append(v.haversine(
receivers[x].latitude, receivers[x].longitude, *intersection))
receivers[y].d_2_last_intersection.append(v.haversine(
receivers[y].latitude, receivers[y].longitude, *intersection))
intersection = list(intersection)
avg_conf = np.mean(
[receivers[x].confidence, receivers[y].confidence])
intersection.append(avg_conf)
intersection = np.array([intersection])
if intersection.any() is not None:
intersect_list = np.concatenate(
(intersect_list, intersection), axis=0)
if (receivers[x].confidence >= ms.min_conf and
receivers[y].confidence >= ms.min_conf and
receivers[x].power >= ms.min_power and
receivers[y].power >= ms.min_power and
abs(receivers[x].doa_time - receivers[y].doa_time) <= max_age and
receivers[x].frequency == receivers[y].frequency):
intersection = plot_intersects(receivers[x].latitude, receivers[x].longitude,
receivers[x].doa, receivers[y].latitude, receivers[y].longitude, receivers[y].doa)
if intersection:
print(intersection)
receivers[x].d_2_last_intersection.append(v.haversine(
receivers[x].latitude, receivers[x].longitude, *intersection))
receivers[y].d_2_last_intersection.append(v.haversine(
receivers[y].latitude, receivers[y].longitude, *intersection))
intersection = list(intersection)
avg_conf = np.mean(
[receivers[x].confidence, receivers[y].confidence])
intersection.append(avg_conf)
intersection = np.array([intersection])
if intersection.any() is not None:
intersect_list = np.concatenate(
(intersect_list, intersection), axis=0)
# 11.01.2023::s1z: I don't know if this shit-code is blocking
# or not. But if it is, you better fucking sleep
# 10ms after each cycle to prevent 100% load
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment