MyBlitzortung stores each flash with all its individual information.. However, often you're only interested in the number of strikes in a region. It would cause very long time and a high server load to calculate these details from every single strike. Therefore MyBlitzortung offers the possibility, to summarize these data in a compressed form at regular intervals . From this data it can create strike maps that cover a big area and a long periods of time.
The strike densities can also be calculated per station, so that you can also visualize the strike ratio of your station. This can be a valuable aid for proper adjustment of your station.
The calculation is turned off by default and has to be switched on separately (see below). Since it is challenging for your server and may take some time, it is performed bit by bit after the update process. In this context it is useful, to set the cronjob interval to only one minute. The calculation would otherwise take even longer. Of course, the import of the lightning data comes always at first.
The calculation is always done for the last month or last year, usually on the first of the month or at the turn of the year (shortly after 0 o'clock). The annual data is calculated from the monthly strike densities, so at least the flash data from the last 32 days has to be present. For different areas the grid can be changed by size. The default preset for Europe is 10km and for Germany 2km. You can add as many individual grids as you want. The data is stored in a binary and compressed format and requires only a few kilobytes for each region and period.
define("BO_ENABLE_DENSITIES", true);Turns on the flash densities for guests (the menu item in the archive)define("BO_CALC_DENSITIES", true);Enables the calculation of strike densitiesdefine("BO_CALC_DENSITIES_CURRENT", true);The flash densities are also calculated for the current month / current year (daily load on the webserver after 0 o'clock!)define("BO_DENSITY_STATIONS", '1,2,3');Calculate strike densities for another stations. The value of the constant BO_PURGE_STRSTA_ALL should be big enough (at least 1 month + 1 day, that means 32 * 24 hours).The calculation is done according to the following settings:
$_BO['density'][0]['name'] = 'Europe';Name
$_BO['density'][0]['coord'] = array(70, 52, 20, -22);Coordinates that define the area, in which the densities should be calculated. This area is split in many smaller areas with equal edge lengths, in which the strikes are aummarized.
$_BO['density'][0]['length'] = 10;Edge size in kilometers of an element. Here 10×10 km.
$_BO['density'][0]['bps'] = 2;Bytes per element. With 2 Bytes, up to 65535 strikes can be count. This should be sufficient for an area of ??100km² for one year.To view the strike densities on existing maps, you have to add some more sentries to the desired map variable. With this procedure, it is possible to calculate densities for a wide area (i.e. Europe) but several cards for this area to offer, that accesses the data once created. For this, it is important, that the coordinates of the map do not exceed those from the calculation area!
$_BO['mapimg'][0]['density'] = true;Enable display of strike densities on that map.
$_BO['mapimg'][0]['density_blocksize'] = 10;Block size in pixels. The value shouldn't be too small.
$_BO['mapimg'][0]['density_colors'] = $_BO['density_colors'];Color code as in the other variables. The variable $ _BO['tpl_density_colors'] is an integrated standard template for the color information.$_BO['mapimg'][0]['density_colors'][] = array( 0, 0, 255, 110);
$_BO['mapimg'][0]['density_colors'][] = array(50, 100, 255, 40);
$_BO['mapimg'][0]['density_colors'][] = array(50, 150, 150, 15);
...
$_BO['mapimg'][0]['density_darken'] = 40;Darkening of the map as a percentage.