Home > src > demos > reentry_demo > reentry_h.m

reentry_h

PURPOSE ^

Measurement model function for reentry demo.

SYNOPSIS ^

function y = reentry_h(x,param)

DESCRIPTION ^

 Measurement model function for reentry demo.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Measurement model function for reentry demo.
0002 
0003 %
0004 % Copyright (C) 2005-2006 Simo S�kk�%               2007      Jouni Hartikainen
0005 %
0006 % This software is distributed under the GNU General Public
0007 % Licence (version 2 or later); please refer to the file
0008 % Licence.txt, included with the software, for details.
0009 
0010 function y = reentry_h(x,param)
0011 
0012   xr = param{1};
0013   yr = param{2};
0014   y = zeros(2,size(x,2));
0015   y(1,:) = sqrt((x(1,:) - xr).^2 + (x(2,:) - yr).^2);
0016   y(2,:) = atan2(x(2,:) - yr, x(1,:) - xr);
0017   
0018   if size(x,1) == 10
0019     y(1,:) = y(1,:) + x(9,:);
0020     y(2,:) = y(2,:) + x(10,:);
0021   elseif size(x,1) == 7
0022     y(1,:) = y(1,:) + x(6,:);
0023     y(2,:) = y(2,:) + x(7,:);
0024   end

Generated on Fri 12-Aug-2011 15:15:16 by m2html © 2005