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

Update uwb_navigation_node.py

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