]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/submodel.hxx
Interim windows build fix
[flightgear.git] / src / AIModel / submodel.hxx
index 5546f0df242bc283872f16258b4e63cb664e0dd7..02de6d6e13dd69951653dc4de72933490f313408 100644 (file)
@@ -20,8 +20,6 @@
 #include <vector>
 #include <string>
 
-using FGXMLAutopilot::InputValue_ptr;
-
 class FGAIBase;
 class FGAIManager;
 
@@ -36,8 +34,6 @@ public:
         SGPropertyNode_ptr contents_node;
         SGPropertyNode_ptr submodel_node;
         SGPropertyNode_ptr speed_node;
-        InputValue_ptr yaw_node;
-        InputValue_ptr pitch_node;
 
         std::string        name;
         std::string        model;
@@ -47,13 +43,19 @@ public:
         double             delay;
         double             timer;
         int                count;
-        double             x_offset;
-        double             y_offset;
-        double             z_offset;
+        bool               offsets_in_meter;
+        FGXMLAutopilot::InputValue_ptr x_offset;
+        FGXMLAutopilot::InputValue_ptr y_offset;
+        FGXMLAutopilot::InputValue_ptr z_offset;
+        FGXMLAutopilot::InputValue_ptr yaw_offset;
+        FGXMLAutopilot::InputValue_ptr pitch_offset;
         double             drag_area;
         double             life;
         double             buoyancy;
-        double             randomness;
+        FGXMLAutopilot::InputValue_ptr azimuth_error;
+        FGXMLAutopilot::InputValue_ptr elevation_error;
+        FGXMLAutopilot::InputValue_ptr cd_randomness;
+        FGXMLAutopilot::InputValue_ptr life_randomness;
         bool               wind;
         bool               first_time;
         double             cd;
@@ -90,9 +92,6 @@ public:
         double     speed_down_fps;
         double     speed_east_fps;
         double     speed_north_fps;
-        double     total_speed_down;
-        double     total_speed_east;
-        double     total_speed_north;
         double     mass;
         int        id;
         bool       no_roll;
@@ -119,14 +118,6 @@ private:
     submodel_vector_type       subsubmodels;
     submodel_vector_iterator   submodel_iterator, subsubmodel_iterator;
 
-    //double Rx, Ry, Rz;
-    //double Sx, Sy, Sz;
-    //double Tx, Ty, Tz;
-
-    float cosRx, sinRx;
-    float cosRy, sinRy;
-    float cosRz, sinRz;
-
     int index;
 
     double ft_per_deg_longitude;
@@ -142,14 +133,13 @@ private:
     double _parent_pitch;
     double _parent_roll;
     double _parent_speed;
-    //double _parent_ID;
 
     double _x_offset;
     double _y_offset;
     double _z_offset;
 
-
-    static const double lbs_to_slugs; //conversion factor
+    // Conversion factor
+    static const double lbs_to_slugs;
 
     double contrail_altitude;
 
@@ -183,23 +173,18 @@ private:
     SGPropertyNode_ptr _selected_ac;
 
     IC_struct  IC;
-    
-    /**
-     * Helper to retrieve the AI manager, if it currently exists
-     */
+
+    // Helper to retrieve the AI manager, if it currently exists
     FGAIManager* aiManager();
-    
+
     void loadAI();
     void loadSubmodels();
-    void setData(int id, const std::string& path, bool serviceable);
-    void setSubData(int id, const std::string& path, bool serviceable);
+    void setData(int id, const std::string& path, bool serviceable, const std::string& property_path, submodel_vector_type& models);
     void valueChanged (SGPropertyNode *);
     void transform(submodel *);
     void setParentNode(int parent_id);
-
     bool release(submodel *, double dt);
 
-
     int _count;
 
     SGGeod userpos;