Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Ardupilot
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
Ardupilot
Commits
151e7106
Commit
151e7106
authored
13 years ago
by
Jason Short
Browse files
Options
Downloads
Patches
Plain Diff
Added slow wp option in calc_desired_speed
parent
4b52dde8
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
+8
-9
8 additions, 9 deletions
ArduCopter/navigation.pde
with
8 additions
and
9 deletions
ArduCopter/navigation.pde
+
8
−
9
View file @
151e7106
...
...
@@ -265,7 +265,7 @@ static void calc_loiter_pitch_roll()
auto_pitch
=
-
auto_pitch
;
}
static
int16_t
calc_desired_speed
(
int16_t
max_speed
)
static
int16_t
calc_desired_speed
(
int16_t
max_speed
,
bool
_slow
)
{
/*
|< WP Radius
...
...
@@ -277,14 +277,13 @@ static int16_t calc_desired_speed(int16_t max_speed)
*/
// max_speed is default 600 or 6m/s
// (wp_distance * .5) = 1/2 of the distance converted to speed
// wp_distance is always in m/s and not cm/s - I know it's stupid that way
// for example 4m from target = 200cm/s speed
// we choose the lowest speed based on disance
max_speed
=
min
(
max_speed
,
wp_distance
);
// go at least 100cm/s
max_speed
=
max
(
max_speed
,
WAYPOINT_SPEED_MIN
);
if
(
_slow
){
max_speed
=
min
(
max_speed
,
wp_distance
/
2
);
max_speed
=
max
(
max_speed
,
0
);
}
else
{
max_speed
=
min
(
max_speed
,
wp_distance
);
max_speed
=
max
(
max_speed
,
WAYPOINT_SPEED_MIN
);
// go at least 100cm/s
}
// limit the ramp up of the speed
// waypoint_speed_gov is reset to 0 at each new WP command
...
...
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