Commit 5854a924cd1ad6230870f6e349c83668e04f88c8

Authored by Daniel Bourgault
1 parent 9d5ec3a4
Exists in master

remove g_res_field.m

Showing 1 changed file with 0 additions and 70 deletions   Show diff stats
src/g_rect/g_res_field.m deleted
... ... @@ -1,70 +0,0 @@
1   -function res = g_res_field(LAT, LON, varargin)
2   -% g_res_field - Function calculating the loss of resolution with de distance
3   -% from the camera
4   -%
5   -% Inputs:
6   -%
7   -% LAT : Latitude matrix obtained from g_rect
8   -%
9   -% LON : Longitude matrix obtained from g_rect
10   -%
11   -% Outputs:
12   -%
13   -% res : The field of resolution which is degrading with distance from
14   -% the camera
15   -%
16   -%
17   -% Author: Daniel Bourgault
18   -% Institut des sciences de la mer de Rimouski
19   -%
20   -% email: daniel_bourgault@uqar.ca
21   -% Website: http://demeter.uqar.ca/g_rect/
22   -% February 2013
23   -%
24   -% Author: Elie Dumas-Lefebvre
25   -% Institut des Science de la Mer de Rimouski
26   -%
27   -% Note: Matricial formulation of the calculation for a faster execution
28   -%
29   -% email: elie.dumas-lefebvre@uqar.ca
30   -% March 2019
31   -%
32   -
33   -% LAT and LON difference in the x-axis
34   -dLATi = diff(LAT, 1, 2);
35   -dLONi = diff(LON, 1, 2);
36   -
37   -% LAT and LON difference in the y-axis
38   -dLATj = diff(LAT, 1, 1);
39   -dLONj = diff(LON, 1, 1);
40   -
41   -% Mean LAT in both x and y axis
42   -LAT_meani = 0.5*(LAT(:, 2:end) + LAT(:, 1:end-1));
43   -LAT_meanj = 0.5*(LAT(2:end, :) + LAT(1:end-1, :));
44   -
45   -% Conversion from degree to meters
46   -meterPerDegLat = 1852*60.0;
47   -meterPerDegLoni = meterPerDegLat .* cosd(LAT_meani);
48   -meterPerDegLonj = meterPerDegLat .* cosd(LAT_meanj);
49   -
50   -% Conversion from degrees to meters
51   -dxi = dLONi.*meterPerDegLoni;
52   -dxj = dLONj.*meterPerDegLonj;
53   -
54   -dyi = dLATi.*meterPerDegLat;
55   -dyj = dLATj.*meterPerDegLat;
56   -
57   -% Distances in x and y axis
58   -deltai = sqrt(dxi.^2 + dyi.^2);
59   -deltaj = sqrt(dxj.^2 + dyj.^2);
60   -
61   -% Adjusting the shape for plotting
62   -deltai = deltai(1:end-1, :);
63   -deltaj = deltaj(:, 1:end-1);
64   -
65   -% field of resolution
66   -res = sqrt(deltai.^2 + deltaj.^2);
67   -
68   -
69   -end
70   -