-
Notifications
You must be signed in to change notification settings - Fork 1
/
matrixABGinit.m
34 lines (34 loc) · 1.24 KB
/
matrixABGinit.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%%*********************************************
%
% Ðàñ÷åò íåñòàöèîíàðíûõ ìàòðèö êîýôôèöèåíòîâ
% äëÿ óðàâíåíèé â ôîðìå Êîøè ïî ñåòêå âðåìåíè dm.t
%
% ÍÅÎÁÕÎÄÈÌÛ Ñ×ÈÒÀÍÍÛÅ ÄÀÍÍÛÅ Â ÑÒÐÓÊÒÓÐÓ TRJ!!!
% Ïðåäâàðèòåëüíûé çàïóñê
% koefs èëè ImportFromMatAndExcel
%
%***********************************************
n = 2 + prj.ntanks + prj.ntons;
koef = -0.06 / pi;
dm.A = zeros(2*n,2*n,length(dm.t));
dm.B = zeros(2*n,1,length(dm.t));
dm.G = zeros(2*n,3,length(dm.t));
dm.C = zeros(2+prj.ndus,2*n,length(dm.t));
for tmp = 1:length(dm.t)
dm.A(:,:,tmp) = [0 0 1 0;
0 0 0 1;
-trj.Cthetatheta(tmp) 0 0 -trj.CthetaVy(tmp);
-trj.CVytheta(tmp) 0 0 -trj.CVyVy(tmp)];
dm.B(:,:,tmp) = [0;
0;
-trj.Cthetadelta(tmp);
-trj.CVydelta(tmp)];
dm.C(:,:,tmp) = [1 0 0 0;
0 0 1 0;
0 0 trj.l(tmp) 1];
dm.G(:,:,tmp) = [0 0 0;
0 0 0;
-trj.CthetaVy(tmp).*sind(trj.thetpr(tmp)).*cos(Az-pi-par.PS) 1./trj.Jz(tmp) 0;
-trj.CVyVy(tmp).*sind(trj.thetpr(tmp)).*cos(Az-pi-par.PS) 0 1./trj.m(tmp)];
end;
clearvars tmp Az koef