//
// 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 "AIStorm.hxx"
-FGAIStorm::FGAIStorm(FGAIManager* mgr) {
- manager = mgr;
- _type_str = "thunderstorm";
- _otype = otStorm;
+FGAIStorm::FGAIStorm() : FGAIBase(otStorm) {
delay = 3.6;
subflashes = 1;
timer = 0.0;
FGAIStorm::~FGAIStorm() {
}
+void FGAIStorm::readFromScenario(SGPropertyNode* scFileNode) {
+ if (!scFileNode)
+ return;
+
+ FGAIBase::readFromScenario(scFileNode);
+
+ setDiameter(scFileNode->getDoubleValue("diameter-ft", 0.0)/6076.11549);
+ setHeight(scFileNode->getDoubleValue("height-msl", 5000.0));
+ setStrengthNorm(scFileNode->getDoubleValue("strength-norm", 1.0));
+}
bool FGAIStorm::init() {
return FGAIBase::init();
void FGAIStorm::Run(double dt) {
- FGAIStorm::dt = dt;
-
double speed_north_deg_sec;
double speed_east_deg_sec;