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

Added scicoslab toolbox.

parent 93e0bc9d
No related branches found
No related tags found
No related merge requests found
Showing
with 1111 additions and 17 deletions
f16.x0=..
[ 5.0000021002e+02;
4.8011363636e-02;
4.8011363636e-02;
-2.3889740868e-05;
4.8011363636e-02;
-2.3889740868e-05;
-1.6488272880e-02;
6.5995540342e-17;
-3.9348232377e-07;
-1.8906151965e-08;
1.0000000000e+03;
1.5707963268e+00;
0.0000000000e+00;
0.0000000000e+00];
f16.u0=..
[ 3.2056753616e-01;
-3.1395818454e-02;
1.6761363636e-02;
-1.4287046602e-03];
f16.sys = syslin('c',..
[ -1.8310373790e-01, -2.5684273575e+00, -3.2034083376e+01, 1.1670441186e+00, -3.1987054374e+01, 1.1670441186e+00, 2.1615050988e-01, 3.5993457149e-03, 1.0516678408e+00, -2.3907589940e-02, 2.0409043367e-05, 7.6769820824e-07, 9.6566273496e-12, -1.8334954181e-03;
-2.8826672050e-04, -9.7238895884e-01, 2.9889554399e-05, 9.9436690553e-01, -1.9711027098e-04, 9.9436690553e-01, 2.9420744447e-04, -2.2491506632e-07, 2.9953669830e-02, 9.0678936677e-04, 2.9823221323e-06, -2.4086109929e-06, -8.6736173799e-15, 1.5559781473e-08;
-4.7779461650e-08, -1.1293772630e-17, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, -3.9393643151e-07, 3.7812311915e-08, 0.0000000000e+00, -6.7762635780e-17, 1.1415971250e-12, 0.0000000000e+00, 9.0350181040e-17, 0.0000000000e+00;
-1.2447162131e-03, -4.7322757446e+00, -5.2200263716e-03, 9.8379320649e-01, 3.4424388246e-02, 9.8379320649e-01, 7.5066450337e-02, 5.7019665378e-05, -2.5972763170e-01, -2.0773950429e-02, -1.6255873823e-05, 6.4716926262e-07, 0.0000000000e+00, -2.9636732883e-07;
-4.7779461650e-08, -1.1293772630e-17, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, -3.9393643151e-07, 3.7812311915e-08, 0.0000000000e+00, -6.7762635780e-17, 1.1415971250e-12, 0.0000000000e+00, 9.0350181040e-17, 0.0000000000e+00;
-1.2447162131e-03, -4.7322757446e+00, -5.2200263716e-03, 9.8379320649e-01, 3.4424388246e-02, 9.8379320649e-01, 7.5066450337e-02, 5.7019665378e-05, -2.5972763170e-01, -2.0773950429e-02, -1.6255873823e-05, 6.4716926262e-07, 0.0000000000e+00, -2.9636732883e-07;
9.7993802641e-06, 1.0437090395e-03, -1.0558794977e-03, -7.1668832370e-06, -1.0556878447e-03, -7.1668832370e-06, -3.2942471138e-01, 6.3830130718e-02, 4.8135378670e-02, -9.8791993464e-01, 1.3981464677e-06, 1.7939931947e-12, 5.7824115866e-15, 3.9199551598e-04;
-7.8878113172e-10, 5.1868815149e-12, -3.7899606807e-08, 3.1763735522e-18, -3.7899606807e-08, 3.1763735522e-18, 2.3917311398e-05, -2.2950943584e-06, 1.0000000000e+00, 4.8048287870e-02, 1.8846571309e-14, 1.2352563814e-18, 0.0000000000e+00, -1.5881867761e-18;
-1.1122360745e-04, 1.7654432836e+00, 2.0074666235e-06, -1.6190081627e-03, 3.5344717662e-06, -1.6190081627e-03, -2.9480685304e+01, 3.3579892241e-05, 3.3253488228e-01, 1.5187336219e+00, 2.1830196072e-04, -2.4869284872e-10, 0.0000000000e+00, -3.5889805167e-05;
-6.3149033313e-04, -3.8854614667e-02, 5.4160592677e-07, 5.4955093071e-04, -1.2342303036e-05, 5.4955093071e-04, 8.0802739747e+00, -1.7809360560e-05, -7.9779537755e-03, -7.9623493351e-01, -1.0940055399e-04, -5.9975866865e-09, 0.0000000000e+00, 1.9003648400e-05;
6.7032606318e-12, -5.0000087572e+02, 4.9993245574e+02, 0.0000000000e+00, 4.9993245574e+02, 0.0000000000e+00, 2.9546677605e-11, -5.5151484770e-02, 0.0000000000e+00, 0.0000000000e+00, -1.7809827687e-12, 3.2664987613e-10, 2.4934337003e-10, -9.6084887731e-11;
-3.7855910261e-11, 5.4162463727e-11, -3.9575534431e-07, 6.6075187331e-17, -3.9575534431e-07, 6.6075187331e-17, 1.1478616285e-06, -2.3965828532e-05, 0.0000000000e+00, 1.0011536535e+00, 9.0451648529e-16, 3.2590916135e-18, -1.5032628999e-17, -2.3889750903e-05;
4.7779461662e-08, 1.6940658945e-17, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 3.9393643150e-07, -1.8906159964e-08, 0.0000000000e+00, 0.0000000000e+00, -1.1416902986e-12, 3.9393643160e-07, -4.5175090520e-17, 0.0000000000e+00;
7.8787220065e-10, -6.2203982064e-18, 2.4219848336e-17, 0.0000000000e+00, 2.4219848336e-17, 0.0000000000e+00, -2.3889750903e-05, 1.1465389199e-06, 0.0000000000e+00, 0.0000000000e+00, -1.8824866090e-14, -2.3889750903e-05, 2.6028616608e-18, 1.4205448386e-17],..
[ 6.4167438963e+01, 7.6545493216e+01, -8.3755617128e+00, 4.7051998073e-04;
-6.1697122561e-03, 6.6920731874e-01, 4.0427203777e-02, -2.2711082234e-06;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
-2.1456406863e-01, 3.7559471299e-01, -7.0604162886e+00, -3.6624293663e-04;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
-2.1456406863e-01, 3.7559471299e-01, -7.0604162886e+00, -3.6624293663e-04;
2.1161962499e-03, -9.1556757983e-03, -8.4946774730e-08, 1.3454425005e-02;
0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00;
-4.6408461854e-07, 1.6221043316e+01, 4.4595726880e-03, 1.8697544065e+00;
1.4721753909e-07, 7.9744920288e-01, -1.8627083614e-04, -9.8034186682e-01;
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.9999999937e-01, 2.8421709430e-10, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -1.4210854715e-10, -1.2789769244e-09, 0.0000000000e+00, 0.0000000000e+00, -1.5158245030e-09, 1.8000415973e-09, -3.7895612574e-10, 0.0000000000e+00;
5.7824115866e-15, 1.0000000000e+00, 5.8980598183e-13, 0.0000000000e+00, 5.8980598183e-13, 0.0000000000e+00, -4.6259292693e-14, 1.5612511284e-13, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -8.0953762212e-14, -5.4354668914e-13, -8.0953762212e-14;
0.0000000000e+00, -1.3685844640e-04, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -1.6581083542e-02, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 5.4932910073e-13, -2.3707887505e-13, -3.7585675313e-13;
-4.7779461650e-08, -1.1293772630e-17, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, -3.9393643151e-07, 2.2587545260e-17, 0.0000000000e+00, 0.0000000000e+00, 1.1415971250e-12, 0.0000000000e+00, 9.0350181040e-17, 0.0000000000e+00;
0.0000000000e+00, -1.3685844640e-04, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -1.6581083542e-02, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 5.4932910073e-13, -2.3707887505e-13, -3.7585675313e-13;
-4.7779461650e-08, -1.1293772630e-17, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, -3.9393643151e-07, 2.2587545260e-17, 0.0000000000e+00, 0.0000000000e+00, 1.1415971250e-12, 0.0000000000e+00, 9.0350181040e-17, 0.0000000000e+00;
2.8912057933e-15, -7.5171350626e-14, -2.6309972719e-13, 0.0000000000e+00, -2.6309972719e-13, 0.0000000000e+00, 1.0000000000e+00, 1.0119220277e-13, 0.0000000000e+00, 0.0000000000e+00, -2.3129646346e-14, 3.8163916471e-13, -1.3010426070e-13, 1.9660199394e-13;
0.0000000000e+00, 1.7946155639e-13, -7.5547129048e-13, 0.0000000000e+00, -7.5547129048e-13, 0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -1.7077793334e-13, 3.6760673787e-13, 8.2204971303e-13;
-7.8696431593e-10, -2.5874680723e-12, 1.8906159906e-08, 0.0000000000e+00, 1.8906159906e-08, 0.0000000000e+00, 2.3862222166e-05, -1.1455312200e-06, 1.0000000000e+00, 0.0000000000e+00, 1.8803160870e-14, 1.4117215788e-18, 7.0586078938e-19, 1.1465389199e-06;
-3.7812288004e-11, 5.3851412841e-11, -3.9348248906e-07, 0.0000000000e+00, -3.9348248906e-07, 0.0000000000e+00, 1.1465389199e-06, 2.3841249518e-05, 0.0000000000e+00, 1.0000000000e+00, 9.0345217957e-16, -4.9079383011e-18, 2.5642598989e-18, -2.3862222166e-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, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, -1.8503717077e-13, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+00, 0.0000000000e+00, 1.8503717077e-13;
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
......@@ -8,14 +8,6 @@
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
function stat = isfile(fname)
stat = (fileinfo(fname) ~= [])
endfunction
function strOut = gettext(str)
strOut = str
endfunction
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.
......
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('f16.log',-1,1);
data = read('data/f16.log',-1,1);
plot(log10(1:size(data,1)),log10(data));
xlabel('log10(iteration)');
ylabel('log10(cost)');
......@@ -7,11 +7,11 @@ title('f16 - level, 500 ft/s');
legend('newton raphson')
xs2eps(1,'f16-level-500fts')
scf(2); clf(2);
data = read('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')
//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