Commit eceb8b6062f1986504d44dbb2444312890bd8aae

Authored by Daniel Bourgault
1 parent 5813a767
Exists in master

Very minor cosmetic changes made.

Showing 2 changed files with 10 additions and 4 deletions   Show diff stats
src/g_rect/g_proj_GCP.m
... ... @@ -38,7 +38,7 @@ for i = 1:n_gcp
38 38 % the 'if' condition here.
39 39 if h_gcp(i) > 0
40 40 [range,a12,a21] = m_idist(LON0,LAT0,lon_gcp0(i),lat_gcp0(i));
41   - proj_factor = H/(H-h_gcp(i));
  41 + proj_factor = H/(H - h_gcp(i));
42 42 new_range = range*proj_factor;
43 43 [lon_gcp(i),lat_gcp(i),a21] = m_fdist(LON0,LAT0,a12,new_range);
44 44 if lon_gcp(i) > 180
... ... @@ -57,7 +57,7 @@ for i = 1:n_gcp
57 57 dx = lon_gcp0(i) - LON0;
58 58 dy = lat_gcp0(i) - LAT0;
59 59 range = sqrt(dx^2 + dy^2);
60   - proj_factor = H/(H-h_gcp(i));
  60 + proj_factor = H/(H - h_gcp(i));
61 61 new_range = range*proj_factor;
62 62 beta = atan2(dy,dx);
63 63  
... ...
src/g_rect/g_rect.m
... ... @@ -108,7 +108,7 @@ display(' ');
108 108 display(' Welcome to g_rect: a package for georectifying oblique images on a flat ocean');
109 109 display(' Authors: Daniel Bourgault and Rich Pawlowicz');
110 110 display(' ');
111   -inputFname = input(' Enter the filename for the input parameters: ','s');
  111 +inputFname = input(' Enter the name of the parameter file: ','s');
112 112 fid = fopen(inputFname);
113 113  
114 114 nHeaderLine = 0;
... ... @@ -157,9 +157,15 @@ lat_gcp0 = gcp.data(:,4);
157 157 if n_column == 5
158 158 h_gcp = gcp.data(:,5);
159 159 else % otherwise elevation are considered to be zero
160   - h_gcp(1:ngcp) = 0.0;
  160 + h_gcp(1:ngcp,1) = 0.0;
161 161 end
162 162  
  163 +i_gcp = i_gcp';
  164 +j_gcp = j_gcp';
  165 +lon_gcp0 = lon_gcp0';
  166 +lat_gcp0 = lat_gcp0';
  167 +h_gcp = h_gcp';
  168 +
163 169 %%
164 170 % Check if the elevation of the GCPs are not too high and above
165 171 % a certain fraction (gamma) of the camera height. If so, stop.
... ...