]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIStorm.hxx
Fix line endings
[flightgear.git] / src / AIModel / AIStorm.hxx
index 2f8d45feb7cf8eb4bb15fc7836b38b04c259a6fd..17980f21fb5b8bfa41fb96165d2533b3216219e2 100644 (file)
@@ -32,21 +32,46 @@ class FGAIStorm : public FGAIBase {
 
 public:
 
-       FGAIStorm(FGAIManager* mgr);
+       FGAIStorm();
        ~FGAIStorm();
        
-       bool init();
+        void readFromScenario(SGPropertyNode* scFileNode);
+
+       virtual bool init();
         virtual void bind();
         virtual void unbind();
-       void update(double dt);
+       virtual void update(double dt);
+        inline void setStrengthNorm( double s ) { strength_norm = s; };
+        inline void setDiameter( double d ) { diameter = d; };
+        inline void setHeight( double h ) { height = h; };
+        inline double getStrengthNorm() const { return strength_norm; };
+        inline double getDiameter() const { return diameter; };
+        inline double getHeight() const { return height; };
+
+        virtual const char* getTypeString(void) const { return "thunderstorm"; }
 
-protected:
-        static FGAIStorm *_self;
-       
 private:
 
-        double dt; 
+        double diameter;      // diameter of turbulence zone, in nm
+        double height;        // top of turbulence zone, in feet MSL
+        double strength_norm; // strength of turbulence
        void Run(double dt);
+
+        // lightning stuff
+        double delay;   // average time (sec) between lightning flashes
+        int subflashes; // number of subflashes per flash
+        double random_delay;  // delay +/- random number
+        double timer; 
+        SGPropertyNode* flash_node; 
+        int flashed;    // number of subflashes already done this flash
+        bool flashing;  // true if currently flashing;
+        int subflash_array[8];
+        int subflash_index;
+
+        // turbulence stuff
+        SGPropertyNode* turb_mag_node;
+        SGPropertyNode* turb_rate_node;
+
 };