MAVLINKHUD

Overview

The ONOFF parameter group configures the behavior of On/Off (Bang-Bang) control for the Antenna Tracker.

While many trackers use high-precision servos (proportional control), some use simple DC motors or relays that can only be turned Fully On or Fully Off. This system estimates how long to run the motor to achieve the desired angle.

Key Concepts

1. Slew Rates (ONOFF_..._RATE)

Defines the speed (deg/s) of the tracker mechanism. Since there is no feedback from the motor itself, the autopilot assumes the tracker moves at exactly this rate.

2. Minimum Time (ONOFF_..._MINT)

Defines the shortest possible "pulse" or motor activation. This prevents the relays from clicking rapidly (chattering) when only a tiny correction is needed.

Parameter Breakdown

  • ONOFF_YAW_RATE: Speed of the yaw rotation.
  • ONOFF_PITCH_RATE: Speed of the pitch rotation.
  • ONOFF_YAW_MINT: Minimum activation time for yaw.

Developer Notes

  • Library: AntennaTracker/Parameters.cpp.
  • Context: Only relevant if SERVO_YAW_TYPE or SERVO_PITCH_TYPE is set to 1 (On/Off).

ONOFF_PITCH_MINT

s
Default 0.1f
Range 0 2

Pitch minimum movement time (ONOFF_PITCH_MINT)

Description

This parameter sets the minimum duration (pulse width) for activating the pitch motor in an On/Off tracker system. It prevents rapid switching or "chattering" that could damage relays or motors when small corrections are requested. If the calculated movement time is less than this value, the motor will not move at all (deadband effect) or will move for at least this long.

The Mathematics

$$ \text{Pulse Width} = \max(\text{Calculated Time}, \text{ONOFF\_PITCH\_MINT}) $$
(If correction < deadband, output is 0).

The Engineer's View

Defined in AntennaTracker/Parameters.cpp. Acts as a hysteresis or minimum actuation constraint.

Tuning & Behavior

  • Default Value: 0.1 s
  • Increase: If relays click too rapidly or motors heat up.

ONOFF_PITCH_RATE

deg/s
Default 1.0f
Range 0 50

Pitch rate for on/off servos (ONOFF_PITCH_RATE)

Description

This parameter is used by the Antenna Tracker when controlling On/Off (Bang-Bang) type mechanisms, such as simple relay-driven DC motors without position feedback loops. It defines the estimated angular velocity of the pitch axis. The controller uses this to calculate how long to run the motor to achieve a desired angle change.

The Mathematics

$$ \Delta t = \frac{|\Delta \text{Angle}|}{\text{ONOFF\_PITCH\_RATE}} $$

The Engineer's View

Defined in AntennaTracker/Parameters.cpp.

  • Constraint: Requires the SERVO_PITCH_TYPE to be set to On/Off.
  • Accuracy: Since this is an open-loop estimation, variations in battery voltage or wind load can affect the actual rate, potentially causing overshoot or undershoot.

Tuning & Behavior

  • Default Value: 1.0 $deg/s$
  • Procedure: Measure the time it takes for the tracker to pitch up by 90 degrees, then calculate the rate: $ \text{Rate} = 90 / \text{Time} $.

ONOFF_YAW_MINT

s
Default 0.1f
Range 0 2

Yaw minimum movement time (ONOFF_YAW_MINT)

Description

This parameter sets the minimum duration for activating the yaw motor in an On/Off tracker system. See ONOFF_PITCH_MINT for details.

The Mathematics

$$ \text{Pulse Width} = \max(\text{Calculated Time}, \text{ONOFF\_YAW\_MINT}) $$

The Engineer's View

Defined in AntennaTracker/Parameters.cpp.

Tuning & Behavior

  • Default Value: 0.1 s

ONOFF_YAW_RATE

deg/s
Default 9.0f
Range 0 50

Yaw rate for on/off servos (ONOFF_YAW_RATE)

Description

This parameter defines the estimated angular velocity of the Yaw axis for Antenna Trackers using On/Off (Bang-Bang) control mechanisms. It allows the tracker to estimate how long to activate the motor to achieve a specific heading change.

The Mathematics

$$ \Delta t\_{\text{yaw}} = \frac{|\Delta \text{Heading}|}{\text{ONOFF\_YAW\_RATE}} $$

The Engineer's View

Defined in AntennaTracker/Parameters.cpp. Matches ONOFF_PITCH_RATE but for the yaw axis.

Tuning & Behavior

  • Default Value: 9.0 $deg/s$
  • Measurement: Time a 360-degree rotation and calculate the rate: $ 360 / \text{Time} $.