MAVLINKHUD

Overview

The CAM parameter group configures the Camera Trigger system for aerial mapping and photography. It allows the autopilot to automatically trigger the camera shutter at precise distance intervals (CAM_TRIGG_DIST) or via RC commands.

ArduPilot supports up to 2 simultaneous cameras (CAM1 and CAM2).

Key Concepts

1. Trigger Type (CAM_TYPE)

How does the autopilot talk to the camera?

  • 0: Disabled.
  • 1 (Servo): PWM pulse on a servo rail pin (e.g., IR trigger, Sony Multiport).
  • 2 (Relay): Hard high/low voltage toggle (e.g., CHDK).
  • 4 (Mount): Sends "Shoot" command to the connected Gimbal/Mount.
  • 5 (MAVLink): Sends CAMERA_TRIGGER MAVLink message to a smart camera.

2. Distance Triggering (CAM_TRIGG_DIST)

The core feature for mapping. The autopilot tracks the distance traveled ("Ground Distance") and triggers the camera every X meters to ensure consistent overlap.

  • CAM_AUTO_ONLY: If enabled, distance triggering only works in Auto mode (safety).

3. Feedback (CAM_FEEDBAK_PIN)

For high-precision RTK mapping (PPK), the autopilot needs to know exactly when the shutter opened, not just when the command was sent.

  • Connect the camera's "Hotshoe" flash output to a digital input pin.
  • The autopilot logs the precise GPS time of the flash in the CAM log message.

Parameter Breakdown

  • CAM_DURATION: How long to hold the button down (Relay/Servo).
  • CAM_SERVO_ON / OFF: PWM values for "Push" and "Release".
  • CAM_MIN_INTERVAL: Minimum time between shots (prevents buffer overflow).

Integration Guide

Setting up a Servo Trigger

  1. Pin: Map a servo output to CameraTrigger (Function 10).
  2. Type: Set CAM_TYPE = 1.
  3. Values: Set CAM_SERVO_ON to the PWM that fires the shutter (e.g., 1900) and OFF to neutral (e.g., 1100).
  4. Test: Use "Trigger Camera NOW" in the GCS.

Developer Notes

  • Library: libraries/AP_Camera
  • Logging: Generates TRIG (commanded) and CAM (feedback) log messages.

CAM1_DURATION

s
Default 0.1
Range 0 5

Camera shutter duration held open

Note: This parameter functions identically to CAM_DURATION.

CAM1_FEEDBAK_PIN

Default -1
Range null

Camera feedback pin

Note: This parameter functions identically to CAM_FEEDBAK_PIN.

CAM1_FEEDBAK_POL

Default 1
Range null

Camera feedback pin polarity

Note: This parameter functions identically to CAM_FEEDBAK_POL.

CAM1_HFOV

deg
Default 0
Range 0 360

Camera horizontal field of view

Note: This parameter functions identically to CAM_HFOV.

CAM1_INTRVAL_MIN

s
Default 0
Range 0 10

Camera minimum time interval between photos

Note: This parameter functions identically to CAM_INTRVAL_MIN.

CAM1_MNT_INST

Default 0
Range null

Camera Mount instance

Note: This parameter functions identically to CAM_MNT_INST.

CAM1_OPTIONS

Default 0
Range null

Camera options

Note: This parameter functions identically to CAM_OPTIONS.

CAM1_RELAY_ON

Default 1
Range null

Camera relay ON value

Note: This parameter functions identically to CAM_RELAY_ON.

CAM1_SERVO_OFF

PWM
Default 1100
Range 1000 2000

Camera servo OFF PWM value

Note: This parameter functions identically to CAM_SERVO_OFF.

CAM1_SERVO_ON

PWM
Default 1300
Range 1000 2000

Camera servo ON PWM value

Note: This parameter functions identically to CAM_SERVO_ON.

CAM1_TRIGG_DIST

m
Default 0
Range 0 1000

Camera trigger distance

Note: This parameter functions identically to CAM_TRIGG_DIST.

CAM1_TYPE

Default 0
Range null

Camera shutter (trigger) type

Note: This parameter functions identically to CAM_TYPE.

CAM1_VFOV

deg
Default 0
Range 0 180

Camera vertical field of view

Note: This parameter functions identically to CAM_VFOV.

CAM2_DURATION

s
Default 0.1
Range 0 5

Camera shutter duration held open

Note: This parameter functions identically to CAM_DURATION.

CAM2_FEEDBAK_PIN

Default -1
Range null

Camera feedback pin

Note: This parameter functions identically to CAM_FEEDBAK_PIN.

CAM2_FEEDBAK_POL

Default 1
Range null

Camera feedback pin polarity

Note: This parameter functions identically to CAM_FEEDBAK_POL.

CAM2_HFOV

deg
Default 0
Range 0 360

Camera horizontal field of view

Note: This parameter functions identically to CAM_HFOV.

CAM2_INTRVAL_MIN

s
Default 0
Range 0 10

Camera minimum time interval between photos

Note: This parameter functions identically to CAM_INTRVAL_MIN.

CAM2_MNT_INST

Default 0
Range null

Camera Mount instance

Note: This parameter functions identically to CAM_MNT_INST.

CAM2_OPTIONS

Default 0
Range null

Camera options

Note: This parameter functions identically to CAM_OPTIONS.

CAM2_RELAY_ON

Default 1
Range null

Camera relay ON value

Note: This parameter functions identically to CAM_RELAY_ON.

CAM2_SERVO_OFF

PWM
Default 1100
Range 1000 2000

Camera servo OFF PWM value

Note: This parameter functions identically to CAM_SERVO_OFF.

CAM2_SERVO_ON

PWM
Default 1300
Range 1000 2000

Camera servo ON PWM value

Note: This parameter functions identically to CAM_SERVO_ON.

CAM2_TRIGG_DIST

m
Default 0
Range 0 1000

Camera trigger distance

Note: This parameter functions identically to CAM_TRIGG_DIST.

CAM2_TYPE

Default 0
Range null

Camera shutter (trigger) type

Note: This parameter functions identically to CAM_TYPE.

CAM2_VFOV

deg
Default 0
Range 0 180

Camera vertical field of view

Note: This parameter functions identically to CAM_VFOV.

CAM_AUTO_ONLY

Default 0
Range 0 1

Distance-triggering in AUTO mode only (CAM_AUTO_ONLY)

Description

Restricts the CAM_TRIGG_DIST functionality to autonomous modes.

CAM_DURATION

s
Default 0.1
Range 0 5

Camera shutter duration (CAM_DURATION)

Description

Duration of the trigger pulse sent to the camera. For most digital cameras, a short pulse (0.1s to 0.5s) is sufficient to trigger a capture.

CAM_FEEDBAK_PIN

Default -1

Camera feedback pin (CAM_FEEDBAK_PIN)

Description

Specifies the hardware pin connected to the camera's hot shoe or flash feedback port. This allows ArduPilot to log the exact moment the shutter opened, rather than just the moment the command was sent.

CAM_FEEDBAK_POL

Default 1
Range 0 1

Camera feedback pin polarity (CAM_FEEDBAK_POL)

Description

Defines whether the feedback signal from the camera is active-high or active-low.

CAM_HFOV

deg
Default 0
Range 0 360

Camera horizontal field of view (CAM_HFOV)

Description

Used for geo-tagging and FOV visualization in the GCS.

CAM_INTRVAL_MIN

s
Default 0
Range 0 10

Camera minimum time interval (CAM_INTRVAL_MIN)

Description

A rate-limiting safety feature. Photos will not be triggered faster than this interval, even if other trigger conditions (like CAM_TRIGG_DIST) are met. This allows the camera hardware time to save images.

CAM_MAX_ROLL

deg
Default 0
Range 0 180

Maximum photo roll angle (CAM_MAX_ROLL)

Description

A quality-control feature that prevents photos from being taken during high-bank maneuvers, ensuring images are relatively level with the ground.

  • 0 disables the check.

CAM_MNT_INST

Default 0
Range 0 1

Camera Mount instance (CAM_MNT_INST)

Description

Links the camera instance to a specific gimbal (mount) instance for coordinated control.

CAM_OPTIONS

Default 0

Camera options (CAM_OPTIONS)

Description

Configuration bitmask for various camera behaviors.

Tuning & Behavior

  • Default Value: 0
  • Bitmask:
    • Bit 0: Recording Starts at arming and stops at disarming

CAM_POS

m
Default 0.0
Range -5 5

Camera Position Offset (CAM_POS)

Description

This parameter is not found as CAM_POS in the main camera library. It appears to be a miscategorized Precision Landing parameter.

CAM_RC_BTN_DELAY

ms
Default 300
Range 100 1000

RunCam Press Hold Time (CAM_RC_BTN_DELAY)

Description

CAM_RC_BTN_DELAY defines the duration of each "Click" sent to the camera.

When the autopilot simulates a button press (e.g. to start a recording), it must "hold" that signal for a minimum amount of time for the camera's internal processor to register it. If this value is too low, the camera may ignore commands.

Tuning & Behavior

  • Default: 300 ms.
  • Significance: Most RunCam models work best with a 300ms pulse. If your camera is intermittently ignoring start/stop commands, try increasing this to 500ms.

CAM_RC_BT_DELAY

ms
Default 300
Range 0 1000

RunCam Button Delay (CAM_RC_BT_DELAY)

Description

CAM_RC_BT_DELAY determines the navigation speed of the RunCam OSD menu.

When you use your transmitter sticks to move through the camera's settings menu, the autopilot sends "Virtual Button" pulses. This delay ensures that the pulses aren't so fast that the camera skips menu items or becomes unresponsive.

Tuning & Behavior

  • Default: 300 ms.
  • Recommendation: Leave at 300. If the menu feels sluggish, you can try reducing to 200.

CAM_RC_CONTROL

Default 1
Range 0 15

RunCam Control Options (CAM_RC_CONTROL)

Description

CAM_RC_CONTROL defines the "Magic Gestures" used to control your RunCam actions from the transmitter.

It is a bitmask to enable specific control methods:

  • Bit 0 (1): Roll Right. Enter the camera menu by holding the Roll stick to the right while disarmed.
  • Bit 1 (2): Pitch Down.
  • Bit 2 (4): Auto-Record. Starts recording automatically as soon as the drone is armed.

Tuning & Behavior

  • Default: 1 (Roll Right).
  • Recommendation: Enable Bit 2 (4) if you want to ensure you always capture your flight footage without having to remember to press a button.

CAM_RC_FEATURES

Default 0
Range 0 15

RunCam Feature Bitmask (CAM_RC_FEATURES)

Description

CAM_RC_FEATURES allows you to customize what ArduPilot can do with your RunCam.

  • Bit 0 (1): Enable Start/Stop Recording.
  • Bit 1 (2): Enable OSD Menu control.
  • Bit 2 (4): Enable Camera Power Control (if supported by hardware).

CAM_RC_MDE_DELAY

ms
Default 500
Range 0 2000

RunCam Mode Transition Delay (CAM_RC_MDE_DELAY)

Description

CAM_RC_MDE_DELAY handles the timing of mode switches (e.g., from taking a photo to starting a video).

Action cameras often take a moment to initialize the storage buffer or change sensor resolutions. This parameter ensures the autopilot waits for the camera to be ready before sending the next command.

CAM_RC_TYPE

Default 0
Range 0 5

RunCam Device Type (CAM_RC_TYPE)

Description

CAM_RC_TYPE enables serial control for RunCam action cameras (like the Split, Hybrid, or Thumb).

By connecting the camera's UART pins to the flight controller and setting this parameter, you can start/stop recording and navigate the camera's internal OSD menu using your transmitter sticks.

  • 0: Disabled.
  • 1: RunCam Split.
  • 2: RunCam Hybrid.
  • 5: RunCam Thumb.

Tuning & Behavior

  • Default: 0.
  • Requirement: Requires a serial port to be configured for RunCam protocol (SERIALx_PROTOCOL = 26).
  • Benefit: Allows for hands-free recording control, ensuring you never forget to "hit record" before takeoff.

CAM_RELAY_ON

Default 1
Range 0 1

Camera relay ON value (CAM_RELAY_ON)

Description

Configures the logic level for relay-based camera triggering.

CAM_SERVO_OFF

PWM
Default 1100
Range 1000 2000

Camera servo OFF PWM value (CAM_SERVO_OFF)

Description

The default (idle) PWM value for the camera trigger servo.

CAM_SERVO_ON

PWM
Default 1300
Range 1000 2000

Camera servo ON PWM value (CAM_SERVO_ON)

Description

The PWM value sent to the camera trigger servo when a photo is requested.

CAM_TRIGG_DIST

m
Default 0
Range 0 1000

Camera trigger distance (CAM_TRIGG_DIST)

Description

Automates aerial photography by triggering the camera every time the aircraft travels a specified distance.

Tuning & Behavior

  • Default Value: 0 (Disabled)
  • Useful for mapping missions to ensure consistent overlap between photos.

CAM_TYPE

Default 0

Camera shutter (trigger) type (CAM_TYPE)

Description

Defines the communication method used to trigger the camera.

Tuning & Behavior

  • Default Value: 0 (None)
  • Values: 0:None, 1:Servo, 2:Relay, 3:GoPro (Solo), 4:Mount (Siyi/Topotek/Viewpro/Xacti), 5:MAVLink, 6:MAVLinkCamV2, 7:Scripting

CAM_VFOV

deg
Default 0
Range 0 180

Camera vertical field of view (CAM_VFOV)

Description

Used for geo-tagging and FOV visualization in the GCS.