Main Page
Namespaces
Classes
Files
File List
File Members
include
rosflight_sim
fixedwing_forces_and_moments.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Daniel Koch, James Jackson and Gary Ellingson, BYU MAGICC Lab.
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
*
8
* * Redistributions of source code must retain the above copyright notice, this
9
* list of conditions and the following disclaimer.
10
*
11
* * Redistributions in binary form must reproduce the above copyright notice,
12
* this list of conditions and the following disclaimer in the documentation
13
* and/or other materials provided with the distribution.
14
*
15
* * Neither the name of the copyright holder nor the names of its
16
* contributors may be used to endorse or promote products derived from
17
* this software without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
* POSSIBILITY OF SUCH DAMAGE.
30
*/
31
32
#ifndef ROSFLIGHT_SIM_FIXEDWING_FORCES_AND_MOMENTS_H
33
#define ROSFLIGHT_SIM_FIXEDWING_FORCES_AND_MOMENTS_H
34
35
#include <
ros/ros.h
>
36
#include <
rosflight_sim/mav_forces_and_moments.h
>
37
#include <eigen3/Eigen/Dense>
38
39
namespace
rosflight_sim
40
{
41
class
Fixedwing
:
public
MAVForcesAndMoments
42
{
43
private
:
44
ros::NodeHandle
*
nh_
;
45
46
// physical parameters
47
double
mass_
;
48
double
Jx_
;
49
double
Jy_
;
50
double
Jz_
;
51
double
Jxz_
;
52
double
rho_
;
53
54
// aerodynamic coefficients
55
struct
WingCoeff
56
{
57
double
S
;
58
double
b
;
59
double
c
;
60
double
M
;
61
double
epsilon
;
62
double
alpha0
;
63
}
wing_
;
64
65
// Propeller Coefficients
66
struct
PropCoeff
67
{
68
double
k_motor
;
69
double
k_T_P
;
70
double
k_Omega
;
71
double
e
;
72
double
S
;
73
double
C
;
74
}
prop_
;
75
76
// Lift Coefficients
77
struct
LiftCoeff
78
{
79
double
O
;
80
double
alpha
;
81
double
beta
;
82
double
p
;
83
double
q
;
84
double
r
;
85
double
delta_a
;
86
double
delta_e
;
87
double
delta_r
;
88
};
89
90
LiftCoeff
CL_
;
91
LiftCoeff
CD_
;
92
LiftCoeff
Cm_
;
93
LiftCoeff
CY_
;
94
LiftCoeff
Cell_
;
95
LiftCoeff
Cn_
;
96
97
// not constants
98
// actuators
99
struct
Actuators
100
{
101
double
e
;
102
double
a
;
103
double
r
;
104
double
t
;
105
}
delta_
;
106
107
// wind
108
Eigen::Vector3d
wind_
;
109
110
public
:
111
Fixedwing
(
ros::NodeHandle
* nh);
112
~Fixedwing
();
113
114
Eigen::Matrix<double, 6, 1>
updateForcesAndTorques
(
Current_State
x,
const
int
act_cmds[]);
115
void
set_wind
(Eigen::Vector3d wind);
116
};
117
118
}
// namespace rosflight_sim
119
120
#endif // ROSFLIGHT_SIM_FIXEDWING_FORCES_AND_MOMENTS_H
rosflight_sim::Fixedwing::PropCoeff::e
double e
Definition:
fixedwing_forces_and_moments.h:71
mav_forces_and_moments.h
rosflight_sim::Fixedwing::Jxz_
double Jxz_
Definition:
fixedwing_forces_and_moments.h:51
rosflight_sim::Fixedwing::LiftCoeff::O
double O
Definition:
fixedwing_forces_and_moments.h:79
rosflight_sim::Fixedwing::LiftCoeff::r
double r
Definition:
fixedwing_forces_and_moments.h:84
ros::NodeHandle
rosflight_sim::Fixedwing::PropCoeff::k_T_P
double k_T_P
Definition:
fixedwing_forces_and_moments.h:69
rosflight_sim::Fixedwing::LiftCoeff
Definition:
fixedwing_forces_and_moments.h:77
rosflight_sim::Fixedwing::CD_
LiftCoeff CD_
Definition:
fixedwing_forces_and_moments.h:91
rosflight_sim::Fixedwing
Definition:
fixedwing_forces_and_moments.h:41
rosflight_sim::MAVForcesAndMoments
Definition:
mav_forces_and_moments.h:39
rosflight_sim::Fixedwing::Jx_
double Jx_
Definition:
fixedwing_forces_and_moments.h:48
rosflight_sim::MAVForcesAndMoments::Current_State
Definition:
mav_forces_and_moments.h:55
rosflight_sim::Fixedwing::updateForcesAndTorques
Eigen::Matrix< double, 6, 1 > updateForcesAndTorques(Current_State x, const int act_cmds[])
Definition:
fixedwing_forces_and_moments.cpp:133
rosflight_sim::Fixedwing::Actuators::t
double t
Definition:
fixedwing_forces_and_moments.h:104
rosflight_sim::Fixedwing::LiftCoeff::beta
double beta
Definition:
fixedwing_forces_and_moments.h:81
rosflight_sim::Fixedwing::PropCoeff
Definition:
fixedwing_forces_and_moments.h:66
rosflight_sim::Fixedwing::LiftCoeff::alpha
double alpha
Definition:
fixedwing_forces_and_moments.h:80
rosflight_sim::Fixedwing::Jz_
double Jz_
Definition:
fixedwing_forces_and_moments.h:50
rosflight_sim::Fixedwing::Actuators::a
double a
Definition:
fixedwing_forces_and_moments.h:102
rosflight_sim::Fixedwing::WingCoeff
Definition:
fixedwing_forces_and_moments.h:55
rosflight_sim::Fixedwing::LiftCoeff::delta_e
double delta_e
Definition:
fixedwing_forces_and_moments.h:86
rosflight_sim::Fixedwing::WingCoeff::S
double S
Definition:
fixedwing_forces_and_moments.h:57
rosflight_sim::Fixedwing::set_wind
void set_wind(Eigen::Vector3d wind)
Definition:
fixedwing_forces_and_moments.cpp:218
rosflight_sim::Fixedwing::Cn_
LiftCoeff Cn_
Definition:
fixedwing_forces_and_moments.h:95
rosflight_sim::Fixedwing::Actuators
Definition:
fixedwing_forces_and_moments.h:99
rosflight_sim::Fixedwing::WingCoeff::epsilon
double epsilon
Definition:
fixedwing_forces_and_moments.h:61
rosflight_sim::Fixedwing::Fixedwing
Fixedwing(ros::NodeHandle *nh)
Definition:
fixedwing_forces_and_moments.cpp:36
rosflight_sim::Fixedwing::prop_
struct rosflight_sim::Fixedwing::PropCoeff prop_
rosflight_sim::Fixedwing::Cell_
LiftCoeff Cell_
Definition:
fixedwing_forces_and_moments.h:94
rosflight_sim::Fixedwing::WingCoeff::c
double c
Definition:
fixedwing_forces_and_moments.h:59
rosflight_sim::Fixedwing::LiftCoeff::q
double q
Definition:
fixedwing_forces_and_moments.h:83
rosflight_sim::Fixedwing::CL_
LiftCoeff CL_
Definition:
fixedwing_forces_and_moments.h:90
rosflight_sim::Fixedwing::Jy_
double Jy_
Definition:
fixedwing_forces_and_moments.h:49
rosflight_sim
Definition:
fixedwing_forces_and_moments.h:39
ros.h
rosflight_sim::Fixedwing::wind_
Eigen::Vector3d wind_
Definition:
fixedwing_forces_and_moments.h:108
rosflight_sim::Fixedwing::delta_
struct rosflight_sim::Fixedwing::Actuators delta_
rosflight_sim::Fixedwing::PropCoeff::k_Omega
double k_Omega
Definition:
fixedwing_forces_and_moments.h:70
rosflight_sim::Fixedwing::WingCoeff::b
double b
Definition:
fixedwing_forces_and_moments.h:58
rosflight_sim::Fixedwing::LiftCoeff::delta_a
double delta_a
Definition:
fixedwing_forces_and_moments.h:85
rosflight_sim::Fixedwing::LiftCoeff::delta_r
double delta_r
Definition:
fixedwing_forces_and_moments.h:87
rosflight_sim::Fixedwing::Cm_
LiftCoeff Cm_
Definition:
fixedwing_forces_and_moments.h:92
rosflight_sim::Fixedwing::mass_
double mass_
Definition:
fixedwing_forces_and_moments.h:47
rosflight_sim::Fixedwing::PropCoeff::k_motor
double k_motor
Definition:
fixedwing_forces_and_moments.h:68
rosflight_sim::Fixedwing::nh_
ros::NodeHandle * nh_
Definition:
fixedwing_forces_and_moments.h:44
rosflight_sim::Fixedwing::CY_
LiftCoeff CY_
Definition:
fixedwing_forces_and_moments.h:93
rosflight_sim::Fixedwing::WingCoeff::M
double M
Definition:
fixedwing_forces_and_moments.h:60
rosflight_sim::Fixedwing::Actuators::e
double e
Definition:
fixedwing_forces_and_moments.h:101
rosflight_sim::Fixedwing::PropCoeff::S
double S
Definition:
fixedwing_forces_and_moments.h:72
rosflight_sim::Fixedwing::wing_
struct rosflight_sim::Fixedwing::WingCoeff wing_
rosflight_sim::Fixedwing::WingCoeff::alpha0
double alpha0
Definition:
fixedwing_forces_and_moments.h:62
rosflight_sim::Fixedwing::~Fixedwing
~Fixedwing()
rosflight_sim::Fixedwing::rho_
double rho_
Definition:
fixedwing_forces_and_moments.h:52
rosflight_sim::Fixedwing::PropCoeff::C
double C
Definition:
fixedwing_forces_and_moments.h:73
rosflight_sim::Fixedwing::Actuators::r
double r
Definition:
fixedwing_forces_and_moments.h:103
rosflight_sim::Fixedwing::LiftCoeff::p
double p
Definition:
fixedwing_forces_and_moments.h:82
rosflight_sim
Author(s): James Jackson, Gary Ellingson, Daniel Koch
autogenerated on Thu Apr 15 2021 05:09:57