Skip to content

Commit

Permalink
Only send avoid-requests for own controlled traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis-Wijngaarden committed Apr 24, 2024
1 parent 6257937 commit b6bf1d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bluesky/plugins/asas/ssd_drone.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from bluesky.tools import geo
from bluesky.tools.aero import nm
from bluesky import core
import bluesky.plugins.c2c.c2c_traffic_receiver as traf_receiver
import numpy as np
# Try to import pyclipper
try:
Expand Down Expand Up @@ -658,7 +659,13 @@ def calculate_resolution(self, conf, ownship):
current_time = time.time()
delta_cr_time = current_time - conflictresolutiontime.cr_time[i]

if (delta_cr_time > 4.0):
# Check if other traffic
other_traffic = False
if (traf_receiver.c2c_traffic_receiver is not None):
if (str(ownship.id[i]).lower() in traf_receiver.c2c_traffic_receiver.traffic_objects.keys()):
other_traffic = True

if (delta_cr_time > 4.0 and not other_traffic):
conflictresolutiontime.cr_time[i] = current_time
# send resolution over mqtt
body = {}
Expand Down

0 comments on commit b6bf1d5

Please sign in to comment.