Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
eff_scheduling_rotwing.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
3 *
4 * This file is part of paparazzi
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
25
26#ifndef CTRL_EFF_SCHED_ROTWING_H
27#define CTRL_EFF_SCHED_ROTWING_H
28
29#include "std.h"
30
31#define RW_ap 0 // X body axis (angular acceleration)
32#define RW_aq 1 // Y body axis (angular acceleration)
33#define RW_ar 2 // Z body axis (angular acceleration)
34#define RW_aZ 3 // Z body axis (linear acceleration)
35#define RW_aX 4 // X body axis (linear acceleration)
36
38 float Ixx_body; // body MMOI around roll axis [kgm²]
39 float Iyy_body; // body MMOI around pitch axis [kgm²]
40 float Izz; // total MMOI around yaw axis [kgm²]
41 float Ixx_wing; // wing MMOI around the chordwise direction of the wing [kgm²]
42 float Iyy_wing; // wing MMOI around the spanwise direction of the wing [kgm²]
43 float m; // mass [kg]
44 float DMdpprz_hover_roll[2]; // Moment coeficients for roll motors (Scaled by 10000)
45 float DMdpprz_hover_pitch[2]; // Moment coeficients for pitch motors (Scaled by 10000)
46 float hover_roll_pitch_coef[2]; // Model coefficients to correct pitch effective for roll motors
47 float hover_roll_roll_coef[2]; // Model coefficients to correct roll effectiveness for roll motors
48 float k_elevator[3];
49 float k_rudder[3];
50 float k_aileron;
52 float k_pusher[2];
56 float k_lift_wing[2];
59};
61
63 float Ixx; // Total MMOI around roll axis [kgm²]
64 float Iyy; // Total MMOI around pitch axis [kgm²]
65 float wing_rotation_rad; // Wing rotation angle in radians: from ABI message
66 float wing_rotation_deg; // Wing rotation angle in degrees: (clone in degrees)
67 float cosr; // cosine of wing rotation angle
68 float sinr; // sine of wing rotation angle
69 float cosr2; // cosine² of wing rotation angle
70 float sinr2; // sine² of wing rotation angle
71 float sinr3; // sine³ of wing rotation angle
72
73 // Set during initialization
74 float pitch_motor_dMdpprz; // derivative of delta moment with respect to a delta paparazzi command for the pitch motors [Nm/pprz]
75 float roll_motor_dMdpprz; // derivative of delta moment with respect to a delta paparazzi command for the roll motors [Nm/pprz]
76
77 // commands
82
83 // airspeed
84 float airspeed;
85 float airspeed2;
86};
87
89
92
93extern float eff_sched_pusher_time;
94extern float roll_eff_slider;
95
96extern void eff_scheduling_rotwing_init(void);
97extern void eff_scheduling_rotwing_periodic(void);
98
99#endif // CTRL_EFF_SCHED_ROTWING_H
100
float roll_eff_slider
int32_t rw_flap_offset
struct rotwing_eff_sched_param_t eff_sched_p
float eff_sched_pusher_time
float rotation_angle_setpoint_deg
void eff_scheduling_rotwing_init(void)
int16_t rotation_cmd
void eff_scheduling_rotwing_periodic(void)
int int32_t
Typedef defining 32 bit int type.
short int16_t
Typedef defining 16 bit short type.