Query to get the last strokes
The last calculated impact positions from all regions together up to the current time can be accessed using the following URL.
https://loginname:password@data.blitzortung.org/Data/Protected/last_strikes.php
The last 100,000 entries (with detector positions) / 1,000,000 entries (without detector positions) are taken into account. In order to keep the transfer rate as high as possible, the data is not read from a disk, but from main memory. The returned records are sorted time descending. The following parameters can be used to restrict the output:
parameter | output restriction | dafault |
number=n | the last n entries | 100 |
time=t | entries after time stamp t (nanoseconds since midnight on January 1, 1970) | current time stamp |
west=lon | entries with a longitude of at least lon (decimal) | -180 |
east=lon | entries with longitude of at most lon (decimal) | 180 |
north=lat | entries with a latitude of at most lat (decimal) | 90 |
south=lat | entries with a latitude of at least lat (decimal) | -90 |
sig=0/1 | entries excluding/including the information of the signals involved | 0 |
Example: The following url outputs the last 10 entries from the last 1000000 entries with a longitude between -10.0° and 40.0°, a latitude between 70.0° and 20.0°, and without the information about the signals involved.
Each line of the data output contains a JSON encoded variable with the following members.
column | description |
time | timestamp in nanoseconds since midnight on January 1, 1970 |
lat | latitude in degrees (decimal) |
lon | longitude in degrees (decimal) |
alt | altitude above sea level in meters |
pol | polarity, -1 or +1 |
mds | maximum deviation range in nanoseconds |
scs | smallest all-covering sector in degrees, formerly called mcg (example: 210 degrees = the detectors are in a sector of 150 degrees from the impact location) |
status | status (optional) |
sig | array of signals involved |
Each signal of the sig array may have the following members.
name | description |
sta | station that has received the signal |
time | time difference to the time of the lightning strike in nanoseconds |
lat | latitude of the detector in degree (decimal) |
lon | longitude of the detector in degree (decimal) |
alt | altitude of the detector above sea level in meters |
status | status of the signal (bit 1 = polarity negative, bit 2 = polarity positive, bit 3 = signal is used for the computation) |
container | container in that the stroke has been computed |
Embedding Live Vector Maps
Blitzortung.org's live vector map can be easily integrated with a fixed map style on own websites. The following parameters with values 0=false and 1=true define the controls.
parameter | value range | default value |
interactive | 0/1 | 0 |
NavigationControl | 0/1 | 1 |
FullScreenControl | 0/1 | 1 |
ScaleControl | 0/1 | 1 |
Advertisment | 0/1 | 1 |
InfoDiv | 0/1 | 1 |
Cookies | 0/1 | 1 |
status | 0/1 | 1 |
The settings in the menu can be controlled by the following parameters, see the examples:
parameter | value range | default value |
MapStyle | 0-2 | 0 |
MapStyleRangeValue | 0-11 | 0 |
LightningRangeValue | 0-23 | 0 |
LightningCheckboxChecked | 0/1 | 0 |
CourseRangeValue | 0-10 | 0 |
CourseCheckboxChecked | 0/1 | 0 |
CountingRangeValue | 0-10 | 0 |
CountingCheckboxChecked | 0/1 | 0 |
CirclesRangeValue | 0-10 | 0 |
CirclesCheckboxChecked | 0/1 | 0 |
SpeedRangeValue | 0-10 | 0 |
SpeedCheckboxChecked | 0/1 | 0 |
LinksRangeValue | 0-10 | 0 |
LinksCheckboxChecked | 0/1 | 0 |
DetectorsRangeValue | 0-10 | 0 |
DetectorsCheckboxChecked | 0/1 | 0 |
CoverageRangeValue | 0-1 | 0 |
CoverageCheckboxChecked | 0/1 | 0 |
DayNightRangeValue | 0/1 | 0 |
DayNightCheckboxChecked | 0/1 | 0 |
AudioRangeValue | 0-10 | 0 |
AudioCheckboxChecked | 0/1 | 0 |
RegionRangeValue | 0-10 | 0 |
RegionCheckboxChecked | 0/1 | 0 |
After copying the URL, remove the spaces.
<iframe src="https://map.blitzortung.org/index.php ?interactive=0 &NavigationControl=0 &FullScreenControl=0 &Cookies=0 &InfoDiv=0 &MenuButtonDiv=0 &ScaleControl=0 &LinksCheckboxChecked=1 &LinksRangeValue=10 &MapStyle=2 &MapStyleRangeValue=10 &Advertisment=0#3/40/15" width="480" height="360"></iframe>
<iframe src="https://map.blitzortung.org/index.php ?interactive=0 &NavigationControl=0 &FullScreenControl=0 &Cookies=0 &InfoDiv=0 &MenuButtonDiv=1 &ScaleControl=1 &LinksCheckboxChecked=1 &LinksRangeValue=10 &MapStyle=0 &MapStyleRangeValue=0 &Advertisment=0#5/51.2/10.0" width="500" height="600"></iframe>
<iframe src="https://map.blitzortung.org/index.php ?interactive=0 &NavigationControl=0 &FullScreenControl=0 &Cookies=0 &InfoDiv=1 &MenuButtonDiv=1 &ScaleControl=1 &LinksCheckboxChecked=1 &LinksRangeValue=10 &MapStyle=3 &MapStyleRangeValue=4 &Advertisment=0#5/36.5/135.0" width="800" height="800"></iframe>
PHP Maps
The following PHP program shows an example of how to display simple maps in Mercator projection on web servers with even with limited resources. The script can be used as a template and should be adapted to own needs. Maps in Mercator projection can be created using the map generator from Blitzortung.org. There are two PHP files, a configuration file and the main processing program. The main processing file will be included into the configuration file.
The configuration file:
//
// username and password from blitzortung.org
//
$username= "xxxxxxxx";
$password= "xxxxxxxx";
//
// the map dounds in decimal degree
//
$map= '../Graphics/Florida_-92.0_-76.0_38.0_24.3.png';
$north= 38.0;
$south= 24.3;
$west= -92.0;
$east= -76.0;
//
// local temporary file
//
$tmp_filename="tmp.json";
//
// time span in seconds
//
$time_span= 7200;
//
// some cities
//
$cities_array= array("33.75;-84.38;Atlanta",
"30.32;-81.67;Jacksonville",
"25.78;-80.22;Miami",
"27.93;-82.45;Tampa",
"33.52;-86.82;Birmingham",
"32.3;-90.18;Jackson",
"29.95;-90.08;New Orleans",
"34;-81.03;Columbia",
"35.23;-80.85;Charlotte");
//
// $stations_type: 0 = draw no stations
// $stations_type: 1 = draw stations without city names
// $stations_type: 2 = draw stations with city names
//
$stations_type= 2;
//
// include the main php program
include "main.php";
?>
- Configuration file: Florida.php (.txt)
- Main php program: main.php (.txt)
Websocket server
Live data can be accessed via websocket servers. However, this is only permitted to a limited extent. Do not access our websocket servers from highly frequented websites or via apps. Please observe our guidelines for handling our data. Demonstration of live data on commercial websites or via apps is not permitted.