Skip to content

Commit

Permalink
Use gimbal rotation in camera parameters #29
Browse files Browse the repository at this point in the history
  • Loading branch information
RexBerry committed Nov 20, 2024
1 parent 79473e7 commit eec713d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flight/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ async def _get_camera_parameters(self, drone: dronekit.Vehicle) -> CameraParamet
location: dronekit.LocationGlobalRelative = drone.location.global_relative_frame

attitude: dronekit.Attitude = drone.attitude
roll_deg: float = math.degrees(attitude.roll)
pitch_deg: float = math.degrees(attitude.pitch)
yaw_deg: float = math.degrees(attitude.yaw)
roll_deg: float = math.degrees(attitude.roll) - drone.gimbal.roll
pitch_deg: float = math.degrees(attitude.pitch) - drone.gimbal.pitch
yaw_deg: float = math.degrees(attitude.yaw) - drone.gimbal.yaw

return {
"focal_length": 24,
Expand Down

0 comments on commit eec713d

Please sign in to comment.