1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00

Clean up Matlab/Octave code

This commit is contained in:
Carles Fernandez 2018-03-30 11:36:50 +02:00
parent c58107d56c
commit c9b2f06d41
18 changed files with 212 additions and 247 deletions

View File

@ -14,9 +14,6 @@ function [phi, lambda, h] = cart2geo(X, Y, Z, i)
% Kai Borre 10-13-98
% Copyright (c) by Kai Borre
% Revision: 1.0 Date: 1998/10/23
%
% CVS record:
% $Id: cart2geo.m,v 1.1.2.3 2007/01/29 15:22:49 dpl Exp $
%==========================================================================
a = [6378388 6378160 6378135 6378137 6378137];
@ -57,4 +54,5 @@ lambda = lambda*180/pi;
%fprintf('\n phi =%3.0f %3.0f %8.5f',b(1),b(2),b(3))
%fprintf('\n lambda =%3.0f %3.0f %8.5f',l(1),l(2),l(3))
%fprintf('\n h =%14.3f\n',h)
%%%%%%%%%%%%%% end cart2geo.m %%%%%%%%%%%%%%%%%%%

View File

@ -14,9 +14,6 @@ function [E, N, U] = cart2utm(X, Y, Z, zone)
% Kai Borre -11-1994
% Copyright (c) by Kai Borre
%
% CVS record:
% $Id: cart2utm.m,v 1.1.1.1.2.6 2007/01/30 09:45:12 dpl Exp $
% This implementation is based upon
% O. Andersson & K. Poder (1981) Koordinattransformationer

View File

@ -11,9 +11,6 @@ function corrTime = check_t(time)
% Kai Borre 04-01-96
% Copyright (c) by Kai Borre
%
% CVS record:
% $Id: check_t.m,v 1.1.1.1.2.4 2006/08/22 13:45:59 dpl Exp $
%==========================================================================
half_week = 302400; % seconds
@ -25,4 +22,5 @@ if time > half_week
elseif time < -half_week
corrTime = time + 2*half_week;
end
%%%%%%% end check_t.m %%%%%%%%%%%%%%%%%

View File

@ -7,8 +7,6 @@ function [re, im] = clksin(ar, degree, arg_real, arg_imag)
%
% See also WGS2UTM or CART2UTM
%
% CVS record:
% $Id: clksin.m,v 1.1.1.1.2.4 2006/08/22 13:45:59 dpl Exp $
%==========================================================================
sin_arg_r = sin(arg_real);

View File

@ -7,9 +7,6 @@ function result = clsin(ar, degree, argument)
% December 20, 1995
%
% See also WGS2UTM or CART2UTM
%
% CVS record:
% $Id: clsin.m,v 1.1.1.1.2.4 2006/08/22 13:45:59 dpl Exp $
%==========================================================================
cos_arg = 2 * cos(argument);
@ -23,4 +20,5 @@ for t = degree : -1 : 1
end
result = hr * sin(argument);
%%%%%%%%%%%%%%%%%%%%%%% end clsin.m %%%%%%%%%%%%%%%%%%%%%

View File

@ -19,7 +19,7 @@ function [dout,mout,sout] = dms2mat(dms,n)
% Copyright 1996-2002 Systems Planning and Analysis, Inc. and The MathWorks, Inc.
% Written by: E. Byrns, E. Brown
% $Revision: 1.10 $ $Date: 2002/03/20 21:25:06 $
% Revision: 1.10 $Date: 2002/03/20 21:25:06
if nargin == 0

View File

@ -13,9 +13,6 @@ function X_sat_rot = e_r_corr(traveltime, X_sat)
% Written by Kai Borre
% Copyright (c) by Kai Borre
%
% CVS record:
% $Id: e_r_corr.m,v 1.1.1.1.2.6 2006/08/22 13:45:59 dpl Exp $
%==========================================================================
Omegae_dot = 7.292115147e-5; % rad/sec

View File

@ -31,9 +31,6 @@ function utmZone = findUtmZone(latitude, longitude)
%USA.
%==========================================================================
%CVS record:
%$Id: findUtmZone.m,v 1.1.2.2 2006/08/22 13:45:59 dpl Exp $
%% Check value bounds =====================================================
if ((longitude > 180) || (longitude < -180))

View File

@ -25,9 +25,6 @@ function [X, Y, Z] = geo2cart(phi, lambda, h, i)
% Kai Borre 10-13-98
% Copyright (c) by Kai Borre
%
% CVS record:
% $Id: geo2cart.m,v 1.1.2.7 2006/08/22 13:45:59 dpl Exp $
%==========================================================================
b = phi(1) + phi(2)/60 + phi(3)/3600;
@ -45,4 +42,5 @@ N = c / sqrt(1 + ex2*cos(b)^2);
X = (N+h) * cos(b) * cos(l);
Y = (N+h) * cos(b) * sin(l);
Z = ((1-f(i))^2*N + h) * sin(b);
%%%%%%%%%%%%%% end geo2cart.m %%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -24,9 +24,6 @@ function [pos, el, az, dop] = leastSquarePos(satpos, obs, settings)
%Based on Kai Borre
%Copyright (c) by Kai Borre
%Updated by Darius Plausinaitis, Peter Rinder and Nicolaj Bertelsen
%
% CVS record:
% $Id: leastSquarePos.m,v 1.1.2.12 2006/08/22 13:45:59 dpl Exp $
%==========================================================================
%=== Initialization =======================================================

View File

@ -1,5 +1,4 @@
function dmsvec = mat2dms(d,m,s,n)
% MAT2DMS Converts a [deg min sec] matrix to vector format
%
% dms = MAT2DMS(d,m,s) converts a deg:min:sec matrix into a vector
@ -24,7 +23,7 @@ function dmsvec = mat2dms(d,m,s,n)
% Copyright 1996-2002 Systems Planning and Analysis, Inc. and The MathWorks, Inc.
% Written by: E. Byrns, E. Brown
% $Revision: 1.10 $ $Date: 2002/03/20 21:25:51 $
% Revision: 1.10 Date: 2002/03/20 21:25:51
if nargin == 0

View File

@ -15,7 +15,7 @@ function [x,msg] = roundn(x,n)
% Copyright 1996-2002 Systems Planning and Analysis, Inc. and The MathWorks, Inc.
% Written by: E. Byrns, E. Brown
% $Revision: 1.9 $ $Date: 2002/03/20 21:26:19 $
% Revision: 1.9 Date: 2002/03/20 21:26:19
msg = []; % Initialize output

View File

@ -21,9 +21,6 @@ function [satPositions, satClkCorr] = satpos(transmitTime, prnList, ...
% Based on Kai Borre 04-09-96
% Copyright (c) by Kai Borre
% Updated by Darius Plausinaitis, Peter Rinder and Nicolaj Bertelsen
%
% CVS record:
% $Id: satpos.m,v 1.1.2.17 2007/01/30 09:45:12 dpl Exp $
%% Initialize constants ===================================================
numOfSatellites = size(prnList, 2);

View File

@ -24,9 +24,6 @@ function [dphi, dlambda, h] = togeod(a, finv, X, Y, Z)
% Reprinted with permission of author, 1996
% Fortran code translated into MATLAB
% Kai Borre 03-30-96
%
% CVS record:
% $Id: togeod.m,v 1.1.1.1.2.4 2006/08/22 13:45:59 dpl Exp $
%==========================================================================
h = 0;

View File

@ -16,9 +16,6 @@ function [Az, El, D] = topocent(X, dx)
% Kai Borre 11-24-96
% Copyright (c) by Kai Borre
%
% CVS record:
% $Id: topocent.m,v 1.1.1.1.2.4 2006/08/22 13:45:59 dpl Exp $
%==========================================================================
dtr = pi/180;

View File

@ -26,9 +26,6 @@ function ddr = tropo(sinel, hsta, p, tkel, hum, hp, htkel, hhum)
% A Matlab reimplementation of a C code from driver.
% Kai Borre 06-28-95
%
% CVS record:
% $Id: tropo.m,v 1.1.1.1.2.4 2006/08/22 13:46:00 dpl Exp $
%==========================================================================
a_e = 6378.137; % semi-major axis of earth ellipsoid