diff --git a/scicoslab/data/f16_lin.sce b/scicoslab/data/f16_lin.sce new file mode 100644 index 0000000000000000000000000000000000000000..0676d8e72f24bda8d80efa9d47f565b31e22af8c --- /dev/null +++ b/scicoslab/data/f16_lin.sce @@ -0,0 +1,79 @@ +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); + diff --git a/scicoslab/f16-level-500fts.eps b/scicoslab/f16-level-500fts.eps new file mode 100644 index 0000000000000000000000000000000000000000..ed80b436e7e44a781c9c9610ccccffcebe67e440 --- /dev/null +++ b/scicoslab/f16-level-500fts.eps @@ -0,0 +1,942 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%BoundingBox: 14 220 581 621 +%% +%%Scilab Postscript File (Copyright 1995-2005 J.Ph Chancelier Enpc/cermics) +%%EndComments +/saved save def +/$pictdict 100 dict def +$pictdict begin + +/dogrey +{ /Arraybox exch def + /Arraygrey exch def + /nargs exch def + /func exch cvx def + Arraybox 0 nargs getinterval Arraygrey 0 get func + 1 1 Arraygrey length 1 sub + {/i exch def + Arraybox i nargs mul nargs getinterval + Arraygrey i get func + }for +} def +%-------------------------------------------- +% [x y width height] nivgris drawbox +% si niv gris > 1.0 alors on fait un stroke +% sans closepath +%-------------------------------------------- + +/drawpoly + {/glev exch def /Ar exch def + newpath + Ar 0 get Ar 1 get moveto + 2 2 Ar length 1 sub + {/i exch def + Ar i get Ar i 1 add get absolu {lineto} {rlineto} ifelse + }for + glev -1 le + { % filling the polygon with current pattern ( gray or color) + closepath gsave glev neg 1 sub WhiteLev 2 add lmin 0 lmax Setgray eofill grestore } + { glev 1 ge + { % drawing the polygon with current dash style or color + % XXXXX : a voir c'est pas clair il faudrait sauver + % and filling it with other color (glev) + closepath gsave glev 1 sub WhiteLev 2 add lmin 0 lmax xsetgray + eofill grestore stroke } + {% drawing the polygon with current style + closeflag {closepath} if stroke} + ifelse } + ifelse +} def + + +/drawbox + {/glev exch def /Ar exch def + /x Ar 0 get def /y Ar 1 get def + /w Ar 2 get def /h Ar 3 get def + newpath + x y moveto + x w add y lineto + x w add y h add lineto + x y h add lineto + glev 1 ge + { % filling + closepath gsave glev 1 sub WhiteLev 2 add lmin 0 lmax Setgray eofill + grestore} + { + % drawing + glev -1 le + { + closepath gsave glev neg 1 sub WhiteLev 2 add lmin 0 lmax xsetgray + stroke grestore } + { closepath stroke} ifelse + } ifelse +} def + +%-------------------------------------------- +% [x y width height] clearzone +%-------------------------------------------- +/clearzone + {/Ar exch def + /x Ar 0 get def /y Ar 1 get def + /w Ar 2 get def /h Ar 3 get def + newpath + x y moveto + x w add y lineto + x w add y h add lineto + x y h add lineto + closepath gsave background Setcolor eofill grestore +} def + +%------------------------------------------------------ +% polyline stroke or polygon fill or both +%------------------------------------------------------ +/absolu true def +/closeflag false def + +/lmin { /y exch def /x exch def x y le { x } { y } ifelse } def +/lmax { /y exch def /x exch def x y le { y } { x } ifelse } def + + +/drawpoly + {/glev exch def /Ar exch def + newpath + Ar 0 get Ar 1 get moveto + 2 2 Ar length 1 sub + {/i exch def + Ar i get Ar i 1 add get absolu {lineto} {rlineto} ifelse + }for + glev -1 le + { % filling the polygon with current pattern ( gray or color) + closepath gsave glev neg 1 sub WhiteLev 2 add lmin 0 lmax Setgray eofill grestore } + { glev 1 ge + { % drawing the polygon with current dash style or color + % XXXXX : a voir c'est pas clair il faudrait sauver + % and filling it with other color (glev) + closepath gsave glev 1 sub WhiteLev 2 add lmin 0 lmax Setgray + eofill grestore stroke } + {% drawing the polygon with current style + closeflag {closepath} if stroke} + ifelse } + ifelse +} def + +%------------------------------------------------------ +% segments non connectes +%------------------------------------------------------ + +/drawsegs + {/glev exch def /Ar exch def + % when b&w is used drawsegs uses dash not gray levels + newpath + Ar 0 get Ar 1 get moveto Ar 2 get Ar 3 get lineto + gsave glev xsetgray stroke grestore + 4 4 Ar length 3 sub + {/i exch def + newpath + Ar i get Ar i 1 add get moveto + Ar i 2 add get Ar i 3 add get lineto + gsave glev xsetgray stroke grestore + }for +} def + + +%------------------------------------------------------ +% unconected arrows +%----------------------------------------------------- + +/drawarrows + {/arsize10 exch def /Ar exch def + Ar 0 get Ar 1 get Ar 2 get Ar 3 get arsize10 drawarrow + 4 4 Ar length 3 sub + {/i exch def + Ar i get Ar i 1 add get Ar i 2 add get Ar i 3 add get arsize10 + drawarrow + }for +} def + +/cos20 20 cos def +/sin20 20 sin def + +/drawarrow + { + /arsize exch 10 div def + /tipy exch def /tipx exch def + /taily exch def /tailx exch def + /dx tipx tailx sub def + /dy tipy taily sub def + newpath tipx tipy moveto tailx taily lineto stroke + /norme dx dx mul dy dy mul add sqrt def + norme 1.e-8 ge + { + arsize dx mul norme div /dx1 exch def + arsize dy mul norme div /dy1 exch def +% 2 following lines modified (correction bug 607 (bruno 18 nov 2004)) + /depx tipx def + /depy tipy def + newpath depx depy moveto + cos20 neg dx1 mul sin20 dy1 mul sub depx add + sin20 dx1 mul cos20 dy1 mul sub depy add lineto + cos20 neg dx1 mul sin20 dy1 mul add depx add + sin20 neg dx1 mul cos20 dy1 mul sub depy add lineto closepath + fill + } {} ifelse + } def + + +%------------------------------------------------------ +% cercle ou portions de cercle +% attention argument (x y w h angl1*64 angl2*64 ) +% devrait tracer une ellipse a modifier donc +%------------------------------------------------------ + +/fillarc + {/glev exch def /Ar exch def + /cx Ar 0 get Ar 2 get 2 div add def + /cy Ar 1 get Ar 3 get 2 div add def + Ar 2 get 0 eq {} { + /hom Ar 3 get Ar 2 get div def + /Cmsave1 matrix def Cmsave1 currentmatrix pop + %-- on change de transformation pour faire homothetie en (x,y) + cx cy [1 0 0 hom 0 0 ] transform + /t1 exch neg cy add def + /t2 exch neg cx add def + [1 0 0 hom t2 t1 ] concat + glev WhiteLev le + { % filling + newpath + cx cy moveto + cx cy Ar 2 get 2 div Ar 5 get Ar 4 get add 64 div neg + Ar 4 get 64 div neg arc closepath + gsave glev Setgray eofill grestore} + { + %drawing with current dash or color unclosed path + newpath + cx cy Ar 2 get 2 div Ar 5 get Ar 4 get add 64 div neg Ar 4 get 64 div neg arc + stroke} ifelse + Cmsave1 setmatrix } ifelse +} def + +/drawarc + {/glev exch def /Ar exch def + /cx Ar 0 get Ar 2 get 2 div add def + /cy Ar 1 get Ar 3 get 2 div add def + Ar 2 get 0 eq {} { + /hom Ar 3 get Ar 2 get div def + /Cmsave1 matrix def Cmsave1 currentmatrix pop + %-- on change de transformation pour faire homothetie en (x,y) + cx cy [1 0 0 hom 0 0 ] transform + /t1 exch neg cy add def + /t2 exch neg cx add def + [1 0 0 hom t2 t1 ] concat + newpath + cx cy Ar 2 get 2 div Ar 5 get Ar 4 get add 64 div neg Ar 4 get 64 div neg arc + closepath glev xsetgray stroke + Cmsave1 setmatrix } ifelse +} def + + +%------------------------------------------------------ +% centred hard mark +%------------------------------------------------------ + +% x y str ShowCString +% on fait un show mais string est centre autour du point (x,y) + +/ShowCString { /str exch def /y exch def /x exch def + newpath + x y moveto + str true charpath flattenpath pathbbox + /y2 exch def /x2 exch def /y1 exch def /x1 exch def + x 2 mul x2 x1 add 2 div sub + y 2 mul y2 y1 add 2 div sub moveto str show + } def + +/drawpolymark {/glev exch def /Ar exch def + Ar 0 get Ar 1 get HardMark ShowCString + 2 2 Ar length 1 sub + {/i exch def + Ar i get Ar i 1 add get HardMark ShowCString + }for +} def + +%--------------------------------------------------- +% chaines de caracteres +%--------------------------------------------------- +/FBox {/Ar exch def /rot exch def /str exch def /y exch def /x exch def + newpath Ar 0 get Ar 1 get moveto + /sina rot sin def /cosa rot cos def + /-sina sina neg def + [cosa -sina sina cosa 0 0 ] CtmModif + Ar 2 get 0 rlineto 0 Ar 3 get neg rlineto Ar 2 get neg 0 rlineto + 0 Ar 3 get rlineto stroke CtmRestore + x y str rot ShowRotate + } def + +% x y str ang Showrotate +% inverse du sens trigo + +/ShowRotate { /ang exch def /str exch def + /y exch def /x exch def + x y moveto + /sina ang sin def /cosa ang cos def + /-sina 0 sina sub def + [cosa -sina sina cosa 0 0 ] CtmModif + str show + CtmRestore +} def + +/HardMark (0) def + +%(Chaine de caracteres) x y flag angle [arfbox] Show + +/Show { /Ar exch def + /rot exch def /flag exch def /y exch def /x exch def /str exch def + flag 1 eq + {x y str rot Ar FBox} + {x y str rot ShowRotate } ifelse} def + +/L {/y2 exch def /x2 exch def /y1 exch def /x1 exch def + newpath x1 y1 moveto x2 y2 lineto stroke } def + +%--------------------------------------------------------- +% drawing an axis +% angle [nsep1,nsep2] ,[siz1,siz2,coeff] [x0,y0] drawaxis", +%--------------------------------------------------------- + +/drawaxis {/XX exch def /Arsize exch def /Arsep exch def /ang exch def + /Cmsave1 matrix def Cmsave1 currentmatrix pop + /sina ang sin def /cosa ang cos def /-sina sina neg def + /x XX 0 get def /y XX 1 get def + %-- on change de transformation pour tourner autour de (x,y) + x y [cosa sina -sina cosa 0 0 ] transform + /t1 exch neg y add def + /t2 exch neg x add def + [cosa sina -sina cosa t2 t1 ] concat + newpath x y moveto 0 Arsize 1 get Arsize 2 get mul rlineto + stroke + 0 1 Arsep 1 get 1 sub + { + % i don't want the value of the for indice + pop + newpath + x y moveto + 0 1 Arsep 0 get 1 sub + { + % i don't want the value of the for indice + pop + Arsize 0 get 0 rlineto + 0 Arsize 1 get rlineto + 0 Arsize 1 get neg rlineto } + for + currentpoint /y exch def /x exch def + stroke + newpath x y moveto 0 Arsize 1 get Arsize 2 get mul rlineto + stroke } + for + Cmsave1 setmatrix } def + +%--------------------------------------------------------- +% change and restore CTM +%--------------------------------------------------------- + +/CtmModif { + /arg exch def + /Cmsave matrix def + Cmsave currentmatrix pop + [1 0 0 -1 0 0 ] concat + arg concat +} def + +/CtmRestore { Cmsave setmatrix } def + +/Thickness { /th exch def th 0 le {/th 0.1 def} if th setlinewidth} def + +/WhiteLev 15 def + +/Setgray { WhiteLev div setgray} def + +/fillsolid { 0 setgray } def + +%-------------------------------------- +% clip zones ( rectangle ) +%------------------------------------- + +/setclipzone {initclip + /h exch def /w exch def /y exch def /x exch def + newpath x y moveto w 0 rlineto 0 h rlineto w neg 0 rlineto + 0 h neg rlineto closepath clip} def + +%------------------ +% to change the position of a picture +%------------------ +/cm{28.346457 mul}def + +/DesPosi { /YH exch def /XW exch def /YP exch def /XP exch def + XP cm YP cm neg translate + XW cm 6000 div YH cm 4240 div scale } def + +0 setlinecap +2 setlinejoin +1 setlinewidth + +%-- Color database +/ColorR [0.000000 0.000000 0.000000 0.529412 0.498039 0.133333 0.000000 0.878431 0.000000 1.000000 1.000000 1.000000 0.933333 1.000000 1.000000 0.960784 1.000000 ] def +/ColorG [0.000000 0.000000 0.000000 0.807843 1.000000 0.545098 1.000000 1.000000 1.000000 0.647059 0.000000 0.000000 0.509804 1.000000 0.843137 0.960784 1.000000 ] def +/ColorB [0.000000 0.501961 1.000000 0.921569 0.831373 0.133333 0.000000 1.000000 1.000000 0.000000 0.000000 1.000000 0.933333 0.000000 0.000000 0.862745 1.000000 ] def + +/Setcolor {/i exch def ColorR i get ColorG i get ColorB i get setrgbcolor } def + +% to multiply all the fontsizes by a factor scf +/scf 1.0 def + +% set dash styles : max number is hardcoded to 6 +% /DashTab [[] [20 50 20 50] [50 20 50 20] [50 30 20 30] [80 30 20 30] [110 30 20 30] [110 30 50 30]] def +/DashTab [[] [50 20 50 20] [50 30 20 30] [80 30 20 30] [110 30 20 30] [110 30 50 30]] def +/Setdash {/i exch 0 lmax 5 lmin def i DashTab i get 0 setdash } def + +% style for drawing: color gray or dash +/xsetgray { usecolor 0 le {Setdash} {Setgray} ifelse } def + +% default value for colormode + +/usecolor 1 def + +% changing fonts encoding + +/Courier findfont +dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding ISOLatin1Encoding def + currentdict + end +/Courier exch definefont pop + +/Times-Roman findfont +dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding ISOLatin1Encoding def + currentdict + end +/Times-Roman exch definefont pop + +/Times-Bold findfont +dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding ISOLatin1Encoding def + currentdict + end +/Times-Bold exch definefont pop + + +/Times-BoldItalic findfont +dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding ISOLatin1Encoding def + currentdict + end +/Times-BoldItalic exch definefont pop + +/Helvetica findfont +dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding ISOLatin1Encoding def + currentdict + end +/Helvetica exch definefont pop + +/Helvetica-Bold findfont +dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding ISOLatin1Encoding def + currentdict + end +/Helvetica-Bold exch definefont pop + +/Helvetica-Bold-Oblique findfont +dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding ISOLatin1Encoding def + currentdict + end +/Helvetica-Bold-Oblique exch definefont pop + +/Helvetica-Oblique findfont +dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding ISOLatin1Encoding def + currentdict + end +/Helvetica-Oblique exch definefont pop + +% used when extracting Latex from scilab generated text +%Latex:% MySetFigFont +%Latex:\begingroup\makeatletter\ifx\MySetFigFont\undefined% +%Latex:\gdef\MySetFigFont#1#2#3#4#5{% +%Latex: \reset@font\fontsize{#1}{#2pt}% +%Latex: \fontfamily{#3}\fontseries{#4}\fontshape{#5}% +%Latex: \selectfont}% +%Latex:\fi\endgroup% +%Latex:% myput +%Latex:\ifx\myput\undefined% +%Latex:\long\def\myput#1#2#3#4{\put(#1,#2){\makebox(0,0)[lb]{\smash{{\MySetFigFont{#3}{#3}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}#4}}}}}} +%Latex:\fi% + +%------ End Main Program ------% +% XP YP XW YW DesPosi in the following code +% will output the picture in the rectangle defined by +% upper left point (XP,YP) wide :XW Height: YW +% the coordinates are given in centimeter and +% are the (0,0) point is the down-left point of the paper + + + +/ColorR [0.000000 +0.000000 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 +0.529412 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.564706 0.690196 0.815686 +0.564706 0.690196 0.815686 0.501961 0.627451 0.752941 1.000000 1.000000 1.000000 1.000000 +1.000000 0.0 1.0] def +/ColorG [0.000000 +0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 +0.807843 0.564706 0.690196 0.815686 0.564706 0.690196 0.815686 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.188235 0.250980 0.376471 0.501961 0.627451 0.752941 0.878431 +0.843137 0.0 1.0] def +/ColorB [0.000000 +1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 0.564706 0.690196 0.815686 +1.000000 0.000000 0.000000 0.000000 0.564706 0.690196 0.815686 0.000000 0.000000 0.000000 +0.564706 0.690196 0.815686 0.000000 0.000000 0.000000 0.501961 0.627451 0.752941 0.878431 +0.000000 0.0 1.0] def +%scipos_w=3000 +%scipos_h=2120 +% Dessin en bas a gauche de taille 3000,2120 +[1.889764 20 div 0 0 1.889764 20 div neg 141 10 div 6212 10 div] concat +% Init driver +/PaintBackground {WhiteLev 2 add background eq {}{ (drawbox) 4 [background 1 add] [0 0 6000 4240] dogrey}ifelse } def +5 Thickness +% 3 setalufunction +-1 -1 200000 200000 setclipzone +[] 0 setdash +/Times-Roman findfont 100 scf mul scalefont setfont +fillsolid +[] 0 setdash +0 Setcolor +/background 33 def PaintBackground +%--use color 1 +fillsolid +[] 0 setdash +0 Setcolor +/WhiteLev 31 def +/Setgray {/i exch def ColorR i get ColorG i get ColorB i get setrgbcolor } def +/Setcolor {/i exch def ColorR i get ColorG i get ColorB i get setrgbcolor } def +/usecolor 1 def +%--end use color 1 +% End init driver +/WhiteLev 31 def +/WhiteLev 31 def +/ColorR [0.000000 +0.000000 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 +0.529412 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.564706 0.690196 0.815686 +0.564706 0.690196 0.815686 0.501961 0.627451 0.752941 1.000000 1.000000 1.000000 1.000000 +1.000000 0.0 1.0] def +/ColorG [0.000000 +0.000000 1.000000 1.000000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 +0.807843 0.564706 0.690196 0.815686 0.564706 0.690196 0.815686 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.188235 0.250980 0.376471 0.501961 0.627451 0.752941 0.878431 +0.843137 0.0 1.0] def +/ColorB [0.000000 +1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 0.564706 0.690196 0.815686 +1.000000 0.000000 0.000000 0.000000 0.564706 0.690196 0.815686 0.000000 0.000000 0.000000 +0.564706 0.690196 0.815686 0.000000 0.000000 0.000000 0.501961 0.627451 0.752941 0.878431 +0.000000 0.0 1.0] def +%Latex:\setlength{\unitlength}{0.05pt} +%Latex:\begin{picture}(6000,4240)(200,0) +/background 33 def PaintBackground +/background 33 def PaintBackground +/background 33 def PaintBackground +32 Setcolor +5 Thickness +750 530 4500 3180 setclipzone +-1 -1 200000 200000 setclipzone +[] 0 setdash +32 Setcolor +33 Setcolor + (drawpoly) 10 [ -34] +[750 530 750 3710 5250 3710 5250 530 750 530 +] dogrey +33 Setcolor +/absolu true def +32 Setcolor +[] 0 setdash +32 Setcolor +1 Setcolor +5 Thickness +[] 0 setdash +750 530 4500 3180 setclipzone +1 Setcolor +5 Thickness +[] 0 setdash +/closeflag false def + (drawpoly) 50 [ 0] +[750 742 1718 742 2284 742 2685 742 2997 742 3251 1564 3466 2705 3653 2705 3817 2771 3964 2849 +4097 2849 4219 2856 4331 2856 4434 2856 4530 2856 4620 3275 4705 3338 4785 3414 4860 3414 4932 3414 +5000 3414 5065 3414 5127 3414 5186 3468 5243 3469 +] dogrey +1 Setcolor +/absolu true def +-1 -1 200000 200000 setclipzone +32 Setcolor +5 Thickness +[] 0 setdash +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +(0.0) 681 3873 0 0.00 [681 3773 139 99] Show +%Latex:\myput{681}{367}{5}{0.0} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[750 3710 750 3773 +] dogrey +32 Setcolor +32 Setcolor +(0.2) 1324 3873 0 0.00 [1324 3773 139 99] Show +%Latex:\myput{1324}{367}{5}{0.2} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[1393 3710 1393 3773 +] dogrey +32 Setcolor +32 Setcolor +(0.4) 1967 3873 0 0.00 [1967 3773 139 99] Show +%Latex:\myput{1967}{367}{5}{0.4} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[2036 3710 2036 3773 +] dogrey +32 Setcolor +32 Setcolor +(0.6) 2610 3873 0 0.00 [2610 3773 139 99] Show +%Latex:\myput{2610}{367}{5}{0.6} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[2679 3710 2679 3773 +] dogrey +32 Setcolor +32 Setcolor +(0.8) 3252 3873 0 0.00 [3252 3773 139 99] Show +%Latex:\myput{3252}{367}{5}{0.8} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[3321 3710 3321 3773 +] dogrey +32 Setcolor +32 Setcolor +(1.0) 3895 3873 0 0.00 [3895 3773 139 99] Show +%Latex:\myput{3895}{367}{5}{1.0} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[3964 3710 3964 3773 +] dogrey +32 Setcolor +32 Setcolor +(1.2) 4538 3873 0 0.00 [4538 3773 139 99] Show +%Latex:\myput{4538}{367}{5}{1.2} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[4607 3710 4607 3773 +] dogrey +32 Setcolor +32 Setcolor +(1.4) 5181 3873 0 0.00 [5181 3773 139 99] Show +%Latex:\myput{5181}{367}{5}{1.4} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[5250 3710 5250 3773 +] dogrey +32 Setcolor + (drawsegs) 4 [ 32] +[750 3710 750 3757 +] dogrey + (drawsegs) 4 [ 32] +[964 3710 964 3757 +] dogrey + (drawsegs) 4 [ 32] +[1179 3710 1179 3757 +] dogrey + (drawsegs) 4 [ 32] +[1393 3710 1393 3757 +] dogrey + (drawsegs) 4 [ 32] +[1607 3710 1607 3757 +] dogrey + (drawsegs) 4 [ 32] +[1821 3710 1821 3757 +] dogrey + (drawsegs) 4 [ 32] +[2036 3710 2036 3757 +] dogrey + (drawsegs) 4 [ 32] +[2250 3710 2250 3757 +] dogrey + (drawsegs) 4 [ 32] +[2464 3710 2464 3757 +] dogrey + (drawsegs) 4 [ 32] +[2679 3710 2679 3757 +] dogrey + (drawsegs) 4 [ 32] +[2893 3710 2893 3757 +] dogrey + (drawsegs) 4 [ 32] +[3107 3710 3107 3757 +] dogrey + (drawsegs) 4 [ 32] +[3321 3710 3321 3757 +] dogrey + (drawsegs) 4 [ 32] +[3536 3710 3536 3757 +] dogrey + (drawsegs) 4 [ 32] +[3750 3710 3750 3757 +] dogrey + (drawsegs) 4 [ 32] +[3964 3710 3964 3757 +] dogrey + (drawsegs) 4 [ 32] +[4179 3710 4179 3757 +] dogrey + (drawsegs) 4 [ 32] +[4393 3710 4393 3757 +] dogrey + (drawsegs) 4 [ 32] +[4607 3710 4607 3757 +] dogrey + (drawsegs) 4 [ 32] +[4821 3710 4821 3757 +] dogrey + (drawsegs) 4 [ 32] +[5036 3710 5036 3757 +] dogrey +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +(0.0) 539 3748 0 0.00 [539 3648 139 99] Show +%Latex:\myput{539}{492}{5}{0.0} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[750 3710 690 3710 +] dogrey +32 Setcolor +32 Setcolor +(0.5) 539 3112 0 0.00 [539 3012 139 99] Show +%Latex:\myput{539}{1128}{5}{0.5} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[750 3074 690 3074 +] dogrey +32 Setcolor +32 Setcolor +(1.0) 539 2476 0 0.00 [539 2376 139 99] Show +%Latex:\myput{539}{1764}{5}{1.0} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[750 2438 690 2438 +] dogrey +32 Setcolor +32 Setcolor +(1.5) 539 1840 0 0.00 [539 1740 139 99] Show +%Latex:\myput{539}{2400}{5}{1.5} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[750 1802 690 1802 +] dogrey +32 Setcolor +32 Setcolor +(2.0) 539 1204 0 0.00 [539 1104 139 99] Show +%Latex:\myput{539}{3036}{5}{2.0} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[750 1166 690 1166 +] dogrey +32 Setcolor +32 Setcolor +(2.5) 539 568 0 0.00 [539 468 139 99] Show +%Latex:\myput{539}{3672}{5}{2.5} +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[750 530 690 530 +] dogrey +32 Setcolor + (drawsegs) 4 [ 32] +[750 3710 705 3710 +] dogrey + (drawsegs) 4 [ 32] +[750 3551 705 3551 +] dogrey + (drawsegs) 4 [ 32] +[750 3392 705 3392 +] dogrey + (drawsegs) 4 [ 32] +[750 3233 705 3233 +] dogrey + (drawsegs) 4 [ 32] +[750 3074 705 3074 +] dogrey + (drawsegs) 4 [ 32] +[750 2915 705 2915 +] dogrey + (drawsegs) 4 [ 32] +[750 2756 705 2756 +] dogrey + (drawsegs) 4 [ 32] +[750 2597 705 2597 +] dogrey + (drawsegs) 4 [ 32] +[750 2438 705 2438 +] dogrey + (drawsegs) 4 [ 32] +[750 2279 705 2279 +] dogrey + (drawsegs) 4 [ 32] +[750 2120 705 2120 +] dogrey + (drawsegs) 4 [ 32] +[750 1961 705 1961 +] dogrey + (drawsegs) 4 [ 32] +[750 1802 705 1802 +] dogrey + (drawsegs) 4 [ 32] +[750 1643 705 1643 +] dogrey + (drawsegs) 4 [ 32] +[750 1484 705 1484 +] dogrey + (drawsegs) 4 [ 32] +[750 1325 705 1325 +] dogrey + (drawsegs) 4 [ 32] +[750 1166 705 1166 +] dogrey + (drawsegs) 4 [ 32] +[750 1007 705 1007 +] dogrey + (drawsegs) 4 [ 32] +[750 848 705 848 +] dogrey + (drawsegs) 4 [ 32] +[750 689 705 689 +] dogrey +32 Setcolor + (drawsegs) 4 [ 32] +[750 3710 5250 3710 +] dogrey +32 Setcolor +32 Setcolor + (drawsegs) 4 [ 32] +[750 3710 750 530 +] dogrey +32 Setcolor + (drawbox) 4 [ 0] +[750 530 4500 3180 +] dogrey +32 Setcolor +[] 0 setdash +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +(f16 - level, 500 ft/s) 2590 292 0 0.00 [2590 192 817 99] Show +%Latex:\myput{2590}{3948}{5}{f16 - level, 500 ft/s} +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +(log10\(iteration\)) 2667 4065 0 0.00 [2667 3965 666 99] Show +%Latex:\myput{2667}{175}{5}{log10(iteration)} +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +(log10\(cost\)) 475 2346 0 270.00 [475 2246 494 99] Show +%Latex:\myput{475}{1894}{5}{log10(cost)} +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +5 Thickness +[] 0 setdash +32 Setcolor +33 Setcolor + (drawpoly) 10 [ -34] +[0 0 0 4 6 4 6 0 0 0 +] dogrey +33 Setcolor +/absolu true def +32 Setcolor +[] 0 setdash +32 Setcolor +32 Setcolor +5 Thickness +[] 0 setdash +33 Setcolor + (drawpoly) 8 [ -34] +[3838 587 5205 587 5205 810 3838 810 +] dogrey +33 Setcolor +/absolu true def +32 Setcolor +5 Thickness +[] 0 setdash +/closeflag true def + (drawpoly) 8 [ 0] +[3838 587 5205 587 5205 810 3838 810 +] dogrey +32 Setcolor +/absolu true def +1 Setcolor +5 Thickness +[] 0 setdash +1 Setcolor +5 Thickness +[] 0 setdash +/closeflag false def + (drawpoly) 4 [ 0] +[3883 699 4108 699 +] dogrey +1 Setcolor +/absolu true def +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +(newton raphson) 4153 745 0 0.00 [4153 645 711 99] Show +%Latex:\myput{4153}{3495}{5}{newton raphson} +32 Setcolor +5 Thickness +[] 0 setdash +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +/Helvetica findfont 100 scf mul scalefont setfont +[] 0 setdash +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +32 Setcolor +32 Setcolor +/Helvetica findfont 100 scf mul scalefont setfont +%Latex:\end{picture} + showpage + + end saved restore + diff --git a/scicoslab/jsbsim-toolbox/VERSION b/scicoslab/jsbsim-toolbox/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..d3827e75a5cadb9fe4a27e1cb9b6d192e7323120 --- /dev/null +++ b/scicoslab/jsbsim-toolbox/VERSION @@ -0,0 +1 @@ +1.0 diff --git a/scicoslab/jsbsim-toolbox/builder.sce b/scicoslab/jsbsim-toolbox/builder.sce new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scicoslab/jsbsim-toolbox/loader.sce b/scicoslab/jsbsim-toolbox/loader.sce new file mode 100644 index 0000000000000000000000000000000000000000..f9bf99e46a2dfbeb4f0984361b5d40a3d038013b --- /dev/null +++ b/scicoslab/jsbsim-toolbox/loader.sce @@ -0,0 +1,45 @@ +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) diff --git a/scicoslab/jsbsim-toolbox/macros/gettext.bin b/scicoslab/jsbsim-toolbox/macros/gettext.bin new file mode 100644 index 0000000000000000000000000000000000000000..4521980d6d6752dc3663eed4634ebbdf62b1c7b5 Binary files /dev/null and b/scicoslab/jsbsim-toolbox/macros/gettext.bin differ diff --git a/scicoslab/jsbsim-toolbox/macros/gettext.sci b/scicoslab/jsbsim-toolbox/macros/gettext.sci new file mode 100644 index 0000000000000000000000000000000000000000..c9e131c231a57b15a96a86d64dcf219c37857379 --- /dev/null +++ b/scicoslab/jsbsim-toolbox/macros/gettext.sci @@ -0,0 +1,4 @@ +function strOut = gettext(str) + strOut = str +endfunction + diff --git a/scicoslab/jsbsim-toolbox/macros/isfile.bin b/scicoslab/jsbsim-toolbox/macros/isfile.bin new file mode 100644 index 0000000000000000000000000000000000000000..b5f30bc7e40da6d5df126581cf826282141b96bd Binary files /dev/null and b/scicoslab/jsbsim-toolbox/macros/isfile.bin differ diff --git a/scicoslab/jsbsim-toolbox/macros/isfile.sci b/scicoslab/jsbsim-toolbox/macros/isfile.sci new file mode 100644 index 0000000000000000000000000000000000000000..1ad94a7a0f695cff937feb0e706ddb0ec0b7979d --- /dev/null +++ b/scicoslab/jsbsim-toolbox/macros/isfile.sci @@ -0,0 +1,4 @@ +function stat = isfile(fname) + stat = (fileinfo(fname) ~= []) +endfunction + diff --git a/scicoslab/jsbsim-toolbox/macros/jsbsim.bin b/scicoslab/jsbsim-toolbox/macros/jsbsim.bin new file mode 100644 index 0000000000000000000000000000000000000000..b671d26fc7a3a5cea4a28225e07401e215dc5d36 Binary files /dev/null and b/scicoslab/jsbsim-toolbox/macros/jsbsim.bin differ diff --git a/scicoslab/jsbsim-toolbox/macros/jsbsim.sci b/scicoslab/jsbsim-toolbox/macros/jsbsim.sci new file mode 100644 index 0000000000000000000000000000000000000000..0acf3111e2090222971693d6398ab23edf58c13d --- /dev/null +++ b/scicoslab/jsbsim-toolbox/macros/jsbsim.sci @@ -0,0 +1,9 @@ +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 diff --git a/scicoslab/jsbsim-toolbox/macros/jsbsimTrim.bin b/scicoslab/jsbsim-toolbox/macros/jsbsimTrim.bin new file mode 100644 index 0000000000000000000000000000000000000000..daf814d23c2c0ade5722b5d06ebc23d4c6c5bd69 Binary files /dev/null and b/scicoslab/jsbsim-toolbox/macros/jsbsimTrim.bin differ diff --git a/scicoslab/jsbsim-toolbox/macros/jsbsimTrim.sci b/scicoslab/jsbsim-toolbox/macros/jsbsimTrim.sci new file mode 100644 index 0000000000000000000000000000000000000000..80c89166e399fb85dc5b203afa29aa8de40e85cf --- /dev/null +++ b/scicoslab/jsbsim-toolbox/macros/jsbsimTrim.sci @@ -0,0 +1,3 @@ +function jsbsimTrim() + host('cd '+jsbsimRoot+'/src && ./JSBSimTrim') +endfunction diff --git a/scicoslab/jsbsim-toolbox/macros/lib b/scicoslab/jsbsim-toolbox/macros/lib new file mode 100644 index 0000000000000000000000000000000000000000..595208438e3897c994a8552cd407da115b1caccf Binary files /dev/null and b/scicoslab/jsbsim-toolbox/macros/lib differ diff --git a/scicoslab/jsbsim-toolbox/macros/loadmacros.sce b/scicoslab/jsbsim-toolbox/macros/loadmacros.sce new file mode 100644 index 0000000000000000000000000000000000000000..0f4783f121befde375bb123237418a8cf5650b9d --- /dev/null +++ b/scicoslab/jsbsim-toolbox/macros/loadmacros.sce @@ -0,0 +1,3 @@ +mode(-1); +lines(0); +genlib('lib_mavsimMacros',pwd()); diff --git a/scicoslab/jsbsim-toolbox/macros/names b/scicoslab/jsbsim-toolbox/macros/names new file mode 100644 index 0000000000000000000000000000000000000000..2a24cd0e00b4afbf720f0f2d1df3c21c958c65a2 --- /dev/null +++ b/scicoslab/jsbsim-toolbox/macros/names @@ -0,0 +1,5 @@ +jsbsimTrim +jsbsim +read_csv +gettext +isfile diff --git a/scicoslab/jsbsim-toolbox/macros/read_csv.bin b/scicoslab/jsbsim-toolbox/macros/read_csv.bin new file mode 100644 index 0000000000000000000000000000000000000000..f28c1b0cbfc5ea4232409400ed5d1ac7fdaa6385 Binary files /dev/null and b/scicoslab/jsbsim-toolbox/macros/read_csv.bin differ diff --git a/scicoslab/read_csv.sci b/scicoslab/jsbsim-toolbox/macros/read_csv.sci similarity index 92% rename from scicoslab/read_csv.sci rename to scicoslab/jsbsim-toolbox/macros/read_csv.sci index 48a851ec2559b6b047ea49d9f893a5ab0c109e24..71725b7098175e0e8dd84e0ad1228886a7d2d981 100644 --- a/scicoslab/read_csv.sci +++ b/scicoslab/jsbsim-toolbox/macros/read_csv.sci @@ -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. diff --git a/scicoslab/scilab.ini b/scicoslab/scilab.ini new file mode 100644 index 0000000000000000000000000000000000000000..68cf99d05095e9a117a2506b77de3fd9d80c910a --- /dev/null +++ b/scicoslab/scilab.ini @@ -0,0 +1,7 @@ +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") diff --git a/scicoslab/trimAnalysis.sce b/scicoslab/trimAnalysis.sce index 6f41085c37b0ad4ced604689ca8369b6c30b7314..5dd6626432a0bc5426d907ea545a1ef30ec54192 100644 --- a/scicoslab/trimAnalysis.sce +++ b/scicoslab/trimAnalysis.sce @@ -1,5 +1,5 @@ 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') diff --git a/src/f16_lin.sce b/src/f16_lin.sce new file mode 100644 index 0000000000000000000000000000000000000000..99b2f626a7c1c5518c2e296b57fc0fa34b9453fb --- /dev/null +++ b/src/f16_lin.sce @@ -0,0 +1,79 @@ +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); +