Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Baitboat
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
Baitboat
Commits
3fd38edc
Commit
3fd38edc
authored
10 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Copter: restore baro climb rate check to land_detector
parent
651a0182
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ArduCopter/land_detector.pde
+5
-5
5 additions, 5 deletions
ArduCopter/land_detector.pde
with
5 additions
and
5 deletions
ArduCopter/land_detector.pde
+
5
−
5
View file @
3fd38edc
...
...
@@ -13,13 +13,13 @@ static bool land_complete_maybe()
// called at 50hz
static
void
update_land_detector
()
{
bool
climb_rate_
small
=
abs
(
climb_rate
)
<
LAND_DETECTOR_CLIMBRATE_MAX
;
bool
target_climb_rate_low
=
!
pos_control
.
is_active_z
()
||
pos_control
.
get_desired_velocity
().
z
<
LAND_SPEED
;
bool
climb_rate_
low
=
(
abs
(
climb_rate
)
<
LAND_DETECTOR_CLIMBRATE_MAX
)
&&
(
abs
(
baro_climbrate
)
<
LAND_DETECTOR_BARO_CLIMBRATE_MAX
)
;
bool
target_climb_rate_low
=
!
pos_control
.
is_active_z
()
||
(
pos_control
.
get_desired_velocity
().
z
<
LAND_SPEED
)
;
bool
motor_at_lower_limit
=
motors
.
limit
.
throttle_lower
;
bool
throttle_low
=
FRAME_CONFIG
==
HELI_FRAME
||
motors
.
get_throttle_out
()
<
get_non_takeoff_throttle
();
bool
not_rotating_fast
=
ahrs
.
get_gyro
().
length
()
<
LAND_DETECTOR_ROTATION_MAX
;
bool
throttle_low
=
(
FRAME_CONFIG
==
HELI_FRAME
)
||
(
motors
.
get_throttle_out
()
<
get_non_takeoff_throttle
()
)
;
bool
not_rotating_fast
=
(
ahrs
.
get_gyro
().
length
()
<
LAND_DETECTOR_ROTATION_MAX
)
;
if
(
climb_rate_
small
&&
target_climb_rate_low
&&
motor_at_lower_limit
&&
throttle_low
&&
not_rotating_fast
)
{
if
(
climb_rate_
low
&&
target_climb_rate_low
&&
motor_at_lower_limit
&&
throttle_low
&&
not_rotating_fast
)
{
if
(
!
ap
.
land_complete
)
{
// increase counter until we hit the trigger then set land complete flag
if
(
land_detector
<
LAND_DETECTOR_TRIGGER
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment