1 // FGAIBallistic.hxx - AIBase derived class creates an AI ballistic object
3 // Written by David Culp, started November 2003.
4 // - davidculp2@comcast.net
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License as
8 // published by the Free Software Foundation; either version 2 of the
9 // License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef _FG_AIBALLISTIC_HXX
21 #define _FG_AIBALLISTIC_HXX
23 #include "AIManager.hxx"
27 class FGAIBallistic : public FGAIBase {
34 void readFromScenario(SGPropertyNode* scFileNode);
36 bool init(bool search_in_AI_path=false);
38 virtual void unbind();
40 void update(double dt);
42 void setAzimuth( double az );
43 void setElevation( double el );
44 void setRoll( double rl );
45 void setStabilisation( bool val );
46 void setDragArea( double a );
47 void setLife( double seconds );
48 void setBuoyancy( double fpss );
49 void setWind_from_east( double fps );
50 void setWind_from_north( double fps );
51 void setWind( bool val );
52 void setCd( double c );
53 void setMass( double m );
54 void setNoRoll( bool nr );
55 void setRandom( bool r );
56 void setName(const string&);
58 double _getTime() const;
60 virtual const char* getTypeString(void) const { return "ballistic"; }
64 double azimuth; // degrees true
65 double elevation; // degrees
66 double rotation; // degrees
67 bool aero_stabilised; // if true, object will align with trajectory
68 double drag_area; // equivalent drag area in ft2
69 double life_timer; // seconds
70 double gravity; // fps2
71 double buoyancy; // fps2
72 double wind_from_east; // fps
73 double wind_from_north; // fps
74 bool wind; // if true, local wind will be applied to object
75 double Cd; // drag coefficient
77 bool random; // modifier for Cd
83 #endif // _FG_AIBALLISTIC_HXX