Skip to content

Confusing takeoff command feedback when command fails #1652

@deepak61296

Description

@deepak61296

Issue Description

The takeoff command in MAVProxy provides misleading feedback that confuses users, especially beginners.

Current Behavior

When executing takeoff 10 in unsuitable conditions:

  • Console prints: "Take Off started" ✅ (misleading - just means command sent)
  • Terminal shows: "Got COMMAND_ACK: NAV_TAKEOFF: FAILED" ❌ (actual result, often missed)

This happens when:

  1. Vehicle is disarmed
  2. Copter is in wrong mode (STABILIZE, LAND, RTL, etc.)
  3. Invalid altitude provided (zero, negative, or non-numeric)

Expected Behavior

Command should validate conditions before sending and provide clear, immediate feedback:

  • "Takeoff refused: Vehicle is DISARMED"
  • "Takeoff refused: Current mode is STABILIZE"
  • "Error: Invalid altitude value"

Proposed Solution

Add client-side pre-flight validation in mavproxy_cmdlong.py:

  1. Check armed status
  2. Check flight mode (copter requires GUIDED or AUTO)
  3. Validate altitude input
  4. Provide actionable error messages

Environment

  • MAVProxy version: master branch
  • Vehicle type: Copter (SITL)
  • Python version: 3.10

Testing

Reproduced in SITL:

STABILIZE> takeoff 10
Take Off started
Got COMMAND_ACK: NAV_TAKEOFF: FAILED

Willing to Contribute

Yes, I have a working implementation tested in SITL and ready for PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions