mirror of
https://github.com/30hours/3lips.git
synced 2024-11-08 12:25:42 +00:00
Add timestamp_event
This commit is contained in:
parent
82a019a6ad
commit
ddd73a0d23
2 changed files with 9 additions and 3 deletions
|
@ -81,7 +81,7 @@ class EllipsoidParametric:
|
|||
# find close points - ellipsoid 1 = master
|
||||
radar_keys = list(target_samples[target].keys())
|
||||
samples_intersect = []
|
||||
threshold = 200
|
||||
threshold = 500
|
||||
|
||||
# loop points in master ellipsoid
|
||||
for point1 in target_samples[target][radar_keys[0]]:
|
||||
|
|
|
@ -103,7 +103,12 @@ async def event():
|
|||
|
||||
# processing
|
||||
associated_dets = associator.process(item["server"], radar_dict_item)
|
||||
localised_dets = coordreg.process(associated_dets, radar_dict_item)
|
||||
associated_dets_3_radars = {
|
||||
key: value
|
||||
for key, value in associated_dets.items()
|
||||
if isinstance(value, list) and len(value) >= 3
|
||||
}
|
||||
localised_dets = coordreg.process(associated_dets_3_radars, radar_dict_item)
|
||||
|
||||
if associated_dets:
|
||||
print(associated_dets, flush=True)
|
||||
|
@ -131,13 +136,14 @@ async def event():
|
|||
[x_rx, y_rx, z_rx],
|
||||
radar["radar"]
|
||||
)
|
||||
points = ellipsoidParametric.sample(ellipsoid, radar["delay"]*1000, 30)
|
||||
points = ellipsoidParametric.sample(ellipsoid, radar["delay"]*1000, 50)
|
||||
for i in range(len(points)):
|
||||
lat, lon, alt = Geometry.ecef2lla(points[i][0], points[i][1], points[i][2])
|
||||
points[i] = ([round(lat, 3), round(lon, 3), round(alt)])
|
||||
ellipsoids[radar["radar"]] = points
|
||||
|
||||
# output data to API
|
||||
item["timestamp_event"] = timestamp
|
||||
item["detections_associated"] = associated_dets
|
||||
item["detections_localised"] = localised_dets
|
||||
item["ellipsoids"] = ellipsoids
|
||||
|
|
Loading…
Reference in a new issue