Test stellar navigation. Uses a random star catalog.
The results will vary with each run. ------------------------------------------------------------------------- See also Mag, Unit, StellarNavigation -------------------------------------------------------------------------
%-------------------------------------------------------------------------- % Copyright 1999 Princeton Satellite Systems, Inc. All rights reserved. %-------------------------------------------------------------------------- nMeas = 500; r = 42164*[cos(.1)*cos(0.01);sin(.1)*cos(0.01);sin(0.01)]; d.rG = 6378.165*[cos(0.1);cos(0.1);sin(0.1)]; rG = d.rG - r; rho = Mag( rG ); n1Sig = 1e-6; uSG = Unit( rG ); uSECI = Unit(rand(3,nMeas)); d.uS = uSECI; angle = acos(uSG'*uSECI) + n1Sig*randn(1,nMeas); rEst = StellarNavigation( d, rho, angle ); err(1) = norm(rG - rEst); d.p = 100^2*eye(3); d.rho = n1Sig^2; rGEst = rG + 100*randn(3,1); [rEst,p] = StellarNavigation( d, rho, angle, 1:nMeas, rGEst ); err(2) = norm(rG - rEst) %-------------------------------------- % PSS internal file version information %--------------------------------------
err = 0.0045771 0.0041691