//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifdef HAVE_CONFIG_H
# include <config.h>
#include "AIThermal.hxx"
-FGAIThermal::FGAIThermal(FGAIManager* mgr) {
- manager = mgr;
- _type_str = "thermal";
- _otype = otThermal;
+FGAIThermal::FGAIThermal() : FGAIBase(otThermal) {
max_strength = 6.0;
diameter = 0.5;
strength = factor = 0.0;
}
-
FGAIThermal::~FGAIThermal() {
}
+void FGAIThermal::readFromScenario(SGPropertyNode* scFileNode) {
+ if (!scFileNode)
+ return;
+
+ FGAIBase::readFromScenario(scFileNode);
+
+ setMaxStrength(scFileNode->getDoubleValue("strength-fps", 8.0));
+ setDiameter(scFileNode->getDoubleValue("diameter-ft", 0.0)/6076.11549);
+ setHeight(scFileNode->getDoubleValue("height-msl", 5000.0));
+}
bool FGAIThermal::init() {
factor = 8.0 * max_strength / (diameter * diameter * diameter);
void FGAIThermal::Run(double dt) {
- FGAIThermal::dt = dt;
-
//###########################//
// do calculations for range //
//###########################//