forked from Archive/PX4-Autopilot
ROMFS wide quad mixer addition and cleanup
This commit is contained in:
commit
13110e0a1f
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2012 PX4 Development Team. All rights reserved.
|
# Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
Multirotor mixer for PX4FMU
|
||||||
|
===========================
|
||||||
|
|
||||||
|
This file defines a single mixer for a quadrotor with a wide configuration. All controls are mixed 100%.
|
||||||
|
|
||||||
|
R: 4w 10000 10000 10000 0
|
|
@ -419,6 +419,7 @@ public:
|
||||||
QUAD_X = 0, /**< quad in X configuration */
|
QUAD_X = 0, /**< quad in X configuration */
|
||||||
QUAD_PLUS, /**< quad in + configuration */
|
QUAD_PLUS, /**< quad in + configuration */
|
||||||
QUAD_V, /**< quad in V configuration */
|
QUAD_V, /**< quad in V configuration */
|
||||||
|
QUAD_WIDE, /**< quad in wide configuration */
|
||||||
HEX_X, /**< hex in X configuration */
|
HEX_X, /**< hex in X configuration */
|
||||||
HEX_PLUS, /**< hex in + configuration */
|
HEX_PLUS, /**< hex in + configuration */
|
||||||
OCTA_X,
|
OCTA_X,
|
||||||
|
|
|
@ -88,6 +88,12 @@ const MultirotorMixer::Rotor _config_quad_v[] = {
|
||||||
{ 0.927184, 0.374607, -1.00 },
|
{ 0.927184, 0.374607, -1.00 },
|
||||||
{ -0.694658, -0.719340, -1.00 },
|
{ -0.694658, -0.719340, -1.00 },
|
||||||
};
|
};
|
||||||
|
const MultirotorMixer::Rotor _config_quad_wide[] = {
|
||||||
|
{ -0.927184, 0.374607, 1.00 },
|
||||||
|
{ 0.777146, -0.629320, 1.00 },
|
||||||
|
{ 0.927184, 0.374607, -1.00 },
|
||||||
|
{ -0.777146, -0.629320, -1.00 },
|
||||||
|
};
|
||||||
const MultirotorMixer::Rotor _config_hex_x[] = {
|
const MultirotorMixer::Rotor _config_hex_x[] = {
|
||||||
{ -1.000000, 0.000000, -1.00 },
|
{ -1.000000, 0.000000, -1.00 },
|
||||||
{ 1.000000, 0.000000, 1.00 },
|
{ 1.000000, 0.000000, 1.00 },
|
||||||
|
@ -128,6 +134,7 @@ const MultirotorMixer::Rotor *_config_index[MultirotorMixer::Geometry::MAX_GEOME
|
||||||
&_config_quad_x[0],
|
&_config_quad_x[0],
|
||||||
&_config_quad_plus[0],
|
&_config_quad_plus[0],
|
||||||
&_config_quad_v[0],
|
&_config_quad_v[0],
|
||||||
|
&_config_quad_wide[0],
|
||||||
&_config_hex_x[0],
|
&_config_hex_x[0],
|
||||||
&_config_hex_plus[0],
|
&_config_hex_plus[0],
|
||||||
&_config_octa_x[0],
|
&_config_octa_x[0],
|
||||||
|
@ -137,6 +144,7 @@ const unsigned _config_rotor_count[MultirotorMixer::Geometry::MAX_GEOMETRY] = {
|
||||||
4, /* quad_x */
|
4, /* quad_x */
|
||||||
4, /* quad_plus */
|
4, /* quad_plus */
|
||||||
4, /* quad_v */
|
4, /* quad_v */
|
||||||
|
4, /* quad_wide */
|
||||||
6, /* hex_x */
|
6, /* hex_x */
|
||||||
6, /* hex_plus */
|
6, /* hex_plus */
|
||||||
8, /* octa_x */
|
8, /* octa_x */
|
||||||
|
@ -195,6 +203,9 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl
|
||||||
} else if (!strcmp(geomname, "4v")) {
|
} else if (!strcmp(geomname, "4v")) {
|
||||||
geometry = MultirotorMixer::QUAD_V;
|
geometry = MultirotorMixer::QUAD_V;
|
||||||
|
|
||||||
|
} else if (!strcmp(geomname, "4w")) {
|
||||||
|
geometry = MultirotorMixer::QUAD_WIDE;
|
||||||
|
|
||||||
} else if (!strcmp(geomname, "6+")) {
|
} else if (!strcmp(geomname, "6+")) {
|
||||||
geometry = MultirotorMixer::HEX_PLUS;
|
geometry = MultirotorMixer::HEX_PLUS;
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,13 @@ set quad_v {
|
||||||
136 CW
|
136 CW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set quad_wide {
|
||||||
|
68 CCW
|
||||||
|
-129 CCW
|
||||||
|
-68 CW
|
||||||
|
129 CW
|
||||||
|
}
|
||||||
|
|
||||||
set hex_x {
|
set hex_x {
|
||||||
90 CW
|
90 CW
|
||||||
-90 CCW
|
-90 CCW
|
||||||
|
@ -67,7 +74,7 @@ set octa_plus {
|
||||||
90 CW
|
90 CW
|
||||||
}
|
}
|
||||||
|
|
||||||
set tables {quad_x quad_plus quad_v hex_x hex_plus octa_x octa_plus}
|
set tables {quad_x quad_plus quad_v quad_wide 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]]}
|
proc factors {a d} { puts [format "\t{ %9.6f, %9.6f, %5.2f }," [rcos [expr $a + 90]] [rcos $a] [expr -$d]]}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue