Refactor radar system

This commit is contained in:
Ayzen
2026-10-05 16:46:28 +03:00
parent 515049d2ed
commit 8f097dfa2e
179 changed files with 8212 additions and 6676 deletions
+4 -6
View File
@@ -119,7 +119,7 @@ def decode_result_collection(payload: bytes) -> ResultCollection:
image_y_axis = np.frombuffer(cursor.read_bytes(y_count * 4), dtype="<f4").astype(np.float32, copy=False)
value_count = x_count * y_count
image_values = np.frombuffer(cursor.read_bytes(value_count * 4), dtype="<f4").astype(np.float32, copy=False)
image = image_values.reshape((y_count, x_count)) if value_count > 0 else np.zeros((0, 0), dtype=np.float32)
image = image_values.reshape((y_count, x_count))
return ResultPayload(
processing_name=name,
kind=kind,
@@ -130,13 +130,11 @@ def decode_result_collection(payload: bytes) -> ResultCollection:
if kind == 4:
table_columns = cursor.read_u32()
table_rows = cursor.read_u32()
if table_rows and not table_columns:
raise ValueError("Result table with rows must have at least one column")
value_count = table_columns * table_rows
table_values = np.frombuffer(cursor.read_bytes(value_count * 4), dtype="<f4").astype(np.float32, copy=False)
table = (
table_values.reshape((table_rows, table_columns))
if value_count > 0 and table_columns > 0
else np.zeros((0, 0), dtype=np.float32)
)
table = table_values.reshape((table_rows, table_columns))
return ResultPayload(
processing_name=name,
kind=kind,