Database and JSON

This dialog is opened by pressing shortcut key CTRL+C or via menu Options->Configuration and selecting the Database and JSON tab

 

Here you can configure database storage options and JSON formatted real-time data uploading.

 

SQLite database storage options

Store data to daily database - If enabled NGX Data Server will save each captured strike event to daily SQLite database archives. A new daily database archive will be created after midnight every day.

 

Database folder - Lets you select a folder where all NGX Data Server databases will be stored.

 

NGX Data Server database files follow the naming convention NGXDS_YYYYMMDD.db3 where...

  • YYYY is the year (4 digits)
  • MM is month (2 digits, 01-12)
  • DD is day (2 digits, 01-31).

The SQLite database engine allows concurrent reads which means that the contents of an active daily database can be viewed and extracted even when it is in use by NGX Data Server.

 

For viewing contents of NGX Data Server databases or exploring the structure we recommend DB Browser for SQLite which is a free database browser for SQLite compatible databases.

 

 

Database fields

Field name     Description Value type Example
ID Unique sequential identifier number INTEGER 1
EPOCH_MS Time of event, Epoch time milliseconds INT(8) 1431686391000
DATETIME_UTC Time of event UTC, human readable form TEXT 2015-05-15 10:39:47.000
LATITUDE Latitude of event, Degrees Decimal format REAL 36.2352717492458
LONGITUDE Longitude of event, Degrees Decimal format REAL -3.14798434599177
TYPE Stroke type* INT 1

 

* Stroke types are defined as follows:

0 - Positive cloud to ground

1 - Negative cloud to ground

2 - Cloud flash

3 - Uncategorized/undefined

99 - Uncategorized/undefined

 

IMPORTANT NOTE: In custom database applications or with any type of database browser software, make sure that you do not lock the active daily database for reading or writing. Doing so may produce unpredictable results and will likely cause NGX Data Server database storage feature to malfunction.

 

Note that if the Strike rate limiter is set and strike rates exceed the defined limit, a reduced amount of lightning data will be stored to the database. If your primary use is for database storage you can increase Strike rate limiter to 4000 strikes/minute to ensure all received data is stored to the database.

 

JSON format export

Upload JSON formatted real-time data - If enabled NGX Data Server will upload two JSON formatted files, one containing latest strike and storm events and another containing data aged up to 1 hour. The upload target folder is the Data directory defined in FTP Settings.

 

JSON stands for JavaScript Object Notation and JSON formatted files are primarily intended for use in Javascript applications which natively support this format. One such example is the StormStation 5 NGX application which is part of the StormVue NGX suite.