Home > src > demos > eimm_demo > f_turn_dx.m

# f_turn_dx

## PURPOSE

Jacobian of the state transition function in reentry demo.

## SYNOPSIS

function df = f_turn_dx(x,param)

## DESCRIPTION

` Jacobian of the state transition function in reentry demo.`

## CROSS-REFERENCE INFORMATION

This function calls:
This function is called by:
• botm_demo EIMM_DEMO2 Bearings Only Tracking of a Manouvering Target demonstration
• ct_demo EIMM_DEMO1 Coordinated turn model demonstration

## SOURCE CODE

```0001 % Jacobian of the state transition function in reentry demo.
0002
0003 %
0004 % Copyright (C) 2005-2006 Simo S�kk�%               2007      Jouni Hartikainen
0005 %
0007 % Licence (version 2 or later); please refer to the file
0008 % Licence.txt, included with the software, for details.
0009
0010 function df = f_turn_dx(x,param)
0011
0012   dt  = param{1};
0013   w = x(5);
0014
0015   if w == 0
0016       coswt = 1;
0017       coswto = 0;
0018       coswtopw = 0;
0019
0020       sinwt = 0;
0021       sinwtpw = dt;
0022
0023       dsinwtpw = 0;
0024       dcoswtopw = -0.5*dt^2;
0025   else
0026       coswt = cos(w*dt);
0027       coswto = cos(w*dt)-1;
0028       coswtopw = coswto/w;
0029
0030       sinwt = sin(w*dt);
0031       sinwtpw = sinwt/w;
0032
0033       dsinwtpw = (w*dt*coswt - sinwt) / (w^2);
0034       dcoswtopw = (-w*dt*sinwt-coswto) / (w^2);
0035   end
0036   df = zeros(5,5);
0037
0038   df(1,1) = 1;
0039   df(1,3) = sinwtpw;
0040   df(1,4) = coswtopw;
0041   df(1,5) = dsinwtpw * x(3) + dcoswtopw * x(4);
0042
0043   df(2,2) = 1;
0044   df(2,3) = -coswtopw;
0045   df(2,4) = sinwtpw;
0046   df(2,5) = -dcoswtopw * x(3) + dsinwtpw * x(4);
0047
0048   df(3,3) = coswt;
0049   df(3,4) = -sinwt;
0050   df(3,5) = -dt * sinwt * x(3) - dt * coswt * x(4);
0051
0052   df(4,3) = sinwt;
0053   df(4,4) = coswt;
0054   df(4,5) = dt * coswt * x(3) - dt * sinwt * x(4);
0055
0056   df(5,5) = 1;
0057
0058```

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