ufrgs-gnss-lab / geo-alhazen

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

Refactor Fermat #10

Closed fgnievinski closed 2 years ago

fgnievinski commented 2 years ago

replace:

x_pla = Ha./tand(e); % Reflection point x axis on plane
if e~=0
    [x_sph] = fminsearch(f, x_pla,opt); % Reflection point x axis on sphere by Fermat's Principle
elseif e==0
    [x_sph] = fminsearch(f, 0, opt);
end

with:

x_pla = Ha./tand(e); % Reflection point x axis on plane
if (e==0),  x_pla = 0;  end
[x_sph] = fminsearch(f, x_pla,opt); % Reflection point x axis on sphere by Fermat's Principle
vitorhjr commented 2 years ago

The piece of code was replaced in get_reflection_spherical_fermat and updated in the branch.