% ------------------------------------------------------------------------------
% Lecture d'un fichier de méta données.
%
% SYNTAX :
%  [o_nCycles, o_nParam, ...
%    o_platformNumber, o_ptt, o_transSystem, o_transSystemId, o_transFrequency, ...
%    o_transRepetition, o_positioningSystem, o_clockDrift, o_platformModel, ...
%    o_platformMaker, o_instReference, o_wmoInstType, o_direction, o_projectName, ...
%    o_dataCentre, o_piName, o_anomaly, ...
%    o_launchDate, o_launchLatitude, o_launchLongitude, o_launchQc, o_startDate, ...
%    o_startDateQc, o_deployPlatform, o_deployMission, o_deployAvailableProfileId, ...
%    o_endMissionDate, o_endMissionStatus, ...
%    o_sensor, o_sensorMaker, o_sensorModel, o_sensorSerialNo, o_sensorUnits, ...
%    o_sensorAccuracy, o_sensorResolution, ...
%    o_parameter, o_predeploymentCalibEquation, o_predeploymentCalibCoefficient, ...
%    o_predeploymentCalibComment, ...
%    o_repetitionRate, o_cycleTime, o_parkingTime, o_descendingProfilingTime, ...
%    o_ascendingProfilingTime, o_surfaceTime, o_parkingPressure, o_deepestPressure, ...
%    o_deepestPressureDescending] = read_file_meta_all(a_fileName)
%
% INPUT PARAMETERS :
%   a_fileName : nom du fichier de meta données à lire
%
% OUTPUT PARAMETERS :
%   paramètres pertinents lus dans le fichier
%
% EXAMPLES :
%
% SEE ALSO :
% AUTHORS  : Jean-Philippe Rannou (Altran)(jean-philippe.rannou@altran.com)
% ------------------------------------------------------------------------------
% RELEASES :
%   09/03/2011 - RNU - creation
% ------------------------------------------------------------------------------
function [o_nCycles, o_nParam, ...
   o_platformNumber, o_ptt, o_transSystem, o_transSystemId, o_transFrequency, ...
   o_transRepetition, o_positioningSystem, o_clockDrift, o_platformModel, ...
   o_platformMaker, o_instReference, o_wmoInstType, o_direction, o_projectName, ...
   o_dataCentre, o_piName, o_anomaly, ...
   o_launchDate, o_launchLatitude, o_launchLongitude, o_launchQc, o_startDate, ...
   o_startDateQc, o_deployPlatform, o_deployMission, o_deployAvailableProfileId, ...
   o_endMissionDate, o_endMissionStatus, ...
   o_sensor, o_sensorMaker, o_sensorModel, o_sensorSerialNo, o_sensorUnits, ...
   o_sensorAccuracy, o_sensorResolution, ...
   o_parameter, o_predeploymentCalibEquation, o_predeploymentCalibCoefficient, ...
   o_predeploymentCalibComment, ...
   o_repetitionRate, o_cycleTime, o_parkingTime, o_descendingProfilingTime, ...
   o_ascendingProfilingTime, o_surfaceTime, o_parkingPressure, o_deepestPressure, ...
   o_deepestPressureDescending] = read_file_meta_all(a_fileName)

% choose the function according to the current matlab version
% matlab version <= 7.6 (R2008a) => NetCDF outside
% matlab version >= 7.7 (R2008b) => NetCDF inside

if (verLessThan('matlab', '7.7'))
   [o_nCycles, o_nParam, ...
      o_platformNumber, o_ptt, o_transSystem, o_transSystemId, o_transFrequency, ...
      o_transRepetition, o_positioningSystem, o_clockDrift, o_platformModel, ...
      o_platformMaker, o_instReference, o_wmoInstType, o_direction, o_projectName, ...
      o_dataCentre, o_piName, o_anomaly, ...
      o_launchDate, o_launchLatitude, o_launchLongitude, o_launchQc, o_startDate, ...
      o_startDateQc, o_deployPlatform, o_deployMission, o_deployAvailableProfileId, ...
      o_endMissionDate, o_endMissionStatus, ...
      o_sensor, o_sensorMaker, o_sensorModel, o_sensorSerialNo, o_sensorUnits, ...
      o_sensorAccuracy, o_sensorResolution, ...
      o_parameter, o_predeploymentCalibEquation, o_predeploymentCalibCoefficient, ...
      o_predeploymentCalibComment, ...
      o_repetitionRate, o_cycleTime, o_parkingTime, o_descendingProfilingTime, ...
      o_ascendingProfilingTime, o_surfaceTime, o_parkingPressure, o_deepestPressure, ...
      o_deepestPressureDescending] = read_file_meta_all_nc_outside(a_fileName);
else
   [o_nCycles, o_nParam, ...
      o_platformNumber, o_ptt, o_transSystem, o_transSystemId, o_transFrequency, ...
      o_transRepetition, o_positioningSystem, o_clockDrift, o_platformModel, ...
      o_platformMaker, o_instReference, o_wmoInstType, o_direction, o_projectName, ...
      o_dataCentre, o_piName, o_anomaly, ...
      o_launchDate, o_launchLatitude, o_launchLongitude, o_launchQc, o_startDate, ...
      o_startDateQc, o_deployPlatform, o_deployMission, o_deployAvailableProfileId, ...
      o_endMissionDate, o_endMissionStatus, ...
      o_sensor, o_sensorMaker, o_sensorModel, o_sensorSerialNo, o_sensorUnits, ...
      o_sensorAccuracy, o_sensorResolution, ...
      o_parameter, o_predeploymentCalibEquation, o_predeploymentCalibCoefficient, ...
      o_predeploymentCalibComment, ...
      o_repetitionRate, o_cycleTime, o_parkingTime, o_descendingProfilingTime, ...
      o_ascendingProfilingTime, o_surfaceTime, o_parkingPressure, o_deepestPressure, ...
      o_deepestPressureDescending] = read_file_meta_all_nc_inside(a_fileName);
end

return
