iLand
Public Slots | Public Member Functions | Static Public Attributes | Properties | List of all members
FireScript Class Reference

FireScript is the scripting shell for the fire module. More...

#include <firescript.h>

Inheritance diagram for FireScript:

Public Slots

double ignite (double x, double y, double firesize=-1, double windspeed=-1, double winddirection=-1)
 Ignite a fire event with pre-defined properties, i.e. More...
 
double igniteBurnIn (double x, double y, double length, double max_fire_size, bool simulate=false)
 
bool gridToFile (QString grid_type, QString file_name)
 create a "ESRI-grid" text file 'grid_type' is one of a fixed list of names, 'file_name' the ouptut file location More...
 
QJSValue grid (QString type)
 returns a ScriptGrid with the requested type More...
 
void setOnIgnitionRU (QJSValue onIgnitionRU)
 
void setOnCalculateFireSize (QJSValue onCalculateFireSize)
 

Public Member Functions

 FireScript (QObject *parent=nullptr)
 
void setFireModule (FireModule *module)
 
int id () const
 the id of the last ignited fire during the simulation More...
 
double x () const
 the x-coordinate of the last ignition More...
 
double y () const
 the x-coordinate of the last ignition More...
 
QJSValue onIgnitionRU () const
 
bool hasIgnitionRUHandler ()
 
double calcDyanmicManagementEffect (FireRUData *data)
 
bool hasCalculateFireSizeHandler ()
 
double calculateFireSize (const FireRUData *data, double distribution_value)
 
QJSValue onCalculateFireSize () const
 
QJSValue onIgnition () const
 
void setOnIgnition (QJSValue handler)
 

Static Public Attributes

static QString fireRUValueType =QLatin1String("")
 

Properties

int id
 
int x
 
int y
 
QJSValue onIgnitionRU
 
QJSValue onCalculateFireSize
 
QJSValue onIgnition
 

Detailed Description

FireScript is the scripting shell for the fire module.

Constructor & Destructor Documentation

◆ FireScript()

FireScript::FireScript ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ calcDyanmicManagementEffect()

double FireScript::calcDyanmicManagementEffect ( FireRUData data)

◆ calculateFireSize()

double FireScript::calculateFireSize ( const FireRUData data,
double  distribution_value 
)

◆ grid

QJSValue FireScript::grid ( QString  type)
slot

returns a ScriptGrid with the requested type

◆ gridToFile

bool FireScript::gridToFile ( QString  grid_type,
QString  file_name 
)
slot

create a "ESRI-grid" text file 'grid_type' is one of a fixed list of names, 'file_name' the ouptut file location

◆ hasCalculateFireSizeHandler()

bool FireScript::hasCalculateFireSizeHandler ( )
inline

◆ hasIgnitionRUHandler()

bool FireScript::hasIgnitionRUHandler ( )
inline

◆ id()

int FireScript::id ( ) const

the id of the last ignited fire during the simulation

◆ ignite

double FireScript::ignite ( double  x,
double  y,
double  firesize = -1,
double  windspeed = -1,
double  winddirection = -1 
)
slot

Ignite a fire event with pre-defined properties, i.e.

at a given location (parameters x_meter, y_meter) with given conditions (i.e. wind direction and speed). The fire size (as taken from the distribution) x_meter, y_meter: metric coordinates of the ignition point in the landscape firesize: provide a fire size (m2). The fire size will be drawn from the fire size distribution if firesize=-1 or omitted. windspeed: wind speed (m/s), drawn randomly if omitted or -1. winddirection: wind direction (0 deg =N..180deg=S..270=Wdeg), drawn randomly if omitted or set to -1. Returns the burnt area

◆ igniteBurnIn

double FireScript::igniteBurnIn ( double  x,
double  y,
double  length,
double  max_fire_size,
bool  simulate = false 
)
slot

◆ onCalculateFireSize()

QJSValue FireScript::onCalculateFireSize ( ) const
inline

◆ onIgnition()

QJSValue FireScript::onIgnition ( ) const
inline

◆ onIgnitionRU()

QJSValue FireScript::onIgnitionRU ( ) const
inline

◆ setFireModule()

void FireScript::setFireModule ( FireModule module)
inline

◆ setOnCalculateFireSize

void FireScript::setOnCalculateFireSize ( QJSValue  onCalculateFireSize)
inlineslot

◆ setOnIgnition()

void FireScript::setOnIgnition ( QJSValue  handler)
inline

◆ setOnIgnitionRU

void FireScript::setOnIgnitionRU ( QJSValue  onIgnitionRU)
inlineslot

◆ x()

double FireScript::x ( ) const

the x-coordinate of the last ignition

◆ y()

double FireScript::y ( ) const

the x-coordinate of the last ignition

Member Data Documentation

◆ fireRUValueType

QString FireScript::fireRUValueType =QLatin1String("")
static

Property Documentation

◆ id

int FireScript::id
read

◆ onCalculateFireSize

QJSValue FireScript::onCalculateFireSize
readwrite

◆ onIgnition

QJSValue FireScript::onIgnition
readwrite

◆ onIgnitionRU

QJSValue FireScript::onIgnitionRU
readwrite

◆ x

int FireScript::x
read

◆ y

int FireScript::y
read

The documentation for this class was generated from the following files: