-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
Plane: add param LAND_RNGFND_HLD to hold-off lidar during landing #25549
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,12 +252,22 @@ bool Plane::verify_command(const AP_Mission::Mission_Command& cmd) // Ret | |
return landing.verify_abort_landing(prev_WP_loc, next_WP_loc, current_loc, auto_state.takeoff_altitude_rel_cm, throttle_suppressed); | ||
|
||
} else { | ||
float height = height_above_target(); | ||
|
||
// use rangefinder to correct if possible | ||
float height = height_above_target() - rangefinder_correction(); | ||
if (landing.get_rangefinder_holdoff_distance() <= 0 || // rangefinder holdoff is disabled (never hold off, always use rtanegfinder) | ||
auto_state.wp_proportion >= 1 || // or we have reached the land waypoint | ||
landing.is_flaring() || // or we are flaring | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure its a good idea to change the altitude once the flare has started. I don't think it will do anything in anycase. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What are you expecting to happen once the flare has already started? Suddenly the correction means were now above flare height and we stop flaring? (which of course means we won't do this correction next loop... ) I just think if your already in the flair its too late to start moving the target altitude about, trying to do it might cause unexpected behavior. |
||
current_loc.get_distance(next_WP_loc) <= landing.get_rangefinder_holdoff_distance()) // or we've reached the holdoff distance | ||
{ | ||
height -= rangefinder_correction(); | ||
} | ||
|
||
// for flare calculations we don't want to use the terrain | ||
// correction as otherwise we will flare early on rising | ||
// ground | ||
height -= auto_state.terrain_correction; | ||
|
||
return landing.verify_land(prev_WP_loc, next_WP_loc, current_loc, | ||
height, auto_state.sink_rate, auto_state.wp_proportion, auto_state.last_flying_ms, arming.is_armed(), is_flying(), | ||
g.rangefinder_landing && rangefinder_state.in_range); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.