Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
CHISTART.M
Package: easy.zip [view]
Upload User: sfyaiting
Upload Date: 2009-10-25
Package Size: 320k
Code Size: 4k
Category:
GPS develop
Development Platform:
Matlab
- function Chi2 = chistart (D,L,a,ncands,factor)
- %CHISTART: Computes the initial size of the search ellipsoid
- %
- % This routine computes or approximates the initial size of the
- % search ellipsoid. If the requested number of candidates is not
- % more than the dimension + 1, this is done by computing the squared
- % distances of partially rounded float vectors to the float vector in
- % the metric of the covariance matrix. Otherwise an approximation is used.
- %
- % Input arguments
- % L,D : LtDL-decomposition of the variance-covariance matrix of
- % the float ambiguities (preferably decorrelated)
- % a : float ambiguites (preferably decorrelated)
- % ncands: Requested number of candidates (default = 2)
- % factor: Multiplication factor for the volume of the resulting
- % search ellipsoid (default = 1.5)
- %
- % Output arguments:
- % Chi2 : Size of the search ellipsoid
- % ----------------------------------------------------------------------
- % File.....: chistart.m
- % Date.....: 19-MAY-1999
- % Author...: Peter Joosten
- % Mathematical Geodesy and Positioning
- % Delft University of Technology
- % ----------------------------------------------------------------------
- % ------------------
- % --- Initialize ---
- % ------------------
- if nargin < 4; ncands = 2 ; end;
- if nargin < 5; factor = 1.5; end;
- n = max(size(a));
- % ----------------------------------------------------------------------
- % --- Computation depends on the number of candidates to be computed ---
- % ----------------------------------------------------------------------
- if ncands == 1;
- % ---------------------------------------------------
- % --- The squared norm, based on the bootstrapped ---
- % --- solution will be computed ---
- % ---------------------------------------------------
- afloat = a;
- afixed = a;
- for i = 1:n;
- dw = 0;
- for j = 1:n-1;
- dw = dw + L(i,j) * (a(j) - afixed(j));
- end;
- a(i) = a(i) - dw;
- afixed(i) = round (a(i));
- end;
- Chi2 = (afloat-afixed)' * inv(L'*diag(D)*L) * (afloat-afixed) + 1d-6;
- elseif ncands <= n+1;
- % ----------------------------------------------
- % --- The right squared norm can be computed ---
- % ----------------------------------------------
- Linv = inv(L);
- Dinv = 1./D;
- dist = round(a) - a;
- e = Linv'*dist;
- Chi = [zeros(1,n) sum(Dinv' .* e .* e)];
- % ------------------------------------------
- % --- Compute the real squared distances ---
- % ------------------------------------------
- for i = 1:n;
- Chi(i) = 0;
- for j = 1:i;
- Chi(i) = Chi(i) + Dinv(j) * Linv(i,j) * (2*e(j)+Linv(i,j));
- end;
- Chi(i) = Chi(n+1) + abs(Chi(i));
- end;
- % ---------------------------------------------------------------
- % --- Sort the results, and return the appropriate number ---
- % --- Add an "eps", to make sure there is no boundary problem ---
- % ---------------------------------------------------------------
- Chi = sort(Chi);
- Chi2 = Chi(ncands) + 1d-6;
- else
- % -----------------------------------------------------
- % An approximation for the squared norm is computed ---
- % -----------------------------------------------------
- Linv = inv(L);
- Dinv = 1./D;
- Vn = (2/n) * (pi ^ (n/2) / gamma(n/2));
- Chi2 = factor * (ncands / sqrt((prod(1 ./ Dinv)) * Vn)) ^ (2/n);
- end;
- % ----------------------------------------------------------------------
- % End of routine: chistart
- % ----------------------------------------------------------------------