Skip to content
Snippets Groups Projects
Commit 9b13275c authored by jlKronos01's avatar jlKronos01
Browse files

Update uwb_navigation_node.py

parent 222997b9
No related branches found
No related tags found
No related merge requests found
......@@ -308,10 +308,10 @@ class UWBNode(Node):
bounds = ([x_min, y_min, z_min], [x_max, y_max, z_max])
def error_function(vars):
x, y = vars
x, y, z = vars
residuals = []
for (bx, by), d_measured in zip(available_beacons, available_distances):
d_computed = np.sqrt((x - bx)**2 + (y - by)**2)
for (bx, by, bz), d_measured in zip(available_beacons, available_distances):
d_computed = np.sqrt((x - bx)**2 + (y - by)**2 + (z - bz)**2)
residuals.append(d_computed - d_measured)
return residuals
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment