Set up a nonlinear least squares minimization and use the Matlab optimization tool lsqnonlin to find the receiver's position and the time correction.

1 visualización (últimos 30 días)
The reason that a minimum of 4 satellites are needed is because in the navigation equation there are 4 unknowns. In this case, the problem is a square problem and no least squares are involved. Assume now that two more satellites are observing the receiver with the following data available: Satellite 5 : position = (17800; 6400; 18660); time interval =0:0732; Satellite 6 : position = (17500; 7590; 18490); time interval =0:0735: (a) (20 pts) Set up a nonlinear least squares minimization and use the Matlab optimization tool lsqnonlin to nd the receiver's position and the time correction.
My function is
function F = myfun(p)
x=p(1);
y=p(2);
z=p(3);
d=p(4);
c = 299792458;
F(1)=sqrt((x-15600).^2 + (y-7540).^2 + (z-20140).^2 )-c.*(0.07074-d);
F(2)=sqrt((x-18760).^2 + (y-2750).^2 + (z-18610).^2 )-c.*(0.07220-d);
F(3)=sqrt((x-17610).^2 + (y-14630).^2 + (z-13480).^2 )-c.*(0.07690-d);
F(4)=sqrt((x-19170).^2 + (y-610).^2 + (z-18390).^2 )-c.*(0.07242-d);
F(5)=sqrt((x-17800).^2 + (y-6400).^2 + (z-18660).^2 )-c.*(0.0732-d);
F(6)=sqrt((x-17500).^2 + (y-7590).^2 + (z-18490).^2 )-c.*(0.0735-d);
end
x0 = [1 2 3 4] % Starting guess
[d,resnorm] = lsqnonlin(@myfun,x0); % Invoke optimizer
options = optimoptions('lsqnonlin', 'Algorithm', 'quasi-newton');
[dfinal, fval, exitflag] = lsqnonlin(@myfun,[-1 -1 2 2],options);

Respuestas (1)

Alan Weiss
Alan Weiss el 30 de En. de 2018
This is clearly a copied homework problem (you wrote "(a) (20 pts) Set up a ..."). So instead of asking us to do your homework for you, I suggest that you show us what you tried and ask for help on the part where you get stuck.
Alan Weiss
MATLAB mathematical toolbox documentation

Categorías

Más información sobre Reference Applications en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by