%
% DESCRIPTION: Program to create the Blast Information GDF file in the Matlab format.
% 
% [TimeZone] and [Description] have text format so the values give in ''


clear;clc;
[FormatName] = 'GDF';
[FormatVersion] = 2.1;
[CRS] = 'n/a'%['EPSG:' num2str(input('[CRS] EPSG code (just number) = '))];
[TimeZone] = 'UTC' %input('TimeZone (char) = ');
[Description] = 'Description of the dataset' %input('Description of data (char) = ');
         
[FieldDescription] = {
    'Blast_target','Blast target'
    'Date','Date of the blast'
    'Lat','Latitude of the blast'
    'Long','Longitude of the blast'
    'Elevation','Elevation of the blast'
    };
[FieldType] = {
    'Blast_target',3
    'Date',5
    'Lat',24
    'Long',24
    'Elevation',4
    };
[FieldUnit] = {
    'Blast_target','char'
    'Date','datenum'
    'Lat','deg'
    'Long','deg'
    'Elevation','m'
    };

[d] = struct();

k=1
d(k).Blast_target=[];
d(k).Date=[];
d(k).Lat=[];
d(k).Long=[];
d(k).Elevation=[];
 
 
k=2
d(k).Blast_target=[];
d(k).Date=[];
d(k).Lat=[];
d(k).Long=[];
d(k).Elevation=[];

k=3
d(k).Blast_target=[];
d(k).Date=[];
d(k).Lat=[];
d(k).Long=[];
d(k).Elevation=[];

save('GDF_EpisodeName_Blast_information_example.mat')