Skip to content

Commit

Permalink
Update camera.py
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Jun 3, 2024
1 parent a46403d commit eac9cf3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions axis-ptz-controller/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,7 @@ def move_to_azimuth_elevation(
logging.info(
f"Current Camera pan and tilt: {self.rho}, {self.tau} [deg]"
)
logging.info(
f"Absolute move to pan: {self.rho}, and tilt: {self.tau}, with zoom: {self.zoom}"
)

# Compute position of aircraft relative to tripod in ENz, then XYZ,
# then uvw coordinates
r_ENz_a_t = np.array(
Expand All @@ -347,6 +345,9 @@ def move_to_azimuth_elevation(
math.atan2(r_uvw_a_t[2], axis_ptz_utilities.norm(r_uvw_a_t[0:2]))
) # [deg]

logging.info(
f"Absolute Move - Target pan: {azimuth} tilt: {elevation} Corrected pan: {camera_pan}, and tilt: {camera_tilt}, with zoom: {self.zoom}"
)
if elevation > 0 and azimuth > 0:
self.slew_camera(camera_pan, camera_tilt)

Expand Down

0 comments on commit eac9cf3

Please sign in to comment.