Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlightTaskManualAltitude: adjust speed downwards when close to ground… #10410

Closed
wants to merge 2 commits into from

Conversation

Stifael
Copy link
Contributor

@Stifael Stifael commented Sep 4, 2018

slow down when close to ground/home altitude when in manual

if (PX4_ISFINITE(_dist_to_bottom)) {
dist_to_ground = _dist_to_bottom;

} else if (PX4_ISFINITE(_sub_home_position->get().valid_alt)) {
Copy link
Member

Choose a reason for hiding this comment

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

What if you're nowhere near home?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it will slow-down as well. This "feature" is actually just a legacy "feature" (https://github.com/PX4/Firmware/pull/9368/files#diff-fc77c3ef569029d45764664c75d4b0c1L2429), I just added it back.

Unfortunately, I cannot find anymore the discussion we had when this "feature" got introduced. I was strongly against it, but the decision was different. At least this time I added the check that if there is a distance sensor to ground, then use the distance to ground instead of blindly use the altitude above home

@dagar
Copy link
Member

dagar commented Sep 17, 2018

Build failure is real. Once fixed please rebase on master to resolve other recent CI issues.

@Stifael Stifael force-pushed the manual_slow_down_ground branch from 9515556 to f2a0fd2 Compare September 17, 2018 14:09

// if there is a valid distance to bottom or distance to home, then
// adjust speed downwards gradually within the limits MPC_LAND_ALT1 and MPC_LAND_ALT2.
if (_sticks(2) > 0.0f) { //user demands speed downwards
Copy link
Member

Choose a reason for hiding this comment

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

Why not using _sticks_expo(2) to be consistent with #10653 ?

}

if (PX4_ISFINITE(dist_to_ground)) {
_velocity_setpoint(2) = math::gradual(dist_to_ground, MPC_LAND_ALT2.get(),
Copy link
Member

Choose a reason for hiding this comment

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

This will not generate a linear setpoint change as the slope is defined by the actual - changing - velocity setpoint: _velocity_setpoint = f(_velocity_setpoint, dist_to_ground). Is that the required behavior?

@stale
Copy link

stale bot commented Jan 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Feb 4, 2019

Closing as stale.

@stale stale bot closed this Feb 4, 2019
@dagar dagar deleted the manual_slow_down_ground branch February 24, 2019 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants