divide by 100

This commit is contained in:
Laura Klünder 2024-12-28 21:16:11 +01:00
parent 17166eaa89
commit 183a7ec4c9

View file

@ -261,12 +261,12 @@ class Locator:
x = 0 x = 0
y = 0 y = 0
for peer_id, value in scan_data_in_the_same_room[:3]: for peer_id, value in scan_data_in_the_same_room[:3]:
x = self.peers[peer_id].xyz[0] * value.rssi / the_sum x = float(self.peers[peer_id].xyz[0]) * value.rssi / the_sum
y = self.peers[peer_id].xyz[1] * value.rssi / the_sum y = float(self.peers[peer_id].xyz[1]) * value.rssi / the_sum
return CustomLocation( return CustomLocation(
level=router.levels[router.spaces[space.pk].level_id], level=router.levels[router.spaces[space.pk].level_id],
x=x, x=x/100,
y=y, y=y/100,
permissions=permissions, permissions=permissions,
icon='my_location' icon='my_location'
) )