Merge pull request #504 from Runepx4/master

Added 8 rotor Coaxial Rotor mixer
This commit is contained in:
Lorenz Meier 2013-10-31 02:28:43 -07:00
commit 9544fe446e
4 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,7 @@
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a Coaxial Octocopter in the X configuration. All controls
are mixed 100%.
R: 8c 10000 10000 10000 0

View File

@ -449,6 +449,7 @@ public:
HEX_PLUS, /**< hex in + configuration */ HEX_PLUS, /**< hex in + configuration */
OCTA_X, OCTA_X,
OCTA_PLUS, OCTA_PLUS,
OCTA_COX,
MAX_GEOMETRY MAX_GEOMETRY
}; };

View File

@ -130,6 +130,16 @@ const MultirotorMixer::Rotor _config_octa_plus[] = {
{ 1.000000, 0.000000, -1.00 }, { 1.000000, 0.000000, -1.00 },
{ -1.000000, 0.000000, -1.00 }, { -1.000000, 0.000000, -1.00 },
}; };
const MultirotorMixer::Rotor _config_octa_cox[] = {
{ -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_index[MultirotorMixer::MAX_GEOMETRY] = { const MultirotorMixer::Rotor *_config_index[MultirotorMixer::MAX_GEOMETRY] = {
&_config_quad_x[0], &_config_quad_x[0],
&_config_quad_plus[0], &_config_quad_plus[0],
@ -139,6 +149,7 @@ const MultirotorMixer::Rotor *_config_index[MultirotorMixer::MAX_GEOMETRY] = {
&_config_hex_plus[0], &_config_hex_plus[0],
&_config_octa_x[0], &_config_octa_x[0],
&_config_octa_plus[0], &_config_octa_plus[0],
&_config_octa_cox[0],
}; };
const unsigned _config_rotor_count[MultirotorMixer::MAX_GEOMETRY] = { const unsigned _config_rotor_count[MultirotorMixer::MAX_GEOMETRY] = {
4, /* quad_x */ 4, /* quad_x */
@ -149,6 +160,7 @@ const unsigned _config_rotor_count[MultirotorMixer::MAX_GEOMETRY] = {
6, /* hex_plus */ 6, /* hex_plus */
8, /* octa_x */ 8, /* octa_x */
8, /* octa_plus */ 8, /* octa_plus */
8, /* octa_cox */
}; };
} }
@ -241,6 +253,9 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl
} else if (!strcmp(geomname, "8x")) { } else if (!strcmp(geomname, "8x")) {
geometry = MultirotorMixer::OCTA_X; geometry = MultirotorMixer::OCTA_X;
} else if (!strcmp(geomname, "8c")) {
geometry = MultirotorMixer::OCTA_COX;
} else { } else {
debug("unrecognised geometry '%s'", geomname); debug("unrecognised geometry '%s'", geomname);
return nullptr; return nullptr;

View File

@ -74,7 +74,18 @@ set octa_plus {
90 CW 90 CW
} }
set tables {quad_x quad_plus quad_v quad_wide hex_x hex_plus octa_x octa_plus} set octa_cox {
45 CCW
-45 CW
-135 CCW
135 CW
-45 CCW
45 CW
135 CCW
-135 CW
}
set tables {quad_x quad_plus quad_v quad_wide hex_x hex_plus octa_x octa_plus octa_cox}
proc factors {a d} { puts [format "\t{ %9.6f, %9.6f, %5.2f }," [rcos [expr $a + 90]] [rcos $a] [expr -$d]]} proc factors {a d} { puts [format "\t{ %9.6f, %9.6f, %5.2f }," [rcos [expr $a + 90]] [rcos $a] [expr -$d]]}