Keep clearance refresh bounded and preserve rear recovery observation

This commit is contained in:
DCCONSTRUCTIONS
2026-10-09 13:29:20 +03:00
parent ade3c19d2a
commit 35c1b88cd7
4 changed files with 75 additions and 6 deletions
@@ -142,6 +142,11 @@ class ObservedRecovery:
yaw = None
if self.phase == "surveying":
yaw = next((v for v in self.sectors if v not in self.views), None)
elif self.phase == "executing" and self.selected and self.selected["reverse"]:
# BackUp moves along the rear body axis. Near its destination a
# centimetre of lateral error can flip the goal bearing sideways;
# that is not a change of travel direction or a new view request.
yaw = 180
elif self.phase == "executing" and self.selected:
dx, dy = (self.selected["goal"][i] - pose[i] for i in range(2))
bearing = math.degrees(angle(math.atan2(dy, dx) - heading(pose)))