]> git.mxchange.org Git - flightgear.git/blob - src/AIModel/AIBallistic.hxx
7dca97c7531257bfa58b01e6c42bed825105e76a
[flightgear.git] / src / AIModel / AIBallistic.hxx
1 // FGAIBallistic - AIBase derived class creates an AI ballistic object
2 //
3 // Written by David Culp, started November 2003.
4 // - davidculp2@comcast.net
5 //
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.
10 //
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.
15 //
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., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 #ifndef _FG_AIBALLISTIC_HXX
21 #define _FG_AIBALLISTIC_HXX
22
23 #include "AIManager.hxx"
24 #include "AIBase.hxx"
25
26
27 class FGAIBallistic : public FGAIBase {
28         
29 public:
30         
31     FGAIBallistic(FGAIManager* mgr);
32     ~FGAIBallistic();
33         
34     bool init();
35     virtual void bind();
36     virtual void unbind();
37     void update(double dt);
38
39     void setAzimuth( double az );
40     void setElevation( double el );
41     void setStabilization( bool val );
42     void setDragArea( double a );
43     void setLife( double seconds );
44     void setBuoyancy( double fps2 );
45         
46 private:
47
48     double azimuth;         // degrees true
49     double elevation;       // degrees
50     double hs;              // horizontal speed (fps)
51     bool aero_stabilized;   // if true, object will point where it's going
52     double drag_area;       // equivalent drag area in ft2
53     double life_timer;      // seconds
54     double gravity;         // fps2
55     double buoyancy;        // fps2
56                 
57     void Run(double dt);
58 };
59
60 #endif  // _FG_AIBALLISTIC_HXX