added gpr speed tracking

This commit is contained in:
Ayzen
2026-04-01 22:05:04 +03:00
parent 669205d8f8
commit 4b78c2808d
20 changed files with 1165 additions and 47 deletions
@@ -30,6 +30,8 @@ class ProcessingLiveConfig:
gpr_comp_power: float = 0.2
gpr_start_freq_mhz: float = 3000.0
gpr_stop_freq_mhz: float = 6000.0
gpr_speed_m_s: float = 0.0
gpr_look_angle_deg: float = 0.0
gpr_background_subtract_enabled: bool = True
gpr_background_mean_count: int = 10
history_command_seq: int = 0
@@ -68,6 +70,8 @@ class ProcessingLiveConfig:
"gpr_comp_power": float(self.gpr_comp_power),
"gpr_start_freq_mhz": float(self.gpr_start_freq_mhz),
"gpr_stop_freq_mhz": float(self.gpr_stop_freq_mhz),
"gpr_speed_m_s": float(self.gpr_speed_m_s),
"gpr_look_angle_deg": float(self.gpr_look_angle_deg),
"gpr_background_subtract_enabled": bool(self.gpr_background_subtract_enabled),
"gpr_background_mean_count": int(self.gpr_background_mean_count),
"history_command_seq": int(self.history_command_seq),
@@ -48,3 +48,7 @@ class ByteCursor:
data = self.payload[self.offset : self.offset + size]
self.offset += size
return data
def remaining_bytes(self) -> int:
"""Return unread byte count."""
return len(self.payload) - self.offset
+15 -1
View File
@@ -54,7 +54,21 @@ def decode_trace_collection(payload: bytes, expected_magic: int) -> SweepCollect
)
)
return SweepCollection(collection_id=collection_id, monotonic_ns=monotonic_ns, traces=traces)
capture_start_ns = 0
capture_end_ns = 0
if cursor.remaining_bytes() == 16:
capture_start_ns = cursor.read_u64()
capture_end_ns = cursor.read_u64()
elif cursor.remaining_bytes() != 0:
raise ValueError("Unexpected trailing bytes in trace collection")
return SweepCollection(
collection_id=collection_id,
monotonic_ns=monotonic_ns,
traces=traces,
capture_start_ns=capture_start_ns,
capture_end_ns=capture_end_ns,
)
def decode_result_collection(payload: bytes) -> ResultCollection: