ufrgs-gnss-lab / geo-alhazen

Modeling of reflection on a sphere
1 stars 0 forks source link

Support other radii #11

Open fgnievinski opened 3 years ago

fgnievinski commented 3 years ago

hint: generalize function

function [delay, graz_ang, arc_len, slant_dist, x_spec, y_spec, x_trans, y_trans, elev_spec] = ...
get_osculating_spherical_reflection (lat, e, Ha, Ht, hs, algorithm, trajectory, frame)
    Rs = get_radius_surface (lat, hs, ell);
   [delay, graz_ang, arc_len, slant_dist, x_spec, y_spec, x_trans, y_trans, elev_spec] = ...
            get_spherical_reflection (e, Ha, Ht, Rs, algorithm, trajectory, frame);
end

where:

function Rs = get_radius_surface (lat, hs, ell)
   if (nargin < 1) || isempty(lat),  lat = 0;  end
   if (nargin < 2) || isempty(hs),  hs = 0;  end
   if (nargin < 3) || isempty(ell),  ell = get_ellipsoid();  end
   Rc = get_radius_gaussian(lat, ell);
   Rs = Rc + hc;
end

and

function Re = get_radius_earth (ell, type)
   a = ell.a;
   b = ell.b;
   swithc lower(type)
   case 'mean'
      Re = (2*a + b) / 3;
   case 'authalic'
      Re = sqrt( (a^2/2) + (b^2/2)*(atanh(e)/e) );
   case {'meridional mean', 'meridional'}
      Re = ((a^(3/2) + b^(3/2))/2)^(2/3);
   end
   % definitions: https://en.wikipedia.org/wiki/Earth_radius#Global_radii
end
vitorhjr commented 1 year ago

To start this issue, I uploaded:

But, I didn't document it correctly. We must have to unify the using of these radii inside functions such as get_spherical_reflection.

fgnievinski commented 1 year ago

I've created a new branch dev for development.

then I removed the new experimental files from the main branch.

I've also renamed get_radius_earth.m to get_radius_global.m in the dev branch.

this repository will require special care because it's public.