44 Motor(
AP_MOTORS_MOT_1, 45,
AP_MOTORS_MATRIX_YAW_FACTOR_CW, 1, -1, 0, 0, 7, 10, -90),
45 Motor(
AP_MOTORS_MOT_2, -135,
AP_MOTORS_MATRIX_YAW_FACTOR_CW, 3, -1, 0, 0, 8, 10, -90),
46 Motor(
AP_MOTORS_MOT_3, -45,
AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 4, -1, 0, 0, 8, 10, -90),
47 Motor(
AP_MOTORS_MOT_4, 135,
AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 2, -1, 0, 0, 7, 10, -90),
114 Motor(
AP_MOTORS_MOT_4, 180,
AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 2,
AP_MOTORS_MOT_7, 60, -60, -1, 0, 0),
119 Motor(
AP_MOTORS_MOT_1, 60,
AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 1, -1, 0, 0,
AP_MOTORS_MOT_8, 0, -90),
120 Motor(
AP_MOTORS_MOT_2, -60,
AP_MOTORS_MATRIX_YAW_FACTOR_CW, 3, -1, 0, 0,
AP_MOTORS_MOT_8, 0, -90),
121 Motor(
AP_MOTORS_MOT_4, 180,
AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 2,
AP_MOTORS_MOT_7, 60, -60, -1, 0, 0),
126 Motor(
AP_MOTORS_MOT_1, 60,
AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 1, -1, 0, 0, 7, 10, -90),
127 Motor(
AP_MOTORS_MOT_2, -60,
AP_MOTORS_MATRIX_YAW_FACTOR_CW, 3, -1, 0, 0, 8, 10, -90),
147 Motor(
AP_MOTORS_MOT_2, 60,
AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 1, -1, 0, 0, 6, 0, -90),
148 Motor(
AP_MOTORS_MOT_3, -60,
AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 5, -1, 0, 0, 6, 0, -90),
150 Motor(
AP_MOTORS_MOT_5, 60,
AP_MOTORS_MATRIX_YAW_FACTOR_CW, 2, -1, 0, 0, 6, 0, -90),
160 Frame(
"+", 4, quad_plus_motors),
161 Frame(
"quad", 4, quad_plus_motors),
162 Frame(
"copter", 4, quad_plus_motors),
163 Frame(
"x", 4, quad_x_motors),
164 Frame(
"tilthvec", 4, tiltquad_h_vectored_motors),
165 Frame(
"hexax", 6, hexax_motors),
166 Frame(
"hexa", 6, hexa_motors),
167 Frame(
"octa-quad", 8, octa_quad_motors),
168 Frame(
"octa", 8, octa_motors),
169 Frame(
"dodeca-hexa", 12, dodeca_hexa_motors),
170 Frame(
"tri", 3, tri_motors),
171 Frame(
"tilttrivec",3, tilttri_vectored_motors),
172 Frame(
"tilttri", 3, tilttri_motors),
173 Frame(
"y6", 6, y6_motors),
174 Frame(
"firefly", 6, firefly_motors)
177 void Frame::init(
float _mass,
float hover_throttle,
float _terminal_velocity,
float _terminal_rotation_rate)
194 for (uint8_t i=0; i <
ARRAY_SIZE(supported_frames); i++) {
196 if (strncasecmp(name, supported_frames[i].name, strlen(supported_frames[i].name)) == 0) {
197 return &supported_frames[i];
214 rot_accel += mraccel;
235 const float gyro_noise =
radians(0.1);
236 const float accel_noise = 0.3;
240 aircraft.
rand_normal(0, 1)) * gyro_noise * noise_scale;
243 aircraft.
rand_normal(0, 1)) * accel_noise * noise_scale;
const Vector3f & get_gyro(void) const
Vector3< float > Vector3f
virtual float gross_mass() const
const Vector3f & get_velocity_air_ef(void) const
float terminal_rotation_rate
#define AP_MOTORS_MATRIX_YAW_FACTOR_CCW
static Motor hexa_motors[]
void init(float mass, float hover_throttle, float terminal_velocity, float terminal_rotation_rate)
static double rand_normal(double mean, double stddev)
Matrix3< T > transposed(void) const
static Motor tiltquad_h_vectored_motors[]
static Motor tilttri_vectored_motors[]
static Motor quad_plus_motors[]
static Frame supported_frames[]
static Frame * find_frame(const char *name)
void calculate_forces(const Aircraft::sitl_input &input, float thrust_scale, uint8_t motor_offset, Vector3f &rot_accel, Vector3f &body_thrust)
static Motor tilttri_motors[]
static Motor quad_x_motors[]
static Motor firefly_motors[]
static Motor hexax_motors[]
static Motor dodeca_hexa_motors[]
static Motor octa_quad_motors[]
void calculate_forces(const Aircraft &aircraft, const Aircraft::sitl_input &input, Vector3f &rot_accel, Vector3f &body_accel)
static constexpr float radians(float deg)
static Motor octa_motors[]
const Matrix3f & get_dcm(void) const
static Motor tri_motors[]
#define AP_MOTORS_MATRIX_YAW_FACTOR_CW