LiftDragPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 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_PLUGINS_LIFTDRAGPLUGIN_HH_
18 #define GAZEBO_PLUGINS_LIFTDRAGPLUGIN_HH_
19 
20 #include <string>
21 #include <vector>
22 
23 #include <ignition/math/Vector3.hh>
24 
25 #include "gazebo/common/Plugin.hh"
26 #include "gazebo/physics/physics.hh"
28 
29 namespace gazebo
30 {
33  {
35  public: LiftDragPlugin();
36 
38  public: ~LiftDragPlugin();
39 
40  // Documentation Inherited.
41  public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
42 
44  protected: virtual void OnUpdate();
45 
48 
51 
54 
57 
61  protected: double cla;
62 
66  protected: double cda;
67 
71  protected: double cma;
72 
74  protected: double alphaStall;
75 
77  protected: double claStall;
78 
80  protected: double cdaStall;
81 
83  protected: double cmaStall;
84 
86  protected: double velocityStall;
87 
91  protected: double rho;
92 
97  protected: bool radialSymmetry;
98 
100  protected: double area;
101 
103  protected: double sweep;
104 
106  protected: double alpha0;
107 
109  protected: double alpha;
110 
112  protected: ignition::math::Vector3d cp;
113 
116  protected: ignition::math::Vector3d forward;
117 
121  protected: ignition::math::Vector3d upward;
122 
124  protected: ignition::math::Vector3d velSmooth;
125 
127  protected: physics::LinkPtr link;
128 
132 
135  protected: double controlJointRadToCL;
136 
138  protected: sdf::ElementPtr sdf;
139  };
140 }
141 #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:71
double claStall
Cl-alpha rate after stall.
Definition: LiftDragPlugin.hh:77
double cla
Coefficient of Lift / alpha slope.
Definition: LiftDragPlugin.hh:61
double sweep
angle of sweep
Definition: LiftDragPlugin.hh:103
sdf::ElementPtr sdf
SDF for this plugin;.
Definition: LiftDragPlugin.hh:138
Forward declarations for transport.
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
double cdaStall
Cd-alpha rate after stall.
Definition: LiftDragPlugin.hh:80
double velocityStall
: : make a stall velocity curve
Definition: LiftDragPlugin.hh:86
physics::ModelPtr model
Pointer to model containing plugin.
Definition: LiftDragPlugin.hh:56
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:125
physics::LinkPtr link
Pointer to link currently targeted by mud joint.
Definition: LiftDragPlugin.hh:127
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:91
physics::PhysicsEnginePtr physics
Pointer to physics engine.
Definition: LiftDragPlugin.hh:53
double cda
Coefficient of Drag / alpha slope.
Definition: LiftDragPlugin.hh:66
ignition::math::Vector3d upward
A vector in the lift/drag plane, perpendicular to the forward vector.
Definition: LiftDragPlugin.hh:121
physics::WorldPtr world
Pointer to world.
Definition: LiftDragPlugin.hh:50
A plugin that simulates lift and drag.
Definition: LiftDragPlugin.hh:32
double controlJointRadToCL
how much to change CL per radian of control surface joint value.
Definition: LiftDragPlugin.hh:135
ignition::math::Vector3d forward
Normally, this is taken as a direction parallel to the chord of the airfoil in zero angle of attack f...
Definition: LiftDragPlugin.hh:116
ignition::math::Vector3d cp
center of pressure in link local coordinates
Definition: LiftDragPlugin.hh:112
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
double alpha
angle of attack
Definition: LiftDragPlugin.hh:109
double alphaStall
angle of attach when airfoil stalls
Definition: LiftDragPlugin.hh:74
double area
effective planeform surface area
Definition: LiftDragPlugin.hh:100
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
double alpha0
initial angle of attack
Definition: LiftDragPlugin.hh:106
bool radialSymmetry
if the shape is aerodynamically radially symmetric about the forward direction.
Definition: LiftDragPlugin.hh:97
event::ConnectionPtr updateConnection
Connection to World Update events.
Definition: LiftDragPlugin.hh:47
physics::JointPtr controlJoint
Pointer to a joint that actuates a control surface for this lifting body.
Definition: LiftDragPlugin.hh:131
A plugin with access to physics::Model.
Definition: Plugin.hh:260
double cmaStall
Cm-alpha rate after stall.
Definition: LiftDragPlugin.hh:83
ignition::math::Vector3d velSmooth
Smoothed velocity.
Definition: LiftDragPlugin.hh:124
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:58