From 3eb1ebbe7785c929b3adc10fb61dca9fe4ea6294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Fri, 27 Dec 2024 14:43:21 +0100 Subject: [PATCH] fix locator least square matching --- src/c3nav/routing/locator.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/c3nav/routing/locator.py b/src/c3nav/routing/locator.py index 4b5c5729..eaff4ca6 100644 --- a/src/c3nav/routing/locator.py +++ b/src/c3nav/routing/locator.py @@ -242,8 +242,6 @@ class Locator: return norm def locate_range(self, scan_data: ScanData, permissions=None, orig_addr=None): - pprint(scan_data) - peer_ids = tuple(i for i in scan_data if i < len(self.xyz)) if len(peer_ids) < 3: @@ -296,8 +294,8 @@ class Locator: # jac="3-point", loss="linear", bounds=( - np.min(self.beacon_positions[:, :dimensions], axis=0) - np.array([200, 200, 100])[:dimensions], - np.max(self.beacon_positions[:, :dimensions], axis=0) + np.array([200, 200, 100])[:dimensions], + np.min(self.xyz[:, :dimensions], axis=0) - np.array([200, 200, 100])[:dimensions], + np.max(self.xyz[:, :dimensions], axis=0) + np.array([200, 200, 100])[:dimensions], ), x0=initial_guess, )