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 
37 #include <eigen3/Eigen/Dense>
38 #include <ros/ros.h>
39 
40 namespace rosflight_sim
41 {
42 
44 {
45 private:
47 
48  // physical parameters
49  double mass_;
50  double Jx_;
51  double Jy_;
52  double Jz_;
53  double Jxz_;
54  double rho_;
55 
56  // aerodynamic coefficients
57  struct WingCoeff{
58  double S;
59  double b;
60  double c;
61  double M;
62  double epsilon;
63  double alpha0;
64  } wing_;
65 
66  // Propeller Coefficients
67  struct PropCoeff{
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  double O;
79  double alpha;
80  double beta;
81  double p;
82  double q;
83  double r;
84  double delta_a;
85  double delta_e;
86  double delta_r;
87  };
88 
95 
96  // not constants
97  // actuators
98  struct Actuators{
99  double e;
100  double a;
101  double r;
102  double t;
103  } delta_;
104 
105  // wind
106  Eigen::Vector3d wind_;
107 
108 public:
110  ~Fixedwing();
111 
112  Eigen::Matrix<double, 6, 1> updateForcesAndTorques(Current_State x, const int act_cmds[]);
113  void set_wind(Eigen::Vector3d wind);
114 };
115 
116 } // namespace rosflight_sim
117 
118 #endif // ROSFLIGHT_SIM_FIXEDWING_FORCES_AND_MOMENTS_H
Eigen::Matrix< double, 6, 1 > updateForcesAndTorques(Current_State x, const int act_cmds[])
void set_wind(Eigen::Vector3d wind)
struct rosflight_sim::Fixedwing::PropCoeff prop_
struct rosflight_sim::Fixedwing::Actuators delta_
struct rosflight_sim::Fixedwing::WingCoeff wing_


rosflight_sim
Author(s): James Jackson, Gary Ellingson, Daniel Koch
autogenerated on Wed Jul 3 2019 20:00:29