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
ec1d400a
Commit
ec1d400a
authored
13 years ago
by
Jason Short
Browse files
Options
Downloads
Patches
Plain Diff
Arducopter: Slower WP deceleration for RTL and WP navigation
Slower descent and slightly faster ascent
parent
91c1c255
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ArduCopter/navigation.pde
+4
-4
4 additions, 4 deletions
ArduCopter/navigation.pde
with
4 additions
and
4 deletions
ArduCopter/navigation.pde
+
4
−
4
View file @
ec1d400a
...
@@ -261,10 +261,10 @@ static int16_t get_desired_speed(int16_t max_speed, bool _slow)
...
@@ -261,10 +261,10 @@ static int16_t get_desired_speed(int16_t max_speed, bool _slow)
// max_speed is default 600 or 6m/s
// max_speed is default 600 or 6m/s
if
(
_slow
){
if
(
_slow
){
max_speed
=
min
(
max_speed
,
wp_distance
/
2
);
max_speed
=
min
(
max_speed
,
wp_distance
/
4
);
max_speed
=
max
(
max_speed
,
0
);
max_speed
=
max
(
max_speed
,
0
);
}
else
{
}
else
{
max_speed
=
min
(
max_speed
,
wp_distance
);
max_speed
=
min
(
max_speed
,
wp_distance
/
2
);
max_speed
=
max
(
max_speed
,
WAYPOINT_SPEED_MIN
);
// go at least 100cm/s
max_speed
=
max
(
max_speed
,
WAYPOINT_SPEED_MIN
);
// go at least 100cm/s
}
}
...
@@ -281,10 +281,10 @@ static int16_t get_desired_speed(int16_t max_speed, bool _slow)
...
@@ -281,10 +281,10 @@ static int16_t get_desired_speed(int16_t max_speed, bool _slow)
static
int16_t
get_desired_climb_rate
(
int16_t
speed
)
static
int16_t
get_desired_climb_rate
(
int16_t
speed
)
{
{
if
(
alt_change_flag
==
ASCENDING
){
if
(
alt_change_flag
==
ASCENDING
){
return
constrain
(
altitude_error
/
4
,
65
,
speed
);
return
constrain
(
altitude_error
/
4
,
65
,
180
);
// 180cm /s up
}
else
if
(
alt_change_flag
==
DESCENDING
){
}
else
if
(
alt_change_flag
==
DESCENDING
){
return
constrain
(
altitude_error
/
6
,
-
speed
,
-
10
);
return
constrain
(
altitude_error
/
6
,
-
100
,
0
);
// -100cm /s down
}
else
{
}
else
{
return
0
;
return
0
;
...
...
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