From 183a7ec4c9a8215a93b94b03288e1aaf52f7e264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sat, 28 Dec 2024 21:16:11 +0100 Subject: [PATCH] divide by 100 --- src/c3nav/routing/locator.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/c3nav/routing/locator.py b/src/c3nav/routing/locator.py index cdaf310b..f774b06b 100644 --- a/src/c3nav/routing/locator.py +++ b/src/c3nav/routing/locator.py @@ -261,12 +261,12 @@ class Locator: x = 0 y = 0 for peer_id, value in scan_data_in_the_same_room[:3]: - x = self.peers[peer_id].xyz[0] * value.rssi / the_sum - y = self.peers[peer_id].xyz[1] * value.rssi / the_sum + x = float(self.peers[peer_id].xyz[0]) * value.rssi / the_sum + y = float(self.peers[peer_id].xyz[1]) * value.rssi / the_sum return CustomLocation( level=router.levels[router.spaces[space.pk].level_id], - x=x, - y=y, + x=x/100, + y=y/100, permissions=permissions, icon='my_location' )