Home > src > demos > reentry_demo > make_reentry_data.m

make_reentry_data

PURPOSE ^

Cenerate data of discrete-time re-entry mechanics

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Cenerate data of discrete-time re-entry mechanics

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Cenerate data of discrete-time re-entry mechanics
0002 
0003 % Copyright (C) 2005-2006 Simo S�kk�%               2007      Jouni Hartikainen
0004 %
0005 % This software is distributed under the GNU General Public
0006 % Licence (version 2 or later); please refer to the file
0007 % Licence.txt, included with the software, for details.
0008 
0009 fprintf('[Generating data...]\n');
0010 
0011 nsteps = round(200/dt);
0012 x = true_m0 + sqrt(true_P0) * randn(5,1);
0013 X = zeros(size(x,1),nsteps);
0014 Y = zeros(2,nsteps);
0015 T = zeros(1,nsteps);
0016 
0017 t = 0;
0018 for k=1:nsteps
0019     ddt = dt / sim_iter;
0020     for i=1:sim_iter
0021         x = reentry_f(x,{ddt,b0,H0,Gm0,R0});
0022         x = x + L * sqrt(ddt * true_Qc) * randn(3,1);
0023     end
0024     
0025     y = reentry_h(x,{xr,yr}) + diag([sqrt(vr) sqrt(va)]) * randn(2,1);
0026     t = t + dt;
0027     X(:,k) = x;
0028     Y(:,k) = y;
0029     T(k) = t;
0030 end
0031 
0032 aa = 0.02*(-1:0.1:4);
0033 cx = R0 * cos(aa);
0034 cy = R0 * sin(aa);
0035 plot(xr,yr,'o',X(1,:),X(2,:),'--',cx,cy,'-');
0036

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