aboutsummaryrefslogtreecommitdiff
path: root/apps/systemlib/mixer/mixer_multirotor.cpp
diff options
context:
space:
mode:
authorJulian Oes <joes@student.ethz.ch>2013-01-02 13:29:33 -0800
committerJulian Oes <joes@student.ethz.ch>2013-01-02 13:29:33 -0800
commite4bfd78847283491309328e54acc3ffdd4073712 (patch)
treee1e35b3e03d710891f4e2853be29cbdbb8e2607d /apps/systemlib/mixer/mixer_multirotor.cpp
parentc08135ffefcb171fd518e210b88e7e993361fd81 (diff)
downloadpx4-firmware-e4bfd78847283491309328e54acc3ffdd4073712.tar.gz
px4-firmware-e4bfd78847283491309328e54acc3ffdd4073712.tar.bz2
px4-firmware-e4bfd78847283491309328e54acc3ffdd4073712.zip
Attention: flipped the yaw direction of multirotors in order to be compatible to APM
Diffstat (limited to 'apps/systemlib/mixer/mixer_multirotor.cpp')
-rw-r--r--apps/systemlib/mixer/mixer_multirotor.cpp75
1 files changed, 36 insertions, 39 deletions
diff --git a/apps/systemlib/mixer/mixer_multirotor.cpp b/apps/systemlib/mixer/mixer_multirotor.cpp
index b5b25e532..e293b1a2f 100644
--- a/apps/systemlib/mixer/mixer_multirotor.cpp
+++ b/apps/systemlib/mixer/mixer_multirotor.cpp
@@ -54,9 +54,6 @@
#include "mixer.h"
-#define CW (-1.0f)
-#define CCW (1.0f)
-
namespace
{
@@ -64,52 +61,52 @@ namespace
* These tables automatically generated by multi_tables - do not edit.
*/
const MultirotorMixer::Rotor _config_quad_x[] = {
- { -0.707107, 0.707107, -1.00 },
- { 0.707107, -0.707107, -1.00 },
- { 0.707107, 0.707107, 1.00 },
- { -0.707107, -0.707107, 1.00 },
+ { -0.707107, 0.707107, 1.00 },
+ { 0.707107, -0.707107, 1.00 },
+ { 0.707107, 0.707107, -1.00 },
+ { -0.707107, -0.707107, -1.00 },
};
const MultirotorMixer::Rotor _config_quad_plus[] = {
- { -1.000000, 0.000000, -1.00 },
- { 1.000000, 0.000000, -1.00 },
- { 0.000000, 1.000000, 1.00 },
- { -0.000000, -1.000000, 1.00 },
+ { -1.000000, 0.000000, 1.00 },
+ { 1.000000, 0.000000, 1.00 },
+ { 0.000000, 1.000000, -1.00 },
+ { -0.000000, -1.000000, -1.00 },
};
const MultirotorMixer::Rotor _config_hex_x[] = {
- { -1.000000, 0.000000, 1.00 },
- { 1.000000, 0.000000, -1.00 },
- { 0.500000, 0.866025, 1.00 },
- { -0.500000, -0.866025, -1.00 },
- { -0.500000, 0.866025, -1.00 },
- { 0.500000, -0.866025, 1.00 },
+ { -1.000000, 0.000000, -1.00 },
+ { 1.000000, 0.000000, 1.00 },
+ { 0.500000, 0.866025, -1.00 },
+ { -0.500000, -0.866025, 1.00 },
+ { -0.500000, 0.866025, 1.00 },
+ { 0.500000, -0.866025, -1.00 },
};
const MultirotorMixer::Rotor _config_hex_plus[] = {
- { 0.000000, 1.000000, 1.00 },
- { -0.000000, -1.000000, -1.00 },
- { 0.866025, -0.500000, 1.00 },
- { -0.866025, 0.500000, -1.00 },
- { 0.866025, 0.500000, -1.00 },
- { -0.866025, -0.500000, 1.00 },
+ { 0.000000, 1.000000, -1.00 },
+ { -0.000000, -1.000000, 1.00 },
+ { 0.866025, -0.500000, -1.00 },
+ { -0.866025, 0.500000, 1.00 },
+ { 0.866025, 0.500000, 1.00 },
+ { -0.866025, -0.500000, -1.00 },
};
const MultirotorMixer::Rotor _config_octa_x[] = {
- { -0.382683, 0.923880, 1.00 },
- { 0.382683, -0.923880, 1.00 },
- { -0.923880, 0.382683, -1.00 },
- { -0.382683, -0.923880, -1.00 },
- { 0.382683, 0.923880, -1.00 },
- { 0.923880, -0.382683, -1.00 },
- { 0.923880, 0.382683, 1.00 },
- { -0.923880, -0.382683, 1.00 },
+ { -0.382683, 0.923880, -1.00 },
+ { 0.382683, -0.923880, -1.00 },
+ { -0.923880, 0.382683, 1.00 },
+ { -0.382683, -0.923880, 1.00 },
+ { 0.382683, 0.923880, 1.00 },
+ { 0.923880, -0.382683, 1.00 },
+ { 0.923880, 0.382683, -1.00 },
+ { -0.923880, -0.382683, -1.00 },
};
const MultirotorMixer::Rotor _config_octa_plus[] = {
- { 0.000000, 1.000000, 1.00 },
- { -0.000000, -1.000000, 1.00 },
- { -0.707107, 0.707107, -1.00 },
- { -0.707107, -0.707107, -1.00 },
- { 0.707107, 0.707107, -1.00 },
- { 0.707107, -0.707107, -1.00 },
- { 1.000000, 0.000000, 1.00 },
- { -1.000000, 0.000000, 1.00 },
+ { 0.000000, 1.000000, -1.00 },
+ { -0.000000, -1.000000, -1.00 },
+ { -0.707107, 0.707107, 1.00 },
+ { -0.707107, -0.707107, 1.00 },
+ { 0.707107, 0.707107, 1.00 },
+ { 0.707107, -0.707107, 1.00 },
+ { 1.000000, 0.000000, -1.00 },
+ { -1.000000, 0.000000, -1.00 },
};
const MultirotorMixer::Rotor *_config_index[MultirotorMixer::Geometry::MAX_GEOMETRY] = {
&_config_quad_x[0],