diff options
-rw-r--r-- | ROMFS/Makefile | 1 | ||||
-rw-r--r-- | ROMFS/mixers/FMU_quad_v.mix | 7 | ||||
-rw-r--r-- | apps/systemlib/mixer/mixer.h | 1 | ||||
-rw-r--r-- | apps/systemlib/mixer/mixer_multirotor.cpp | 11 | ||||
-rwxr-xr-x | apps/systemlib/mixer/multi_tables | 9 |
5 files changed, 28 insertions, 1 deletions
diff --git a/ROMFS/Makefile b/ROMFS/Makefile index ed39ab825..11a4650fa 100644 --- a/ROMFS/Makefile +++ b/ROMFS/Makefile @@ -32,6 +32,7 @@ ROMFS_FSSPEC := $(SRCROOT)/scripts/rcS~init.d/rcS \ $(SRCROOT)/mixers/FMU_RET.mix~mixers/FMU_ERT.mix \ $(SRCROOT)/mixers/FMU_quad_x.mix~mixers/FMU_quad_x.mix \ $(SRCROOT)/mixers/FMU_quad_+.mix~mixers/FMU_quad_+.mix \ + $(SRCROOT)/mixers/FMU_quad_v.mix~mixers/FMU_quad_v.mix \ $(SRCROOT)/mixers/FMU_hex_x.mix~mixers/FMU_hex_x.mix \ $(SRCROOT)/mixers/FMU_hex_+.mix~mixers/FMU_hex_+.mix \ $(SRCROOT)/mixers/FMU_octo_x.mix~mixers/FMU_octo_x.mix \ diff --git a/ROMFS/mixers/FMU_quad_v.mix b/ROMFS/mixers/FMU_quad_v.mix new file mode 100644 index 000000000..2a4a0f341 --- /dev/null +++ b/ROMFS/mixers/FMU_quad_v.mix @@ -0,0 +1,7 @@ +Multirotor mixer for PX4FMU +=========================== + +This file defines a single mixer for a quadrotor in the V configuration. All controls +are mixed 100%. + +R: 4v 10000 10000 10000 0 diff --git a/apps/systemlib/mixer/mixer.h b/apps/systemlib/mixer/mixer.h index 71386cba7..40d37fce2 100644 --- a/apps/systemlib/mixer/mixer.h +++ b/apps/systemlib/mixer/mixer.h @@ -418,6 +418,7 @@ public: enum Geometry { QUAD_X = 0, /**< quad in X configuration */ QUAD_PLUS, /**< quad in + configuration */ + QUAD_V, /**< quad in V configuration */ HEX_X, /**< hex in X configuration */ HEX_PLUS, /**< hex in + configuration */ OCTA_X, diff --git a/apps/systemlib/mixer/mixer_multirotor.cpp b/apps/systemlib/mixer/mixer_multirotor.cpp index 4b9cfc023..d79811c0f 100644 --- a/apps/systemlib/mixer/mixer_multirotor.cpp +++ b/apps/systemlib/mixer/mixer_multirotor.cpp @@ -82,6 +82,12 @@ const MultirotorMixer::Rotor _config_quad_plus[] = { { 0.000000, 1.000000, -1.00 }, { -0.000000, -1.000000, -1.00 }, }; +const MultirotorMixer::Rotor _config_quad_v[] = { + { -0.927184, 0.374607, 1.00 }, + { 0.694658, -0.719340, 1.00 }, + { 0.927184, 0.374607, -1.00 }, + { -0.694658, -0.719340, -1.00 }, +}; const MultirotorMixer::Rotor _config_hex_x[] = { { -1.000000, 0.000000, -1.00 }, { 1.000000, 0.000000, 1.00 }, @@ -121,6 +127,7 @@ const MultirotorMixer::Rotor _config_octa_plus[] = { const MultirotorMixer::Rotor *_config_index[MultirotorMixer::Geometry::MAX_GEOMETRY] = { &_config_quad_x[0], &_config_quad_plus[0], + &_config_quad_v[0], &_config_hex_x[0], &_config_hex_plus[0], &_config_octa_x[0], @@ -129,6 +136,7 @@ const MultirotorMixer::Rotor *_config_index[MultirotorMixer::Geometry::MAX_GEOME const unsigned _config_rotor_count[MultirotorMixer::Geometry::MAX_GEOMETRY] = { 4, /* quad_x */ 4, /* quad_plus */ + 4, /* quad_v */ 6, /* hex_x */ 6, /* hex_plus */ 8, /* octa_x */ @@ -184,6 +192,9 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl } else if (!strcmp(geomname, "4x")) { geometry = MultirotorMixer::QUAD_X; + } else if (!strcmp(geomname, "4v")) { + geometry = MultirotorMixer::QUAD_V; + } else if (!strcmp(geomname, "6+")) { geometry = MultirotorMixer::HEX_PLUS; diff --git a/apps/systemlib/mixer/multi_tables b/apps/systemlib/mixer/multi_tables index f17ae30ca..19a8239a6 100755 --- a/apps/systemlib/mixer/multi_tables +++ b/apps/systemlib/mixer/multi_tables @@ -20,6 +20,13 @@ set quad_plus { 180 CW } +set quad_v { + 68 CCW + -136 CCW + -68 CW + 136 CW +} + set hex_x { 90 CW -90 CCW @@ -60,7 +67,7 @@ set octa_plus { 90 CW } -set tables {quad_x quad_plus hex_x hex_plus octa_x octa_plus} +set tables {quad_x quad_plus quad_v hex_x hex_plus octa_x octa_plus} proc factors {a d} { puts [format "\t{ %9.6f, %9.6f, %5.2f }," [rcos [expr $a + 90]] [rcos $a] [expr -$d]]} |