From 44982a9b3c027af73776016110f1a75cead76411 Mon Sep 17 00:00:00 2001 From: duffyduck Date: Sat, 11 Jul 2026 22:12:38 +0200 Subject: [PATCH] =?UTF-8?q?feat(bridge):=20exakte=20Peilung=20(Grad)=20zus?= =?UTF-8?q?=C3=A4tzlich=20zur=20Himmelsrichtung=20im=20Pr=C3=A4fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Neben "nordwestwaerts" jetzt auch die genaue Bearing-Gradzahl (0-359) — "unterwegs nordwestwaerts (304 Grad)". Die KI nutzt, was die Frage braucht (Pannenhilfe → Ort/km, Luftfahrt/Navigation → exakte Peilung). Co-Authored-By: Claude Opus 4.8 --- bridge/aria_bridge.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bridge/aria_bridge.py b/bridge/aria_bridge.py index cadb08d..1879533 100644 --- a/bridge/aria_bridge.py +++ b/bridge/aria_bridge.py @@ -1220,8 +1220,9 @@ class ARIABridge: if anchor: moved = _haversine_m(anchor["lat"], anchor["lon"], lat, lon) if moved >= MIN_MOVE_M: - self._last_heading = _heading_word( - _bearing_deg(anchor["lat"], anchor["lon"], lat, lon)) + _bg = _bearing_deg(anchor["lat"], anchor["lon"], lat, lon) + self._last_heading = _heading_word(_bg) + self._last_bearing = int(round(_bg)) % 360 # exakte Peilung self._heading_anchor = {"lat": lat, "lon": lon} else: self._heading_anchor = {"lat": lat, "lon": lon} @@ -1748,7 +1749,13 @@ class ARIABridge: place = getattr(self, "_last_place_name", "") where = f"{place} " if place else "" heading = getattr(self, "_last_heading", "") - moving = f", unterwegs {heading}" if heading else "" + bearing = getattr(self, "_last_bearing", None) + if heading and bearing is not None: + moving = f", unterwegs {heading} ({bearing} Grad)" + elif heading: + moving = f", unterwegs {heading}" + else: + moving = "" parts.append( f"[Stefans aktueller Standort: {where}(GPS {float(lat):.5f}, " f"{float(lon):.5f}){moving}. Nutze das nur wenn die Frage sich "