Skip to content

Conversation

@Niki-dev12
Copy link
Contributor

Adaptive Zoom-Based Gimbal Speed and Automatic Camera FOV Integration

Description

This pull request introduces adaptive gimbal speed scaling based on camera zoom level and automatic FOV synchronization within QGroundControl.

The gimbal’s pitch/yaw speed now dynamically adjusts according to the current zoom level, ensuring precise control at high zoom and faster response at wide angles.

The camera’s Horizontal (HFOV) and Vertical (VFOV) fields of view are automatically requested and updated in real time via CAMERA_FOV_STATUS (MAVLink message 271).

The values are stored in GimbalControllerSettings Facts (CameraHFov, CameraVFov) and made available to the UI and related logic.

Fallback aspect ratio derivation from CAMERA_INFORMATION ensures compatibility with cameras that do not send FOV updates.

This improves user experience during zoom operations, maintaining smooth and consistent gimbal motion and accurate FOV metadata.

Test Steps

  1. Connect a MAVLink-compatible camera or gimbal that supports CAMERA_INFORMATION and CAMERA_FOV_STATUS.
  2. Open QGroundControl and connect to the vehicle.
  3. Use a joystick or UI control to change the zoom level.

Observe:

  1. Gimbal speed adapts automatically to zoom level (slower at high zoom).
  2. HFOV and VFOV values update in real time in the settings for gimbal and click on screen (CameraHFov, CameraVFov).
  3. Verify correct FOV calculation and smooth zoom-dependent control.

Checklist:

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

DonLakeFlyer and others added 30 commits June 19, 2025 13:02
This would cause huge leaks if the stream was continuously restarting due to video timeout
This way we don't hammer the main thread with silly work
Updated the LandingComplexItem recalculation logic to properly handle
waypoint approach items, fixing several issues with heading calculations
and when loading plans, such as the loiter radius being taken into
account despite the "Use loiter to altitude" option being disabled.
Refactored the relevant areas to unify the naming and logic between
waypoint and loiter-based approaches.

This replaces previous GUI-level workarounds (ddd97ad, e0f6a0a) that
partially fixed these heading calculation problems by manipulating the
loiter radius. This commit addresses the root cause instead, so it also
fixes the issues for VTOL landing sequences, where the GUI workarounds
hadn't yet been applied.

Key changes:
- Updated the coordinate recalculation logic to handle waypoint and
  loiter approaches as distinct modes, rather than forcing the waypoint
  approach through the loiter-based architecture.
- Added _recalcFromApproachModeChange method to properly handle
  switching between loiter and waypoint approach items, instead of using
  the generic coordinate change handler.
- Renamed "loiter tangent" to "slope start".
- Updated all UI components to remove some explicit approach
  item-dependant logic which is no longer needed, and to use the new
  naming.
* This makes it fit on small screens like Herelink
* Tried supporting dynamic single/double columns based on size but too complicated
Fixes compass rotation setting off by one on rotation param set
This supports request for standard modes. It will also on a delay report new modes available which should trigger a new mode query and ui update.
This fixes a bug where extremely long legs in flight plans were drawn as
straight lines on the map, instead of following the great circle path.

Key changes:
- Break down mission legs longer than 50km into smaller segments that
  follow the great circle path.
- Update leg arrow heading calculation to account for changing bearing
  along great circle paths.
- Ensure stream info is updated for all video receivers, including thermal streams.
- Update auto-stream configuration logic for reliability when changing video sources or camera settings.
- Motivation: Fixes issue where video stream would not update properly in the UI after switching cameras or stream types.
This allows you to go past where tiles exists but mirrors how 4.4 works. It allows you to go as far as possible zoomed in.
Fixes a bug in the telemetry color picker dialog where the wrong color value was passed on acceptance.

Changed the onAccepted handler to use selectedColor instead of color to ensure the correct hex color value is used when updating telemetry colors.

Changes:
- Modified colorPickerDialog's onAccepted from:
  onAccepted: updateColorValue(colorIndex, color)
Add TapHandler to block click event leakage to underlying map
Wasn't waiting long enough for queued recalcs to flow through
The inner circle in the PhotoVideoControl widget was not always
perfectly centered due to a bug in Qt's anchors.centerIn property
(QTBUG-95224) which causes it to return integer positions instead of
subpixel values.

Implemented a workaround by setting alignWhenCentered to false.

Related Qt bug: https://bugreports.qt.io/browse/QTBUG-95224

Qt fix commit:
qt/qtdeclarative@fd23a22
@Niki-dev12 Niki-dev12 closed this Oct 29, 2025
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.

5 participants