Skip to content
Snippets Groups Projects
Commit 7f2d2767 authored by James Goppert's avatar James Goppert
Browse files

Merge branch 'simplexSplit' of github.com:openmav/jsbsim into simplexSplit

parents ccb6cb2d fec0b9c9
No related branches found
No related tags found
No related merge requests found
Showing
with 1225 additions and 0 deletions
f16.x0=..
[ 5.0000021002e+02;
3.9891191178e-02;
3.9891191178e-02;
-2.3892269734e-05;
3.9891191178e-02;
-2.3892269734e-05;
7.7572299113e-03;
-6.9444185226e-18;
1.8519409896e-07;
7.3915343564e-09;
1.0000000000e+03;
1.5707963268e+00;
0.0000000000e+00;
0.0000000000e+00];
f16.u0=..
[ 2.6880598485e-01;
6.7138558416e-03;
-2.6132360356e-02;
1.4045552382e-01];
f16.sys = syslin('c',..
[ 1.3626752051e-01, 8.1722328147e+00, -3.2025072242e+01, -1.3351433275e+00, -3.2078892989e+01, -1.3351433275e+00, -1.0851775507e-01, -1.6335598151e-03, 1.7308220147e+00, 2.8257437912e-02, 4.5182250337e-05, -7.0213667056e-07, -1.0344734328e-11, 8.6483533293e-04;
-2.5722253396e-04, -9.6394940891e-01, 2.5278289277e-05, 9.9456442589e-01, -1.9383425850e-04, 9.9456442589e-01, -2.0174506277e-04, 6.8444220651e-08, 5.7073466616e-03, -1.9432890141e-04, 1.8968274778e-06, 1.1284964713e-06, 1.4456028966e-15, 1.2781709736e-08;
-4.7784519397e-08, -1.1293772630e-17, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 1.8534162488e-07, -1.4783071900e-08, 0.0000000000e+00, 0.0000000000e+00, 1.1417439440e-12, -1.1293772630e-17, 0.0000000000e+00, -1.0164395367e-16;
6.2858088546e-05, -5.0565077129e+00, -4.5892127593e-03, 9.8681186356e-01, 3.5190006814e-02, 9.8681186356e-01, 2.3441127031e-02, -2.2686927199e-05, -2.6078069100e-01, -2.0592422564e-02, -1.1224312324e-05, 5.1895538648e-07, 0.0000000000e+00, -2.4957763756e-07;
-4.7784519397e-08, -1.1293772630e-17, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 1.8534162488e-07, -1.4783071900e-08, 0.0000000000e+00, 0.0000000000e+00, 1.1417439440e-12, -1.1293772630e-17, 0.0000000000e+00, -1.0164395367e-16;
6.2858088546e-05, -5.0565077129e+00, -4.5892127593e-03, 9.8681186356e-01, 3.5190006814e-02, 9.8681186356e-01, 2.3441127031e-02, -2.2686927199e-05, -2.6078069100e-01, -2.0592422564e-02, -1.1224312324e-05, 5.1895538648e-07, 0.0000000000e+00, -2.4957763756e-07;
-3.2008894853e-06, -4.9396363888e-04, 4.9677102661e-04, -3.6327678409e-06, 4.9686121731e-04, -3.6327678409e-06, -3.2331999566e-01, 6.3846065510e-02, 4.0035218975e-02, -9.8827456506e-01, 1.5963872117e-06, 1.2629148306e-12, 0.0000000000e+00, 3.9202143757e-04;
3.7097806918e-10, -4.4848987247e-13, 1.4806621203e-08, -2.6469779602e-19, 1.4806621203e-08, -2.6469779602e-19, 2.3911302360e-05, -1.9070788130e-06, 1.0000000000e+00, 3.9912364368e-02, -8.8636262811e-15, 9.7055858540e-19, 3.9704669403e-19, -6.6174449004e-19;
-6.1044155841e-05, -9.1442410075e-01, 1.3858413722e-06, -8.4986864823e-04, 6.4132592177e-07, -8.4986864823e-04, -2.8554997439e+01, 3.4354952575e-05, 3.3569450958e-01, 1.5481213535e+00, 2.1872259082e-04, -3.0195753305e-11, 0.0000000000e+00, -3.6667476997e-05;
7.3173777182e-05, 2.1052609813e-02, 2.1757312387e-08, 2.8102302706e-04, -6.0211175397e-06, 2.8102302706e-04, 8.1164236010e+00, -1.7965656853e-05, -8.5077457351e-03, -8.0282553544e-01, -1.1372838184e-04, -5.9685994573e-09, 0.0000000000e+00, 1.9169024736e-05;
1.5660216179e-11, -5.0000052090e+02, 4.9998537645e+02, 0.0000000000e+00, 4.9998537645e+02, 0.0000000000e+00, -5.3863163929e-12, 2.5957503891e-02, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -1.9337829948e-11, 8.1926652962e-11, -1.5744928509e-10;
1.4794832502e-11, -5.6318467818e-12, 1.8593212202e-07, -6.9469385111e-18, 1.8593212202e-07, -6.9469385111e-18, 9.5359737577e-07, -2.3947871511e-05, 0.0000000000e+00, 1.0007961815e+00, -3.5348598433e-16, 1.7090930090e-17, 3.7802153994e-18, -2.3892279770e-05;
4.7784519371e-08, 2.5410988418e-17, 2.2587545260e-17, 0.0000000000e+00, 2.2587545260e-17, 0.0000000000e+00, -1.8534162480e-07, 7.3915375705e-09, 0.0000000000e+00, 0.0000000000e+00, -1.1417382971e-12, -1.8534162488e-07, 0.0000000000e+00, 1.1293772630e-17;
-3.7068293829e-10, 1.5440704768e-18, -6.2203982064e-18, 0.0000000000e+00, -6.2203982064e-18, 0.0000000000e+00, -2.3892279770e-05, 9.5283874322e-07, 0.0000000000e+00, 0.0000000000e+00, 8.8568103129e-15, -2.3892279770e-05, -1.5661286264e-18, 2.5146290622e-18],..
[ 5.3830665042e+01, 7.6441978752e+01, 9.7117839711e+00, -5.4480264734e-04;
-4.2987608708e-03, 6.6914508611e-01, 3.9538168228e-02, -2.2179754683e-06;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
-1.7991826226e-01, 3.5451967364e-01, -7.1780342884e+00, 4.3702241171e-04;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
-1.7991826226e-01, 3.5451967364e-01, -7.1780342884e+00, 4.3702241171e-04;
-8.3517615734e-04, -9.1555664670e-03, -4.6330343352e-08, 1.2839806852e-03;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
-2.1134659127e-07, 1.6215240806e+01, 2.4327832709e-03, 1.8185195068e-01;
6.6797898231e-08, 8.2722979134e-01, -1.0159303515e-04, -9.4311723130e-02;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00],..
[ 9.9999999956e-01, 7.5791225148e-10, 3.7895612574e-10, 0.0000000000e+00, 3.7895612574e-10, 0.0000000000e+00, 1.8474111130e-09, 1.7053025658e-09, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 5.6843418861e-10, 0.0000000000e+00, 2.3684757859e-10;
-4.0476881106e-14, 1.0000000000e+00, -1.7925475918e-13, 0.0000000000e+00, -1.7925475918e-13, 0.0000000000e+00, 4.6259292693e-14, -3.9320398789e-13, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 9.8300996972e-14, 1.2721305490e-13, 4.0476881106e-14;
0.0000000000e+00, -3.0289792254e-05, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 7.8031306637e-03, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 2.8912057933e-14, 3.0068540250e-13, -1.9081958236e-13;
-4.7784519397e-08, -1.1293772630e-17, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 1.8534162488e-07, -7.9056408410e-17, 0.0000000000e+00, 0.0000000000e+00, 1.1417439440e-12, -1.1293772630e-17, 0.0000000000e+00, -1.0164395367e-16;
0.0000000000e+00, -3.0289792254e-05, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 7.8031306637e-03, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 2.8912057933e-14, 3.0068540250e-13, -1.9081958236e-13;
-4.7784519397e-08, -1.1293772630e-17, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 1.8534162488e-07, -7.9056408410e-17, 0.0000000000e+00, 0.0000000000e+00, 1.1417439440e-12, -1.1293772630e-17, 0.0000000000e+00, -1.0164395367e-16;
1.4456028966e-15, 6.2883726004e-14, -9.0350181040e-14, 0.0000000000e+00, -9.0350181040e-14, 0.0000000000e+00, 1.0000000000e+00, -2.8044696195e-13, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -3.4549909230e-13, 6.2160924556e-14, -2.0888961857e-13;
0.0000000000e+00, 2.3148061657e-14, 5.0057736914e-13, 0.0000000000e+00, 5.0057736914e-13, 0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -4.0798458820e-13, -1.0705978556e-13, 4.8900280430e-13;
3.7038804218e-10, 2.2388810155e-13, -7.3915374614e-09, 0.0000000000e+00, -7.3915374614e-09, 0.0000000000e+00, 2.3873272313e-05, -9.5213839134e-07, 1.0000000000e+00, 0.0000000000e+00, -8.8496414142e-15, 1.7646519734e-19, 3.5293039469e-19, 9.5283874322e-07;
1.4783062499e-11, -5.6094934734e-12, 1.8519417676e-07, 0.0000000000e+00, 1.8519417676e-07, 0.0000000000e+00, 9.5283874322e-07, 2.3855725072e-05, 0.0000000000e+00, 1.0000000000e+00, -3.5320474293e-16, -2.4167460230e-18, -1.3345180549e-18, -2.3873272313e-05;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 1.0000231365e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, -1.4802973662e-12, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 1.2952601954e-12, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 1.8503717077e-13, 1.4802973662e-12;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00],..
[ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00]);
f16.tfm = ss2tf(f16.sys);
This diff is collapsed.
1.0
mode(-1);
lines(0);
initDir=pwd();
jsbsimPath=get_absolute_file_path('loader.sce');
chdir('../')
jsbsimRoot=pwd();
chdir(jsbsimPath);
mprintf('jsbsim version %s\n', stripblanks(read("VERSION",1,1,'(a)')) );
mprintf('Copyright (C) 2011 James Goppert\n' );
if isdir('sci_gateway') then
chdir('sci_gateway');
exec('loader.sce');
chdir('..');
end
if isdir('macros') then
chdir('macros');
exec('loadmacros.sce');
chdir('..');
end
if isdir('scicos') then
chdir('scicos');
exec('loadscicos.sce');
chdir('..');
end
if isdir('demos') then
chdir('demos');
exec('loaddemos.sce');
chdir('..');
end
if isdir('help') then
chdir('help');
exec('loadhelp.sce');
chdir('..');
end
chdir(initDir)
File added
function strOut = gettext(str)
strOut = str
endfunction
File added
function stat = isfile(fname)
stat = (fileinfo(fname) ~= [])
endfunction
File added
function jsbsim(str,root)
[lhs,rhs] = argn()
if (rhs == 1) then
root=jsbsimRoot
elseif (rhs ~= 2) then
error('wrong number of args, usage: jsbsim(str,root)')
end
host(jsbsimRoot+'/src/JSBSim --root='+root+' '+str)
endfunction
File added
function jsbsimTrim()
host('cd '+jsbsimRoot+'/src && ./JSBSimTrim')
endfunction
File added
mode(-1);
lines(0);
genlib('lib_mavsimMacros',pwd());
jsbsimTrim
jsbsim
read_csv
gettext
isfile
File added
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2008 - INRIA
// Copyright (C) 2009 - DIGITEO - Allan CORNET
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
function mat = read_csv(fname,sep)
// Given an ascii file created by Excel using "Text and comma" format
// read_csv(fname) returns the corresponding Scilab matrix of strings.
if (type(fname) <> 10) then
error(msprintf(gettext("%s: Wrong type for input argument #%d: a string expected.\n"), 'write_csv', 1));
end
if (size(fname,'*')<> 1) then
error(msprintf(gettext("%s: Wrong size for input argument #%d: a string expected.\n"), 'write_csv', 1));
end
if argn(2)<2 then
sep = ',';
end
if ~isfile(fname) then
//error(msprintf(gettext("%s: file %s does not exist.\n"), 'write_csv', 1, fname));
error('file doesn''t exist')
end
v = mgetl(fname);
ns = length(sep);
mat = [];
ki = 1;
for i = 1 : size(v,'*')
line = v(i);
K = [strindex(line, sep)];
ki = 1;
row = [];
for k = K
row = [row, part(line,ki:k-1)];
ki = k + ns;
end
row = [row, part(line, ki:length(line))];
if (i > 1) then
if size(row,2) > size(mat,2) then
mat($,size(row,2)) = '';
elseif size(row,2) < size(mat,2) then
row(size(mat,2)) = '';
end
end
mat = [mat; row];
end
endfunction
toolboxes('.')
mode(-1)
exec jsbsim-toolbox/loader.sce
printf("jsbsim loaded");
printf("\nredefinition warnings above are ok, any errors are a problem.")
printf("\nsciclab.ini changing directory to : %s",pwd())
printf("\nclick Demos on the menu above to run jsbsim demos.\n")
scf(1); clf(1);
data = read('data/f16.log',-1,1);
plot(log10(1:size(data,1)),log10(data));
xlabel('log10(iteration)');
ylabel('log10(cost)');
title('f16 - level, 500 ft/s');
legend('newton raphson')
xs2eps(1,'f16-level-500fts')
//scf(2); clf(2);
//data = read('data/c172p.log',-1,1);
//plot(log10(1:size(data,1)),log10(data));
//xlabel('log10(iteration)');
//ylabel('log10(cost)');
//title('c172p - level, 20 ft/s');
//legend('newton raphson')
//xs2eps(2,'c172p-level-20fts')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment