Skip to content

Commit 1c943d8

Browse files
committed
[panorama] fixes to measurement
1 parent bc2e12b commit 1c943d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/instrumentman/panorama/measure.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def run_panorama(
5151

5252
fov_hz, fov_v = resp_fov.params
5353

54-
delta_hz = to_hz - from_hz
55-
delta_v = to_v - from_v
54+
delta_hz = to_hz.relative_to(from_hz)
55+
delta_v = to_v.relative_to(from_v)
5656

5757
cols = math.ceil(abs(float(delta_hz)) / float(fov_hz)) + 1
5858
rows = math.ceil(abs(float(delta_v)) / float(fov_v)) + 1
@@ -75,8 +75,8 @@ def run_panorama(
7575
for i in range(rows):
7676
for j in range(cols):
7777
tps.aut.turn_to(
78-
(from_hz + delta_hz * j / cols).normalized(),
79-
(from_v + delta_v * i / rows).normalized()
78+
(from_hz + delta_hz * j / (cols - 1)).normalized(),
79+
(from_v + delta_v * i / (rows - 1)).normalized()
8080
)
8181
tps.cam.set_actual_image_name(
8282
"panorama",
@@ -91,7 +91,7 @@ def run_panorama(
9191

9292
pos = resp_cam_pos.params
9393

94-
resp_cam_dir = tps.cam.get_camera_direction(100)
94+
resp_cam_dir = tps.cam.get_camera_direction(1)
9595
if resp_cam_dir.params is None:
9696
echo_red("Could not retrieve camera direction")
9797
logger.critical("Could not retrieve camera direction")

0 commit comments

Comments
 (0)