Skip to content

camera_server: Add CAMERA_FOV_STATUS request support#2898

Draft
jnomikos wants to merge 3 commits into
mavlink:mainfrom
jnomikos:dev-camera-server-fov-status
Draft

camera_server: Add CAMERA_FOV_STATUS request support#2898
jnomikos wants to merge 3 commits into
mavlink:mainfrom
jnomikos:dev-camera-server-fov-status

Conversation

@jnomikos

@jnomikos jnomikos commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Adds CAMERA_FOV_STATUS support to MAVSDK camera_server plugin:

  1. Added send_fov_status functionality which gets called when a request for CAMERA_FOV_STATUS is received.
  2. Added set_position which allows user to set camera position so that CAMERA_FOV_STATUS can provide it.
  3. Added set_attitude_quaternion which allows user to set camera attitude quaternion so that CAMERA_FOV_STATUS can provide it.
  4. Added set_zoom_factor which allows user to set the camera zoom factor, which is used in horizontal and vertical fov calculation in send_fov_status.
  5. Added set_field_of_view as a fallback for users who cannot get zoom factor from their camera, or wish to provide their own calculated field of view. Lets user set horizontal and vertical fov directly.
  6. send_fov_status falls back to computing FOV from the camera information provided via set_information (equivalent to 1x zoom) if neither set_zoom_factor nor set_field_of_view have been called.

Design rationale:

  1. Both the camera position and attitude are intentionally left to the caller to maintain separation between the camera_server and telemetry plugins.

  2. Zoom factor and field of view are also intentionally written in such a way for users to manually set them because each camera can differ in implementation. This keeps the API flexible across different camera hardware implementations.

MAVSDK-Proto PR: mavlink/MAVSDK-Proto#414

Overall purpose:

CAMERA_FOV_STATUS support was added to QGroundControl so that the functionality which allows tapping on the video stream to move the gimbal is more robust and accounts for field of view. I have a MAVSDK camera server implementation on a payload and wish to provide CAMERA_FOV_STATUS to the ground control station. mavlink/qgroundcontrol#13612

1. Added ability to set both camera position and attitude
2. Added support for sending CAMERA_FOV_STATUS when requested
@jnomikos jnomikos force-pushed the dev-camera-server-fov-status branch from b592ae3 to 2771e76 Compare June 10, 2026 23:03
jnomikos added 2 commits June 11, 2026 10:04
1. set_zoom_factor added to set camera zoom factor for fov calculation
2. set_field_of_fiew added as a fallback for cameras which do not expose
   zoom factor.
3. send_fov_status modified to calculate fov based on zoom factor if
   provided, or use field of view provided from set_field_of_view. Falls
back to generic calculation if neither are provided.
@julianoes

Copy link
Copy Markdown
Collaborator

Let me know when it's tested and I should review and merge.

@jnomikos

jnomikos commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Let me know when it's tested and I should review and merge.

Will do

@julianoes

Copy link
Copy Markdown
Collaborator

@jnomikos what's the status here? Still working on it?

@jnomikos

Copy link
Copy Markdown
Contributor Author

@jnomikos what's the status here? Still working on it?

Haven't had a chance to test it. The client who I was working on this for shifted priorities and I haven't had free time to fully test it out. I know the request process works but did not get a chance to test the other parts.

I'm out on a client site all week, so realistically might be a week or two until I can get back to this PR. If you want to test in the meantime, feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants