diff --git a/@tsg_nc/tsg_quality.csv b/@tsg_nc/tsg_quality.csv
index bf122ea2c56fc60aa7f559f4d8897b63536e364d..a7d49681c66920dadca2cbcd2b57b97387acf150 100644
--- a/@tsg_nc/tsg_quality.csv
+++ b/@tsg_nc/tsg_quality.csv
@@ -11,5 +11,5 @@ char;char;char;byte;char;char;char
 #;VALUE_CHANGED;Value changed;5;c;off;#
 #;HARBOUR;Harbour;6;c;on;#
 #;NOT_USED;Not used;7;w;off;#
-#;INTERPOLATED_VALUE;Interpolated value;8;k;off;#
+#;INTERPOLATED_VALUE;Interpolated value;8;b;off;#
 #;MISSING_VALUE;Missing value;9;k;off;#
diff --git a/tsg_util/InterpPosLinear.m b/tsg_util/InterpPosLinear.m
deleted file mode 100644
index c0d0e728855b255ecfdf2dcbf103aedc874a6cdd..0000000000000000000000000000000000000000
--- a/tsg_util/InterpPosLinear.m
+++ /dev/null
@@ -1,47 +0,0 @@
-function interpPosLinear( hMainFig, dateMin, dateMax )
-%
-% Function that interpolate linearly Latitude and position when they are
-% set to NaN
-%
-% Input
-% hMainFig ..... Handle to the main GUI
-% dateMin ...... the correction is applied between dateMin and date Max
-% dateMax ...... the correction is applied between dateMin and date Max
-%
-% Output
-% Error ........  1 everything OK
-%       ........ -1 dateMax <= date Min
-%
-
-% Get application data
-% --------------------
-tsg    = getappdata( hMainFig, 'tsg_data');
-
-error = 1;
-if dateMax > dateMin
-
-  % find the closest point
-  % ----------------------
-  ind = find( tsg.DAYD >= dateMin && tsg.DAYD <= dateMax );
-
-  if ~isempty( ind )
-    
-    interp1( tsg.DAYD(ind), tsg.LATX(ind)
-  end
-  
-  % Create time series
-  % ------------------
-  time = dateMin:deltaT:dateMax;
-  
-  
-  % Update tsg application data
-  % ---------------------------
-  setappdata( hMainFig, 'tsg_data', tsg);
-
-else
-
-  error = -1;
-
-end
-
-end
\ No newline at end of file
diff --git a/tsg_util/interpPosLinear.m b/tsg_util/interpPosLinear.m
new file mode 100644
index 0000000000000000000000000000000000000000..0fe231d6c9b3598b4479c1885e3a2675ee21cca5
--- /dev/null
+++ b/tsg_util/interpPosLinear.m
@@ -0,0 +1,61 @@
+function [error] = interpPosLinear( hMainFig, dateMin, dateMax )
+%
+% Function that interpolate linearly Latitude and position when they are
+% set to NaN
+%
+% Input
+% hMainFig ..... Handle to the main GUI
+% dateMin ...... the correction is applied between dateMin and date Max
+% dateMax ...... the correction is applied between dateMin and date Max
+%
+% Output
+% Error ........  1 everything OK
+%       ........ -1 dateMax <= date Min
+%
+
+% Get application data
+% --------------------
+tsg    = getappdata( hMainFig, 'tsg_data');
+
+% Get INTERPOLATED_VALUE code
+% ---------------------------
+NO_CONTROL         = get(tsg.qc.hash, 'NO_CONTROL', 'code');
+INTERPOLATED_VALUE = get(tsg.qc.hash, 'INTERPOLATED_VALUE', 'code');
+
+error = 1;
+if dateMax > dateMin
+
+  % find the closest point
+  % ----------------------
+  ind = find( tsg.DAYD >= dateMin && tsg.DAYD <= dateMax );
+
+  if ~isempty( ind )
+    
+    % Look for records with no position
+    % ---------------------------------
+    ind2 = find( isnan(tsg.LATX(ind)) == 1 );
+    Y = interp1( tsg.DAYD(ind), tsg.LATX(ind), tsg.DAYD(ind(ind2)) );
+    tsg.LATX(ind(ind2)) = Y;
+    
+    Y = interp1( tsg.DAYD(ind), tsg.LONX(ind), tsg.DAYD(ind(ind2)) );
+    tsg.LONX(ind(ind2)) = Y;
+    
+    if isempty( tsg.POSITION_QC )
+      tsg.POSITION = NO_CONTROL * ones( size(tsg.DAYD) );
+    end
+    
+    tsg.POSITION_QC(ind(ind2)) = INTERPOLATED_VALUE;
+
+  end 
+  
+  % Update tsg application data
+  % ---------------------------
+  setappdata( hMainFig, 'tsg_data', tsg);
+
+else
+
+  error = -1;
+
+end
+
+end
\ No newline at end of file