Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
eff_scheduling_rot_wing.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
26
#ifndef CTRL_EFF_SCHED_ROT_WING_H
27
#define CTRL_EFF_SCHED_ROT_WING_H
28
29
#include "
std.h
"
30
31
struct
rot_wing_eff_sched_param_t
{
32
float
Ixx_body
;
// body MMOI around roll axis [kgm²]
33
float
Iyy_body
;
// body MMOI around pitch axis [kgm²]
34
float
Izz
;
// total MMOI around yaw axis [kgm²]
35
float
Ixx_wing
;
// wing MMOI around the chordwise direction of the wing [kgm²]
36
float
Iyy_wing
;
// wing MMOI around the spanwise direction of the wing [kgm²]
37
float
m
;
// mass [kg]
38
float
DMdpprz_hover_roll
[2];
// Moment coeficients for roll motors (Scaled by 10000)
39
float
hover_roll_pitch_coef
[2];
// Model coefficients to correct pitch effective for roll motors
40
float
hover_roll_roll_coef
[2];
// Model coefficients to correct roll effectiveness for roll motors
41
float
k_elevator
[3];
42
float
k_rudder
[3];
43
float
k_aileron
;
44
float
k_flaperon
;
45
float
k_pusher
[2];
46
float
k_elevator_deflection
[2];
47
float
d_rudder_d_pprz
;
48
float
k_rpm_pprz_pusher
[3];
49
float
k_lift_wing
[2];
50
float
k_lift_fuselage
;
51
float
k_lift_tail
;
52
};
53
54
struct
rot_wing_eff_sched_var_t
{
55
float
Ixx
;
// Total MMOI around roll axis [kgm²]
56
float
Iyy
;
// Total MMOI around pitch axis [kgm²]
57
float
wing_rotation_rad
;
// Wing rotation angle in radians: from ABI message
58
float
wing_rotation_deg
;
// Wing rotation angle in degrees: (clone in degrees)
59
float
cosr
;
// cosine of wing rotation angle
60
float
sinr
;
// sine of wing rotation angle
61
float
cosr2
;
// cosine² of wing rotation angle
62
float
sinr2
;
// sine² of wing rotation angle
63
float
sinr3
;
// sine³ of wing rotation angle
64
65
// Set during initialization
66
float
pitch_motor_dMdpprz
;
// derivative of delta moment with respect to a delta paparazzi command for the pitch motors [Nm/pprz]
67
float
roll_motor_dMdpprz
;
// derivative of delta moment with respect to a delta paparazzi command for the roll motors [Nm/pprz]
68
69
// commands
70
float
cmd_elevator
;
71
float
cmd_pusher
;
72
float
cmd_pusher_scaled
;
73
float
cmd_T_mean_scaled
;
74
75
// airspeed
76
float
airspeed
;
77
float
airspeed2
;
78
};
79
80
extern
float
rotation_angle_setpoint_deg
;
81
extern
int16_t
rotation_cmd
;
82
83
extern
void
eff_scheduling_rot_wing_init
(
void
);
84
extern
void
eff_scheduling_rot_wing_periodic
(
void
);
85
86
#endif
// CTRL_EFF_SCHED_ROT_WING_H
87
rot_wing_eff_sched_param_t::hover_roll_roll_coef
float hover_roll_roll_coef[2]
Definition:
eff_scheduling_rot_wing.h:40
rot_wing_eff_sched_var_t::cosr
float cosr
Definition:
eff_scheduling_rot_wing.h:59
rot_wing_eff_sched_param_t::d_rudder_d_pprz
float d_rudder_d_pprz
Definition:
eff_scheduling_rot_wing.h:47
eff_scheduling_rot_wing_init
void eff_scheduling_rot_wing_init(void)
Definition:
eff_scheduling_rot_wing.c:187
rot_wing_eff_sched_var_t::cmd_elevator
float cmd_elevator
Definition:
eff_scheduling_rot_wing.h:70
rot_wing_eff_sched_param_t::Ixx_body
float Ixx_body
Definition:
eff_scheduling_rot_wing.h:32
rot_wing_eff_sched_var_t::sinr2
float sinr2
Definition:
eff_scheduling_rot_wing.h:62
rot_wing_eff_sched_var_t::airspeed
float airspeed
Definition:
eff_scheduling_rot_wing.h:76
rot_wing_eff_sched_param_t::k_elevator
float k_elevator[3]
Definition:
eff_scheduling_rot_wing.h:41
rot_wing_eff_sched_var_t::cmd_T_mean_scaled
float cmd_T_mean_scaled
Definition:
eff_scheduling_rot_wing.h:73
rot_wing_eff_sched_var_t::wing_rotation_deg
float wing_rotation_deg
Definition:
eff_scheduling_rot_wing.h:58
rot_wing_eff_sched_param_t::k_flaperon
float k_flaperon
Definition:
eff_scheduling_rot_wing.h:44
rot_wing_eff_sched_param_t::k_lift_tail
float k_lift_tail
Definition:
eff_scheduling_rot_wing.h:51
rot_wing_eff_sched_param_t::k_rudder
float k_rudder[3]
Definition:
eff_scheduling_rot_wing.h:42
rot_wing_eff_sched_var_t::wing_rotation_rad
float wing_rotation_rad
Definition:
eff_scheduling_rot_wing.h:57
eff_scheduling_rot_wing_periodic
void eff_scheduling_rot_wing_periodic(void)
Definition:
eff_scheduling_rot_wing.c:216
rot_wing_eff_sched_var_t::Ixx
float Ixx
Definition:
eff_scheduling_rot_wing.h:55
rot_wing_eff_sched_param_t::k_rpm_pprz_pusher
float k_rpm_pprz_pusher[3]
Definition:
eff_scheduling_rot_wing.h:48
rot_wing_eff_sched_var_t::cmd_pusher
float cmd_pusher
Definition:
eff_scheduling_rot_wing.h:71
rot_wing_eff_sched_param_t::k_pusher
float k_pusher[2]
Definition:
eff_scheduling_rot_wing.h:45
rot_wing_eff_sched_param_t::DMdpprz_hover_roll
float DMdpprz_hover_roll[2]
Definition:
eff_scheduling_rot_wing.h:38
rotation_angle_setpoint_deg
float rotation_angle_setpoint_deg
rot_wing_eff_sched_param_t::k_aileron
float k_aileron
Definition:
eff_scheduling_rot_wing.h:43
rot_wing_eff_sched_param_t::Iyy_body
float Iyy_body
Definition:
eff_scheduling_rot_wing.h:33
rot_wing_eff_sched_param_t::Izz
float Izz
Definition:
eff_scheduling_rot_wing.h:34
rot_wing_eff_sched_param_t::k_lift_fuselage
float k_lift_fuselage
Definition:
eff_scheduling_rot_wing.h:50
rot_wing_eff_sched_var_t::cosr2
float cosr2
Definition:
eff_scheduling_rot_wing.h:61
rot_wing_eff_sched_param_t::k_lift_wing
float k_lift_wing[2]
Definition:
eff_scheduling_rot_wing.h:49
rot_wing_eff_sched_var_t::pitch_motor_dMdpprz
float pitch_motor_dMdpprz
Definition:
eff_scheduling_rot_wing.h:66
rot_wing_eff_sched_var_t::sinr3
float sinr3
Definition:
eff_scheduling_rot_wing.h:63
rotation_cmd
int16_t rotation_cmd
rot_wing_eff_sched_var_t::cmd_pusher_scaled
float cmd_pusher_scaled
Definition:
eff_scheduling_rot_wing.h:72
rot_wing_eff_sched_param_t::Ixx_wing
float Ixx_wing
Definition:
eff_scheduling_rot_wing.h:35
rot_wing_eff_sched_param_t::Iyy_wing
float Iyy_wing
Definition:
eff_scheduling_rot_wing.h:36
rot_wing_eff_sched_var_t::airspeed2
float airspeed2
Definition:
eff_scheduling_rot_wing.h:77
rot_wing_eff_sched_var_t::sinr
float sinr
Definition:
eff_scheduling_rot_wing.h:60
rot_wing_eff_sched_param_t::k_elevator_deflection
float k_elevator_deflection[2]
Definition:
eff_scheduling_rot_wing.h:46
rot_wing_eff_sched_var_t::roll_motor_dMdpprz
float roll_motor_dMdpprz
Definition:
eff_scheduling_rot_wing.h:67
rot_wing_eff_sched_var_t::Iyy
float Iyy
Definition:
eff_scheduling_rot_wing.h:56
rot_wing_eff_sched_param_t::hover_roll_pitch_coef
float hover_roll_pitch_coef[2]
Definition:
eff_scheduling_rot_wing.h:39
rot_wing_eff_sched_param_t::m
float m
Definition:
eff_scheduling_rot_wing.h:37
rot_wing_eff_sched_param_t
Definition:
eff_scheduling_rot_wing.h:31
rot_wing_eff_sched_var_t
Definition:
eff_scheduling_rot_wing.h:54
std.h
int16_t
short int16_t
Typedef defining 16 bit short type.
Definition:
vl53l1_types.h:93
sw
airborne
modules
ctrl
eff_scheduling_rot_wing.h
Generated on Wed Apr 24 2024 14:48:49 for Paparazzi UAS by
1.9.1