mirror of
https://github.com/30hours/3lips.git
synced 2024-11-18 12:33:58 +00:00
Store all associations in API
This commit is contained in:
parent
b4f129c1e4
commit
90694e6758
2 changed files with 9 additions and 4 deletions
|
@ -70,7 +70,7 @@ class AdsbAssociator:
|
|||
output[key] = [value]
|
||||
else:
|
||||
output[key].append(value)
|
||||
output = {key: values for key, values in output.items() if len(values) > 1}
|
||||
#output = {key: values for key, values in output.items() if len(values) > 1}
|
||||
|
||||
return output
|
||||
|
||||
|
|
|
@ -116,6 +116,11 @@ async def event():
|
|||
for key, value in associated_dets.items()
|
||||
if isinstance(value, list) and len(value) >= 3
|
||||
}
|
||||
associated_dets_2_radars = {
|
||||
key: value
|
||||
for key, value in associated_dets.items()
|
||||
if isinstance(value, list) and len(value) >= 2
|
||||
}
|
||||
localised_dets = localisation.process(associated_dets_3_radars, radar_dict_item)
|
||||
|
||||
if associated_dets:
|
||||
|
@ -123,11 +128,11 @@ async def event():
|
|||
|
||||
# show ellipsoids of associated detections for 1 target
|
||||
ellipsoids = {}
|
||||
if associated_dets:
|
||||
if associated_dets_2_radars:
|
||||
# get first target key
|
||||
key = next(iter(associated_dets))
|
||||
key = next(iter(associated_dets_2_radars))
|
||||
ellipsoid_radars = []
|
||||
for radar in associated_dets[key]:
|
||||
for radar in associated_dets_2_radars[key]:
|
||||
ellipsoid_radars.append(radar["radar"])
|
||||
x_tx, y_tx, z_tx = Geometry.lla2ecef(
|
||||
radar_dict_item[radar["radar"]]["config"]['location']['tx']['latitude'],
|
||||
|
|
Loading…
Reference in a new issue