LiftDragPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_LIFT_DRAG_PLUGIN_HH_
18 #define _GAZEBO_LIFT_DRAG_PLUGIN_HH_
19 
20 #include <string>
21 #include <vector>
22 
23 #include "gazebo/common/Plugin.hh"
24 #include "gazebo/physics/physics.hh"
26 
27 namespace gazebo
28 {
31  {
33  public: LiftDragPlugin();
34 
36  public: ~LiftDragPlugin();
37 
38  // Documentation Inherited.
39  public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
40 
42  protected: virtual void OnUpdate();
43 
46 
49 
52 
55 
59  protected: double cla;
60 
64  protected: double cda;
65 
69  protected: double cma;
70 
72  protected: double alphaStall;
73 
75  protected: double claStall;
76 
78  protected: double cdaStall;
79 
81  protected: double cmaStall;
82 
84  protected: double velocityStall;
85 
89  protected: double rho;
90 
95  protected: bool radialSymmetry;
96 
98  protected: double area;
99 
101  protected: double sweep;
102 
104  protected: double alpha0;
105 
107  protected: double alpha;
108 
110  protected: math::Vector3 cp;
111 
114  protected: math::Vector3 forward;
115 
119  protected: math::Vector3 upward;
120 
123 
125  protected: physics::LinkPtr link;
126 
130 
133  protected: double controlJointRadToCL;
134 
136  protected: sdf::ElementPtr sdf;
137  };
138 }
139 #endif
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:89
double cma
Coefficient of Moment / alpha slope.
Definition: LiftDragPlugin.hh:69
math::Vector3 velSmooth
Smoothed velocity.
Definition: LiftDragPlugin.hh:122
double claStall
Cl-alpha rate after stall.
Definition: LiftDragPlugin.hh:75
double cla
Coefficient of Lift / alpha slope.
Definition: LiftDragPlugin.hh:59
double sweep
angle of sweep
Definition: LiftDragPlugin.hh:101
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
sdf::ElementPtr sdf
SDF for this plugin;.
Definition: LiftDragPlugin.hh:136
Forward declarations for transport.
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
double cdaStall
Cd-alpha rate after stall.
Definition: LiftDragPlugin.hh:78
double velocityStall
: : make a stall velocity curve
Definition: LiftDragPlugin.hh:84
math::Vector3 cp
center of pressure in link local coordinates
Definition: LiftDragPlugin.hh:110
physics::ModelPtr model
Pointer to model containing plugin.
Definition: LiftDragPlugin.hh:54
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:125
physics::LinkPtr link
Pointer to link currently targeted by mud joint.
Definition: LiftDragPlugin.hh:125
double rho
air density at 25 deg C it's about 1.1839 kg/m^3 At 20 °C and 101.325 kPa, dry air has a density of 1...
Definition: LiftDragPlugin.hh:89
physics::PhysicsEnginePtr physics
Pointer to physics engine.
Definition: LiftDragPlugin.hh:51
double cda
Coefficient of Drag / alpha slope.
Definition: LiftDragPlugin.hh:64
physics::WorldPtr world
Pointer to world.
Definition: LiftDragPlugin.hh:48
A plugin that simulates lift and drag.
Definition: LiftDragPlugin.hh:30
double controlJointRadToCL
how much to change CL per radian of control surface joint value.
Definition: LiftDragPlugin.hh:133
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:153
double alpha
angle of attack
Definition: LiftDragPlugin.hh:107
double alphaStall
angle of attach when airfoil stalls
Definition: LiftDragPlugin.hh:72
double area
effective planeform surface area
Definition: LiftDragPlugin.hh:98
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
math::Vector3 upward
A vector in the lift/drag plane, perpendicular to the forward vector.
Definition: LiftDragPlugin.hh:119
double alpha0
initial angle of attack
Definition: LiftDragPlugin.hh:104
math::Vector3 forward
Normally, this is taken as a direction parallel to the chord of the airfoil in zero angle of attack f...
Definition: LiftDragPlugin.hh:114
bool radialSymmetry
if the shape is aerodynamically radially symmetric about the forward direction.
Definition: LiftDragPlugin.hh:95
event::ConnectionPtr updateConnection
Connection to World Update events.
Definition: LiftDragPlugin.hh:45
physics::JointPtr controlJoint
Pointer to a joint that actuates a control surface for this lifting body.
Definition: LiftDragPlugin.hh:129
A plugin with access to physics::Model.
Definition: Plugin.hh:245
double cmaStall
Cm-alpha rate after stall.
Definition: LiftDragPlugin.hh:81
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59