Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
42ebbd14
Commit
42ebbd14
authored
6 years ago
by
Ivo Drescher
Committed by
Matthias Grob
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changed the intendation to tabs
Signed-off-by:
Ivo Drescher
<
ivo.drescher@gmail.com
>
parent
77d4554e
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
src/modules/mc_att_control/mc_att_control_main.cpp
+7
-7
7 additions, 7 deletions
src/modules/mc_att_control/mc_att_control_main.cpp
with
7 additions
and
7 deletions
src/modules/mc_att_control/mc_att_control_main.cpp
+
7
−
7
View file @
42ebbd14
...
@@ -418,13 +418,13 @@ MulticopterAttitudeControl::control_attitude(float dt)
...
@@ -418,13 +418,13 @@ MulticopterAttitudeControl::control_attitude(float dt)
_rates_sp
=
eq
.
emult
(
attitude_gain
);
_rates_sp
=
eq
.
emult
(
attitude_gain
);
/* Feed forward the yaw setpoint rate.
/* Feed forward the yaw setpoint rate.
* The yaw_feedforward_rate is a commanded rotation around the world z-axis,
* The yaw_feedforward_rate is a commanded rotation around the world z-axis,
* but we need to apply it in the body frame (because _rates_sp is expressed in the body frame).
* but we need to apply it in the body frame (because _rates_sp is expressed in the body frame).
* Therefore we infer the world z-axis (expressed in the body frame) by taking the last column of R.transposed (== q.inversed)
* Therefore we infer the world z-axis (expressed in the body frame) by taking the last column of R.transposed (== q.inversed)
* and multiply it by the yaw setpoint rate (yaw_sp_move_rate) and gain (_yaw_ff).
* and multiply it by the yaw setpoint rate (yaw_sp_move_rate) and gain (_yaw_ff).
* This yields a vector representing the commanded rotatation around the world z-axis expressed in the body frame
* This yields a vector representing the commanded rotatation around the world z-axis expressed in the body frame
* such that it can be added to the rates setpoint.
* such that it can be added to the rates setpoint.
*/
*/
Vector3f
yaw_feedforward_rate
=
q
.
inversed
().
dcm_z
();
Vector3f
yaw_feedforward_rate
=
q
.
inversed
().
dcm_z
();
yaw_feedforward_rate
*=
_v_att_sp
.
yaw_sp_move_rate
*
_yaw_ff
.
get
();
yaw_feedforward_rate
*=
_v_att_sp
.
yaw_sp_move_rate
*
_yaw_ff
.
get
();
_rates_sp
+=
yaw_feedforward_rate
;
_rates_sp
+=
yaw_feedforward_rate
;
...
...
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