Skip to content

Docs: fix incorrect 10m-above-home motor shutoff condition in LAND mode#7589

Open
hritikkumar07 wants to merge 2 commits intoArduPilot:masterfrom
hritikkumar07:fix/land-mode-10m-altitude-docs
Open

Docs: fix incorrect 10m-above-home motor shutoff condition in LAND mode#7589
hritikkumar07 wants to merge 2 commits intoArduPilot:masterfrom
hritikkumar07:fix/land-mode-10m-altitude-docs

Conversation

@hritikkumar07
Copy link
Copy Markdown

@hritikkumar07 hritikkumar07 commented Mar 30, 2026

Fixes #7577
Fixes #7574

The Note block incorrectly states that motor shutoff requires the copter
to be below 10m above home altitude. After reading land_detector.cpp,
no such check exists in update_land_detector().

LAND_ALT_LOW_M (10m default) only controls the descent speed transition
from LAND_SPD_HIGH_MS to LAND_SPD_MS, not the disarm condition.

Updated the Note block to reflect the actual landing detection conditions.

@khancyr
Copy link
Copy Markdown
Contributor

khancyr commented Mar 30, 2026

this isn't related to the issue you mentionned

approximately one second:

- Motors are commanded to their lower limit by the vertical position controller
- Throttle mix is at minimum (``is_throttle_mix_min``)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this variable doing here ?

- The airframe is not accelerating (earth-frame accel ≈ 0)
- Vertical speed is within 1 m/s of zero
- If a healthy rangefinder is available: altitude is below 2m
- Weight-on-Wheels (WoW) sensor (if present) confirms contact or is unknown
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mean nothing

Copy link
Copy Markdown
Contributor

@Hwurzburg Hwurzburg Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disagree, Copter has Weight on Wheels landing gear feature and is used in code....this is correct

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If present confirm contact or is unknown?
That means nothing and isn't what we got on the code

Copy link
Copy Markdown
Contributor

@Hwurzburg Hwurzburg Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code is in the path
#if AP_LANDINGGEAR_ENABLED
const bool WoW_check = (landinggear.get_wow_state() == AP_LandingGear::LG_WOW || landinggear.get_wow_state() == AP_LandingGear::LG_WOW_UNKNOWN);
#else
const bool WoW_check = true;
#endif
SET_LOG_FLAG(WoW_check, LandDetectorLoggingFlag::WOW);

if (motor_at_lower_limit && throttle_mix_at_min && !large_angle_request && !large_angle_error && accel_stationary && descent_rate_low && rangefinder_check && WoW_check)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That english sentence isn't good. If you don't know what it is , you cannot understand

I don't think we should details strictly the code, just say something like WoW trigger
For example we don't say if rangefinder is present with data valid over 3 consecutive read under 2m etc.

Adding a note with reference to the landing detector file would be interesting too, so people can check in doubt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammarly states that it is understandable in English, but could be improved:
"The Weight-on-Wheels (WoW) sensor (if present) confirms ground contact or has an unknown status."

And having general user noticeable effects listed is fine in my opinion, as long as they are not confusing to the user....and this user noticed some

- Throttle mix is at minimum (``is_throttle_mix_min``)
- No large angle is being requested (roll/pitch target < 15°)
- No large angle error exists (attitude error < 30°)
- The airframe is not accelerating (earth-frame accel ≈ 0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

< 1 -2 m/s²

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's be accurate here"

Suggested change
- The airframe is not accelerating (earth-frame accel ≈ 0)
- The airframe is not accelerating downward > 1m/s/s ( >2 m/s/s if Weight on Wheels feature is enabled)

Copy link
Copy Markdown
Contributor

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed which issues this closes

- No large angle error exists (attitude error < 30°)
- The airframe is not accelerating (earth-frame accel ≈ 0)
- Vertical speed is within 1 m/s of zero
- If a healthy rangefinder is available: altitude is below 2m
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If a healthy rangefinder is available: altitude is below 2m
- If a healthy rangefinder is available, and rangefinder altitude is below 2m

- Throttle mix is at minimum (``is_throttle_mix_min``)
- No large angle is being requested (roll/pitch target < 15°)
- No large angle error exists (attitude error < 30°)
- The airframe is not accelerating (earth-frame accel ≈ 0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's be accurate here"

Suggested change
- The airframe is not accelerating (earth-frame accel ≈ 0)
- The airframe is not accelerating downward > 1m/s/s ( >2 m/s/s if Weight on Wheels feature is enabled)

- No large angle is being requested (roll/pitch target < 15°)
- No large angle error exists (attitude error < 30°)
- The airframe is not accelerating (earth-frame accel ≈ 0)
- Vertical speed is within 1 m/s of zero
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

Suggested change
- Vertical speed is within 1 m/s of zero
- Vertical speed is within 1 m/s of zero ( within 2 m/s if Weight on Wheels feature is enabled)

@Hwurzburg
Copy link
Copy Markdown
Contributor

  • dont do merge commits unless is fixes a CI failure...now you will neeed to squash to one commit
  • requested changes should be addressed

@Hwurzburg
Copy link
Copy Markdown
Contributor

Others are making changes in this area. Unless you update with the requested changes so I can merge, it will also need conflict resolution...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants