ufrgs-gnss-lab / geo-alhazen

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

Normalized Martin-Neira #26

Closed fgnievinski closed 1 year ago

fgnievinski commented 1 year ago
    I've tried to normalize radii to values closer to 1 to avoid overflow when squaring, R^2:
R0 = Rs;
Ra = Ra./R0;
Rt = Rt./R0;
Rs = Rs./R0;  %=1

Originally posted by @fgnievinski in https://github.com/vitorhjr/geo-alhazen/issues/25#issuecomment-1366871460

Let's try the same in quartic_param.m: https://github.com/vitorhjr/geo-alhazen/blob/main/geo-alhazen-aux/quartic_param.m

R0 = Rs;
Rs = 1;  % Rs./R0;
pos_ant = pos_ant./R0;
pos_sat = pos_sat./R0;

Hopefuly, it'll fix the systematic error at 45°.

fgnievinski commented 1 year ago

modified code:

function [c0,c1,c2,c3,c4,t0,gamma0] = quartic_param (pos_ant, pos_sat, Rs)

% Return parameters (coefficients and starting estimate value)
% of quartic polynomial for Martin-Neira (1993) and Helm (2008) equations

%% Normalize vectors closer to unit circle:
R0 = Rs;
Rs = 1;  % Rs./R0;
pos_ant = pos_ant./R0;
pos_sat = pos_sat./R0;

%% Extract coordinates of position vectors:
xt=pos_sat(1); % X coordinate of transmitter/satellite
yt=pos_sat(2); % Y coordinate of transmitter/satellite

xr=pos_ant(1); % X coordinate of receiver
yr=pos_ant(2); % Y coordinate of receiver

%% Coefficients of quartic polynomial
c0 = ((xt.*yr)+(yt.*xr))-(Rs.*(yt+yr));
c1 = (-4.*((xt.*xr)-(yt.*yr)))+(2.*Rs.*(xt+xr));
c2 = (-6.*((xt.*yr)+(yt.*xr)));
c3 = (4.*((xt.*xr)-(yt.*yr)))+(2.*Rs.*(xt+xr));
c4 = ((xt.*yr)+(yt.*xr))+(Rs.*(yt+yr));

%% Starting estimate value 
cos_gamma_rt = dot(pos_sat, pos_ant)./(norm(pos_sat).*norm(pos_ant));
gamma_rt = acosd(cos_gamma_rt); % Angle between receiver and transmitter direction
%gamma_rt = get_geocentric_angle_vec (pos_ant, pos_sat);

gamma0 = 90 - gamma_rt./3;
t0 = tand(gamma0./2); % Starting estimate value 
vitorhjr commented 1 year ago

I implemented your code showed above and it works well without any corrections.

However, it doesn't remove the systematic discrepancies with respect to Fujimura which is observed in the figure below for grazing angle: image