Skip to content

Improve ROI LOS rates and align camera telemetry timing - #30

Closed
tridge wants to merge 2 commits into
ArduPilot:masterfrom
tridge:pr-improve-los-rates
Closed

tridge wants to merge 2 commits into
ArduPilot:masterfrom
tridge:pr-improve-los-rates

Conversation

@tridge

@tridge tridge commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Vehicle and gimbal telemetry can describe different instants, producing yaw-rate ripple during ROI tracking. Finite differences of rounded positions and gimbal angles also introduce noise into control feed-forward and SITL video prediction.

Map vehicle boot timestamps into camera monotonic time using the AP_RTC minimum-delay estimator, and interpolate vehicle yaw/rate at the gimbal feedback timestamp. Derive stationary ROI line-of-sight rates analytically from GLOBAL_POSITION_INT position and NED velocity, and carry measured gimbal yaw rate through video metadata for prediction. Predictions stop after 250 ms of stale data; ATTITUDE fallback becomes eligible at that limit. Legacy metadata without measured rates remains supported.

Includes regression coverage for timestamp wrapping, restarts, reordered/buffered samples, fallback, singular geometry and quantised gimbal feedback, plus camera and SITL documentation updates.

Validation:

  • MT11 SITL build and targeted telemetry-time, targeting, MAVLink-time and video-metadata tests passed.
  • Normal and jittered ROI angle tracking, jittered ROI rate tracking, MAVLink parameters and MT11 angle-hold integration checks passed.
  • Terrain video geometry, prediction, loading and encoding tests passed. The synthetic quantisation test reduced frame-to-frame yaw prediction jitter about fourfold with measured rates.
  • The broader video telemetry integration test has a zoom/FOV assertion failure reproduced on the baseline. Hardware validation and confirmation of the final change in the live flight remain outstanding.

The clock estimator cannot remove fixed one-way latency; MT11 feedback is still timestamped on receipt. Real motor-response ripple can remain.

Map vehicle boot clocks into local time and match vehicle yaw to gimbal feedback so transport jitter does not mix samples of different ages. Derive stationary ROI line-of-sight rates directly from position and velocity, avoiding quantisation from finite differences of rounded coordinates, and stop prediction when telemetry is stale.
Preserve yaw history when corrected sample times coincide, allow ATTITUDE fallback at prediction expiry, and retain vertical-pitch metadata without using an undefined yaw rate for control. Carry measured gimbal yaw rate into video metadata so prediction avoids differentiating quantised angles, with regression tests and documentation for both changes.
@tridge

tridge commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

replaced by #31

@tridge tridge closed this Sep 23, 2026
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.

1 participant