% ------------------------------------------------------------------------------
% Process meta-data exported from Coriolis data base and save it in individual
% json files.
%
% SYNTAX :
%  generate_json_float_meta_prv_argos_( ...
%    a_floatMetaFileName, a_floatListFileName, a_outputDirName)
%
% INPUT PARAMETERS :
%   a_floatMetaFileName : meta-data file exported from Coriolis data base
%   a_floatListFileName : list of concerned floats
%   a_outputDirName     : directory of individual json float meta-data files
%
% OUTPUT PARAMETERS :
%
% EXAMPLES :
%
% SEE ALSO :
% AUTHORS  : Jean-Philippe Rannou (Altran)(jean-philippe.rannou@altran.com)
% ------------------------------------------------------------------------------
% RELEASES :
%   04/22/2013 - RNU - creation
%   09/01/2017 - RNU - RT version added
% ------------------------------------------------------------------------------
function generate_json_float_meta_prv_argos_( ...
   a_floatMetaFileName, a_floatListFileName, a_outputDirName)

% report information structure
global g_cogj_reportData;


% check inputs
fprintf('Generating json meta-data files from input file: \n FLOAT_META_FILE_NAME = %s\n', a_floatMetaFileName);

if ~(exist(a_floatMetaFileName, 'file') == 2)
   fprintf('ERROR: Meta-data file not found: %s\n', a_floatMetaFileName);
   return
end

fprintf('Generating json meta-data files for floats of the list: \n FLOAT_LIST_FILE_NAME = %s\n', a_floatListFileName);

if ~(exist(a_floatListFileName, 'file') == 2)
   fprintf('ERROR: Float file list not found: %s\n', a_floatListFileName);
   return
end

fprintf('Output directory of json meta-data files: \n OUTPUT_DIR_NAME = %s\n', a_outputDirName);

% lists of mandatory meta-data
% FLOAT_SERIAL_NO and SENSOR_SERIAL_NO should not be in the following list
% (only the database can set these mandatory values to 'n/a')
mandatoryList1 = [ ...
   {'BATTERY_TYPE'} ...
   {'CONTROLLER_BOARD_SERIAL_NO_PRIMARY'} ...
   {'CONTROLLER_BOARD_TYPE_PRIMARY'} ...
   {'DAC_FORMAT_ID'} ...
   {'FIRMWARE_VERSION'} ...
   {'MANUAL_VERSION'} ...
   {'PI_NAME'} ...
   {'PREDEPLOYMENT_CALIB_COEFFICIENT'} ...
   {'PREDEPLOYMENT_CALIB_EQUATION'} ...
   {'PTT'} ...
   {'PARAMETER_UNITS'} ...
   {'PARAMETER_SENSOR'} ...
   {'STANDARD_FORMAT_ID'} ...
   {'TRANS_FREQUENCY'} ...
   {'TRANS_SYSTEM_ID'} ...
   {'WMO_INST_TYPE'} ...
   ];
mandatoryList2 = [ ...
   {'SENSOR_MAKER'} ...
   {'SENSOR_MODEL'} ...
   ];

% list of floats which profile during descent
profDuringDescFloatList = [ ...
   69000	69001	69002	69003	69004	69005	69030	69031	69032	69034	69035	69036	...
   69037	69038	69039	69040	69041	69042	69043	69044	1900341	1900342	3900999 ...
   3901000	6900045	6900046	6900047	6900048	6900383	6900384	6900385 ...
   6900386	6900677	6900680	6900681	6900682	6900683];

% get DB meta-data
fId = fopen(a_floatMetaFileName, 'r');
if (fId == -1)
   fprintf('ERROR: Unable to open file: %s\n', a_floatMetaFileName);
   return
end
fileContents = textscan(fId, '%s', 'delimiter', '\t');
fileContents = fileContents{:};
fclose(fId);

fileContents = regexprep(fileContents, '"', '');

metaData = reshape(fileContents, 5, size(fileContents, 1)/5)';
metaData(:,4)=(cellfun(@strtrim, metaData(:, 4), 'UniformOutput', 0))';

% get the mapping structure
metaBddStruct = get_meta_bdd_struct();
metaBddStructNames = fieldnames(metaBddStruct);

% process the meta-data to fill the structure
% wmoList = str2num(cell2mat(metaData(:, 1))); % works only if all raws have the sme number of digits
% dimLevlist = str2num(cell2mat(metaData(:, 3))); % works only if all raws have the sme number of digits
wmoList = metaData(:, 1);
for id = 1:length(wmoList)
   if (isempty(str2num(wmoList{id})))
      fprintf('ERROR: %s is not a valid WMO number\n', wmoList{id});
      return
   end
end
S = sprintf('%s*', wmoList{:});
wmoList = sscanf(S, '%f*');
dimLevlist = metaData(:, 3);
S = sprintf('%s*', dimLevlist{:});
dimLevlist = sscanf(S, '%f*');
floatList = unique(wmoList);

% check needed floats against DB contents
refFloatList = load(a_floatListFileName);

floatList = sort(intersect(floatList, refFloatList));
% floatList = [3901000];
% floatList = [6901881];
% floatList = [6901607];

notFoundFloat = setdiff(refFloatList, floatList);
if (~isempty(notFoundFloat))
   fprintf('WARNING: Meta-data not found for float: %d\n', notFoundFloat);
end

% process floats
for idFloat = 1:length(floatList)
   
   skipFloat = 0;
   floatNum = floatList(idFloat);
   fprintf('%3d/%3d %d\n', idFloat, length(floatList), floatNum);
      
   % initialize the structure to be filled
   metaStruct = get_meta_init_struct();

   metaStruct.PLATFORM_NUMBER = num2str(floatNum);
   metaStruct.ARGO_USER_MANUAL_VERSION = '3.1';
   
   % direct conversion data
   idForWmo = find(wmoList == floatNum);
   for idBSN = 1:length(metaBddStructNames)
      metaBddStructField = metaBddStructNames{idBSN};
      metaBddStructValue = metaBddStruct.(metaBddStructField);
      if (~isempty(metaBddStructValue))
         idF = find(strcmp(metaData(idForWmo, 5), metaBddStructValue) == 1, 1);
         if (~isempty(idF))
            metaStruct.(metaBddStructField) = metaData{idForWmo(idF), 4};
         else
            if (~isempty(find(strcmp(mandatoryList1, metaBddStructField) == 1, 1)))
               metaStruct.(metaBddStructField) = 'n/a';
               %                fprintf('Empty mandatory meta-data ''%s'' set to ''n/a''\n', metaBddStructValue);
            elseif (~isempty(find(strcmp(mandatoryList2, metaBddStructField) == 1, 1)))
               metaStruct.(metaBddStructField) = 'UNKNOWN';
            end
            if (strcmp(metaBddStructField, 'FLOAT_SERIAL_NO'))
               fprintf('ERROR: Float #%d: FLOAT_SERIAL_NO (''%s'') is mandatory - no json file generated\n', ...
                  floatNum, metaBddStructValue);
               skipFloat = 1;
            end
         end
      end
   end
   
   % retrieve DAC_FORMAT_ID
   dacFormatId = metaStruct.DAC_FORMAT_ID;
   if (isempty(dacFormatId))
      fprintf('ERROR: DAC_FORMAT_ID (from PR_VERSION) is missing for float %d - no json file generated\n', ...
         floatNum);
      continue
   end
   
   % check if the float version is concerned by this tool
   if (~ismember(dacFormatId, [ ...
         {'4.2'} {'4.21'} {'4.22'} {'4.4'} {'4.41'} ...
         {'4.5'} ...
         {'4.23'} {'4.51'} {'4.43'} ...
         {'4.42'} {'4.44'} {'4.45'} ...
         {'4.53'} ...
         {'4.52'} ...
         {'4.54'}]))
      fprintf('INFO: Float %d is not managed by this tool (DAC_FORMAT_ID (from PR_VERSION) : ''%s'')\n', ...
         floatNum, dacFormatId);
      continue
   end
   
   % multi dim data
   itemList = [ ...
      {'TRANS_SYSTEM'} ...
      {'TRANS_SYSTEM_ID'} ...
      {'TRANS_FREQUENCY'} ...
      ];
   [metaStruct] = add_multi_dim_data( ...
      itemList, ...
      metaData, idForWmo, dimLevlist, ...
      metaStruct, mandatoryList1, mandatoryList2);

   [metaStruct] = add_multi_dim_data( ...
      {'POSITIONING_SYSTEM'}, ...
      metaData, idForWmo, dimLevlist, ...
      metaStruct, mandatoryList1, mandatoryList2);
   
   itemList = [ ...
      {'SENSOR'} ...
      {'SENSOR_MAKER'} ...
      {'SENSOR_MODEL'} ...
      {'SENSOR_SERIAL_NO'} ...
      ];
   [metaStruct] = add_multi_dim_data( ...
      itemList, ...
      metaData, idForWmo, dimLevlist, ...
      metaStruct, mandatoryList1, mandatoryList2);
   
   % check that SENSOR_SERIAL_NO is set
   if (~isempty(metaStruct.SENSOR_SERIAL_NO))
      for idS = 1:length(metaStruct.SENSOR_SERIAL_NO)
         if (isempty(metaStruct.SENSOR_SERIAL_NO{idS}))
            fprintf('ERROR: Float #%d: SENSOR_SERIAL_NO is mandatory (for SENSOR=''%s'' SENSOR_MODEL=''%s'' SENSOR_MAKER=''%s'') - no json file generated\n', ...
               floatNum, ...
               metaStruct.SENSOR{idS}, ...
               metaStruct.SENSOR_MODEL{idS}, ...
               metaStruct.SENSOR_MAKER{idS});
            skipFloat = 1;
         end
      end
   else
      fprintf('ERROR: Float #%d: SENSOR_SERIAL_NO is mandatory - no json file generated\n', ...
         floatNum);
      skipFloat = 1;
   end

   itemList = [ ...
      {'PARAMETER'} ...
      {'PARAMETER_SENSOR'} ...
      {'PARAMETER_UNITS'} ...
      {'PARAMETER_ACCURACY'} ...
      {'PARAMETER_RESOLUTION'} ...
      {'PREDEPLOYMENT_CALIB_EQUATION'} ...
      {'PREDEPLOYMENT_CALIB_COEFFICIENT'} ...
      {'PREDEPLOYMENT_CALIB_COMMENT'} ...
      ];
   [metaStruct] = add_multi_dim_data( ...
      itemList, ...
      metaData, idForWmo, dimLevlist, ...
      metaStruct, mandatoryList1, mandatoryList2);
   
   itemList = [ ...
      {'CALIB_RT_PARAMETER'} ...
      {'CALIB_RT_EQUATION'} ...
      {'CALIB_RT_COEFFICIENT'} ...
      {'CALIB_RT_COMMENT'} ...
      {'CALIB_RT_DATE'} ...
      {'CALIB_RT_ADJUSTED_ERROR'} ...
      {'CALIB_RT_ADJ_ERROR_METHOD'} ...
      ];
   [metaStruct] = add_multi_dim_data( ...
      itemList, ...
      metaData, idForWmo, dimLevlist, ...
      metaStruct, mandatoryList1, mandatoryList2);
   
   %    % PTT / IMEI specific processing
   %    if (~isempty(metaStruct.IMEI))
   %       metaStruct.PTT = metaStruct.IMEI;
   %    end
   
   % configuration parameters

   % CONFIG_PARAMETER_NAME
   configStruct = get_config_init_struct(dacFormatId);
   if (isempty(configStruct))
      continue
   end
   configStructNames = fieldnames(configStruct);
   metaStruct.CONFIG_PARAMETER_NAME = configStructNames;
   
   % CONFIG_PARAMETER_VALUE
   if (strcmp(dacFormatId, '4.52') || ...
         strcmp(dacFormatId, '4.54'))
      % since 2013 firmware update, the floats transmit their configuration.
      % we create only the configuration at launch (because configuration
      % transmitted by the float seems more reliable).
      
      configBddStruct = get_config_bdd_struct(dacFormatId);
      if (isempty(configBddStruct))
         continue
      end
      configBddStructNames = fieldnames(configBddStruct);
      
      nbConfig = 1;
      configParamVal = cell(length(configStructNames), nbConfig);
      configRepRate = cell(1, nbConfig);
      for idConf = 1:nbConfig
         configRepRate{1, idConf} = '1';
         for idBSN = 1:length(configBddStructNames)
            configBddStructName = configBddStructNames{idBSN};
            configBddStructValue = configBddStruct.(configBddStructName);
            if (~isempty(configBddStructValue))
               idF = find(strcmp(metaData(idForWmo, 5), configBddStructValue) == 1);
               if (~isempty(idF))
                  dimLev = dimLevlist(idForWmo(idF));
                  idDim = find(dimLev == idConf, 1);
                  if ((isempty(idDim)) && (idConf > 1))
                     idDim = 1;
                  elseif ((isempty(idDim)) && (idConf == 1))
                     fprintf('ERROR\n');
                  end
                  
                  if (strcmp(configBddStructName, 'CONFIG_MC002_CyclePeriod') || ...
                        strcmp(configBddStructName, 'CONFIG_MC2_CyclePeriod1') || ...
                        strcmp(configBddStructName, 'CONFIG_MC10_DriftDepth1') || ...
                        strcmp(configBddStructName, 'CONFIG_MC11_ProfileDepth1'))
                     % the parameter is stored within DIM_LEVEL = 1
                     idDim = find(dimLev == 1, 1);
                  elseif (strcmp(configBddStructName, 'CONFIG_MC3_CyclePeriod2') || ...
                        strcmp(configBddStructName, 'CONFIG_MC12_DriftDepth2') || ...
                        strcmp(configBddStructName, 'CONFIG_MC13_ProfileDepth2'))
                     % the parameter is stored within DIM_LEVEL = 2
                     idDim = find(dimLev == 2, 1);
                  end
                  
                  if (strcmp(configBddStructValue, 'PR_IMMERSION_DRIFT_PERIOD') == 1)
                     configParamVal{idBSN, idConf} = num2str(str2num(metaData{idForWmo(idF(idDim)), 4})/60);
                  else
                     configParamVal{idBSN, idConf} = metaData{idForWmo(idF(idDim)), 4};
                  end
               end
            else
               % if we want to use default values if the information is
               % missing in the database
            end
         end
      end
      
      % set additional configuration parameters
      
      % profile direction
      idDir = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PX0_Direction') == 1);
      if (~isempty(idDir))
         idDescSampPeriod = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_MC7_DescentSamplingPeriod') == 1);
         idAscSampPeriod = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_MC9_AscentSamplingPeriod') == 1);
         if (~isempty(idDescSampPeriod) && ~isempty(idAscSampPeriod))
            % set default direction (sampling during ascent) because we will
            % only consider not empty sampling information
            direction = 1;
            if (~isempty(configParamVal{idDescSampPeriod}) && ...
                  (str2num(configParamVal{idDescSampPeriod}) > 0))
               % sampling during descent
               direction = 3;
            end
            if (~isempty(configParamVal{idAscSampPeriod}) && ...
                  (str2num(configParamVal{idAscSampPeriod}) == 0))
               % no sampling during ascent
               if (direction == 3)
                  direction = 2;
               end
            end
            configParamVal{idDir} = num2str(direction);
         end
      end
      
      idCtdPumpCutOffPres = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_TC18_CTDPumpCutOffPressure') == 1);
      if (~isempty(idCtdPumpCutOffPres) && ~isempty(configParamVal{idCtdPumpCutOffPres}))
         
         idCtdCutOffPressure = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PX1_CtdCutOffPressure') == 1);
         if (~isempty(idCtdCutOffPressure))
            configParamVal{idCtdCutOffPressure} = configParamVal{idCtdPumpCutOffPres};
         end
         
         idProfileCutOffPressure = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PX2_ProfileCutOffPressure') == 1);
         if (~isempty(idProfileCutOffPressure))
            configParamVal{idProfileCutOffPressure} = num2str(str2num(configParamVal{idCtdPumpCutOffPres}) + 0.5);
         end
      end
      
      metaStruct.CONFIG_REPETITION_RATE = configRepRate;
      metaStruct.CONFIG_PARAMETER_VALUE = configParamVal;
      
   else
      % older versions don't transmit configuration.
      % we create all configuration from data base information
      idFRepRate = find(strcmp(metaData(idForWmo, 5), 'REPETITION_RATE') == 1);
      if (~isempty(idFRepRate))
         
         configBddStruct = get_config_bdd_struct(dacFormatId);
         if (isempty(configBddStruct))
            continue
         end
         configBddStructNames = fieldnames(configBddStruct);
         
         nbConfig = length(idFRepRate);
         if (nbConfig > 1)
            fprintf('Multi conf: %d\n', floatNum);
         end
         configParamVal = cell(length(configStructNames), nbConfig);
         configRepRate = cell(1, nbConfig);
         for idConf = 1:nbConfig
            configRepRate{1, idConf} = metaData{idForWmo(idFRepRate(idConf)), 4};
            for idBSN = 1:length(configBddStructNames)
               configBddStructName = configBddStructNames{idBSN};
               if ((strcmp(configBddStructName, 'CONFIG_PM2_ReferenceDay') == 0) && ...
                     (strcmp(configBddStructName, 'CONFIG_PM3_AscentStartTime') == 0) && ...
                     (strcmp(configBddStructName, 'CONFIG_PM3_EstimatedSurfaceTime') == 0))
                  configBddStructValue = configBddStruct.(configBddStructName);
                  if (~isempty(configBddStructValue))
                     idF = find(strcmp(metaData(idForWmo, 5), configBddStructValue) == 1);
                     if (~isempty(idF))
                        dimLev = dimLevlist(idForWmo(idF));
                        idDim = find(dimLev == idConf, 1);
                        if ((isempty(idDim)) && (idConf > 1))
                           idDim = 1;
                        elseif ((isempty(idDim)) && (idConf == 1))
                           fprintf('ERROR\n');
                        end
                        
                        if ((strcmp(configBddStructValue, 'DIRECTION') == 0) && ...
                              (strcmp(configBddStructValue, 'CYCLE_TIME') == 0) && ...
                              (strcmp(configBddStructValue, 'PR_IMMERSION_DRIFT_PERIOD') == 0) && ...
                              (strncmp(configBddStructValue, 'AANDERAA_OPTODE_COEF_C', length('AANDERAA_OPTODE_COEF_C')) == 0))
                           configParamVal{idBSN, idConf} = metaData{idForWmo(idF(idDim)), 4};
                        else
                           if (strcmp(configBddStructValue, 'DIRECTION') == 1)
                              if (ismember(floatNum, profDuringDescFloatList))
                                 configParamVal{idBSN, idConf} = '3';
                              else
                                 configParamVal{idBSN, idConf} = '1';
                              end
                           elseif (strcmp(configBddStructValue, 'CYCLE_TIME') == 1)
                              configParamVal{idBSN, idConf} = num2str(str2num(metaData{idForWmo(idF(idDim)), 4})/24);
                           elseif (strcmp(configBddStructValue, 'PR_IMMERSION_DRIFT_PERIOD') == 1)
                              configParamVal{idBSN, idConf} = num2str(str2num(metaData{idForWmo(idF(idDim)), 4})/60);
                           elseif (strncmp(configBddStructValue, 'AANDERAA_OPTODE_COEF_C', length('AANDERAA_OPTODE_COEF_C')) == 1)
                              % processed below
                           end
                        end
                     end
                  else
                     % if we want to use default values if the information is
                     % missing in the database
                     %                      configParamVal{idBSN, idConf} = configStruct.(configBddStructName);
                  end
               else
                  if (strcmp(configBddStructName, 'CONFIG_PM2_ReferenceDay') == 1)
                     idF0 = find(strcmp(metaData(idForWmo, 5), 'PRCFG_Reference_day') == 1);
                     if (~isempty(idF0))
                        configParamVal{idBSN, idConf} = metaData{idForWmo(idF0), 4};
                     else
                        idF1 = find(strcmp(metaData(idForWmo, 5), 'PR_REFERENCE_DATETIME') == 1);
                        idF2 = find(strcmp(metaData(idForWmo, 5), 'PR_LAUNCH_DATETIME') == 1);
                        if ~(isempty(idF1) || isempty(idF2))
                           refDate = datenum(metaData{idForWmo(idF1), 4}, 'dd/mm/yyyy HH:MM');
                           launchDate = datenum(metaData{idForWmo(idF2), 4}, 'dd/mm/yyyy HH:MM');
                           configParamVal{idBSN, idConf} = num2str(fix(refDate) - fix(launchDate));
                        end
                     end
                  elseif (strcmp(configBddStructName, 'CONFIG_PM3_AscentStartTime') == 1)
                     idF0 = find(strcmp(metaData(idForWmo, 5), 'PRCFG_Start_time') == 1);
                     if (~isempty(idF0))
                        configParamVal{idBSN, idConf} = sprintf('%02d', str2num(metaData{idForWmo(idF0), 4}));
                     else
                        idF1 = find(strcmp(metaData(idForWmo, 5), 'PR_REFERENCE_DATETIME') == 1);
                        if (~isempty(idF1))
                           refDate = datenum(metaData{idForWmo(idF1), 4}, 'dd/mm/yyyy HH:MM');
                           configParamVal{idBSN, idConf} = datestr(refDate, 'HH');
                        end
                     end
                  elseif (strcmp(configBddStructName, 'CONFIG_PM3_EstimatedSurfaceTime') == 1)
                     idF0 = find(strcmp(metaData(idForWmo, 5), 'PRCFG_End_time') == 1);
                     if (~isempty(idF0))
                        configParamVal{idBSN, idConf} = sprintf('%02d', str2num(metaData{idForWmo(idF0), 4}));
                     else
                        idF1 = find(strcmp(metaData(idForWmo, 5), 'PR_REFERENCE_DATETIME') == 1);
                        if (~isempty(idF1))
                           refDate = datenum(metaData{idForWmo(idF1), 4}, 'dd/mm/yyyy HH:MM');
                           configParamVal{idBSN, idConf} = datestr(refDate, 'HH');
                        end
                     end
                  end
               end
            end
         end
         
         % the configuration with idConf=1 SHOULD be the configuration of the
         % float for the cycle #1 (not for the first cycle which is #0)
         
         % add a first configuration, specific to float version (with or
         % without a prelude phase)
         switch (dacFormatId)
            case {'4.2', '4.21', '4.22', '4.4', '4.41', '4.5'}
               % floats without a prelude phase: cycle #0 is the first deep
               % cycle; it has a shorter duration and the float profiles during
               % descent
               
               % the configuration is based on the last one
               configParamVal0 = configParamVal(:, end);
               
               % set the descending sampling period
               idDescSampPeriod = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM5_DescentSamplingPeriod') == 1);
               idAscSampPeriod = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM7_AscentSamplingPeriod') == 1);
               if (~isempty(idDescSampPeriod))
                  if  (isempty(configParamVal0{idDescSampPeriod}) || ...
                        (~isempty(configParamVal0{idDescSampPeriod}) && ...
                        (str2num(configParamVal0{idDescSampPeriod}) == 0)))
                     % the descending sampling period is empty or set to 0
                     
                     if (~isempty(idAscSampPeriod) && ...
                           ~isempty(configParamVal0{idAscSampPeriod}))
                        % copy the ascending sampling period to the descending
                        % sampling period
                        configParamVal0{idDescSampPeriod} = configParamVal0{idAscSampPeriod};
                     else
                        % set the descending sampling period to the default
                        % value (10 sec)
                        configParamVal0{idDescSampPeriod} = num2str(10);
                     end
                  end
               end
               
               % compute the duration of the cycle #0
               idCycleTime = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM1_CyclePeriod') == 1);
               if ~(isempty(idCycleTime))
                  configParamVal0{idCycleTime} = '';
               end
               
               idCycleTime = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM1_CyclePeriod') == 1);
               idRefDay = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM2_ReferenceDay') == 1);
               idAscentStartTime = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM3_AscentStartTime') == 1);
               idProfileDepth = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM9_ProfileDepth') == 1);
               if (strcmp(dacFormatId, '4.5') == 1)
                  idArgosTransmissionDuration = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PA3_ArgosTransmissionDuration') == 1);
               else
                  idArgosTransmissionDuration = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PA2_ArgosTransmissionDuration') == 1);
               end
               if ~(isempty(idCycleTime) || isempty(idRefDay) || ...
                     isempty(idAscentStartTime) || isempty(idProfileDepth) || ...
                     isempty(idArgosTransmissionDuration))
                  
                  refDay = configParamVal0{idRefDay};
                  ascentStartTime = configParamVal0{idAscentStartTime};
                  profileDepth = configParamVal0{idProfileDepth};
                  argosTransmissionDuration = configParamVal0{idArgosTransmissionDuration};
                  
                  if ~(isempty(refDay) || isempty(ascentStartTime) || ...
                        isempty(profileDepth) || isempty(argosTransmissionDuration))
                     
                     firstDeepCycleDuration = str2num(refDay) + ...
                        str2num(ascentStartTime)/24 + ...
                        str2num(profileDepth)/8640 + ...
                        str2num(argosTransmissionDuration)/24;
                     
                     configParamVal0{idCycleTime} = num2str(firstDeepCycleDuration);
                  end
               end
            case {'4.23', '4.42', '4.43', '4.44', '4.45', '4.51', '4.53'}
               % floats with a prelude phase: cycle #0 is a surface cycle,
               % cycle #0 is a deep cycle
               % (shorter duration and profile during descent)
               
               % floats with a prelude phase: cycle #0 is a surface cycle,
               % cycle #1 is the first deep cycle; it has a shorter duration and
               % the float profiles during descent
               
               % the configuration is based on the first one
               configParamVal0 = configParamVal(:, 1);
               
               % set the descending sampling period
               idDescSampPeriod = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM5_DescentSamplingPeriod') == 1);
               idAscSampPeriod = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM7_AscentSamplingPeriod') == 1);
               if (~isempty(idDescSampPeriod))
                  if  (isempty(configParamVal0{idDescSampPeriod}) || ...
                        (~isempty(configParamVal0{idDescSampPeriod}) && ...
                        (str2num(configParamVal0{idDescSampPeriod}) == 0)))
                     % the descending sampling period is empty or set to 0
                     
                     if (~isempty(idAscSampPeriod) && ...
                           ~isempty(configParamVal0{idAscSampPeriod}))
                        % copy the ascending sampling period to the descending
                        % sampling period
                        configParamVal0{idDescSampPeriod} = configParamVal0{idAscSampPeriod};
                     else
                        % set the descending sampling period to the default
                        % value (10 sec)
                        configParamVal0{idDescSampPeriod} = num2str(10);
                     end
                  end
               end
               
               % compute the duration of the cycle #1
               idCycleTime = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM1_CyclePeriod') == 1);
               if ~(isempty(idCycleTime))
                  configParamVal0{idCycleTime} = '';
               end
               
               idCycleTime = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM1_CyclePeriod') == 1);
               idRefDay = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM2_ReferenceDay') == 1);
               idEstimatedSurfaceTime = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PM3_EstimatedSurfaceTime') == 1);
               idArgosTransmissionDuration = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PA3_ArgosTransmissionDuration') == 1);
               if ~(isempty(idCycleTime) || isempty(idRefDay) || ...
                     isempty(idEstimatedSurfaceTime) || ...
                     isempty(idArgosTransmissionDuration))
                  
                  refDay = configParamVal0{idRefDay};
                  estimatedSurfaceTime = configParamVal0{idEstimatedSurfaceTime};
                  argosTransmissionDuration = configParamVal0{idArgosTransmissionDuration};
                  
                  if ~(isempty(refDay) || isempty(estimatedSurfaceTime) || ...
                        isempty(argosTransmissionDuration))
                     
                     firstDeepCycleDuration = str2num(refDay) + ...
                        str2num(estimatedSurfaceTime)/24 + ...
                        str2num(argosTransmissionDuration)/24;
                     
                     configParamVal0{idCycleTime} = num2str(firstDeepCycleDuration);
                  end
               end
            otherwise
               fprintf('WARNING: Nothing done yet in generate_json_float_meta_prv_argos_ for dacFormatId %s\n', dacFormatId);
         end
         
         idDir = find(strcmp(metaStruct.CONFIG_PARAMETER_NAME, 'CONFIG_PX0_Direction') == 1);
         if (~isempty(idDir))
            configParamVal0{idDir} = '3';
         end
         
         configParamVal = [configParamVal0 configParamVal];
         
         metaStruct.CONFIG_REPETITION_RATE = configRepRate;
         metaStruct.CONFIG_PARAMETER_VALUE = configParamVal;
      end
   end
   
   % CALIBRATION_COEFFICIENT
   switch (dacFormatId)
      case {'4.4', '4.41', '4.43'}
         idF = find(strcmp(metaData(idForWmo, 5), 'DOXY_CALIB_REF_SALINITY') == 1);
         if (~isempty(idF))
            calibrationCoefficient = [];
            calibrationCoefficient.OPTODE.DoxyCalibRefSalinity = metaData{idForWmo(idF(1)), 4};
            
            metaStruct.CALIBRATION_COEFFICIENT = calibrationCoefficient;
         end
      case {'4.42', '4.54'}
         idF = find((strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_COEF_C', length('AANDERAA_OPTODE_COEF_C')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_PHASE_COEF_', length('AANDERAA_OPTODE_PHASE_COEF_')) == 1));
         calibData = [];
         for id = 1:length(idF)
            calibName = metaData{idForWmo(idF(id)), 5};
            if (strncmp(calibName, 'AANDERAA_OPTODE_COEF_C', length('AANDERAA_OPTODE_COEF_C')) == 1)
               fieldName = ['SVUFoilCoef' num2str(str2num(calibName(end)))];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_PHASE_COEF_', length('AANDERAA_OPTODE_PHASE_COEF_')) == 1)
               fieldName = ['PhaseCoef' calibName(end)];
            end
            calibData.(fieldName) = metaData{idForWmo(idF(id)), 4};
         end
         if (~isempty(calibData))
            calibrationCoefficient = [];
            calibrationCoefficient.OPTODE = calibData;
            
            metaStruct.CALIBRATION_COEFFICIENT = calibrationCoefficient;
         end
      case {'4.44'}
         idF = find((strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_TEMP_COEF_', length('AANDERAA_OPTODE_TEMP_COEF_')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_PHASE_COEF_', length('AANDERAA_OPTODE_PHASE_COEF_')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_FOIL_COEFF_A', length('AANDERAA_OPTODE_FOIL_COEFF_A')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_FOIL_COEFF_B', length('AANDERAA_OPTODE_FOIL_COEFF_B')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_FOIL_POLYDEG_T', length('AANDERAA_OPTODE_FOIL_POLYDEG_T')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_FOIL_POLYDEG_O', length('AANDERAA_OPTODE_FOIL_POLYDEG_O')) == 1));
         calibData = [];
         for id = 1:length(idF)
            calibName = metaData{idForWmo(idF(id)), 5};
            if (strncmp(calibName, 'AANDERAA_OPTODE_TEMP_COEF_', length('AANDERAA_OPTODE_TEMP_COEF_')) == 1)
               fieldName = ['TempCoef' calibName(end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_PHASE_COEF_', length('AANDERAA_OPTODE_PHASE_COEF_')) == 1)
               fieldName = ['PhaseCoef' calibName(end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_FOIL_COEFF_A', length('AANDERAA_OPTODE_FOIL_COEFF_A')) == 1)
               fieldName = ['FoilCoefA' calibName(length('AANDERAA_OPTODE_FOIL_COEFF_A')+1:end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_FOIL_COEFF_B', length('AANDERAA_OPTODE_FOIL_COEFF_B')) == 1)
               fieldName = ['FoilCoefB' calibName(length('AANDERAA_OPTODE_FOIL_COEFF_B')+1:end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_FOIL_POLYDEG_T', length('AANDERAA_OPTODE_FOIL_POLYDEG_T')) == 1)
               fieldName = ['FoilPolyDegT' calibName(length('AANDERAA_OPTODE_FOIL_POLYDEG_T')+1:end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_FOIL_POLYDEG_O', length('AANDERAA_OPTODE_FOIL_POLYDEG_O')) == 1)
               fieldName = ['FoilPolyDegO' calibName(length('AANDERAA_OPTODE_FOIL_POLYDEG_O')+1:end)];
            end
            calibData.(fieldName) = metaData{idForWmo(idF(id)), 4};
         end
         if (~isempty(calibData))
            calibrationCoefficient = [];
            calibrationCoefficient.OPTODE = calibData;
            
            metaStruct.CALIBRATION_COEFFICIENT = calibrationCoefficient;
         end
      case {'4.45'}
         idF = find((strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_TEMP_COEF_', length('AANDERAA_OPTODE_TEMP_COEF_')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_PHASE_COEF_', length('AANDERAA_OPTODE_PHASE_COEF_')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_CONC_COEF_', length('AANDERAA_OPTODE_CONC_COEF_')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_FOIL_COEFF_A', length('AANDERAA_OPTODE_FOIL_COEFF_A')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_FOIL_COEFF_B', length('AANDERAA_OPTODE_FOIL_COEFF_B')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_FOIL_POLYDEG_T', length('AANDERAA_OPTODE_FOIL_POLYDEG_T')) == 1) | ...
            (strncmp(metaData(idForWmo, 5), 'AANDERAA_OPTODE_FOIL_POLYDEG_O', length('AANDERAA_OPTODE_FOIL_POLYDEG_O')) == 1));
         calibData = [];
         for id = 1:length(idF)
            calibName = metaData{idForWmo(idF(id)), 5};
            if (strncmp(calibName, 'AANDERAA_OPTODE_TEMP_COEF_', length('AANDERAA_OPTODE_TEMP_COEF_')) == 1)
               fieldName = ['TempCoef' calibName(end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_PHASE_COEF_', length('AANDERAA_OPTODE_PHASE_COEF_')) == 1)
               fieldName = ['PhaseCoef' calibName(end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_CONC_COEF_', length('AANDERAA_OPTODE_CONC_COEF_')) == 1)
               fieldName = ['ConcCoef' calibName(end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_FOIL_COEFF_A', length('AANDERAA_OPTODE_FOIL_COEFF_A')) == 1)
               fieldName = ['FoilCoefA' calibName(length('AANDERAA_OPTODE_FOIL_COEFF_A')+1:end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_FOIL_COEFF_B', length('AANDERAA_OPTODE_FOIL_COEFF_B')) == 1)
               fieldName = ['FoilCoefB' calibName(length('AANDERAA_OPTODE_FOIL_COEFF_B')+1:end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_FOIL_POLYDEG_T', length('AANDERAA_OPTODE_FOIL_POLYDEG_T')) == 1)
               fieldName = ['FoilPolyDegT' calibName(length('AANDERAA_OPTODE_FOIL_POLYDEG_T')+1:end)];
            elseif (strncmp(calibName, 'AANDERAA_OPTODE_FOIL_POLYDEG_O', length('AANDERAA_OPTODE_FOIL_POLYDEG_O')) == 1)
               fieldName = ['FoilPolyDegO' calibName(length('AANDERAA_OPTODE_FOIL_POLYDEG_O')+1:end)];
            end
            calibData.(fieldName) = metaData{idForWmo(idF(id)), 4};
         end
         if (~isempty(calibData))
            calibrationCoefficient = [];
            calibrationCoefficient.OPTODE = calibData;
            
            metaStruct.CALIBRATION_COEFFICIENT = calibrationCoefficient;
         end
   end
   
   % RT_OFFSET
   if (any(strcmp(metaData(idForWmo, 5), 'CALIB_RT_PARAMETER')))
      metaStruct.RT_OFFSET = get_rt_offset(metaData, idForWmo);
   end
   
   if (~check_json_meta_data(metaStruct, floatNum))
      skipFloat = 1;
   end
   
   if (skipFloat)
      continue
   end
   
   % create the directory of json output files
   if ~(exist(a_outputDirName, 'dir') == 7)
      mkdir(a_outputDirName);
   end
   
   % create json output file
   outputFileName = [a_outputDirName '/' sprintf('%d_meta.json', floatNum)];
   ok = generate_json_file(outputFileName, metaStruct);
   if (~ok)
      return
   end
   g_cogj_reportData{end+1} = outputFileName;

end

return

% ------------------------------------------------------------------------------
% Get the list of configuration parameters for a given float version.
%
% SYNTAX :
%  [o_configStruct] = get_config_init_struct(a_dacFormatId)
%
% INPUT PARAMETERS :
%   a_dacFormatId : float DAC version
%
% OUTPUT PARAMETERS :
%   o_configStruct : list of configuration parameters
%
% EXAMPLES :
%
% SEE ALSO :
% AUTHORS  : Jean-Philippe Rannou (Altran)(jean-philippe.rannou@altran.com)
% ------------------------------------------------------------------------------
% RELEASES :
%   04/22/2013 - RNU - creation
%   09/01/2017 - RNU - RT version added
% ------------------------------------------------------------------------------
function [o_configStruct] = get_config_init_struct(a_dacFormatId)

% output parameters initialization
o_configStruct = [];

switch (a_dacFormatId)
   case {'4.2', '4.21', '4.22', '4.4', '4.41'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', '255', ...
         'CONFIG_PM1_CyclePeriod', '10', ...
         'CONFIG_PM2_ReferenceDay', '2', ...
         'CONFIG_PM3_AscentStartTime', '23', ...
         'CONFIG_PM4_DelayBeforeMission', '0', ...
         'CONFIG_PM5_DescentSamplingPeriod', '0', ...
         'CONFIG_PM6_DriftSamplingPeriod', '12', ...
         'CONFIG_PM7_AscentSamplingPeriod', '10', ...
         'CONFIG_PM8_DriftDepth', '1000', ...
         'CONFIG_PM9_ProfileDepth', '2000', ...
         'CONFIG_PM10_DelayBeforeProfile', '10', ...
         'CONFIG_PM11_ThresholdSurfaceBottomPressure', '200', ...
         'CONFIG_PM12_ThicknessOfTheSurfaceSlices', '10', ...
         'CONFIG_PM13_ThicknessOfTheBottomSlices', '25', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', '40', ...
         'CONFIG_PA1_Retransmission', '25', ...
         'CONFIG_PA2_ArgosTransmissionDuration', '6', ...
         'CONFIG_PT3_SurfaceValveMaxTimeAdditionalActions', '270', ...
         'CONFIG_PT4_OilVolumeMaxPerValveAction', '30', ...
         'CONFIG_PT5_PumpActionMaxTimeReposition', '40', ...
         'CONFIG_PT6_OilVolumeMaxPerValveAction', '3', ...
         'CONFIG_PT7_PumpActionMaxTimeAscent', '200', ...
         'CONFIG_PT10_PumpActionTimeBuoyancyAcquisition', '3000', ...
         'CONFIG_PT11_PressureCheckTimeAscent', '2', ...
         'CONFIG_PT12_PressureCheckTimeBuoyancyReductionPhase', '1', ...
         'CONFIG_PT14_PressureTargetToleranceForStabilisation', '30', ...
         'CONFIG_PT16_PressureMaxBeforeEmergencyAscent', '2100', ...
         'CONFIG_PT17_BuoyancyReductionFirstThreshold', '4', ...
         'CONFIG_PT18_BuoyancyReductionSecondThreshold', '8', ...
         'CONFIG_PT20_NumberOfOutOfTolerancePresBeforeReposition', '2', ...
         'CONFIG_PT21_GroundingMode', '0', ...
         'CONFIG_PT23_OilVolumeMinForGroundingDetection', '100', ...
         'CONFIG_PT24_GroundingModeMinPresThreshold', '200', ...
         'CONFIG_PT25_GroundingModePresAdjustment', '50', ...
         'CONFIG_PT26_PressureTargetToleranceDuringDrift', '50', ...
         'CONFIG_PX0_Direction', '');
   case {'4.5'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', '255', ...
         'CONFIG_PM1_CyclePeriod', '10', ...
         'CONFIG_PM2_ReferenceDay', '2', ...
         'CONFIG_PM3_AscentStartTime', '23', ...
         'CONFIG_PM4_DelayBeforeMission', '0', ...
         'CONFIG_PM5_DescentSamplingPeriod', '0', ...
         'CONFIG_PM6_DriftSamplingPeriod', '12', ...
         'CONFIG_PM7_AscentSamplingPeriod', '10', ...
         'CONFIG_PM8_DriftDepth', '1000', ...
         'CONFIG_PM9_ProfileDepth', '2000', ...
         'CONFIG_PM10_ThresholdSurfaceBottomPressure', '200', ...
         'CONFIG_PM11_ThicknessOfTheSurfaceSlices', '10', ...
         'CONFIG_PM12_ThicknessOfTheBottomSlices', '25', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', '40', ...
         'CONFIG_PA1_ArgosEolPeriod', '100', ...
         'CONFIG_PA2_Retransmission', '25', ...
         'CONFIG_PA3_ArgosTransmissionDuration', '1', ...
         'CONFIG_PA6_PreludeDuration', '180', ...
         'CONFIG_PT0_SurfaceValveMaxTimeAdditionalActions', '1000', ...
         'CONFIG_PT1_OilVolumeMaxPerValveAction', '11', ...
         'CONFIG_PT2_PumpActionMaxTimeReposition', '290', ...
         'CONFIG_PT3_PumpActionMaxTimeAscent', '720', ...
         'CONFIG_PT4_PumpActionTimeBuoyancyAcquisition', '24000', ...
         'CONFIG_PT5_PressureTargetToleranceForStabilisation', '30', ...
         'CONFIG_PT6_PressureMaxBeforeEmergencyAscent', '2100', ...
         'CONFIG_PT7_BuoyancyReductionFirstThreshold', '1', ...
         'CONFIG_PT8_BuoyancyReductionSecondThreshold', '7', ...
         'CONFIG_PT9_NumberOfOutOfTolerancePresBeforeReposition', '2', ...
         'CONFIG_PT10_GroundingMode', '0', ...
         'CONFIG_PT11_OilVolumeMinForGroundingDetection', '36', ...
         'CONFIG_PT12_GroundingModeMinPresThreshold', '200', ...
         'CONFIG_PT13_GroundingModePresAdjustment', '100', ...
         'CONFIG_PT14_PressureTargetToleranceDuringDrift', '50', ...
         'CONFIG_PT15_CTDPowerAcquisitionMode', '1', ...
         'CONFIG_PT18_DescentSpeed', '30', ...
         'CONFIG_PT20_InternalPressureCalibrationCoef1', '0.125', ...
         'CONFIG_PT21_InternalPressureCalibrationCoef2', '0', ...
         'CONFIG_PX0_Direction', '');
   case {'4.23', '4.51', '4.43'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', '255', ...
         'CONFIG_PM1_CyclePeriod', '10', ...
         'CONFIG_PM2_ReferenceDay', '2', ...
         'CONFIG_PM3_EstimatedSurfaceTime', '6', ...
         'CONFIG_PM4_DelayBeforeMission', '0', ...
         'CONFIG_PM5_DescentSamplingPeriod', '0', ...
         'CONFIG_PM6_DriftSamplingPeriod', '12', ...
         'CONFIG_PM7_AscentSamplingPeriod', '10', ...
         'CONFIG_PM8_DriftDepth', '1000', ...
         'CONFIG_PM9_ProfileDepth', '2000', ...
         'CONFIG_PM10_ThresholdSurfaceMiddlePressure', '10', ...
         'CONFIG_PM11_ThresholdMiddleBottomPressure', '200', ...
         'CONFIG_PM12_ThicknessOfTheSurfaceSlices', '1', ...
         'CONFIG_PM13_ThicknessOfTheMiddleSlices', '10', ...
         'CONFIG_PM14_ThicknessOfTheBottomSlices', '25', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', '40', ...
         'CONFIG_PA1_ArgosEolPeriod', '100', ...
         'CONFIG_PA2_Retransmission', '25', ...
         'CONFIG_PA3_ArgosTransmissionDuration', '1', ...
         'CONFIG_PA6_PreludeDuration', '180', ...
         'CONFIG_PT0_SurfaceValveMaxTimeAdditionalActions', '2700', ...
         'CONFIG_PT1_OilVolumeMaxPerValveAction', '30', ...
         'CONFIG_PT2_PumpActionMaxTimeReposition', '400', ...
         'CONFIG_PT3_PumpActionMaxTimeAscent', '2000', ...
         'CONFIG_PT4_PumpActionTimeBuoyancyAcquisition', '30000', ...
         'CONFIG_PT5_PressureTargetToleranceForStabilisation', '30', ...
         'CONFIG_PT6_PressureMaxBeforeEmergencyAscent', '2100', ...
         'CONFIG_PT7_BuoyancyReductionFirstThreshold', '4', ...
         'CONFIG_PT8_BuoyancyReductionSecondThreshold', '8', ...
         'CONFIG_PT9_NumberOfOutOfTolerancePresBeforeReposition', '2', ...
         'CONFIG_PT10_GroundingMode', '0', ...
         'CONFIG_PT11_OilVolumeMinForGroundingDetection', '100', ...
         'CONFIG_PT12_GroundingModeMinPresThreshold', '200', ...
         'CONFIG_PT13_GroundingModePresAdjustment', '50', ...
         'CONFIG_PT14_PressureTargetToleranceDuringDrift', '50', ...
         'CONFIG_PT15_CTDPowerAcquisitionMode', '1', ...
         'CONFIG_PT18_DescentSpeed', '30', ...
         'CONFIG_PT22_InternalPressureCalibrationCoef1', '0.125', ...
         'CONFIG_PT23_InternalPressureCalibrationCoef2', '0', ...      
         'CONFIG_PX0_Direction', '');
   case {'4.42', '4.44', '4.45'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', '255', ...
         'CONFIG_PM1_CyclePeriod', '10', ...
         'CONFIG_PM2_ReferenceDay', '2', ...
         'CONFIG_PM3_EstimatedSurfaceTime', '6', ...
         'CONFIG_PM4_DelayBeforeMission', '0', ...
         'CONFIG_PM5_DescentSamplingPeriod', '0', ...
         'CONFIG_PM6_DriftSamplingPeriod', '12', ...
         'CONFIG_PM7_AscentSamplingPeriod', '10', ...
         'CONFIG_PM8_DriftDepth', '1000', ...
         'CONFIG_PM9_ProfileDepth', '2000', ...
         'CONFIG_PM10_ThresholdSurfaceMiddlePressure', '10', ...
         'CONFIG_PM11_ThresholdMiddleBottomPressure', '200', ...
         'CONFIG_PM12_ThicknessOfTheSurfaceSlices', '1', ...
         'CONFIG_PM13_ThicknessOfTheMiddleSlices', '10', ...
         'CONFIG_PM14_ThicknessOfTheBottomSlices', '25', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', '40', ...
         'CONFIG_PA1_ArgosEolPeriod', '100', ...
         'CONFIG_PA2_Retransmission', '25', ...
         'CONFIG_PA3_ArgosTransmissionDuration', '1', ...
         'CONFIG_PA6_PreludeDuration', '180', ...
         'CONFIG_PT0_SurfaceValveMaxTimeAdditionalActions', '2700', ...
         'CONFIG_PT1_OilVolumeMaxPerValveAction', '30', ...
         'CONFIG_PT2_PumpActionMaxTimeReposition', '400', ...
         'CONFIG_PT3_PumpActionMaxTimeAscent', '2000', ...
         'CONFIG_PT4_PumpActionTimeBuoyancyAcquisition', '30000', ...
         'CONFIG_PT5_PressureTargetToleranceForStabilisation', '30', ...
         'CONFIG_PT6_PressureMaxBeforeEmergencyAscent', '2100', ...
         'CONFIG_PT7_BuoyancyReductionFirstThreshold', '4', ...
         'CONFIG_PT8_BuoyancyReductionSecondThreshold', '8', ...
         'CONFIG_PT9_NumberOfOutOfTolerancePresBeforeReposition', '2', ...
         'CONFIG_PT10_GroundingMode', '0', ...
         'CONFIG_PT11_OilVolumeMinForGroundingDetection', '100', ...
         'CONFIG_PT12_GroundingModeMinPresThreshold', '200', ...
         'CONFIG_PT13_GroundingModePresAdjustment', '50', ...
         'CONFIG_PT14_PressureTargetToleranceDuringDrift', '50', ...
         'CONFIG_PT15_CTDPowerAcquisitionMode', '1', ...
         'CONFIG_PT18_DescentSpeed', '30', ...
         'CONFIG_PT20_CTDPumpSwitchOffPres', '5', ...
         'CONFIG_PT22_AscentEndThreshold', '10', ...
         'CONFIG_PT23_AscentSpeed', '90', ...
         'CONFIG_PT24_PressureCheckTimeAscent', '2', ...
         'CONFIG_PT25_AscentVerticalThresholdForBuoyancyAction', '10', ...
         'CONFIG_PT26_InternalPressureCalibrationCoef1', '0.125', ...
         'CONFIG_PT27_InternalPressureCalibrationCoef2', '0', ...
         'CONFIG_PX0_Direction', '');
   case {'4.53'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', '255', ...
         'CONFIG_PM1_CyclePeriod', '10', ...
         'CONFIG_PM2_ReferenceDay', '2', ...
         'CONFIG_PM3_EstimatedSurfaceTime', '6', ...
         'CONFIG_PM4_DelayBeforeMission', '0', ...
         'CONFIG_PM5_DescentSamplingPeriod', '0', ...
         'CONFIG_PM6_DriftSamplingPeriod', '12', ...
         'CONFIG_PM7_AscentSamplingPeriod', '10', ...
         'CONFIG_PM8_DriftDepth', '1000', ...
         'CONFIG_PM9_ProfileDepth', '2000', ...
         'CONFIG_PM10_ThresholdSurfaceMiddlePressure', '10', ...
         'CONFIG_PM11_ThresholdMiddleBottomPressure', '200', ...
         'CONFIG_PM12_ThicknessOfTheSurfaceSlices', '1', ...
         'CONFIG_PM13_ThicknessOfTheMiddleSlices', '10', ...
         'CONFIG_PM14_ThicknessOfTheBottomSlices', '25', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', '40', ...
         'CONFIG_PA1_ArgosEolPeriod', '100', ...
         'CONFIG_PA2_Retransmission', '25', ...
         'CONFIG_PA3_ArgosTransmissionDuration', '1', ...
         'CONFIG_PA6_PreludeDuration', '180', ...
         'CONFIG_PT0_SurfaceValveMaxTimeAdditionalActions', '2700', ...
         'CONFIG_PT1_OilVolumeMaxPerValveAction', '30', ...
         'CONFIG_PT2_PumpActionMaxTimeReposition', '400', ...
         'CONFIG_PT3_PumpActionMaxTimeAscent', '2000', ...
         'CONFIG_PT4_PumpActionTimeBuoyancyAcquisition', '30000', ...
         'CONFIG_PT5_PressureTargetToleranceForStabilisation', '30', ...
         'CONFIG_PT6_PressureMaxBeforeEmergencyAscent', '2100', ...
         'CONFIG_PT7_BuoyancyReductionFirstThreshold', '4', ...
         'CONFIG_PT8_BuoyancyReductionSecondThreshold', '8', ...
         'CONFIG_PT9_NumberOfOutOfTolerancePresBeforeReposition', '2', ...
         'CONFIG_PT10_GroundingMode', '0', ...
         'CONFIG_PT11_OilVolumeMinForGroundingDetection', '100', ...
         'CONFIG_PT12_GroundingModeMinPresThreshold', '200', ...
         'CONFIG_PT13_GroundingModePresAdjustment', '50', ...
         'CONFIG_PT14_PressureTargetToleranceDuringDrift', '50', ...
         'CONFIG_PT15_CTDPowerAcquisitionMode', '1', ...
         'CONFIG_PT18_DescentSpeed', '30', ...
         'CONFIG_PT20_CTDPumpSwitchOffPres', '5', ...
         'CONFIG_PT26_InternalPressureCalibrationCoef1', '0.125', ...
         'CONFIG_PT27_InternalPressureCalibrationCoef2', '0', ...
         'CONFIG_PX0_Direction', '');
   case {'4.52'}
      o_configStruct = struct( ...
         'CONFIG_MC0_NumberOfCycles', '300', ...
         'CONFIG_MC1_NbCyclesFirstMission', '300', ...
         'CONFIG_MC2_CyclePeriod1', '240', ...
         'CONFIG_MC3_CyclePeriod2', '240', ...
         'CONFIG_MC002_CyclePeriod', '240', ...
         'CONFIG_MC010_DriftDepth', '1000', ...
         'CONFIG_MC011_ProfileDepth', '2000', ...
         'CONFIG_MC4_ReferenceDay', '2', ...
         'CONFIG_MC5_EstimatedSurfaceTime', '6', ...
         'CONFIG_MC6_DelayBeforeMission', '0', ...
         'CONFIG_MC7_DescentSamplingPeriod', '0', ...
         'CONFIG_MC8_DriftSamplingPeriod', '12', ...
         'CONFIG_MC9_AscentSamplingPeriod', '10', ...
         'CONFIG_MC10_DriftDepth1', '1000', ...
         'CONFIG_MC11_ProfileDepth1', '2000', ...
         'CONFIG_MC12_DriftDepth2', '1000', ...
         'CONFIG_MC13_ProfileDepth2', '2000', ...
         'CONFIG_MC14_ThresholdSurfaceMiddlePressure', '10', ...
         'CONFIG_MC15_ThresholdMiddleBottomPressure', '200', ...
         'CONFIG_MC16_ThicknessOfTheSurfaceSlices', '1', ...
         'CONFIG_MC17_ThicknessOfTheMiddleSlices', '10', ...
         'CONFIG_MC18_ThicknessOfTheBottomSlices', '25', ...
         'CONFIG_MC21_GroundingMode', '0', ...
         'CONFIG_MC22_GroundingSwitchPressureAdjustment', '50', ...
         'CONFIG_MC24_OptodeType', '0', ...
         'CONFIG_AC0_ArgosTransmissionPeriod', '40', ...
         'CONFIG_AC1_ArgosEolPeriod', '100', ...
         'CONFIG_AC2_Retransmission', '25', ...
         'CONFIG_AC3_ArgosTransmissionDuration', '1', ...
         'CONFIG_AC6_PreludeDuration', '180', ...
         'CONFIG_TC0_SurfaceValveMaxTimeAdditionalActions', '800', ...
         'CONFIG_TC1_OilVolumeMaxPerValveAction', '11', ...
         'CONFIG_TC2_PumpActionMaxTimeReposition', '290', ...
         'CONFIG_TC3_PumpActionMaxTimeAscent', '720', ...
         'CONFIG_TC4_PumpActionTimeBuoyancyAcquisition', '24000', ...
         'CONFIG_TC5_PressureTargetToleranceForStabilisation', '30', ...
         'CONFIG_TC6_PressureMaxBeforeEmergencyAscent', '2100', ...
         'CONFIG_TC7_BuoyancyReductionFirstThreshold', '1', ...
         'CONFIG_TC8_BuoyancyReductionSecondThreshold', '7', ...
         'CONFIG_TC9_NumberOfOutOfTolerancePresBeforeReposition', '2', ...
         'CONFIG_TC10_OilVolumeMinForGroundingDetection', '36', ...
         'CONFIG_TC11_GroundingModeMinPresThreshold', '200', ...
         'CONFIG_TC12_PressureTargetToleranceDuringDrift', '50', ...
         'CONFIG_TC13_CTDPowerAcquisitionMode', '1', ...
         'CONFIG_TC14_SecondProfilePressureRepetitionRate', '1', ...
         'CONFIG_TC15_SecondProfilePressure', '2000', ...
         'CONFIG_TC16_AverageDescentSpeed', '25', ...
         'CONFIG_TC17_ParkPressureIncrementBetweenCycles', '0', ...
         'CONFIG_TC18_CTDPumpCutOffPressure', '5', ...
         'CONFIG_TC20_EndOfAscentPressure', '10', ...
         'CONFIG_TC21_AverageAscentSpeed', '90', ...
         'CONFIG_TC22_PressureCheckPeriodDuringAscent', '2', ...
         'CONFIG_TC23_MinPressureDiffForPumpAction', '10', ...
         'CONFIG_TC26_InternalPressureCalibrationCoef1', '0.125', ...
         'CONFIG_TC27_InternalPressureCalibrationCoef2', '0', ...
         'CONFIG_PX0_Direction', '3', ...
         'CONFIG_PX1_CtdCutOffPressure', '5', ...
         'CONFIG_PX2_ProfileCutOffPressure', '5.5');
   case {'4.54'}
      o_configStruct = struct( ...
         'CONFIG_MC0_NumberOfCycles', '300', ...
         'CONFIG_MC1_NbCyclesFirstMission', '300', ...
         'CONFIG_MC2_CyclePeriod1', '240', ...
         'CONFIG_MC3_CyclePeriod2', '240', ...
         'CONFIG_MC002_CyclePeriod', '240', ...
         'CONFIG_MC010_DriftDepth', '1000', ...
         'CONFIG_MC011_ProfileDepth', '2000', ...
         'CONFIG_MC4_ReferenceDay', '2', ...
         'CONFIG_MC5_EstimatedSurfaceTime', '6', ...
         'CONFIG_MC6_DelayBeforeMission', '0', ...
         'CONFIG_MC7_DescentSamplingPeriod', '0', ...
         'CONFIG_MC8_DriftSamplingPeriod', '12', ...
         'CONFIG_MC9_AscentSamplingPeriod', '10', ...
         'CONFIG_MC10_DriftDepth1', '1000', ...
         'CONFIG_MC11_ProfileDepth1', '2000', ...
         'CONFIG_MC12_DriftDepth2', '1000', ...
         'CONFIG_MC13_ProfileDepth2', '2000', ...
         'CONFIG_MC14_ThresholdSurfaceMiddlePressure', '10', ...
         'CONFIG_MC15_ThresholdMiddleBottomPressure', '200', ...
         'CONFIG_MC16_ThicknessOfTheSurfaceSlices', '1', ...
         'CONFIG_MC17_ThicknessOfTheMiddleSlices', '10', ...
         'CONFIG_MC18_ThicknessOfTheBottomSlices', '25', ...
         'CONFIG_MC21_GroundingMode', '0', ...
         'CONFIG_MC22_GroundingSwitchPressureAdjustment', '50', ...
         'CONFIG_MC24_OptodeType', '0', ...
         'CONFIG_AC0_ArgosTransmissionPeriod', '40', ...
         'CONFIG_AC1_ArgosEolPeriod', '100', ...
         'CONFIG_AC2_Retransmission', '25', ...
         'CONFIG_AC3_ArgosTransmissionDuration', '1', ...
         'CONFIG_AC6_PreludeDuration', '180', ...
         'CONFIG_TC0_SurfaceValveMaxTimeAdditionalActions', '800', ...
         'CONFIG_TC1_OilVolumeMaxPerValveAction', '11', ...
         'CONFIG_TC2_PumpActionMaxTimeReposition', '290', ...
         'CONFIG_TC3_PumpActionMaxTimeAscent', '720', ...
         'CONFIG_TC4_PumpActionTimeBuoyancyAcquisition', '24000', ...
         'CONFIG_TC5_PressureTargetToleranceForStabilisation', '30', ...
         'CONFIG_TC6_PressureMaxBeforeEmergencyAscent', '2100', ...
         'CONFIG_TC7_BuoyancyReductionFirstThreshold', '1', ...
         'CONFIG_TC8_BuoyancyReductionSecondThreshold', '7', ...
         'CONFIG_TC9_NumberOfOutOfTolerancePresBeforeReposition', '2', ...
         'CONFIG_TC10_OilVolumeMinForGroundingDetection', '36', ...
         'CONFIG_TC11_GroundingModeMinPresThreshold', '200', ...
         'CONFIG_TC12_PressureTargetToleranceDuringDrift', '50', ...
         'CONFIG_TC13_CTDPowerAcquisitionMode', '1', ...
         'CONFIG_TC14_SecondProfilePressureRepetitionRate', '1', ...
         'CONFIG_TC15_SecondProfilePressure', '2000', ...
         'CONFIG_TC16_AverageDescentSpeed', '25', ...
         'CONFIG_TC17_ParkPressureIncrementBetweenCycles', '0', ...
         'CONFIG_TC18_CTDPumpCutOffPressure', '5', ...
         'CONFIG_TC20_EndOfAscentPressure', '10', ...
         'CONFIG_TC21_AverageAscentSpeed', '90', ...
         'CONFIG_TC22_PressureCheckPeriodDuringAscent', '2', ...
         'CONFIG_TC23_MinPressureDiffForPumpAction', '10', ...
         'CONFIG_TC26_DelayBeforeResetOffsetCmd', '0', ...
         'CONFIG_TC27_InternalPressureCalibrationCoef1', '0.125', ...
         'CONFIG_TC28_InternalPressureCalibrationCoef2', '0', ...
         'CONFIG_PX0_Direction', '3', ...
         'CONFIG_PX1_CtdCutOffPressure', '5', ...
         'CONFIG_PX2_ProfileCutOffPressure', '5.5');
   otherwise
      fprintf('WARNING: Nothing done yet in generate_json_float_meta_prv_argos_ for dacFormatId %s\n', a_dacFormatId);
end

return

% ------------------------------------------------------------------------------
% Get the list of BDD variables associated to configuration parameters for a
% given float version.
%
% SYNTAX :
%  [o_configStruct] = get_config_bdd_struct(a_dacFormatId)
%
% INPUT PARAMETERS :
%   a_dacFormatId : float DAC version
%
% OUTPUT PARAMETERS :
%   o_configStruct : list of BDD variables
%
% EXAMPLES :
%
% SEE ALSO :
% AUTHORS  : Jean-Philippe Rannou (Altran)(jean-philippe.rannou@altran.com)
% ------------------------------------------------------------------------------
% RELEASES :
%   04/22/2013 - RNU - creation
%   09/01/2017 - RNU - RT version added
% ------------------------------------------------------------------------------
function [o_configStruct] = get_config_bdd_struct(a_dacFormatId)

% output parameters initialization
o_configStruct = [];

switch (a_dacFormatId)
   case {'4.2', '4.21', '4.22', '4.4', '4.41'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', 'CONFIG_MaxCycles_NUMBER', ...
         'CONFIG_PM1_CyclePeriod', 'CYCLE_TIME', ...
         'CONFIG_PM2_ReferenceDay', 'PRCFG_Reference_day', ...
         'CONFIG_PM3_AscentStartTime', 'PRCFG_Start_time', ...
         'CONFIG_PM4_DelayBeforeMission', 'DELAY_BEFORE_MISSION', ...
         'CONFIG_PM5_DescentSamplingPeriod', 'DESC_PROFILE_PERIOD', ...
         'CONFIG_PM6_DriftSamplingPeriod', 'PR_IMMERSION_DRIFT_PERIOD', ...
         'CONFIG_PM7_AscentSamplingPeriod', 'ASC_PROFILE_PERIOD', ...
         'CONFIG_PM8_DriftDepth', 'PARKING_PRESSURE', ...
         'CONFIG_PM9_ProfileDepth', 'DEEPEST_PRESSURE', ...
         'CONFIG_PM10_DelayBeforeProfile', 'DEEP_PROFILE_DESCENT_DELAY', ...
         'CONFIG_PM11_ThresholdSurfaceBottomPressure', 'SHALLOW_DEEP_THRESHOLD', ...
         'CONFIG_PM12_ThicknessOfTheSurfaceSlices', 'SURF_SLICE_THICKNESS', ...
         'CONFIG_PM13_ThicknessOfTheBottomSlices', 'DEPTH_SLICE_THICKNESS', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', 'TRANS_REPETITION', ...
         'CONFIG_PA1_Retransmission', 'CONFIG_TeleRepetition_COUNT', ...
         'CONFIG_PA2_ArgosTransmissionDuration', 'CONFIG_TransMinTime_HOURS', ...
         'CONFIG_PT3_SurfaceValveMaxTimeAdditionalActions', 'PRCFG_Surf_valve_max_duration', ...
         'CONFIG_PT4_OilVolumeMaxPerValveAction', 'PRCFG_Depth_valve_max_volume', ...
         'CONFIG_PT5_PumpActionMaxTimeReposition', 'PRCFG_Depth_pump_max_duration', ...
         'CONFIG_PT6_OilVolumeMaxPerValveAction', 'PRCFG_Depth_valve_volume', ...
         'CONFIG_PT7_PumpActionMaxTimeAscent', 'PRCFG_Asc_pump_max_duration', ...
         'CONFIG_PT10_PumpActionTimeBuoyancyAcquisition', 'PRCFG_Surf_pump_duration', ...
         'CONFIG_PT11_PressureCheckTimeAscent', 'VECTOR_ASCEND_SAMPLING_PERIOD', ...
         'CONFIG_PT12_PressureCheckTimeBuoyancyReductionPhase', 'VECTOR_SURFACE_SAMPLING_PERIOD', ...
         'CONFIG_PT14_PressureTargetToleranceForStabilisation', 'PRCFG_Gap_order_go_delta_pres', ...
         'CONFIG_PT16_PressureMaxBeforeEmergencyAscent', 'PRCFG_Max_pressure', ...
         'CONFIG_PT17_BuoyancyReductionFirstThreshold', 'PRCFG_Surf_valve_start_pressure', ...
         'CONFIG_PT18_BuoyancyReductionSecondThreshold', 'PRCFG_Descent_start_pressure', ...
         'CONFIG_PT20_NumberOfOutOfTolerancePresBeforeReposition', 'PRCFG_Gap_order_delta_position', ...
         'CONFIG_PT21_GroundingMode', 'PRCFG_Grounded_mode', ...
         'CONFIG_PT23_OilVolumeMinForGroundingDetection', 'PRCFG_Grounded_volume', ...
         'CONFIG_PT24_GroundingModeMinPresThreshold', 'PRCFG_Grounded_waiting_pres', ...
         'CONFIG_PT25_GroundingModePresAdjustment', 'PRCFG_Grounded_reduction_pres', ...
         'CONFIG_PT26_PressureTargetToleranceDuringDrift', 'PRCFG_Gap_order_keep_delta_pres', ...
         'CONFIG_PX0_Direction', 'DIRECTION');
   case {'4.5'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', 'CONFIG_MaxCycles_NUMBER', ...
         'CONFIG_PM1_CyclePeriod', 'CYCLE_TIME', ...
         'CONFIG_PM2_ReferenceDay', 'PRCFG_Reference_day', ...
         'CONFIG_PM3_AscentStartTime', 'PRCFG_Start_time', ...
         'CONFIG_PM4_DelayBeforeMission', 'DELAY_BEFORE_MISSION', ...
         'CONFIG_PM5_DescentSamplingPeriod', 'DESC_PROFILE_PERIOD', ...
         'CONFIG_PM6_DriftSamplingPeriod', 'PR_IMMERSION_DRIFT_PERIOD', ...
         'CONFIG_PM7_AscentSamplingPeriod', 'ASC_PROFILE_PERIOD', ...
         'CONFIG_PM8_DriftDepth', 'PARKING_PRESSURE', ...
         'CONFIG_PM9_ProfileDepth', 'DEEPEST_PRESSURE', ...
         'CONFIG_PM10_ThresholdSurfaceBottomPressure', 'SHALLOW_DEEP_THRESHOLD', ...
         'CONFIG_PM11_ThicknessOfTheSurfaceSlices', 'SURF_SLICE_THICKNESS', ...
         'CONFIG_PM12_ThicknessOfTheBottomSlices', 'DEPTH_SLICE_THICKNESS', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', 'TRANS_REPETITION', ...
         'CONFIG_PA1_ArgosEolPeriod', 'PRCFG_EOL_trans_period', ...
         'CONFIG_PA2_Retransmission', 'CONFIG_TeleRepetition_COUNT', ...
         'CONFIG_PA3_ArgosTransmissionDuration', 'CONFIG_TransMinTime_HOURS', ...
         'CONFIG_PA6_PreludeDuration', 'CONFIG_PreludeDuration_MINUTES', ...
         'CONFIG_PT0_SurfaceValveMaxTimeAdditionalActions', 'PRCFG_Surf_valve_max_duration', ...
         'CONFIG_PT1_OilVolumeMaxPerValveAction', 'PRCFG_Depth_valve_max_volume', ...
         'CONFIG_PT2_PumpActionMaxTimeReposition', 'PRCFG_Depth_pump_max_duration', ...
         'CONFIG_PT3_PumpActionMaxTimeAscent', 'PRCFG_Asc_pump_max_duration', ...
         'CONFIG_PT4_PumpActionTimeBuoyancyAcquisition', 'PRCFG_Surf_pump_duration', ...
         'CONFIG_PT5_PressureTargetToleranceForStabilisation', 'PRCFG_Gap_order_go_delta_pres', ...
         'CONFIG_PT6_PressureMaxBeforeEmergencyAscent', 'PRCFG_Max_pressure', ...
         'CONFIG_PT7_BuoyancyReductionFirstThreshold', 'PRCFG_Surf_valve_start_pressure', ...
         'CONFIG_PT8_BuoyancyReductionSecondThreshold', 'PRCFG_Descent_start_pressure', ...
         'CONFIG_PT9_NumberOfOutOfTolerancePresBeforeReposition', 'PRCFG_Gap_order_delta_position', ...
         'CONFIG_PT10_GroundingMode', 'PRCFG_Grounded_mode', ...
         'CONFIG_PT11_OilVolumeMinForGroundingDetection', 'PRCFG_Grounded_volume', ...
         'CONFIG_PT12_GroundingModeMinPresThreshold', 'PRCFG_Grounded_waiting_pres', ...
         'CONFIG_PT13_GroundingModePresAdjustment', 'PRCFG_Grounded_reduction_pres', ...
         'CONFIG_PT14_PressureTargetToleranceDuringDrift', 'PRCFG_Gap_order_keep_delta_pres', ...
         'CONFIG_PT15_CTDPowerAcquisitionMode', 'PRCFG_Acquisition_mode', ...
         'CONFIG_PT18_DescentSpeed', 'PRCFG_Descent_speed', ...
         'CONFIG_PT20_InternalPressureCalibrationCoef1', 'PRCFG_Pressure_coefficient_A', ...
         'CONFIG_PT21_InternalPressureCalibrationCoef2', 'PRCFG_Pressure_coefficient_B', ...     
         'CONFIG_PX0_Direction', 'DIRECTION');
   case {'4.23', '4.51', '4.43'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', 'CONFIG_MaxCycles_NUMBER', ...
         'CONFIG_PM1_CyclePeriod', 'CYCLE_TIME', ...
         'CONFIG_PM2_ReferenceDay', 'PRCFG_Reference_day', ...
         'CONFIG_PM3_EstimatedSurfaceTime', 'PRCFG_End_time', ...
         'CONFIG_PM4_DelayBeforeMission', 'DELAY_BEFORE_MISSION', ...
         'CONFIG_PM5_DescentSamplingPeriod', 'DESC_PROFILE_PERIOD', ...
         'CONFIG_PM6_DriftSamplingPeriod', 'PR_IMMERSION_DRIFT_PERIOD', ...
         'CONFIG_PM7_AscentSamplingPeriod', 'ASC_PROFILE_PERIOD', ...
         'CONFIG_PM8_DriftDepth', 'PARKING_PRESSURE', ...
         'CONFIG_PM9_ProfileDepth', 'DEEPEST_PRESSURE', ...
         'CONFIG_PM10_ThresholdSurfaceMiddlePressure', 'INT_SURF_THRESHOLD', ...
         'CONFIG_PM11_ThresholdMiddleBottomPressure', 'DEPTH_INT_THRESHOLD', ...
         'CONFIG_PM12_ThicknessOfTheSurfaceSlices', 'SURF_SLICE_THICKNESS', ...
         'CONFIG_PM13_ThicknessOfTheMiddleSlices', 'INT_SLICE_THICKNESS', ...
         'CONFIG_PM14_ThicknessOfTheBottomSlices', 'DEPTH_SLICE_THICKNESS', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', 'TRANS_REPETITION', ...
         'CONFIG_PA1_ArgosEolPeriod', 'PRCFG_EOL_trans_period', ...
         'CONFIG_PA2_Retransmission', 'CONFIG_TeleRepetition_COUNT', ...
         'CONFIG_PA3_ArgosTransmissionDuration', 'CONFIG_TransMinTime_HOURS', ...
         'CONFIG_PA6_PreludeDuration', 'CONFIG_PreludeDuration_MINUTES', ...
         'CONFIG_PT0_SurfaceValveMaxTimeAdditionalActions', 'PRCFG_Surf_valve_max_duration', ...
         'CONFIG_PT1_OilVolumeMaxPerValveAction', 'PRCFG_Depth_valve_max_volume', ...
         'CONFIG_PT2_PumpActionMaxTimeReposition', 'PRCFG_Depth_pump_max_duration', ...
         'CONFIG_PT3_PumpActionMaxTimeAscent', 'PRCFG_Asc_pump_max_duration', ...
         'CONFIG_PT4_PumpActionTimeBuoyancyAcquisition', 'PRCFG_Surf_pump_duration', ...
         'CONFIG_PT5_PressureTargetToleranceForStabilisation', 'PRCFG_Gap_order_go_delta_pres', ...
         'CONFIG_PT6_PressureMaxBeforeEmergencyAscent', 'PRCFG_Max_pressure', ...
         'CONFIG_PT7_BuoyancyReductionFirstThreshold', 'PRCFG_Surf_valve_start_pressure', ...
         'CONFIG_PT8_BuoyancyReductionSecondThreshold', 'PRCFG_Descent_start_pressure', ...
         'CONFIG_PT9_NumberOfOutOfTolerancePresBeforeReposition', 'PRCFG_Gap_order_delta_position', ...
         'CONFIG_PT10_GroundingMode', 'PRCFG_Grounded_mode', ...
         'CONFIG_PT11_OilVolumeMinForGroundingDetection', 'PRCFG_Grounded_volume', ...
         'CONFIG_PT12_GroundingModeMinPresThreshold', 'PRCFG_Grounded_waiting_pres', ...
         'CONFIG_PT13_GroundingModePresAdjustment', 'PRCFG_Grounded_reduction_pres', ...
         'CONFIG_PT14_PressureTargetToleranceDuringDrift', 'PRCFG_Gap_order_keep_delta_pres', ...
         'CONFIG_PT15_CTDPowerAcquisitionMode', 'PRCFG_Acquisition_mode', ...
         'CONFIG_PT18_DescentSpeed', 'PRCFG_Descent_speed', ...
         'CONFIG_PT22_InternalPressureCalibrationCoef1', 'PRCFG_Pressure_coefficient_A', ...
         'CONFIG_PT23_InternalPressureCalibrationCoef2', 'PRCFG_Pressure_coefficient_B', ...        
         'CONFIG_PX0_Direction', 'DIRECTION');
   case {'4.42', '4.44', '4.45'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', 'CONFIG_MaxCycles_NUMBER', ...
         'CONFIG_PM1_CyclePeriod', 'CYCLE_TIME', ...
         'CONFIG_PM2_ReferenceDay', 'PRCFG_Reference_day', ...
         'CONFIG_PM3_EstimatedSurfaceTime', 'PRCFG_End_time', ...
         'CONFIG_PM4_DelayBeforeMission', 'DELAY_BEFORE_MISSION', ...
         'CONFIG_PM5_DescentSamplingPeriod', 'DESC_PROFILE_PERIOD', ...
         'CONFIG_PM6_DriftSamplingPeriod', 'PR_IMMERSION_DRIFT_PERIOD', ...
         'CONFIG_PM7_AscentSamplingPeriod', 'ASC_PROFILE_PERIOD', ...
         'CONFIG_PM8_DriftDepth', 'PARKING_PRESSURE', ...
         'CONFIG_PM9_ProfileDepth', 'DEEPEST_PRESSURE', ...
         'CONFIG_PM10_ThresholdSurfaceMiddlePressure', 'INT_SURF_THRESHOLD', ...
         'CONFIG_PM11_ThresholdMiddleBottomPressure', 'DEPTH_INT_THRESHOLD', ...
         'CONFIG_PM12_ThicknessOfTheSurfaceSlices', 'SURF_SLICE_THICKNESS', ...
         'CONFIG_PM13_ThicknessOfTheMiddleSlices', 'INT_SLICE_THICKNESS', ...
         'CONFIG_PM14_ThicknessOfTheBottomSlices', 'DEPTH_SLICE_THICKNESS', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', 'TRANS_REPETITION', ...
         'CONFIG_PA1_ArgosEolPeriod', 'PRCFG_EOL_trans_period', ...
         'CONFIG_PA2_Retransmission', 'CONFIG_TeleRepetition_COUNT', ...
         'CONFIG_PA3_ArgosTransmissionDuration', 'CONFIG_TransMinTime_HOURS', ...
         'CONFIG_PA6_PreludeDuration', 'CONFIG_PreludeDuration_MINUTES', ...
         'CONFIG_PT0_SurfaceValveMaxTimeAdditionalActions', 'PRCFG_Surf_valve_max_duration', ...
         'CONFIG_PT1_OilVolumeMaxPerValveAction', 'PRCFG_Depth_valve_max_volume', ...
         'CONFIG_PT2_PumpActionMaxTimeReposition', 'PRCFG_Depth_pump_max_duration', ...
         'CONFIG_PT3_PumpActionMaxTimeAscent', 'PRCFG_Asc_pump_max_duration', ...
         'CONFIG_PT4_PumpActionTimeBuoyancyAcquisition', 'PRCFG_Surf_pump_duration', ...
         'CONFIG_PT5_PressureTargetToleranceForStabilisation', 'PRCFG_Gap_order_go_delta_pres', ...
         'CONFIG_PT6_PressureMaxBeforeEmergencyAscent', 'PRCFG_Max_pressure', ...
         'CONFIG_PT7_BuoyancyReductionFirstThreshold', 'PRCFG_Surf_valve_start_pressure', ...
         'CONFIG_PT8_BuoyancyReductionSecondThreshold', 'PRCFG_Descent_start_pressure', ...
         'CONFIG_PT9_NumberOfOutOfTolerancePresBeforeReposition', 'PRCFG_Gap_order_delta_position', ...
         'CONFIG_PT10_GroundingMode', 'PRCFG_Grounded_mode', ...
         'CONFIG_PT11_OilVolumeMinForGroundingDetection', 'PRCFG_Grounded_volume', ...
         'CONFIG_PT12_GroundingModeMinPresThreshold', 'PRCFG_Grounded_waiting_pres', ...
         'CONFIG_PT13_GroundingModePresAdjustment', 'PRCFG_Grounded_reduction_pres', ...
         'CONFIG_PT14_PressureTargetToleranceDuringDrift', 'PRCFG_Gap_order_keep_delta_pres', ...
         'CONFIG_PT15_CTDPowerAcquisitionMode', 'PRCFG_Acquisition_mode', ...
         'CONFIG_PT18_DescentSpeed', 'PRCFG_Descent_speed', ...
         'CONFIG_PT20_CTDPumpSwitchOffPres', 'CTD_CUT_OFF_PRESSURE', ...
         'CONFIG_PT22_AscentEndThreshold', 'ASCENT_END_THRESHOLD', ...
         'CONFIG_PT23_AscentSpeed', 'AverageAscentSpeed', ...
         'CONFIG_PT24_PressureCheckTimeAscent', 'PRES_CHECK_TIME_ASCENT', ...
         'CONFIG_PT25_AscentVerticalThresholdForBuoyancyAction', 'ASCENT_STABILIZATION_PRES', ...      
         'CONFIG_PT26_InternalPressureCalibrationCoef1', 'PRCFG_Pressure_coefficient_A', ...
         'CONFIG_PT27_InternalPressureCalibrationCoef2', 'PRCFG_Pressure_coefficient_B', ...     
         'CONFIG_PX0_Direction', 'DIRECTION');
   case {'4.53'}
      o_configStruct = struct( ...
         'CONFIG_PM0_NumberOfCycles', 'CONFIG_MaxCycles_NUMBER', ...
         'CONFIG_PM1_CyclePeriod', 'CYCLE_TIME', ...
         'CONFIG_PM2_ReferenceDay', 'PRCFG_Reference_day', ...
         'CONFIG_PM3_EstimatedSurfaceTime', 'PRCFG_End_time', ...
         'CONFIG_PM4_DelayBeforeMission', 'DELAY_BEFORE_MISSION', ...
         'CONFIG_PM5_DescentSamplingPeriod', 'DESC_PROFILE_PERIOD', ...
         'CONFIG_PM6_DriftSamplingPeriod', 'PR_IMMERSION_DRIFT_PERIOD', ...
         'CONFIG_PM7_AscentSamplingPeriod', 'ASC_PROFILE_PERIOD', ...
         'CONFIG_PM8_DriftDepth', 'PARKING_PRESSURE', ...
         'CONFIG_PM9_ProfileDepth', 'DEEPEST_PRESSURE', ...
         'CONFIG_PM10_ThresholdSurfaceMiddlePressure', 'INT_SURF_THRESHOLD', ...
         'CONFIG_PM11_ThresholdMiddleBottomPressure', 'DEPTH_INT_THRESHOLD', ...
         'CONFIG_PM12_ThicknessOfTheSurfaceSlices', 'SURF_SLICE_THICKNESS', ...
         'CONFIG_PM13_ThicknessOfTheMiddleSlices', 'INT_SLICE_THICKNESS', ...
         'CONFIG_PM14_ThicknessOfTheBottomSlices', 'DEPTH_SLICE_THICKNESS', ...
         'CONFIG_PA0_ArgosTransmissionPeriod', 'TRANS_REPETITION', ...
         'CONFIG_PA1_ArgosEolPeriod', 'PRCFG_EOL_trans_period', ...
         'CONFIG_PA2_Retransmission', 'CONFIG_TeleRepetition_COUNT', ...
         'CONFIG_PA3_ArgosTransmissionDuration', 'CONFIG_TransMinTime_HOURS', ...
         'CONFIG_PA6_PreludeDuration', 'CONFIG_PreludeDuration_MINUTES', ...
         'CONFIG_PT0_SurfaceValveMaxTimeAdditionalActions', 'PRCFG_Surf_valve_max_duration', ...
         'CONFIG_PT1_OilVolumeMaxPerValveAction', 'PRCFG_Depth_valve_max_volume', ...
         'CONFIG_PT2_PumpActionMaxTimeReposition', 'PRCFG_Depth_pump_max_duration', ...
         'CONFIG_PT3_PumpActionMaxTimeAscent', 'PRCFG_Asc_pump_max_duration', ...
         'CONFIG_PT4_PumpActionTimeBuoyancyAcquisition', 'PRCFG_Surf_pump_duration', ...
         'CONFIG_PT5_PressureTargetToleranceForStabilisation', 'PRCFG_Gap_order_go_delta_pres', ...
         'CONFIG_PT6_PressureMaxBeforeEmergencyAscent', 'PRCFG_Max_pressure', ...
         'CONFIG_PT7_BuoyancyReductionFirstThreshold', 'PRCFG_Surf_valve_start_pressure', ...
         'CONFIG_PT8_BuoyancyReductionSecondThreshold', 'PRCFG_Descent_start_pressure', ...
         'CONFIG_PT9_NumberOfOutOfTolerancePresBeforeReposition', 'PRCFG_Gap_order_delta_position', ...
         'CONFIG_PT10_GroundingMode', 'PRCFG_Grounded_mode', ...
         'CONFIG_PT11_OilVolumeMinForGroundingDetection', 'PRCFG_Grounded_volume', ...
         'CONFIG_PT12_GroundingModeMinPresThreshold', 'PRCFG_Grounded_waiting_pres', ...
         'CONFIG_PT13_GroundingModePresAdjustment', 'PRCFG_Grounded_reduction_pres', ...
         'CONFIG_PT14_PressureTargetToleranceDuringDrift', 'PRCFG_Gap_order_keep_delta_pres', ...
         'CONFIG_PT15_CTDPowerAcquisitionMode', 'PRCFG_Acquisition_mode', ...
         'CONFIG_PT18_DescentSpeed', 'PRCFG_Descent_speed', ...
         'CONFIG_PT20_CTDPumpSwitchOffPres', 'CTD_CUT_OFF_PRESSURE', ...
         'CONFIG_PT26_InternalPressureCalibrationCoef1', 'PRCFG_Pressure_coefficient_A', ...
         'CONFIG_PT27_InternalPressureCalibrationCoef2', 'PRCFG_Pressure_coefficient_B', ...     
         'CONFIG_PX0_Direction', 'DIRECTION');
   case {'4.52'}
      o_configStruct = struct( ...
         'CONFIG_MC0_NumberOfCycles', 'CONFIG_MaxCycles_NUMBER', ...
         'CONFIG_MC1_NbCyclesFirstMission', 'NB_CYCLE_FIRST_MISSION', ...
         'CONFIG_MC2_CyclePeriod1', 'CYCLE_TIME', ...
         'CONFIG_MC3_CyclePeriod2', 'CYCLE_TIME', ...
         'CONFIG_MC002_CyclePeriod', 'CYCLE_TIME', ...
         'CONFIG_MC010_DriftDepth', 'PARKING_PRESSURE', ...
         'CONFIG_MC011_ProfileDepth', 'DEEPEST_PRESSURE', ...
         'CONFIG_MC4_ReferenceDay', 'PRCFG_Reference_day', ...
         'CONFIG_MC5_EstimatedSurfaceTime', 'PRCFG_End_time', ...
         'CONFIG_MC6_DelayBeforeMission', 'DELAY_BEFORE_MISSION', ...
         'CONFIG_MC7_DescentSamplingPeriod', 'DESC_PROFILE_PERIOD', ...
         'CONFIG_MC8_DriftSamplingPeriod', 'PR_IMMERSION_DRIFT_PERIOD', ...
         'CONFIG_MC9_AscentSamplingPeriod', 'ASC_PROFILE_PERIOD', ...
         'CONFIG_MC10_DriftDepth1', 'PARKING_PRESSURE', ...
         'CONFIG_MC11_ProfileDepth1', 'DEEPEST_PRESSURE', ...
         'CONFIG_MC12_DriftDepth2', 'PARKING_PRESSURE', ...
         'CONFIG_MC13_ProfileDepth2', 'DEEPEST_PRESSURE', ...
         'CONFIG_MC14_ThresholdSurfaceMiddlePressure', 'INT_SURF_THRESHOLD', ...
         'CONFIG_MC15_ThresholdMiddleBottomPressure', 'DEPTH_INT_THRESHOLD', ...
         'CONFIG_MC16_ThicknessOfTheSurfaceSlices', 'SURF_SLICE_THICKNESS', ...
         'CONFIG_MC17_ThicknessOfTheMiddleSlices', 'INT_SLICE_THICKNESS', ...
         'CONFIG_MC18_ThicknessOfTheBottomSlices', 'DEPTH_SLICE_THICKNESS', ...
         'CONFIG_MC21_GroundingMode', 'PRCFG_Grounded_mode', ...
         'CONFIG_MC22_GroundingSwitchPressureAdjustment', 'PRCFG_Grounded_reduction_pres', ...
         'CONFIG_MC24_OptodeType', 'OptodeType', ...      
         'CONFIG_AC0_ArgosTransmissionPeriod', 'TRANS_REPETITION', ...
         'CONFIG_AC1_ArgosEolPeriod', 'PRCFG_EOL_trans_period', ...
         'CONFIG_AC2_Retransmission', 'CONFIG_TeleRepetition_COUNT', ...
         'CONFIG_AC3_ArgosTransmissionDuration', 'CONFIG_TransMinTime_HOURS', ...
         'CONFIG_AC6_PreludeDuration', 'CONFIG_PreludeDuration_MINUTES', ...
         'CONFIG_TC0_SurfaceValveMaxTimeAdditionalActions', 'PRCFG_Surf_valve_max_duration', ...
         'CONFIG_TC1_OilVolumeMaxPerValveAction', 'PRCFG_Depth_valve_max_volume', ...
         'CONFIG_TC2_PumpActionMaxTimeReposition', 'PRCFG_Depth_pump_max_duration', ...
         'CONFIG_TC3_PumpActionMaxTimeAscent', 'PRCFG_Asc_pump_max_duration', ...
         'CONFIG_TC4_PumpActionTimeBuoyancyAcquisition', 'PRCFG_Surf_pump_duration', ...
         'CONFIG_TC5_PressureTargetToleranceForStabilisation', 'PRCFG_Gap_order_go_delta_pres', ...
         'CONFIG_TC6_PressureMaxBeforeEmergencyAscent', 'PRCFG_Max_pressure', ...
         'CONFIG_TC7_BuoyancyReductionFirstThreshold', 'PRCFG_Surf_valve_start_pressure', ...
         'CONFIG_TC8_BuoyancyReductionSecondThreshold', 'PRCFG_Descent_start_pressure', ...
         'CONFIG_TC9_NumberOfOutOfTolerancePresBeforeReposition', 'PRCFG_Gap_order_delta_position', ...
         'CONFIG_TC10_OilVolumeMinForGroundingDetection', 'PRCFG_Grounded_volume', ...
         'CONFIG_TC11_GroundingModeMinPresThreshold', 'PRCFG_Grounded_waiting_pres', ...
         'CONFIG_TC12_PressureTargetToleranceDuringDrift', 'PRCFG_Gap_order_keep_delta_pres', ...
         'CONFIG_TC13_CTDPowerAcquisitionMode', 'PRCFG_Acquisition_mode', ...
         'CONFIG_TC14_SecondProfilePressureRepetitionRate', 'PRCFG_Alternate_profile_period', ...
         'CONFIG_TC15_SecondProfilePressure', 'PRCFG_Alternate_profile_depth', ...
         'CONFIG_TC16_AverageDescentSpeed', 'PRCFG_Descent_speed', ...
         'CONFIG_TC17_ParkPressureIncrementBetweenCycles', 'PRCFG_Imm_increment_pressure', ...
         'CONFIG_TC18_CTDPumpCutOffPressure', 'CTD_CUT_OFF_PRESSURE', ...
         'CONFIG_TC20_EndOfAscentPressure', 'ASCENT_END_THRESHOLD', ...
         'CONFIG_TC21_AverageAscentSpeed', 'AverageAscentSpeed', ...
         'CONFIG_TC22_PressureCheckPeriodDuringAscent', 'PRES_CHECK_TIME_ASCENT', ...
         'CONFIG_TC23_MinPressureDiffForPumpAction', 'ASCENT_STABILIZATION_PRES', ...
         'CONFIG_TC26_InternalPressureCalibrationCoef1', 'PRCFG_Pressure_coefficient_A', ...
         'CONFIG_TC27_InternalPressureCalibrationCoef2', 'PRCFG_Pressure_coefficient_B', ...
         'CONFIG_PX0_Direction', '', ...
         'CONFIG_PX1_CtdCutOffPressure', '', ...
         'CONFIG_PX2_ProfileCutOffPressure', '');
   case {'4.54'}
      o_configStruct = struct( ...
         'CONFIG_MC0_NumberOfCycles', 'CONFIG_MaxCycles_NUMBER', ...
         'CONFIG_MC1_NbCyclesFirstMission', 'NB_CYCLE_FIRST_MISSION', ...
         'CONFIG_MC2_CyclePeriod1', 'CYCLE_TIME', ...
         'CONFIG_MC3_CyclePeriod2', 'CYCLE_TIME', ...
         'CONFIG_MC002_CyclePeriod', 'CYCLE_TIME', ...
         'CONFIG_MC010_DriftDepth', 'PARKING_PRESSURE', ...
         'CONFIG_MC011_ProfileDepth', 'DEEPEST_PRESSURE', ...
         'CONFIG_MC4_ReferenceDay', 'PRCFG_Reference_day', ...
         'CONFIG_MC5_EstimatedSurfaceTime', 'PRCFG_End_time', ...
         'CONFIG_MC6_DelayBeforeMission', 'DELAY_BEFORE_MISSION', ...
         'CONFIG_MC7_DescentSamplingPeriod', 'DESC_PROFILE_PERIOD', ...
         'CONFIG_MC8_DriftSamplingPeriod', 'PR_IMMERSION_DRIFT_PERIOD', ...
         'CONFIG_MC9_AscentSamplingPeriod', 'ASC_PROFILE_PERIOD', ...
         'CONFIG_MC10_DriftDepth1', 'PARKING_PRESSURE', ...
         'CONFIG_MC11_ProfileDepth1', 'DEEPEST_PRESSURE', ...
         'CONFIG_MC12_DriftDepth2', 'PARKING_PRESSURE', ...
         'CONFIG_MC13_ProfileDepth2', 'DEEPEST_PRESSURE', ...
         'CONFIG_MC14_ThresholdSurfaceMiddlePressure', 'INT_SURF_THRESHOLD', ...
         'CONFIG_MC15_ThresholdMiddleBottomPressure', 'DEPTH_INT_THRESHOLD', ...
         'CONFIG_MC16_ThicknessOfTheSurfaceSlices', 'SURF_SLICE_THICKNESS', ...
         'CONFIG_MC17_ThicknessOfTheMiddleSlices', 'INT_SLICE_THICKNESS', ...
         'CONFIG_MC18_ThicknessOfTheBottomSlices', 'DEPTH_SLICE_THICKNESS', ...
         'CONFIG_MC21_GroundingMode', 'PRCFG_Grounded_mode', ...
         'CONFIG_MC22_GroundingSwitchPressureAdjustment', 'PRCFG_Grounded_reduction_pres', ...
         'CONFIG_MC24_OptodeType', 'OptodeType', ...      
         'CONFIG_AC0_ArgosTransmissionPeriod', 'TRANS_REPETITION', ...
         'CONFIG_AC1_ArgosEolPeriod', 'PRCFG_EOL_trans_period', ...
         'CONFIG_AC2_Retransmission', 'CONFIG_TeleRepetition_COUNT', ...
         'CONFIG_AC3_ArgosTransmissionDuration', 'CONFIG_TransMinTime_HOURS', ...
         'CONFIG_AC6_PreludeDuration', 'CONFIG_PreludeDuration_MINUTES', ...
         'CONFIG_TC0_SurfaceValveMaxTimeAdditionalActions', 'PRCFG_Surf_valve_max_duration', ...
         'CONFIG_TC1_OilVolumeMaxPerValveAction', 'PRCFG_Depth_valve_max_volume', ...
         'CONFIG_TC2_PumpActionMaxTimeReposition', 'PRCFG_Depth_pump_max_duration', ...
         'CONFIG_TC3_PumpActionMaxTimeAscent', 'PRCFG_Asc_pump_max_duration', ...
         'CONFIG_TC4_PumpActionTimeBuoyancyAcquisition', 'PRCFG_Surf_pump_duration', ...
         'CONFIG_TC5_PressureTargetToleranceForStabilisation', 'PRCFG_Gap_order_go_delta_pres', ...
         'CONFIG_TC6_PressureMaxBeforeEmergencyAscent', 'PRCFG_Max_pressure', ...
         'CONFIG_TC7_BuoyancyReductionFirstThreshold', 'PRCFG_Surf_valve_start_pressure', ...
         'CONFIG_TC8_BuoyancyReductionSecondThreshold', 'PRCFG_Descent_start_pressure', ...
         'CONFIG_TC9_NumberOfOutOfTolerancePresBeforeReposition', 'PRCFG_Gap_order_delta_position', ...
         'CONFIG_TC10_OilVolumeMinForGroundingDetection', 'PRCFG_Grounded_volume', ...
         'CONFIG_TC11_GroundingModeMinPresThreshold', 'PRCFG_Grounded_waiting_pres', ...
         'CONFIG_TC12_PressureTargetToleranceDuringDrift', 'PRCFG_Gap_order_keep_delta_pres', ...
         'CONFIG_TC13_CTDPowerAcquisitionMode', 'PRCFG_Acquisition_mode', ...
         'CONFIG_TC14_SecondProfilePressureRepetitionRate', 'PRCFG_Alternate_profile_period', ...
         'CONFIG_TC15_SecondProfilePressure', 'PRCFG_Alternate_profile_depth', ...
         'CONFIG_TC16_AverageDescentSpeed', 'PRCFG_Descent_speed', ...
         'CONFIG_TC17_ParkPressureIncrementBetweenCycles', 'PRCFG_Imm_increment_pressure', ...
         'CONFIG_TC18_CTDPumpCutOffPressure', 'CTD_CUT_OFF_PRESSURE', ...
         'CONFIG_TC20_EndOfAscentPressure', 'ASCENT_END_THRESHOLD', ...
         'CONFIG_TC21_AverageAscentSpeed', 'AverageAscentSpeed', ...
         'CONFIG_TC22_PressureCheckPeriodDuringAscent', 'PRES_CHECK_TIME_ASCENT', ...
         'CONFIG_TC23_MinPressureDiffForPumpAction', 'ASCENT_STABILIZATION_PRES', ...
         'CONFIG_TC26_DelayBeforeResetOffsetCmd', 'DELAY_BEFORE_RESETOFFSET_CMD', ...
         'CONFIG_TC27_InternalPressureCalibrationCoef1', 'PRCFG_Pressure_coefficient_A', ...
         'CONFIG_TC28_InternalPressureCalibrationCoef2', 'PRCFG_Pressure_coefficient_B', ...
         'CONFIG_PX0_Direction', '', ...
         'CONFIG_PX1_CtdCutOffPressure', '', ...
         'CONFIG_PX2_ProfileCutOffPressure', '');
   otherwise
      fprintf('WARNING: Nothing done yet in generate_json_float_meta_prv_argos_ for dacFormatId %s\n', a_dacFormatId);
end

return

% ------------------------------------------------------------------------------
% Get the list of BDD variables associated to float meta-data.
%
% SYNTAX :
%  [o_metaStruct] = get_meta_bdd_struct()
%
% INPUT PARAMETERS :
%
% OUTPUT PARAMETERS :
%   o_metaStruct : list of BDD variables
%
% EXAMPLES :
%
% SEE ALSO :
% AUTHORS  : Jean-Philippe Rannou (Altran)(jean-philippe.rannou@altran.com)
% ------------------------------------------------------------------------------
% RELEASES :
%   04/22/2013 - RNU - creation
%   09/01/2017 - RNU - RT version added
% ------------------------------------------------------------------------------
function [o_metaStruct] = get_meta_bdd_struct()

% output parameters initialization
o_metaStruct = struct( ...
   'ARGO_USER_MANUAL_VERSION', '', ...
   'PLATFORM_NUMBER', '', ...
   'PTT', 'PTT', ...
   'IMEI', 'IMEI', ...
   'TRANS_SYSTEM', 'TRANS_SYSTEM', ...
   'TRANS_SYSTEM_ID', 'TRANS_SYSTEM_ID', ...
   'TRANS_FREQUENCY', 'TRANS_FREQUENCY', ...
   'POSITIONING_SYSTEM', 'POSITIONING_SYSTEM', ...
   'PLATFORM_FAMILY', 'PLATFORM_FAMILY', ...
   'PLATFORM_TYPE', 'PLATFORM_TYPE', ...
   'PLATFORM_MAKER', 'PLATFORM_MAKER', ...
   'FIRMWARE_VERSION', 'FIRMWARE_VERSION', ...
   'MANUAL_VERSION', 'MANUAL_VERSION', ...
   'FLOAT_SERIAL_NO', 'INST_REFERENCE', ...
   'STANDARD_FORMAT_ID', 'STANDARD_FORMAT_ID', ...
   'DAC_FORMAT_ID', 'PR_VERSION', ...
   'WMO_INST_TYPE', 'PR_PROBE_CODE', ...
   'PROJECT_NAME', 'PR_EXPERIMENT_ID', ...
   'DATA_CENTRE', 'DATA_CENTRE', ...
   'PI_NAME', 'PI_NAME', ...
   'ANOMALY', 'ANOMALY', ...
   'BATTERY_TYPE', 'BATTERY_TYPE', ...
   'BATTERY_PACKS', 'BATTERY_PACKS', ...
   'CONTROLLER_BOARD_TYPE_PRIMARY', 'CONTROLLER_BOARD_TYPE_PRIMARY', ...
   'CONTROLLER_BOARD_TYPE_SECONDARY', 'CONTROLLER_BOARD_TYPE_SECONDARY', ...
   'CONTROLLER_BOARD_SERIAL_NO_PRIMARY', 'CONTROLLER_BOARD_SERIAL_NO_PRIMA', ...
   'CONTROLLER_BOARD_SERIAL_NO_SECONDARY', 'CONTROLLER_BOARD_SERIAL_NO_SECON', ...
   'SPECIAL_FEATURES', 'SPECIAL_FEATURES', ...
   'FLOAT_OWNER', 'FLOAT_OWNER', ...
   'OPERATING_INSTITUTION', 'OPERATING_INSTITUTION', ...
   'CUSTOMISATION', 'CUSTOMISATION', ...
   'LAUNCH_DATE', 'PR_LAUNCH_DATETIME', ...
   'LAUNCH_LATITUDE', 'PR_LAUNCH_LATITUDE', ...
   'LAUNCH_LONGITUDE', 'PR_LAUNCH_LONGITUDE', ...
   'LAUNCH_QC', 'LAUNCH_QC', ...
   'START_DATE', 'START_DATE', ...
   'START_DATE_QC', 'START_DATE_QC', ...
   'STARTUP_DATE', '', ...
   'STARTUP_DATE_QC', '', ...
   'DEPLOYMENT_PLATFORM', 'DEPLOY_PLATFORM', ...
   'DEPLOYMENT_CRUISE_ID', 'DEPLOY_MISSION', ...
   'DEPLOYMENT_REFERENCE_STATION_ID', 'DEPLOY_AVAILABLE_PROFILE_ID', ...
   'END_MISSION_DATE', 'END_MISSION_DATE', ...
   'END_MISSION_STATUS', 'END_MISSION_STATUS', ...
   'PREDEPLOYMENT_CALIB_EQUATION', 'PREDEPLOYMENT_CALIB_EQUATION', ...
   'PREDEPLOYMENT_CALIB_COEFFICIENT', 'PREDEPLOYMENT_CALIB_COEFFICIENT', ...
   'PREDEPLOYMENT_CALIB_COMMENT', 'PREDEPLOYMENT_CALIB_COMMENT', ...
   'CALIB_RT_PARAMETER', 'CALIB_RT_PARAMETER', ...
   'CALIB_RT_EQUATION', 'CALIB_RT_EQUATION', ...
   'CALIB_RT_COEFFICIENT', 'CALIB_RT_COEFFICIENT', ...
   'CALIB_RT_COMMENT', 'CALIB_RT_COMMENT', ...
   'CALIB_RT_DATE', 'CALIB_RT_DATE', ...
   'CALIB_RT_ADJUSTED_ERROR', 'CALIB_RT_ADJUSTED_ERROR', ...
   'CALIB_RT_ADJ_ERROR_METHOD', 'CALIB_RT_ADJ_ERROR_METHOD');

return
