%
% DESCRIPTION: Program to create the Air Quality 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] = {
    'Date','Time of measurement'
    'NO','Nitrogen oxide'
    'NO_2','Nitrogen dioxide'
    'NO_x','Nitrogen oxides'
    'CO','Carbon monoxide'
    'PM10','Particulate matter PM10 (particles that are 10 micrometers in diameter or smaller'
    'O_3','Ozone'
    'CO_2','Carbon dioxide'
    'CH_4','Methane'
    'NMHC','Non-methane hydrocarbons'
    'THC','Total hydrocarbons'
    };
[FieldType] = {
    'Date',5
    'NO',34
    'NO_2',34
    'NO_x',34
    'CO',44
    'PM10',34
    'O_3',34
    'CO_2',44
    'CH_4',24
    'NMHC',16
    'THC',26
    };
[FieldUnit] = {
    'Date','datenum'
    'NO','ppb'
    'NO_2','ppb'
    'NO_x','ppb'
    'CO','ppb'
    'PM10','ug/m^3'
    'O_3','ppb'
    'CO_2','ppm'
    'CH_4','ppm'
    'NMHC','ppmC'
    'THC','ppmC'
    };
[d] = struct();

d.Date = [];

d.NO = [];

d.NO_2 = [];

d.NO_x = [];

d.CO = [];

d.PM10 = [];

d.O_3 = [];

d.CO_2 = [];

d.CH_4 = [];

d.NMHC = [];

d.THC = [];


save('GDF_EpisodeName_Air_quality_example.mat')