![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Original Version of STM Board
Diff: main.cpp
- Revision:
- 122:dcb3ce3056a0
- Parent:
- 121:89396c37b03e
- Child:
- 123:be3f3ce98277
diff -r 89396c37b03e -r dcb3ce3056a0 main.cpp --- a/main.cpp Tue Sep 15 00:22:01 2020 +0000 +++ b/main.cpp Tue Sep 15 05:29:49 2020 +0000 @@ -1,4 +1,4 @@ -//200915-1 +//200915-2 #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -193,82 +193,77 @@ float input_NN[num_input] = { 0.0f }; const float h1[num_input][16] = { - {-0.12538549304008484f,-0.1297602355480194f,0.11304140090942383f,0.2742859721183777f,-0.8250300288200378f,-0.04229236766695976f,-0.15306922793388367f,-0.4135235548019409f,-0.2961782217025757f,-0.07852207124233246f,-1.1915283203125f,0.01317680161446333f,-0.25207650661468506f,-0.014075362123548985f,-0.22528137266635895f,-0.6198574304580688f}, -{-0.19888468086719513f,0.4962921142578125f,-0.3440950810909271f,-0.04722340777516365f,-0.9384036064147949f,0.008911640383303165f,-0.3551466166973114f,-0.5058884024620056f,-0.11596696078777313f,0.14010098576545715f,-1.1150455474853516f,-0.7881326079368591f,0.21576932072639465f,-0.6239233016967773f,-0.1836855560541153f,-0.5878320336341858f}, -{-0.03559984266757965f,0.06665316969156265f,0.3188004493713379f,-0.23797664046287537f,-0.8946518898010254f,0.33254438638687134f,0.2516096830368042f,-0.4437709152698517f,-0.18694481253623962f,0.14209488034248352f,-0.7290050387382507f,-0.47835156321525574f,0.0697505995631218f,0.009985013864934444f,0.04897245764732361f,-0.5600040555000305f}, -{-0.06218857690691948f,0.0055004083551466465f,0.34815579652786255f,0.3614911139011383f,-0.9616373777389526f,0.4737781584262848f,-0.10148510336875916f,-0.19577272236347198f,-0.02599596232175827f,0.25770917534828186f,0.10352985560894012f,-0.025867044925689697f,-0.09092411398887634f,0.37447765469551086f,-0.2594349980354309f,-0.29302236437797546f}, -{-1.0256245136260986f,3.3244986534118652f,-0.004507303237915039f,-0.4295147955417633f,-0.2665431797504425f,1.2085310220718384f,0.11336228251457214f,0.5614469647407532f,-0.020764315500855446f,0.09357579052448273f,2.153151750564575f,-2.3825974464416504f,-0.19526953995227814f,1.485861897468567f,-0.33859342336654663f,-1.0096709728240967f}, -{0.33760398626327515f,0.15137788653373718f,0.19074231386184692f,0.28160399198532104f,0.06776947528123856f,0.15706767141819f,0.1446705460548401f,-0.59229576587677f,-0.01898665726184845f,0.09772954136133194f,-0.2321673035621643f,-0.43289390206336975f,-0.22538399696350098f,0.2040676772594452f,-0.36205175518989563f,-0.5129569172859192f}, -{0.0647188276052475f,0.385019987821579f,-0.21918344497680664f,-0.3794626295566559f,-0.4691496193408966f,0.5222136974334717f,0.05268651247024536f,-0.654662549495697f,0.2718934714794159f,0.053434062749147415f,0.024371149018406868f,-0.27870720624923706f,-0.1430879831314087f,0.2003219723701477f,-0.13682329654693604f,-0.31295764446258545f}, -{0.04983292520046234f,0.1452646702528f,-0.23319895565509796f,0.12819106876850128f,-0.46857011318206787f,0.32018986344337463f,-0.15703755617141724f,-0.6967725157737732f,-0.023273874074220657f,0.0937250480055809f,-0.04469524696469307f,-0.625782310962677f,0.33592408895492554f,-0.06288835406303406f,0.03769642114639282f,-0.12413319200277328f}, -{0.22675682604312897f,0.5973165035247803f,0.08977723121643066f,-0.2428070604801178f,-0.3495730757713318f,0.6904239058494568f,-0.06348633766174316f,-0.7936407327651978f,-0.2829691469669342f,0.2962890565395355f,-0.49142125248908997f,-0.2163258045911789f,0.2159746140241623f,-0.12937478721141815f,-0.2676756680011749f,-0.09756138920783997f}, -{0.056595273315906525f,0.04809652268886566f,0.16173982620239258f,0.020012572407722473f,-0.09903427213430405f,0.9706398844718933f,-0.26198261976242065f,-0.5410996675491333f,-0.05274199694395065f,-0.42306792736053467f,-0.33324792981147766f,-0.8957317471504211f,0.3466741442680359f,-0.6731507182121277f,0.3052974343299866f,-0.2763424217700958f}, -{0.5586411952972412f,0.43095552921295166f,0.32573211193084717f,0.4262547492980957f,-0.23946885764598846f,0.853289008140564f,-0.17817988991737366f,-0.5030534267425537f,-0.41963163018226624f,0.01310235820710659f,-0.10254285484552383f,-0.6943825483322144f,-0.03343270346522331f,-0.5341449975967407f,0.23379981517791748f,-0.5737422108650208f}, -{-0.43968984484672546f,-0.5982950925827026f,-0.3532183766365051f,-0.09305038303136826f,0.02779853157699108f,-0.31271958351135254f,0.13436567783355713f,0.3002631366252899f,-0.1767670065164566f,0.16469384729862213f,-0.5442917943000793f,-0.09487488865852356f,0.10150864720344543f,-0.1174691766500473f,0.09193113446235657f,-0.398308128118515f}, -{-0.29969802498817444f,-0.20802512764930725f,0.173875629901886f,-0.03646260127425194f,0.2339116930961609f,-0.025851814076304436f,-0.21062730252742767f,0.1728522628545761f,-0.1958557665348053f,-0.19184263050556183f,-0.16906322538852692f,-0.3767596185207367f,0.03815969452261925f,-0.034190502017736435f,-0.19507692754268646f,-0.6954120993614197f}, -{-0.5445505380630493f,-0.06667868793010712f,0.36161231994628906f,-0.3853375017642975f,-0.18679115176200867f,-0.17434139549732208f,-0.2803434431552887f,-0.1055828109383583f,-0.1492249220609665f,-0.22327004373073578f,-0.096988745033741f,-0.4720779061317444f,-0.33747512102127075f,-0.01742616668343544f,0.04202204942703247f,-0.3880178928375244f}, -{-0.30601173639297485f,0.6010074019432068f,0.1776806116104126f,-0.3648182153701782f,0.37388876080513f,-0.3927247226238251f,0.036818891763687134f,0.47357508540153503f,0.2354845255613327f,0.042778871953487396f,0.21399913728237152f,-1.0210378170013428f,0.033867064863443375f,0.33429262042045593f,0.058527231216430664f,-0.4199855625629425f}, -{-0.34438514709472656f,2.2698769569396973f,-0.3542669713497162f,-0.528469979763031f,-0.13626305758953094f,-2.7937612533569336f,-0.13638360798358917f,0.16776393353939056f,0.1462515890598297f,-0.03840259462594986f,1.0126919746398926f,-1.1838299036026f,-0.24433782696723938f,2.422633171081543f,-0.07223698496818542f,-0.3419298827648163f}, -{0.6194776892662048f,-2.516664743423462f,0.14635330438613892f,0.9439404606819153f,-0.4982180595397949f,2.151139259338379f,-0.03628063201904297f,-1.0738998651504517f,-0.08571594953536987f,0.0396052785217762f,-2.8291807174682617f,1.5088356733322144f,0.20211462676525116f,-2.522641181945801f,0.25779521465301514f,-0.026165809482336044f}, -{0.06352996081113815f,-0.05066967010498047f,0.18322283029556274f,0.03522790968418121f,-0.4696357548236847f,0.25518545508384705f,-0.3163079023361206f,-0.27377328276634216f,-0.3872103691101074f,-0.14478269219398499f,-0.6481943726539612f,0.3252601623535156f,0.25736236572265625f,-0.651495099067688f,-0.2407861351966858f,0.20217441022396088f}, -{-0.2707156240940094f,-0.923464834690094f,-0.2609631419181824f,0.26111695170402527f,0.2789458930492401f,-0.7849046587944031f,0.2401489019393921f,-0.3799836337566376f,-0.38324639201164246f,-0.012600225396454334f,-0.6569547653198242f,0.7391843199729919f,0.07483898103237152f,0.7388472557067871f,-0.28592410683631897f,-0.06940817087888718f}, -{0.14886534214019775f,-1.379183292388916f,0.1335710883140564f,-0.2705114483833313f,-0.1318787783384323f,-1.0396175384521484f,-0.1246849000453949f,-0.2070637196302414f,-0.1831875741481781f,0.0033268898259848356f,-0.176667258143425f,1.1407310962677002f,0.18566201627254486f,1.2869547605514526f,0.1255095899105072f,0.5903193950653076f}, -{-0.46475258469581604f,-1.7666163444519043f,-0.07108169794082642f,0.0038260819856077433f,-0.08281804621219635f,-1.5454415082931519f,0.13563674688339233f,0.305400013923645f,-0.3685535192489624f,-0.30845415592193604f,-0.4078262448310852f,0.7521111965179443f,-0.22504742443561554f,1.6817525625228882f,0.01829466223716736f,0.7402373552322388f}, -{-0.5450851917266846f,-1.325493335723877f,0.24740570783615112f,-0.5695751309394836f,0.3641650676727295f,-1.0611701011657715f,0.25593245029449463f,0.29514080286026f,-0.09460391849279404f,0.05305565521121025f,0.11546958982944489f,0.6832703351974487f,0.14349237084388733f,1.1527934074401855f,0.056514471769332886f,0.6130792498588562f}, -{-0.07460365444421768f,-0.3792673945426941f,-0.3288555443286896f,-0.2455163151025772f,-0.24700762331485748f,-0.4440239369869232f,-0.11800059676170349f,0.14122913777828217f,-0.29557308554649353f,0.2819157540798187f,0.260654479265213f,0.4827042520046234f,-0.06022251769900322f,0.44099026918411255f,-0.3194865584373474f,0.6340256929397583f}, -{-0.1879761815071106f,-0.2528689503669739f,-0.29844698309898376f,-0.5101702809333801f,0.339926540851593f,0.3075282871723175f,-0.249517560005188f,0.331373929977417f,-0.4385988116264343f,0.16865456104278564f,0.20783667266368866f,-0.0021506110206246376f,0.23602595925331116f,0.34091079235076904f,0.23831695318222046f,0.06740475445985794f}, -{-0.025915497913956642f,-0.1714746356010437f,0.20589900016784668f,-0.04402639716863632f,0.10800769180059433f,-0.639302134513855f,-0.2483310103416443f,0.1761297583580017f,-0.16761073470115662f,0.28876426815986633f,-0.0992262214422226f,-0.07243049889802933f,-0.3015822470188141f,-0.017708564177155495f,0.06927120685577393f,-0.09717927873134613f}, -{-0.429812490940094f,0.1543487310409546f,0.008588135242462158f,-0.5760452151298523f,-0.2914566993713379f,-0.2223208248615265f,0.013287186622619629f,-0.08880852162837982f,0.1582227200269699f,-0.024031326174736023f,0.3269001841545105f,-0.5358487367630005f,-0.009665273129940033f,-0.29968416690826416f,-0.1702093929052353f,-0.03628617152571678f}, -{-0.34342706203460693f,-0.039361659437417984f,0.06708025932312012f,-0.05964343994855881f,0.043768007308244705f,-0.27679672837257385f,0.27470332384109497f,-0.0833902433514595f,-0.11639530956745148f,0.2393946647644043f,0.49262282252311707f,-0.8204572796821594f,0.01190573163330555f,0.30590832233428955f,0.11447501182556152f,-0.21693718433380127f}, + {-1.8506627082824707f,2.0218918323516846f,0.12024858593940735f,0.334626168012619f,-2.249953269958496f,1.9626299142837524f,-0.1628284603357315f,1.3325554132461548f,-0.2643141448497772f,0.24690963327884674f,-0.190817192196846f,-0.6419653296470642f,-0.385654479265213f,-1.4703359603881836f,-0.2396446317434311f,-0.7596855163574219f}, +{-1.4319499731063843f,1.4720803499221802f,-0.36603355407714844f,-0.0015192287974059582f,-1.7912445068359375f,1.2486926317214966f,-0.3777896761894226f,0.9492644667625427f,-0.07244833558797836f,-0.19318599998950958f,-0.2250930666923523f,-0.468036949634552f,0.13008064031600952f,-1.5212249755859375f,-0.1953967958688736f,-0.31536585092544556f}, +{-0.890915036201477f,0.7970179915428162f,0.33912619948387146f,-0.3751471936702728f,-0.9556958675384521f,0.7455353140830994f,0.2676515281200409f,0.7646156549453735f,-0.14835304021835327f,-0.7684594392776489f,-0.2939259707927704f,-0.40702295303344727f,-0.04098569601774216f,-0.5739985704421997f,0.05209478735923767f,-0.350443959236145f}, +{-0.0880332961678505f,-0.2273148149251938f,0.3703531324863434f,0.19594193994998932f,-0.17067699134349823f,-0.40647760033607483f,-0.10795548558235168f,0.4863579273223877f,0.023037606850266457f,-0.8945105671882629f,0.11969369649887085f,0.15493015944957733f,-0.1403219848871231f,-0.020145311951637268f,-0.27597576379776f,0.1543225646018982f}, +{1.3755062818527222f,-1.1244970560073853f,-0.004794687032699585f,0.10745205730199814f,0.9105810523033142f,-1.2077865600585938f,0.12058994174003601f,-0.8482258915901184f,0.029088687151670456f,-0.2553604543209076f,0.3545044958591461f,0.24097034335136414f,0.0023218640126287937f,1.0849770307540894f,-0.36018112301826477f,0.08965467661619186f}, +{2.90755033493042f,-3.026319742202759f,0.20290347933769226f,0.0943901315331459f,2.5411956310272217f,-2.870671033859253f,0.15389427542686462f,-2.634014844894409f,0.032256871461868286f,1.875529408454895f,-0.20045262575149536f,0.9997451901435852f,-0.12699256837368011f,2.6072731018066406f,-0.38513508439064026f,0.33966103196144104f}, +{0.30216723680496216f,-0.09030109643936157f,-0.2331579178571701f,-0.4601763188838959f,-0.02901097945868969f,-0.27014070749282837f,0.05604562163352966f,-1.2240875959396362f,0.3410864770412445f,2.1281368732452393f,0.16920678317546844f,0.8471516966819763f,-0.19045685231685638f,0.48616722226142883f,-0.14554673433303833f,-0.018513629212975502f}, +{0.1568038910627365f,-0.052679359912872314f,-0.24806702136993408f,0.04960189387202263f,-0.19025251269340515f,-0.2686614692211151f,-0.16704979538917542f,-0.5832833647727966f,0.02708231657743454f,0.4750233590602875f,0.12661993503570557f,0.11257220059633255f,0.31431248784065247f,0.12500332295894623f,0.04009982943534851f,0.17564482986927032f}, +{0.37038499116897583f,0.4679296910762787f,0.09550115466117859f,-0.39122816920280457f,0.07986307144165039f,-0.029025008901953697f,-0.06753402948379517f,-0.8683886528015137f,-0.24924451112747192f,1.3740239143371582f,-0.24858735501766205f,0.3611556887626648f,0.1781640350818634f,0.3319956362247467f,-0.2847418785095215f,0.21208970248699188f}, +{0.14103619754314423f,-0.13035796582698822f,0.17205187678337097f,-0.14981357753276825f,0.4522019326686859f,0.1493782252073288f,-0.2786858379840851f,-0.7821434736251831f,-0.004449290223419666f,1.1047570705413818f,0.020737964659929276f,-0.574953019618988f,0.30793464183807373f,-0.06897160410881042f,0.3247623145580292f,0.007590302266180515f}, +{0.17401696741580963f,0.22213375568389893f,0.34649983048439026f,0.2206556648015976f,-0.01957986131310463f,0.3260992169380188f,-0.1895401030778885f,-0.046695638447999954f,-0.3947817385196686f,-0.95995032787323f,0.3530721664428711f,-1.2572782039642334f,-0.10333867371082306f,-0.34184521436691284f,0.24870619177818298f,-0.44091910123825073f}, +{-0.9943146109580994f,-0.3759954869747162f,-0.3757385015487671f,-0.014625824056565762f,-0.2851690351963043f,0.5389546155929565f,0.1429324448108673f,1.6276763677597046f,-0.1364438533782959f,-4.751498222351074f,-0.3575619161128998f,-1.7067830562591553f,0.09590709954500198f,-0.519068717956543f,0.09779238700866699f,-0.32152608036994934f}, +{-0.2625819146633148f,-0.30365893244743347f,0.18496140837669373f,0.09376431256532669f,0.1606818437576294f,0.36680442094802856f,-0.22405625879764557f,0.7386453747749329f,-0.15395772457122803f,-0.5011937618255615f,-0.07291673868894577f,-0.9210411310195923f,0.050583451986312866f,-0.33904582262039185f,-0.2075144499540329f,-0.6333385705947876f}, +{-0.34100425243377686f,-0.4398183524608612f,0.38466766476631165f,-0.1400693655014038f,-0.09625256061553955f,-0.25562015175819397f,-0.2982172966003418f,0.35427048802375793f,-0.10424912720918655f,1.5073919296264648f,-0.15292727947235107f,-0.5606862902641296f,-0.31030091643333435f,0.5212416648864746f,0.04470124840736389f,-0.14669658243656158f}, +{-0.09396076947450638f,-0.2132670134305954f,0.18900898098945618f,-0.006891733035445213f,0.4393378496170044f,-0.1139921024441719f,0.03916636109352112f,1.1131302118301392f,0.30513760447502136f,2.086885452270508f,-0.23151704668998718f,-0.5726979970932007f,0.09222923964262009f,0.9589197039604187f,0.062258750200271606f,-0.05595967546105385f}, +{-0.24362331628799438f,-0.4561339020729065f,-0.37685394287109375f,-0.15669989585876465f,-0.019076088443398476f,0.05067385360598564f,-0.14507901668548584f,0.8482010960578918f,0.2103574573993683f,1.4738718271255493f,-0.41259074211120605f,-0.17351755499839783f,-0.24652741849422455f,0.9462325572967529f,-0.07684260606765747f,0.026301397010684013f}, +{-0.2469327747821808f,-0.19127419590950012f,0.15568438172340393f,0.013388275168836117f,0.07754073292016983f,-0.16209541261196136f,-0.03859376907348633f,0.6055757403373718f,-0.036313481628894806f,0.8575357794761658f,-0.300382524728775f,0.17809930443763733f,0.11538615822792053f,0.8635719418525696f,0.2742314636707306f,-0.09905195236206055f}, +{-0.06328064203262329f,-0.12922413647174835f,0.19490453600883484f,-0.21009601652622223f,-0.05462188273668289f,-0.2357606142759323f,-0.336474746465683f,-0.0008470341563224792f,-0.3569486737251282f,1.243172287940979f,-0.12590691447257996f,0.29106783866882324f,0.270772784948349f,0.02584521286189556f,-0.2561379373073578f,-0.10021689534187317f}, +{-0.2280615270137787f,-0.01991485431790352f,-0.2776013910770416f,0.18846926093101501f,0.6372979879379272f,-0.25882571935653687f,0.25546005368232727f,-0.7267547845840454f,-0.35274121165275574f,0.19305068254470825f,-0.3666076362133026f,0.20772354304790497f,0.08446492999792099f,0.027577899396419525f,-0.30415377020835876f,-0.5849681496620178f}, +{0.2291831523180008f,0.4364030063152313f,0.1420871913433075f,-0.263975590467453f,-0.17359964549541473f,0.1464209109544754f,-0.13263443112373352f,-0.7673089504241943f,-0.139872744679451f,-0.6755945682525635f,0.12958543002605438f,0.11205241829156876f,0.21903835237026215f,-0.12403884530067444f,0.13351169228553772f,-0.03856346011161804f}, +{-0.2062045931816101f,-0.07650892436504364f,-0.07561364769935608f,0.13947992026805878f,-0.24838335812091827f,-0.196685329079628f,0.14428457617759705f,-0.591441810131073f,-0.33693382143974304f,-0.8057929277420044f,-0.3537156283855438f,-0.3019849359989166f,-0.2002863585948944f,0.08731236308813095f,0.019461065530776978f,0.1173880472779274f}, +{-0.002015499398112297f,-0.24292074143886566f,0.2631795108318329f,-0.5063177347183228f,0.35079896450042725f,-0.6218180060386658f,0.27224990725517273f,-0.9140992164611816f,-0.04535284638404846f,0.02357923984527588f,0.06677521020174026f,-0.10548800230026245f,0.2033764272928238f,0.2849285304546356f,0.06011766195297241f,0.09386705607175827f}, }; const float h2[16][16] = { - {-0.40168216824531555f,0.5186493396759033f,-0.06966331601142883f,-0.9802365303039551f,-0.21907491981983185f,0.6322985291481018f,0.09174512326717377f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,-0.3015476167201996f,0.15160076320171356f,0.12968102097511292f,0.321427583694458f,0.3973703384399414f,0.7016607522964478f}, -{-0.17964878678321838f,-19.759550094604492f,0.057057321071624756f,0.14957964420318604f,-0.35503754019737244f,-18.96450424194336f,-0.6501030325889587f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,-1.3818602561950684f,-7.4136576652526855f,0.33698758482933044f,-1.7448585033416748f,-2.7991631031036377f,-10.538856506347656f}, + {-13.123759269714355f,-10.64799690246582f,-0.06966331601142883f,0.8244877457618713f,-0.21907491981983185f,4.0606865882873535f,0.2356909215450287f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,9.276981353759766f,-0.4540843665599823f,0.056251250207424164f,-1.3451508283615112f,-1.5055451393127441f,4.240088939666748f}, +{6.542728900909424f,0.18463732302188873f,0.057057321071624756f,-0.012478298507630825f,-0.35503754019737244f,-1.2571966648101807f,-0.5783900618553162f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,2.1687819957733154f,-0.8159777522087097f,0.121641606092453f,1.2536906003952026f,-0.015002740547060966f,-3.265460729598999f}, {-0.22745239734649658f,0.003037691116333008f,-0.061119019985198975f,0.35696902871131897f,0.05568113923072815f,0.011741191148757935f,-0.20225946605205536f,-0.08465918898582458f,0.3489862382411957f,0.0687277615070343f,0.31964078545570374f,0.3004753887653351f,0.36063823103904724f,-0.42892736196517944f,0.08652284741401672f,0.027493387460708618f}, -{-0.23776614665985107f,0.20758849382400513f,-0.2894435524940491f,0.21407021582126617f,0.08946844935417175f,-0.8848502039909363f,-0.3794410824775696f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.11218374967575073f,0.07981710880994797f,-0.404754102230072f,0.6458055973052979f,0.37363240122795105f,-0.5949528217315674f}, -{-0.4611620008945465f,0.4566289186477661f,-0.25313520431518555f,0.27121683955192566f,0.036378175020217896f,0.12893712520599365f,-0.19370491802692413f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,-0.2024049311876297f,-0.5216248035430908f,0.10077962279319763f,-0.422469824552536f,-0.2906075417995453f,-0.42898765206336975f}, -{0.08551257848739624f,-0.8909131288528442f,-0.3519742488861084f,0.2551344633102417f,-0.3015052080154419f,1.128373384475708f,-0.6188379526138306f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,-0.31142207980155945f,-0.8247268795967102f,-0.20959392189979553f,0.9023554921150208f,0.3796950578689575f,-2.667577028274536f}, +{0.01388174295425415f,-0.3469332754611969f,-0.2894435524940491f,0.31946173310279846f,0.08946844935417175f,0.24346177279949188f,-0.23805393278598785f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.18906588852405548f,0.3300709128379822f,-0.49054771661758423f,-0.17289645969867706f,0.24430541694164276f,0.12520535290241241f}, +{-0.397769033908844f,-2.3165476322174072f,-0.25313520431518555f,-0.02290874347090721f,0.036378175020217896f,0.5441870093345642f,-0.48299986124038696f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,0.09240629523992538f,-0.6374193429946899f,-0.1255887746810913f,-0.5452685952186584f,-0.7363669276237488f,0.6408634781837463f}, +{-1.168005108833313f,-13.791483879089355f,-0.3519742488861084f,0.4676467478275299f,-0.3015052080154419f,-0.8159934878349304f,-0.5539982914924622f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,-0.3017163574695587f,-0.4974907636642456f,-0.42820867896080017f,1.3066133260726929f,0.27911949157714844f,-1.3278311491012573f}, {-0.1828227937221527f,-0.02554568648338318f,-0.3260969817638397f,0.08422836661338806f,-0.38453540205955505f,-0.25432005524635315f,0.285016268491745f,0.12387624382972717f,-0.0982072651386261f,0.13111665844917297f,-0.03692615032196045f,-0.32796353101730347f,-0.21546880900859833f,0.049302369356155396f,-0.27088475227355957f,-0.4124959409236908f}, -{-0.06052946671843529f,0.42518696188926697f,0.33083590865135193f,-0.3584161102771759f,-0.14358049631118774f,-0.3736359179019928f,-0.21919091045856476f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,0.38830283284187317f,-0.7548213005065918f,-0.31673234701156616f,-0.31882062554359436f,0.2643463909626007f,-0.020919619128108025f}, -{-0.25820738077163696f,0.30604642629623413f,-0.11379697918891907f,0.1305476427078247f,0.041274964809417725f,-0.2976079285144806f,-0.10284432768821716f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,0.011476963758468628f,-0.3197441101074219f,-0.37024784088134766f,-0.2545563280582428f,-0.3413182497024536f,-0.24413029849529266f}, -{-0.17419426143169403f,0.23410338163375854f,-0.13502129912376404f,0.12825390696525574f,0.12987366318702698f,0.10837459564208984f,0.2711336314678192f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.2463141530752182f,0.36859747767448425f,0.3811538517475128f,-0.2518221437931061f,0.0015065826009958982f,-0.22126294672489166f}, -{-0.5818582773208618f,-0.9885985851287842f,0.0457797646522522f,-1.0289779901504517f,-0.03321319818496704f,-0.10241472721099854f,-0.1456492394208908f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,0.03015293926000595f,-0.1720106303691864f,-0.3647043704986572f,-0.26887544989585876f,0.043931350111961365f,-1.271228551864624f}, -{-0.023775232955813408f,0.4065960645675659f,0.3954955041408539f,0.12153828144073486f,0.0033026933670043945f,-0.34759125113487244f,-0.46868860721588135f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,0.4603039026260376f,-0.684657633304596f,0.0820283591747284f,-0.7265788912773132f,0.4195437729358673f,0.7041466236114502f}, -{-0.3727343678474426f,-0.14289318025112152f,-0.15798500180244446f,0.3409014940261841f,-0.37393757700920105f,0.33053267002105713f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.06061609461903572f,-0.3116716742515564f,0.41839322447776794f,-0.10966654866933823f,-0.16619719564914703f,0.13714851438999176f}, -{-0.5560265779495239f,0.7481104135513306f,-0.2018718123435974f,-0.4556296467781067f,0.07545611262321472f,-1.7956639528274536f,-0.5900709629058838f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,1.6568773984909058f,-1.7330076694488525f,-0.16718891263008118f,-2.74723219871521f,0.004431179724633694f,-0.960465669631958f}, +{1.1644668579101562f,-6.186361789703369f,0.33083590865135193f,-0.9413183927536011f,-0.14358049631118774f,-0.26085901260375977f,-0.3549717962741852f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,1.7662361860275269f,-0.38025879859924316f,-0.5093775391578674f,0.701710045337677f,0.2792395055294037f,0.23897208273410797f}, +{-0.2221008688211441f,0.3253232538700104f,-0.11379697918891907f,0.10359980911016464f,0.041274964809417725f,-0.3796563744544983f,-0.10284432768821716f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,0.040156856179237366f,-0.3197441101074219f,-0.37024784088134766f,-0.2742692828178406f,-0.3782183825969696f,-0.23547153174877167f}, +{-1.0379282236099243f,1.424320101737976f,-0.13502129912376404f,-0.43842431902885437f,0.12987366318702698f,0.28802773356437683f,-0.13538013398647308f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,-2.066289186477661f,-0.17734509706497192f,0.18067878484725952f,-0.8891626000404358f,-0.18673075735569f,-0.6008006930351257f}, +{-0.2657378315925598f,-0.027052253484725952f,0.0457797646522522f,-0.38413307070732117f,-0.03321319818496704f,-0.43077635765075684f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.2300442010164261f,0.3545852601528168f,-0.3647043704986572f,0.44146791100502014f,-0.37364575266838074f,-0.3058986961841583f}, +{0.313798725605011f,0.29133400321006775f,0.3954955041408539f,0.4571808874607086f,0.0033026933670043945f,-0.11047647893428802f,-0.32514688372612f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,-0.08039194345474243f,-0.30911344289779663f,-0.14130108058452606f,-0.5991055965423584f,0.17477981746196747f,-0.0376196913421154f}, +{-0.229353666305542f,-0.26048946380615234f,-0.15798500180244446f,0.3036942183971405f,-0.37393757700920105f,0.27425891160964966f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.1427236944437027f,-0.27431198954582214f,0.33350905776023865f,0.0029848215635865927f,-0.10662510991096497f,0.05866997316479683f}, +{-10.753022193908691f,-3.305298089981079f,-0.2018718123435974f,-0.15719115734100342f,0.07545611262321472f,1.8841334581375122f,-0.4831283688545227f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,2.573591709136963f,-0.7771016359329224f,-0.380965918302536f,-1.9606705904006958f,-0.6331924796104431f,-0.42659011483192444f}, {0.4138670265674591f,0.1604653298854828f,0.056746453046798706f,0.036025404930114746f,0.3228367865085602f,-0.07083973288536072f,0.018455177545547485f,0.0059362053871154785f,0.40515169501304626f,0.014240056276321411f,-0.07738298177719116f,0.1407785713672638f,-0.13024571537971497f,-0.29546058177948f,-0.11976784467697144f,-0.35825538635253906f}, -{-0.5551757216453552f,0.8669682145118713f,0.12081471085548401f,-0.34179648756980896f,0.29976895451545715f,-0.03801266476511955f,-0.23086988925933838f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,-0.0883992463350296f,-0.21656711399555206f,-0.19991017878055573f,-1.109067440032959f,0.42645376920700073f,0.903927206993103f}, +{-0.458335280418396f,0.15321379899978638f,0.12081471085548401f,-0.2682785987854004f,0.29976895451545715f,0.0028282348066568375f,-0.31176257133483887f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,-0.278635710477829f,-0.20589298009872437f,-0.43637412786483765f,-0.22767320275306702f,0.04488081485033035f,-0.05814647302031517f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-0.1728317141532898f,0.0832991823554039f,-0.2757801115512848f,-0.014608257450163364f,-0.07343047857284546f,0.3332441747188568f,0.3036012351512909f,-0.2405819296836853f,0.04891335964202881f,-0.11870327591896057f,0.4001283347606659f,0.19365239143371582f,0.22657039761543274f,-0.4084663987159729f,0.15862074494361877f}, -{0.047732532024383545f,0.07508695870637894f,-0.40331459045410156f,-2.776319980621338f,-0.10381913185119629f,-0.224410742521286f,-0.3198729455471039f,0.06247803568840027f,-0.026402181014418602f,-0.9442688226699829f,0.649472713470459f,-0.3128277659416199f,-0.1413102000951767f,-1.077832579612732f,-0.426487535238266f,-0.34495070576667786f}, + {-0.36079341173171997f,-1.6201248168945312f,0.8301860094070435f,-0.48217716813087463f,0.5664730072021484f,0.5938783288002014f,0.3332441747188568f,0.3036012351512909f,-0.3351503312587738f,-0.5333303809165955f,-0.11870327591896057f,0.4001283347606659f,1.8286677598953247f,-0.013096470385789871f,-1.445587158203125f,0.9391236901283264f}, +{0.047732532024383545f,-0.48205438256263733f,-0.5824161171913147f,-0.41216522455215454f,-0.9947847723960876f,1.1071703433990479f,-0.3198729455471039f,0.06247803568840027f,0.07229861617088318f,-0.029003819450736046f,0.15297773480415344f,-0.3128277659416199f,0.4850897490978241f,1.1648766994476318f,-0.20866917073726654f,0.33910253643989563f}, {0.07903262972831726f,0.2790505588054657f,-0.07798504829406738f,0.04248586297035217f,-0.1963958442211151f,-0.19260792434215546f,-0.4038352966308594f,0.015906542539596558f,0.15353140234947205f,0.030178606510162354f,0.2488909661769867f,0.13805970549583435f,-0.0816211998462677f,-0.20733052492141724f,-0.3036302626132965f,0.054825395345687866f}, -{-0.30922991037368774f,-0.4433991611003876f,0.4574945271015167f,0.09743720293045044f,-0.0694722980260849f,0.14645597338676453f,0.20021501183509827f,0.07002416253089905f,-0.24844947457313538f,-0.365601509809494f,-0.2854161858558655f,0.41021624207496643f,0.10841058939695358f,0.03622414171695709f,0.07073167711496353f,-0.040545202791690826f}, +{-0.30922991037368774f,-0.2953498363494873f,0.3023351728916168f,-0.3808897137641907f,-0.2341996431350708f,0.06336987763643265f,0.20021501183509827f,0.07002416253089905f,-0.25833481550216675f,-0.37944620847702026f,0.13192829489707947f,0.41021624207496643f,-0.08585329353809357f,-0.06085298955440521f,-0.05164620652794838f,-0.6447161436080933f}, {-0.39607733488082886f,-0.05481579899787903f,0.1976260244846344f,0.022423356771469116f,0.16892847418785095f,-0.27518749237060547f,0.16012099385261536f,0.3626593053340912f,-0.08640444278717041f,-0.11053556203842163f,-0.10529157519340515f,-0.31317979097366333f,-0.1530032455921173f,-0.1336749792098999f,0.22959044575691223f,0.19986507296562195f}, -{-0.37449589371681213f,0.02758697420358658f,-0.748950719833374f,3.097226619720459f,0.16600477695465088f,0.3010225296020508f,-0.18732719123363495f,0.22384825348854065f,-0.39487534761428833f,-0.2469484806060791f,-1.296645164489746f,0.03210585191845894f,1.1341166496276855f,-5.499073505401611f,0.7008980512619019f,-0.3663637042045593f}, -{0.4110594093799591f,0.41326889395713806f,-0.1446264535188675f,0.2394024282693863f,0.15542545914649963f,0.02894638292491436f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.09694360196590424f,0.23209775984287262f,0.21062560379505157f,-0.3391006588935852f}, +{-0.37449589371681213f,0.5301491618156433f,-0.6153388023376465f,0.015763333067297935f,0.3733992576599121f,1.0108109712600708f,-0.18732719123363495f,0.07622884958982468f,-0.8597542643547058f,-0.8733744025230408f,-0.3998960852622986f,-0.10382425785064697f,-0.6340463757514954f,0.46026381850242615f,0.46378228068351746f,-1.0209071636199951f}, +{0.4110594093799591f,0.16155977547168732f,-0.2606540620326996f,0.37246426939964294f,0.19412796199321747f,-0.17604853212833405f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.23844516277313232f,0.03825477510690689f,0.24671794474124908f,-0.3391006588935852f}, {-0.40892091393470764f,0.043769627809524536f,-0.3867315948009491f,0.25968697667121887f,0.3424709737300873f,-0.051169753074645996f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,-0.0003446042537689209f,-0.2742875814437866f,-0.36560842394828796f,0.07994696497917175f,0.005298197269439697f}, {0.10697010159492493f,-0.12228584289550781f,-0.37870171666145325f,0.21184906363487244f,-0.37222859263420105f,-0.17138728499412537f,-0.1382003128528595f,0.3493293821811676f,-0.360889196395874f,-0.3875247836112976f,0.42142823338508606f,-0.3482915461063385f,-0.3289247751235962f,-0.2186824083328247f,0.09620395302772522f,-0.06898030638694763f}, {0.2847062647342682f,0.018552124500274658f,0.11435768008232117f,0.36562982201576233f,-0.047046810388565063f,0.30447837710380554f,0.2430230677127838f,0.2909286320209503f,-0.2802048921585083f,0.18043199181556702f,0.41849127411842346f,-0.287167489528656f,0.24394884705543518f,-0.14084559679031372f,-0.10168051719665527f,0.010465055704116821f}, -{0.15459725260734558f,0.9851001501083374f,-0.5585569143295288f,-4.768768787384033f,-4.561844348907471f,-0.06768854707479477f,-0.08742031455039978f,0.05785742402076721f,-0.7121787667274475f,-0.7615283727645874f,-0.2505240738391876f,-0.4624474048614502f,0.17736832797527313f,0.07977358996868134f,1.0232466459274292f,0.12484536319971085f}, -{-0.408692330121994f,-0.6701602935791016f,0.3410312831401825f,3.574692726135254f,1.6209317445755005f,-0.1792183518409729f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,2.006563901901245f,-0.15693505108356476f,-3.104768991470337f,0.31507769227027893f}, -{-0.2991822361946106f,0.3794580399990082f,-0.07897943258285522f,-0.05932474136352539f,0.08582660555839539f,0.24227938055992126f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.015840977430343628f,-0.13475483655929565f,0.36124154925346375f,-0.16869547963142395f}, -{-0.2675279378890991f,0.6613599061965942f,-0.5254913568496704f,0.5071489214897156f,-0.8461319208145142f,-0.028701091185212135f,-0.32875844836235046f,-0.31893211603164673f,-0.8966178297996521f,-1.0070687532424927f,-4.600563049316406f,-0.5409274101257324f,2.186650276184082f,-9.456685066223145f,0.5640637874603271f,0.011688347905874252f}, -{-0.015470266342163086f,-1.0990486145019531f,0.36706429719924927f,-2.238311290740967f,1.893033504486084f,-0.9363606572151184f,0.05196094512939453f,-0.008358269929885864f,-0.43764856457710266f,-0.5347727537155151f,-0.9336159825325012f,-0.2734082341194153f,0.16708572208881378f,-0.05967127904295921f,-0.8606027364730835f,-0.6590554714202881f}, -{0.1863725483417511f,0.10718924552202225f,-0.20982491970062256f,6.906591415405273f,3.032275915145874f,0.411905974149704f,0.04860696196556091f,0.17769548296928406f,-0.2722950279712677f,0.3353809714317322f,0.8508809804916382f,0.03773829713463783f,2.3911309242248535f,4.472320079803467f,0.3127724826335907f,-0.14473260939121246f}, +{0.15459725260734558f,0.6257462501525879f,2.4722132682800293f,-0.2541096806526184f,1.1974189281463623f,0.5241444706916809f,-0.08742031455039978f,-0.0797993466258049f,-0.08179803192615509f,0.7537839412689209f,0.1268840730190277f,-0.30447322130203247f,-4.300448894500732f,-0.528559684753418f,0.21849340200424194f,-1.7872956991195679f}, +{-0.408692330121994f,-0.22055906057357788f,0.036167971789836884f,0.0922636091709137f,0.08667898178100586f,-0.1559617668390274f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.4383557140827179f,-0.2787511944770813f,-0.3355647027492523f,0.07012176513671875f}, +{-0.2991822361946106f,0.13270005583763123f,0.09838561713695526f,-0.05932474136352539f,0.2640399932861328f,0.06369897723197937f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.1913551241159439f,-0.30303725600242615f,0.1539403647184372f,-0.01897444948554039f}, +{-0.2675279378890991f,-6.733436107635498f,0.04663084074854851f,-0.016923164948821068f,0.02508571371436119f,-0.15193060040473938f,-0.32875844836235046f,-0.31893211603164673f,-0.8268672227859497f,-1.467612385749817f,-0.44607219099998474f,-0.5477458834648132f,0.5839250683784485f,-0.759961724281311f,0.09728594124317169f,0.6874459981918335f}, +{-0.015470266342163086f,-1.3787834644317627f,0.30659225583076477f,0.26224443316459656f,0.29704105854034424f,-0.33337152004241943f,0.05196094512939453f,-0.008358269929885864f,-0.4470785856246948f,-0.45836886763572693f,0.13179203867912292f,-0.11511552333831787f,1.5568339824676514f,-1.396690845489502f,-0.6800358295440674f,0.5716347098350525f}, +{0.1863725483417511f,-7.471870422363281f,-2.1432347297668457f,-0.6515491008758545f,-2.701878309249878f,-0.6873466372489929f,0.04860696196556091f,0.03839363902807236f,-0.191893070936203f,-0.4771784543991089f,-0.5917513966560364f,-0.07967619597911835f,-4.557742595672607f,0.9240701198577881f,-0.35937249660491943f,-1.0610584020614624f}, }; -const float hout[16] = { 0.45773375034332275f,0.3902415931224823f,-0.11512358486652374f,-0.18819743394851685f,-0.7611111402511597f,0.141798734664917f,0.0030125975608825684f,0.15066689252853394f,-0.07033118605613708f,-0.07679157704114914f,-0.12265626341104507f,-0.1242092102766037f,-0.20101481676101685f,0.2781880497932434f,0.12302208691835403f,-0.00921870581805706f }; +const float hout[16] = { 0.45773375034332275f,0.08443395793437958f,-0.24364621937274933f,0.018310023471713066f,0.10100215673446655f,0.1674295961856842f,0.0030125975608825684f,0.0690273717045784f,-0.030205409973859787f,-0.1419939547777176f,0.06930676847696304f,-0.1930040568113327f,-0.19178131222724915f,0.21673108637332916f,0.06627470254898071f,-0.20579802989959717f }; -const float b1[16] = { 0.6857439279556274f,0.8585952520370483f,-1.7145336866378784f,0.4170946180820465f,1.0364162921905518f,1.8229438066482544f,-0.058932315558195114f,0.5788186192512512f,0.48582303524017334f,-0.9250008463859558f,0.3594502806663513f,1.5126398801803589f,-0.3694119453430176f,-1.401212215423584f,-1.087764859199524f,1.1468214988708496f }; +const float b1[16] = { 0.731039822101593f,0.8990240097045898f,-1.7145336866378784f,0.3026110529899597f,1.0379314422607422f,1.0104310512542725f,-0.058932315558195114f,0.8992959856987f,0.535614550113678f,-1.3062801361083984f,0.604394793510437f,0.8861756920814514f,-0.41538795828819275f,-1.6284390687942505f,-1.087764859199524f,0.9179224371910095f }; -const float b2[16] = { -0.46634921431541443f,-1.174963116645813f,-1.4564176797866821f,-0.7021169662475586f,-0.6939148902893066f,1.0442237854003906f,-0.016787389293313026f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,0.9218783378601074f,1.205435872077942f,-0.07918518036603928f,1.5303215980529785f,1.0930001735687256f,2.110299587249756f }; +const float b2[16] = { 0.7752900719642639f,0.6012373566627502f,-1.4564176797866821f,-0.6743422150611877f,-0.6939148902893066f,-0.04699823260307312f,0.03530285507440567f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,-0.2669457793235779f,0.14791935682296753f,-0.29172441363334656f,1.7034413814544678f,-0.09204483032226562f,0.5913106799125671f }; -const float b3[16] = { -1.963319182395935f,-0.47111451625823975f,-0.1743324249982834f,0.8459889888763428f,0.4399511516094208f,-0.047738414257764816f,-0.45353031158447266f,-0.6562485098838806f,-0.035808175802230835f,-0.08489542454481125f,-1.1606186628341675f,-0.10742253065109253f,-0.42785224318504333f,-0.04730849713087082f,-1.0170482397079468f,-0.5944331884384155f }; +const float b3[16] = { -1.963319182395935f,-0.4255251884460449f,1.0348836183547974f,-0.12362325936555862f,0.03665608540177345f,0.27929219603538513f,-0.45353031158447266f,-0.7946745753288269f,-0.00050879962509498f,1.6810349225997925f,-0.45526382327079773f,-0.24638405442237854f,-3.330601215362549f,0.33003854751586914f,-1.4941415786743164f,0.4397965669631958f }; -const float bout[1] = { -0.47615566849708557f }; +const float bout[1] = { -0.07078884541988373f }; float VALVE_POS_RAW_NN = 0.0f; @@ -398,10 +393,10 @@ input_NN[ind] = (pos.sen / ENC_PULSE_PER_POSITION) / 60.0f; ind = ind + 1; - for(int i=0; i<numfuture_x; i++) { - input_NN[ind] = x_future[time_interval*i+time_interval] / 60.0f; - ind = ind + 1; - } +// for(int i=0; i<numfuture_x; i++) { +// input_NN[ind] = x_future[time_interval*i+time_interval] / 60.0f; +// ind = ind + 1; +// } for(int i=0; i<numpast_f; i++) { input_NN[ind] = f_past[time_interval*i] / 10000.0f + 0.5f;