![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
distribution-201229
Diff: main.cpp
- Revision:
- 145:35f5ec0d7e56
- Parent:
- 144:fb8c3025963c
diff -r fb8c3025963c -r 35f5ec0d7e56 main.cpp --- a/main.cpp Thu Oct 08 07:35:31 2020 +0000 +++ b/main.cpp Thu Oct 08 11:33:17 2020 +0000 @@ -1,4 +1,4 @@ -//201008-5 +//201008-7 #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -193,77 +193,72 @@ float input_NN[num_input] = { 0.0f }; const float h1[num_input][16] = { - {-2.3152809143066406f,1.727402925491333f,0.12024858593940735f,0.3642372488975525f,-2.551915168762207f,1.6625466346740723f,-0.1628284603357315f,-0.2717422544956207f,-0.23101584613323212f,-0.023556355386972427f,-0.213934063911438f,-0.9510829448699951f,-0.46818628907203674f,-1.5005090236663818f,-0.2396446317434311f,-0.5505883693695068f}, -{-1.8617732524871826f,1.2280305624008179f,-0.36603355407714844f,0.020320722833275795f,-1.852152943611145f,0.9200283288955688f,-0.3777896761894226f,-0.26674363017082214f,-0.0329865925014019f,0.21348443627357483f,-0.24816828966140747f,-0.7358936667442322f,0.04711906611919403f,-1.5031263828277588f,-0.1953967958688736f,-0.21457244455814362f}, -{-1.328779697418213f,0.6305422186851501f,0.33912619948387146f,-0.36133837699890137f,-0.8119953870773315f,0.42370355129241943f,0.2676515281200409f,0.02444564737379551f,-0.10264942795038223f,0.2200983166694641f,-0.316930890083313f,-0.648487389087677f,-0.12411943823099136f,-0.5221869945526123f,0.05209478735923767f,-0.36078131198883057f}, -{-0.5197798013687134f,-0.32913661003112793f,0.3703531324863434f,0.20121149718761444f,0.17911207675933838f,-0.7240257859230042f,-0.10795548558235168f,0.3901039958000183f,0.0750034898519516f,0.3478025794029236f,0.09678419679403305f,0.0063720084726810455f,-0.22296254336833954f,0.06852824240922928f,-0.27597576379776f,0.02640494890511036f}, -{1.0433883666992188f,-1.2392282485961914f,-0.004794687032699585f,0.1031724065542221f,1.4619780778884888f,-1.5678507089614868f,0.12058994174003601f,0.1821904182434082f,0.08734194189310074f,0.17816007137298584f,0.33168479800224304f,0.4059227406978607f,-0.07882260531187057f,1.2437946796417236f,-0.36018112301826477f,-0.16798365116119385f}, -{2.857693910598755f,-3.3041610717773438f,0.20290347933769226f,0.07956814765930176f,3.318584680557251f,-3.3711345195770264f,0.15389427542686462f,0.06304170936346054f,0.09683135896921158f,0.18959861993789673f,-0.22322161495685577f,1.841825246810913f,-0.20501361787319183f,2.939310073852539f,-0.38513508439064026f,-0.0713680163025856f}, -{0.6324058771133423f,-0.43518802523612976f,-0.2331579178571701f,-0.3590847849845886f,-0.19355417788028717f,-0.17370332777500153f,0.05604562163352966f,-0.6124011278152466f,0.31069356203079224f,0.010415825061500072f,0.15558111667633057f,0.9956388473510742f,-0.26913198828697205f,1.016658067703247f,-0.14554673433303833f,-0.3392884135246277f}, -{0.44745802879333496f,-0.45198550820350647f,-0.24806702136993408f,0.13153602182865143f,-0.3461902439594269f,-0.2838374674320221f,-0.16704979538917542f,-0.5994587540626526f,-0.003078911919146776f,0.05557386949658394f,0.11294785887002945f,0.6535332202911377f,0.2496033012866974f,0.5708394646644592f,0.04009982943534851f,-0.12518605589866638f}, -{0.5713577270507812f,0.1668863445520401f,0.09550115466117859f,-0.32965824007987976f,-0.1708855777978897f,0.03479478880763054f,-0.06753402948379517f,-0.644003689289093f,-0.2797917127609253f,0.2735665440559387f,-0.26223233342170715f,0.6971666812896729f,0.12468379735946655f,0.49515432119369507f,-0.2847418785095215f,-0.1023692935705185f}, -{0.16310913860797882f,-0.11523257941007614f,0.17205187678337097f,-0.10984060168266296f,0.13215506076812744f,0.39142823219299316f,-0.2786858379840851f,-0.3326667249202728f,-0.03540360555052757f,-0.48883235454559326f,0.007313740439713001f,-1.0144288539886475f,0.2633468806743622f,-0.301626056432724f,0.3247623145580292f,-0.3123617470264435f}, -{0.09060637652873993f,0.751677393913269f,0.34649983048439026f,0.238347128033638f,-0.18993692100048065f,0.7072498202323914f,-0.1895401030778885f,-0.24043914675712585f,-0.4269353449344635f,-0.02136058919131756f,0.33979934453964233f,-2.280555486679077f,-0.13881582021713257f,-0.8600243330001831f,0.24870619177818298f,-0.6370449066162109f}, -{-1.2227174043655396f,0.8980315923690796f,-0.3757385015487671f,-0.016326511278748512f,-0.37785834074020386f,1.2150253057479858f,0.1429324448108673f,0.1361755132675171f,-0.16958828270435333f,0.14431153237819672f,-0.3707931339740753f,-2.920011520385742f,0.0691303163766861f,-1.61436927318573f,0.09779238700866699f,-0.41666141152381897f}, -{-0.3208516538143158f,0.4696144163608551f,0.18496140837669373f,0.10039933770895004f,0.34736987948417664f,0.8090188503265381f,-0.22405625879764557f,-0.032775260508060455f,-0.18931987881660461f,-0.22892595827579498f,-0.08640900999307632f,-2.58586049079895f,0.04208873212337494f,-0.8988630771636963f,-0.2075144499540329f,-0.6604486107826233f}, -{0.16262409090995789f,-0.01671232096850872f,0.38466766476631165f,-0.14667004346847534f,0.18218474090099335f,-0.10421261936426163f,-0.2982172966003418f,-0.40107446908950806f,-0.1390027552843094f,-0.2559940814971924f,-0.166481614112854f,-1.602246642112732f,-0.3095857799053192f,-0.24121171236038208f,0.04470124840736389f,-0.15184690058231354f}, -{0.5174210667610168f,-0.04763205349445343f,0.18900898098945618f,-0.028117891401052475f,0.5945087671279907f,-0.10929259657859802f,0.03916636109352112f,0.16368715465068817f,0.2704102098941803f,0.033244144171476364f,-0.24501635134220123f,-1.0999691486358643f,0.10306726396083832f,0.03853769227862358f,0.062258750200271606f,-0.027132803574204445f}, -{0.2914155125617981f,-0.4265623986721039f,-0.37685394287109375f,-0.1996072381734848f,-0.019203273579478264f,0.009786401875317097f,-0.14507901668548584f,-0.0853961631655693f,0.17501948773860931f,-0.047144565731287f,-0.4260883331298828f,-0.3157176971435547f,-0.22497230768203735f,0.23816914856433868f,-0.07684260606765747f,0.05888473987579346f}, -{0.13738799095153809f,-0.22142702341079712f,0.15568438172340393f,-0.058044277131557465f,-0.0232255682349205f,-0.14742983877658844f,-0.03859376907348633f,-0.050225719809532166f,-0.07352999597787857f,0.041070763021707535f,-0.3139238655567169f,0.17045529186725616f,0.14994587004184723f,0.5364378690719604f,0.2742314636707306f,-0.06731603294610977f}, -{0.15600940585136414f,-0.16535674035549164f,0.19490453600883484f,-0.3138192892074585f,-0.3106350898742676f,-0.08246537297964096f,-0.336474746465683f,0.05921122804284096f,-0.39584556221961975f,-0.15033116936683655f,-0.13937796652317047f,0.12563101947307587f,0.31835269927978516f,0.17374621331691742f,-0.2561379373073578f,-0.11289579421281815f}, -{-0.18690593540668488f,-0.06943024694919586f,-0.2776013910770416f,0.05439651012420654f,0.33863118290901184f,-0.03686759993433952f,0.25546005368232727f,-0.350205659866333f,-0.3939896523952484f,-0.004937915131449699f,-0.38015687465667725f,0.1677393615245819f,0.14523454010486603f,0.4078146517276764f,-0.30415377020835876f,-0.5786517262458801f}, -{0.26198509335517883f,0.24746471643447876f,0.1420871913433075f,-0.4235791265964508f,-0.377158522605896f,0.3205195367336273f,-0.13263443112373352f,-0.400607705116272f,-0.1832873523235321f,0.01716863363981247f,0.11593614518642426f,0.543384850025177f,0.2921818196773529f,0.42891642451286316f,0.13351169228553772f,0.00543095450848341f}, -{-0.2991099953651428f,-0.41585615277290344f,-0.07561364769935608f,-0.03986741602420807f,-0.4765874743461609f,-0.01874842494726181f,0.14428457617759705f,-0.02254398912191391f,-0.383146733045578f,-0.3092406094074249f,-0.3674323558807373f,0.6129317879676819f,-0.11757314205169678f,0.49564477801322937f,0.019461065530776978f,0.1277700960636139f}, -{-0.21371565759181976f,-0.8026935458183289f,0.2631795108318329f,-0.7004210948944092f,0.1280365288257599f,-0.4730685353279114f,0.27224990725517273f,0.006050639320164919f,-0.09381511807441711f,0.08090905845165253f,0.05304040387272835f,1.5589348077774048f,0.29210609197616577f,0.5046173930168152f,0.06011766195297241f,0.05217600241303444f}, + {-1.202144980430603f,1.138988971710205f,0.12903714179992676f,0.4784081280231476f,-2.007096529006958f,1.1101239919662476f,-0.17472904920578003f,1.376711368560791f,-0.6657677292823792f,-1.2683919668197632f,-0.2366894781589508f,-2.119908571243286f,-0.27179795503616333f,-0.2513915002346039f,-0.2571594715118408f,-2.217491626739502f}, +{-1.038386583328247f,0.9783099293708801f,-0.3927857577800751f,0.1331273317337036f,-1.6192518472671509f,0.7398083209991455f,-0.4054011106491089f,0.999164342880249f,-0.3204660713672638f,-0.7893865704536438f,-0.2734762132167816f,-1.7904084920883179f,0.22786423563957214f,-0.6183355450630188f,-0.20967772603034973f,-1.7576642036437988f}, +{-0.8073722124099731f,0.723030686378479f,0.36391180753707886f,-0.25218313932418823f,-0.8648297190666199f,0.646933913230896f,0.2872133255004883f,0.9005036354064941f,-0.26115748286247253f,-0.5288271307945251f,-0.3473871052265167f,-1.568228840827942f,-0.010325154289603233f,0.032464317977428436f,0.05590221285820007f,-1.797452688217163f}, +{-0.30040138959884644f,-0.03466230630874634f,0.39742106199264526f,0.37627866864204407f,-0.06165529042482376f,-0.24948622286319733f,-0.11584559082984924f,0.6195026636123657f,0.0672391802072525f,0.11928713321685791f,0.09644106775522232f,-0.6219649910926819f,-0.1723935604095459f,0.1230471059679985f,-0.2961459457874298f,-1.0144660472869873f}, +{0.9413514733314514f,-0.9783564209938049f,-0.0051451027393341064f,0.2973308861255646f,1.2383958101272583f,-1.0510715246200562f,0.1294034719467163f,-0.8967423439025879f,0.22686034440994263f,1.0535863637924194f,0.3483673930168152f,0.28839874267578125f,-0.07595616579055786f,0.475301057100296f,-0.3865056037902832f,-0.2590292990207672f}, +{2.2739834785461426f,-3.384673595428467f,0.21773302555084229f,0.2994205355644226f,3.3027589321136475f,-3.102123737335205f,0.16514194011688232f,-3.0555598735809326f,0.3947591781616211f,2.9011330604553223f,-0.2471718192100525f,2.413551092147827f,-0.27255699038505554f,0.875239372253418f,-0.4132833778858185f,1.5249680280685425f}, +{-0.0025823377072811127f,0.5788406729698181f,-0.2501986622810364f,-0.6869844198226929f,0.013595464639365673f,0.958987295627594f,0.06014183163642883f,-0.6783658266067505f,0.2335476279258728f,-0.15955637395381927f,0.14809231460094452f,0.49601414799690247f,-0.17972350120544434f,-0.01836634986102581f,-0.15618428587913513f,1.9472782611846924f}, +{-0.5333747863769531f,0.6159882545471191f,-0.26619744300842285f,-0.10663940757513046f,-0.6672677397727966f,0.7491434812545776f,-0.17925891280174255f,0.45909467339515686f,-0.061611875891685486f,-0.5273573398590088f,0.10323914140462875f,-0.1594064086675644f,0.3640030324459076f,0.04273512586951256f,0.04303058981895447f,0.4016958773136139f}, +{-0.06486926227807999f,0.5101504325866699f,0.10248100757598877f,-0.6076595187187195f,-0.22489143908023834f,0.28914013504981995f,-0.07246989011764526f,-0.32467958331108093f,-0.3318542540073395f,0.43399131298065186f,-0.29930150508880615f,0.8827233910560608f,0.2215290069580078f,0.17675165832042694f,-0.30555272102355957f,1.0407618284225464f}, +{0.0067978473380208015f,-0.538397490978241f,0.18462657928466797f,-0.3743363916873932f,0.18972061574459076f,-0.09740876406431198f,-0.2990540862083435f,-0.5601083636283875f,-0.039114855229854584f,0.16344060003757477f,-0.010178256779909134f,0.4692024886608124f,0.36460021138191223f,-0.18887411057949066f,0.3484981060028076f,1.2080103158950806f}, +{0.5042862892150879f,-0.23018865287303925f,0.37182438373565674f,0.0031008694786578417f,-0.13351543247699738f,-0.37750890851020813f,-0.20339298248291016f,-0.5399224162101746f,-0.4469622075557709f,0.7113228440284729f,0.34657230973243713f,0.5766669511795044f,-0.07425376027822495f,0.058319900184869766f,0.26688337326049805f,0.7508887648582458f}, +{-0.36814379692077637f,-0.5277806520462036f,-0.40320003032684326f,-0.26136666536331177f,-0.2674432694911957f,-0.26984360814094543f,0.1533789038658142f,0.007386255543678999f,-0.17324255406856537f,0.6930100321769714f,-0.41594198346138f,0.6991134881973267f,0.13697238266468048f,0.04665316268801689f,0.10493969917297363f,0.6447699666023254f}, +{-0.10107079893350601f,-0.23446384072303772f,0.19847965240478516f,-0.11969888210296631f,-0.07624413073062897f,0.021741967648267746f,-0.2404318004846573f,-0.14804726839065552f,-0.20712880790233612f,0.17828989028930664f,-0.11077233403921127f,0.1089673861861229f,0.08429888635873795f,0.060614317655563354f,-0.22268100082874298f,0.13039818406105042f}, +{-0.22510682046413422f,-0.12380469590425491f,0.4127817749977112f,-0.3654475212097168f,-0.4933675229549408f,-0.36989352107048035f,-0.32001304626464844f,-0.5990984439849854f,-0.17157448828220367f,0.11538881808519363f,-0.19669756293296814f,0.046649251133203506f,-0.32045069336891174f,-0.04418804123997688f,0.0479682981967926f,0.4848869740962982f}, +{0.08632653206586838f,0.06087305769324303f,0.20282304286956787f,-0.21891111135482788f,0.13672329485416412f,-0.18774953484535217f,0.04202890396118164f,0.043800003826618195f,0.25277137756347656f,0.3155035078525543f,-0.2811494767665863f,-0.37795940041542053f,0.09589854627847672f,-0.07150355726480484f,0.0668090283870697f,0.3614422380924225f}, +{-0.14654578268527985f,-0.3255223035812378f,-0.40439701080322266f,-0.3830048739910126f,-0.2781727612018585f,-0.08479150384664536f,-0.15568238496780396f,-0.3112363815307617f,0.14826036989688873f,0.26614072918891907f,-0.47562071681022644f,-0.1283193975687027f,-0.2787332534790039f,-0.02893819846212864f,-0.08245879411697388f,0.2619592249393463f}, +{-0.1407018005847931f,-0.28579166531562805f,0.16706281900405884f,-0.21144752204418182f,-0.025171607732772827f,-0.4996216595172882f,-0.041414469480514526f,-0.4635230600833893f,-0.10190882533788681f,0.5193468332290649f,-0.3552822470664978f,0.2423761785030365f,0.10444391518831253f,0.3413086235523224f,0.29427415132522583f,-0.02577020600438118f}, }; const float h2[16][16] = { - {-0.2627347707748413f,1.6072235107421875f,-0.06966331601142883f,1.3059860467910767f,-0.21907491981983185f,-10.074268341064453f,-0.10165838152170181f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,1.889585018157959f,-0.4408711791038513f,0.09407905489206314f,-2.1551506519317627f,-1.681544303894043f,-8.785170555114746f}, -{-0.07196462154388428f,-0.46957844495773315f,0.057057321071624756f,-0.3067782521247864f,-0.35503754019737244f,-3.547255277633667f,-0.42634716629981995f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,-0.7903809547424316f,-0.6991819143295288f,0.27004608511924744f,0.7093417644500732f,0.9480265378952026f,-2.6635963916778564f}, + {-0.42087849974632263f,0.4165714979171753f,-0.06966331601142883f,-0.40978044271469116f,-0.21907491981983185f,0.19977861642837524f,-0.09562018513679504f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,-5.7234206199646f,-0.3770526647567749f,-2.265185832977295f,-1.3839008808135986f,-0.46374428272247314f,-0.3703479766845703f}, +{0.10605034232139587f,-0.8491718769073486f,0.057057321071624756f,-0.11637905985116959f,-1.471933126449585f,-2.3849689960479736f,-0.678670346736908f,-0.4641587734222412f,-0.33757925033569336f,0.2895788848400116f,-3.7726151943206787f,-0.825717568397522f,-0.4287202060222626f,1.856231927871704f,-0.3886423408985138f,-0.8368627429008484f}, {-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.006364033091813326f,-0.2805274426937103f,-0.2894435524940491f,0.22353897988796234f,0.08946844935417175f,0.3361161947250366f,-0.23805393278598785f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.2456456422805786f,0.38107261061668396f,-0.4747326970100403f,-0.23024532198905945f,0.21823757886886597f,0.13803395628929138f}, -{-0.3554824888706207f,3.049980401992798f,-0.25313520431518555f,0.3931412994861603f,0.036378175020217896f,-2.617460012435913f,-0.5512491464614868f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,-0.678700864315033f,-0.7182751297950745f,0.033540356904268265f,-0.06770995259284973f,-2.3080103397369385f,-1.9733433723449707f}, -{0.20959323644638062f,-1.3502219915390015f,-0.3519742488861084f,0.18502606451511383f,-0.3015052080154419f,-3.7923583984375f,-0.7683287262916565f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,-0.8958200216293335f,-0.34072569012641907f,-0.27347302436828613f,0.9521313309669495f,1.0914380550384521f,-2.391331911087036f}, +{0.01821889728307724f,-0.19988501071929932f,-0.2894435524940491f,0.5687466859817505f,0.08946844935417175f,0.4089488089084625f,-0.23805393278598785f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,0.1993970274925232f,0.28493621945381165f,-0.5520196557044983f,-0.30905404686927795f,0.2588307857513428f,0.06752173602581024f}, +{-0.4842865467071533f,0.5623611807823181f,-0.25313520431518555f,-0.015972860157489777f,-2.685121536254883f,-0.8270378112792969f,-0.6444149613380432f,-0.27048569917678833f,-0.024399548768997192f,-0.39465832710266113f,-1.3381013870239258f,-0.9601086378097534f,-0.23603275418281555f,-7.192060947418213f,-0.6448869705200195f,-0.5070762038230896f}, +{0.26964879035949707f,-0.20627757906913757f,-0.3519742488861084f,0.08445581048727036f,-0.5232159495353699f,-1.5471696853637695f,-0.7417458295822144f,-0.18649421632289886f,-0.23047015070915222f,0.3579089343547821f,-1.5071357488632202f,-0.45861613750457764f,-1.9862370491027832f,0.5577003955841064f,-0.024327976629137993f,-0.8124467134475708f}, {-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.09947510808706284f,0.35010796785354614f,0.33083590865135193f,-0.3367353081703186f,-0.14358049631118774f,-0.36243200302124023f,-0.09043094515800476f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,0.31178247928619385f,-0.31911033391952515f,-0.41125836968421936f,0.2665112614631653f,0.01156060304492712f,0.12491219490766525f}, -{-0.2314327508211136f,0.4525166153907776f,-0.11379697918891907f,-0.09526991099119186f,0.041274964809417725f,-0.2055896818637848f,-0.10284432768821716f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,0.10668562352657318f,-0.3197441101074219f,-0.37024784088134766f,-0.3530832827091217f,-0.4519219398498535f,-0.12629814445972443f}, -{-0.1665608137845993f,0.3012998402118683f,-0.13502129912376404f,0.054572269320487976f,0.12987366318702698f,0.20264874398708344f,0.2711336314678192f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,0.3255550265312195f,0.36860600113868713f,0.3811538517475128f,-0.324370801448822f,-0.07046277821063995f,-0.14053338766098022f}, -{-0.22478652000427246f,-0.01952047273516655f,0.0457797646522522f,-0.36477410793304443f,-0.03321319818496704f,-0.44883063435554504f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.22648464143276215f,0.3545852601528168f,-0.3647043704986572f,0.42692625522613525f,-0.38498252630233765f,-0.2930787205696106f}, -{0.1855839043855667f,-0.21992193162441254f,0.3954955041408539f,0.39627113938331604f,0.0033026933670043945f,-1.2386260032653809f,-0.293239563703537f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,0.059261854737997055f,-0.33992287516593933f,0.014869287610054016f,-0.669883668422699f,0.249106764793396f,-0.41038769483566284f}, -{-0.3410651385784149f,-0.24929744005203247f,-0.15798500180244446f,0.5034734606742859f,-0.37393757700920105f,0.23025217652320862f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.15765021741390228f,-0.3137330710887909f,0.3513602316379547f,-0.04629771038889885f,-0.24852626025676727f,0.07677663862705231f}, -{-0.45097577571868896f,-0.13339103758335114f,-0.2018718123435974f,0.06062299385666847f,0.07545611262321472f,1.9103381633758545f,-0.46714287996292114f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,1.649477243423462f,-0.6026387214660645f,-0.2412213385105133f,-1.874483585357666f,-0.12564484775066376f,-0.35405778884887695f}, +{-0.0016780151054263115f,-0.17736129462718964f,0.33083590865135193f,-0.8090094327926636f,-2.097384214401245f,-2.0368118286132812f,-0.572920560836792f,-0.4613488018512726f,0.2600560486316681f,-0.37898191809654236f,-2.721445083618164f,-0.653968334197998f,-0.1349858194589615f,1.660499930381775f,-0.22006866335868835f,0.04596048220992088f}, +{-0.31423863768577576f,0.341561883687973f,-0.11379697918891907f,-0.23742690682411194f,0.041274964809417725f,-0.35426101088523865f,-0.256329745054245f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,-0.4106711745262146f,-0.4447551667690277f,-0.518744945526123f,-0.4609438180923462f,-0.48924964666366577f,-0.37356749176979065f}, +{-0.6705074906349182f,0.2682148516178131f,-0.13502129912376404f,0.3107656240463257f,1.292205572128296f,0.2772318422794342f,-0.14059102535247803f,-0.5952746868133545f,-0.13619378209114075f,0.16938945651054382f,1.6001759767532349f,-0.28879669308662415f,0.11340539157390594f,-0.8598341345787048f,-0.3627699911594391f,-0.8332610130310059f}, +{-0.2734835743904114f,-0.006139871198683977f,0.0457797646522522f,-0.3544529974460602f,-0.03321319818496704f,-0.43699121475219727f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.21864968538284302f,0.3545852601528168f,-0.3647043704986572f,0.4158240258693695f,-0.39413556456565857f,-0.280180960893631f}, +{0.21503236889839172f,-0.006975529715418816f,0.3954955041408539f,-0.002965252147987485f,0.37924548983573914f,-4.352310657501221f,-0.5501192808151245f,-0.28764215111732483f,0.3487861454486847f,-0.32520344853401184f,-4.292383193969727f,-0.7163788676261902f,-1.6283358335494995f,-0.7420485615730286f,0.006725164595991373f,0.05786462873220444f}, +{-0.2682988941669464f,-0.21874792873859406f,-0.15798500180244446f,0.3955790102481842f,-0.37393757700920105f,0.34758031368255615f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.11641307920217514f,-0.2837170362472534f,0.41839322447776794f,-0.010468282736837864f,-0.12172400951385498f,0.1040443703532219f}, +{-0.4393233060836792f,0.42088809609413147f,-0.2018718123435974f,0.3200990855693817f,0.07545611262321472f,0.3041123151779175f,-0.4151543378829956f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,0.2655569314956665f,-0.6807448267936707f,-0.15791945159435272f,-0.13821366429328918f,-0.524168848991394f,-0.4587186574935913f}, {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.43417003750801086f,0.2870778739452362f,0.12081471085548401f,-0.28882813453674316f,0.29976895451545715f,-0.129892036318779f,-0.112851083278656f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,0.28394222259521484f,-0.14616353809833527f,-0.2666535973548889f,0.17890380322933197f,0.34988918900489807f,0.09183908253908157f}, +{-0.5081422328948975f,-0.06909644603729248f,0.12081471085548401f,-0.5307455062866211f,0.6937620639801025f,-1.7394471168518066f,-0.112851083278656f,0.14146126806735992f,-0.3893685042858124f,-0.02222958207130432f,-3.628293752670288f,-0.5519410967826843f,-1.8406803607940674f,-0.49850648641586304f,-0.041028495877981186f,-0.20542386174201965f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-0.22157756984233856f,0.04996342584490776f,-0.37189048528671265f,-0.06003464758396149f,-0.08961917459964752f,0.3332441747188568f,0.3036012351512909f,-0.2405819296836853f,0.04891335964202881f,-0.11870327591896057f,0.4001283347606659f,0.012323440052568913f,0.18081840872764587f,-0.30172455310821533f,0.13669900596141815f}, -{0.047732532024383545f,0.6989078521728516f,0.6557276844978333f,-1.027191162109375f,-0.7921809554100037f,0.10846979916095734f,-0.3198729455471039f,0.06247803568840027f,0.5821853280067444f,-0.5057151317596436f,0.11285559087991714f,-2.0360121726989746f,-1.6084725856781006f,-0.6113699674606323f,-0.5270559787750244f,-0.4096241891384125f}, + {-0.36079341173171997f,-0.4983029067516327f,0.5477026700973511f,-0.3543650507926941f,-0.13606339693069458f,-0.08796219527721405f,0.3332441747188568f,0.3036012351512909f,-0.2405819296836853f,0.04891335964202881f,-0.11870327591896057f,-0.07875661551952362f,0.1948052942752838f,0.3429747223854065f,-0.7145496606826782f,0.30580008029937744f}, +{0.047732532024383545f,0.44144171476364136f,-0.03628820925951004f,-0.28411877155303955f,-0.46656039357185364f,0.25812917947769165f,-0.3198729455471039f,0.06247803568840027f,0.18673597276210785f,-0.1780138611793518f,0.2920512855052948f,-0.27276602387428284f,-0.02848001755774021f,0.5977586507797241f,-0.2459808588027954f,-0.48939114809036255f}, {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.2609212398529053f,-0.35918179154396057f,-0.49626997113227844f,-2.002046585083008f,0.23198626935482025f,0.20021501183509827f,0.07002416253089905f,-2.9994735717773438f,-0.6615407466888428f,-0.16319164633750916f,-0.4781607985496521f,-0.19987694919109344f,-0.03317837044596672f,0.2836754620075226f,-0.10154473036527634f}, -{-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,1.4071166515350342f,0.07251398265361786f,-0.9862403869628906f,-0.453469455242157f,1.3401246070861816f,-0.18732719123363495f,0.22384825348854065f,1.1909663677215576f,-0.4245598614215851f,-0.24387189745903015f,-4.09767484664917f,-2.500598430633545f,0.9592363238334656f,0.290335088968277f,-0.3659419119358063f}, -{0.4110594093799591f,0.1429830938577652f,-0.0927792340517044f,0.37246426939964294f,0.1850888431072235f,-0.19440588355064392f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.21155259013175964f,0.09956309199333191f,0.3126353323459625f,-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.30922991037368774f,0.021412329748272896f,0.13412728905677795f,-0.3774894177913666f,-0.41859447956085205f,0.27175024151802063f,0.20021501183509827f,0.07002416253089905f,-0.28385472297668457f,-0.365601509809494f,0.13192829489707947f,0.41021624207496643f,-0.2204446941614151f,0.2754747271537781f,0.3391396701335907f,-0.3910892903804779f}, +{-0.39607733488082886f,-0.21291382610797882f,1.3589930534362793f,0.022423356771469116f,0.6434191465377808f,-0.27518749237060547f,0.03828391432762146f,0.8088476061820984f,-0.08640444278717041f,-0.11053556203842163f,-0.10529157519340515f,-0.2748071551322937f,1.2419054508209229f,0.28642505407333374f,0.10066504031419754f,-0.34874701499938965f}, +{-0.37449589371681213f,0.3277108669281006f,-1.8050578832626343f,-0.01751975156366825f,0.043049342930316925f,1.43709397315979f,-0.18732719123363495f,0.22384825348854065f,-0.7361441850662231f,-0.46488797664642334f,-0.21090413630008698f,-0.17663529515266418f,-0.20991544425487518f,0.9128029346466064f,0.5134555697441101f,-0.9794425964355469f}, +{0.4110594093799591f,0.17092753946781158f,-0.2997543513774872f,0.2397543042898178f,0.10350155830383301f,-0.11353641003370285f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.02873902954161167f,0.09196598082780838f,0.3126353323459625f,-0.3646398186683655f}, +{-0.40892091393470764f,0.043769627809524536f,-0.1879284828901291f,0.25968697667121887f,0.5609180331230164f,-0.051169753074645996f,-0.23312048614025116f,-0.390264093875885f,0.26103636622428894f,-0.1559126079082489f,-0.14134526252746582f,-0.2452119141817093f,-0.46458858251571655f,-0.16402840614318848f,0.07994696497917175f,-0.19317680597305298f}, {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.72439044713974f,-0.5466641187667847f,-0.7720921635627747f,-0.6371919512748718f,0.7213203310966492f,-0.08742031455039978f,0.05785742402076721f,-1.262664794921875f,-0.5998016595840454f,-0.17241103947162628f,-2.2987046241760254f,-3.9738259315490723f,-1.018069863319397f,0.1471223384141922f,0.12088090926408768f}, -{-0.408692330121994f,-0.01745096780359745f,0.09452779591083527f,0.06247909367084503f,0.015625588595867157f,-0.2146359384059906f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.4221092760562897f,-0.379727303981781f,-0.3349076807498932f,0.31518054008483887f}, -{-0.2991822361946106f,0.29517999291419983f,0.0042093913070857525f,0.024277420714497566f,0.16840599477291107f,0.15824651718139648f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.09814348071813583f,-0.21696944534778595f,0.27826768159866333f,-0.16869547963142395f}, -{-0.2675279378890991f,-0.770762026309967f,1.6120538711547852f,-0.20645307004451752f,-0.15061108767986298f,-0.16551825404167175f,-0.32875844836235046f,-0.31893211603164673f,-1.4138376712799072f,-0.8004869818687439f,-0.3685331642627716f,-1.5057293176651f,0.1274058073759079f,-1.585729718208313f,0.1306980550289154f,0.1441774070262909f}, -{-0.015470266342163086f,-1.9857964515686035f,1.6790562868118286f,0.4655911922454834f,-0.08354365080595016f,-2.514406442642212f,0.05196094512939453f,-0.008358269929885864f,-4.3329997062683105f,-0.579310953617096f,0.13179203867912292f,-0.040511056780815125f,2.757723093032837f,-2.6764187812805176f,0.035064682364463806f,-0.5825209021568298f}, -{0.1863725483417511f,1.4100269079208374f,0.11397874355316162f,-0.8381223678588867f,0.6091724038124084f,0.9195526838302612f,0.04860696196556091f,0.17769548296928406f,0.4023902416229248f,-0.09889062494039536f,-0.5419447422027588f,0.34525805711746216f,-0.9069976806640625f,1.014098882675171f,-0.04629502072930336f,-0.16994908452033997f}, +{0.15459725260734558f,0.2284596711397171f,-0.14678864181041718f,-0.2826405167579651f,-3.0918989181518555f,0.1449601799249649f,-0.08742031455039978f,-0.9357023239135742f,-0.13340064883232117f,-0.2220277339220047f,0.0040720803663134575f,0.17651532590389252f,-0.8968222737312317f,0.21969160437583923f,0.5914236307144165f,-0.8322000503540039f}, +{-0.408692330121994f,-0.050453294068574905f,-0.15351682901382446f,0.0922636091709137f,-0.35955044627189636f,0.12949898838996887f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,-0.05215730890631676f,-0.6658473014831543f,0.16470779478549957f,-0.23339450359344482f,-0.040699247270822525f}, +{-0.2991822361946106f,0.32027140259742737f,-0.5629739761352539f,-0.05932474136352539f,-1.0874625444412231f,1.0245612859725952f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.22929511964321136f,0.19547978043556213f,0.5248737335205078f,0.36124154925346375f,0.27143019437789917f}, +{-0.2675279378890991f,-0.39045897126197815f,-0.05424119159579277f,-0.13007770478725433f,1.437944769859314f,-1.7302147150039673f,-0.3452095687389374f,-1.4223114252090454f,-0.745403528213501f,-0.7274325489997864f,-0.49066221714019775f,-1.6464046239852905f,0.8509430885314941f,-0.8237955570220947f,0.001911899889819324f,0.6988413333892822f}, +{-0.015470266342163086f,-0.529937207698822f,0.35546091198921204f,0.348036527633667f,0.1403835117816925f,-0.4197324514389038f,0.05196094512939453f,-0.008358269929885864f,-0.40752580761909485f,-0.38441595435142517f,0.13179203867912292f,-0.11511552333831787f,0.34031230211257935f,-0.04929199069738388f,-0.09811098128557205f,-0.19937199354171753f}, +{0.1863725483417511f,0.18601037561893463f,-0.15775355696678162f,-0.46877092123031616f,0.44797858595848083f,0.024585137143731117f,0.04860696196556091f,0.17769548296928406f,-0.0749552771449089f,0.3378079831600189f,-0.5061431527137756f,0.19592127203941345f,0.3813547194004059f,0.09455892443656921f,-0.05183706805109978f,-0.012699469923973083f}, }; -const float hout[16] = { 0.45773375034332275f,0.23122456669807434f,-0.18602921068668365f,-0.3125866651535034f,-0.029993798583745956f,0.20471511781215668f,0.0030125975608825684f,0.15066689252853394f,-0.5208629369735718f,0.004466731566935778f,0.08295199275016785f,-0.26822465658187866f,-0.3498326539993286f,0.026779841631650925f,0.07775511592626572f,-0.060560304671525955f }; +const float hout[16] = { 0.45773375034332275f,0.6764231324195862f,0.41992294788360596f,-0.06468239426612854f,0.17464998364448547f,0.24689403176307678f,0.04647764563560486f,0.2595721483230591f,0.08323294669389725f,0.11144406348466873f,0.14762791991233826f,-0.36595073342323303f,-0.6349490880966187f,0.21191029250621796f,0.6433769464492798f,-0.2769685387611389f }; -const float b1[16] = { 1.3190714120864868f,1.5952208042144775f,-1.7145336866378784f,0.3097442090511322f,0.9651374220848083f,1.5615040063858032f,-0.058932315558195114f,0.8412410616874695f,0.534761905670166f,-0.8942662477493286f,0.5916527509689331f,3.810105562210083f,-0.45955052971839905f,-0.3557904064655304f,-1.087764859199524f,0.9899064898490906f }; +const float b1[16] = { 0.3696094751358032f,1.7992044687271118f,-1.7145336866378784f,0.18997706472873688f,0.9549577832221985f,1.690210223197937f,-0.058932315558195114f,1.68743896484375f,0.44077587127685547f,-1.493913173675537f,0.5701789855957031f,1.6503576040267944f,-0.37873172760009766f,-0.894616961479187f,-1.087764859199524f,1.5419913530349731f }; -const float b2[16] = { -0.2645142376422882f,-0.2895103693008423f,-1.4564176797866821f,-0.49256083369255066f,-0.6939148902893066f,0.8274815082550049f,0.09697892516851425f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,0.27735763788223267f,0.3822407126426697f,-0.14580224454402924f,1.841172695159912f,0.46085551381111145f,0.41733479499816895f }; +const float b2[16] = { -0.2885071039199829f,-1.014089822769165f,-1.4564176797866821f,-0.7668818831443787f,-0.5584616661071777f,-0.49620234966278076f,0.03875614330172539f,-0.4831103980541229f,-1.20063054561615f,-1.912178635597229f,-0.32878178358078003f,0.04990300163626671f,-0.5751988887786865f,2.2356293201446533f,-0.2019418329000473f,0.697745680809021f }; -const float b3[16] = { -1.963319182395935f,-0.4159342348575592f,0.1794152706861496f,-0.4108562469482422f,-0.21904510259628296f,0.0030512125231325626f,-0.45353031158447266f,-0.6562485098838806f,-0.5568499565124512f,0.06824243813753128f,-0.44575250148773193f,2.5458240509033203f,-3.0509939193725586f,-0.7597270607948303f,-1.5004441738128662f,-0.6097174286842346f }; +const float b3[16] = { -1.963319182395935f,-0.5902930498123169f,0.1656760722398758f,-0.26326483488082886f,-2.454986333847046f,-0.20164278149604797f,-0.6144739985466003f,-0.6377184391021729f,-0.11426637321710587f,-0.05030348151922226f,-0.26522213220596313f,2.0851621627807617f,-1.2783746719360352f,1.249510407447815f,-1.4266045093536377f,-0.08144649863243103f }; -const float bout[1] = { -0.21177443861961365f }; +const float bout[1] = { 0.05578257516026497f }; float VALVE_POS_RAW_NN = 0.0f; @@ -405,8 +400,8 @@ input_NN[ind] = torq.sen / 10000.0f + 0.5f; ind = ind + 1; for(int i=0; i<numfuture_f; i++) { -// input_NN[ind] = (f_future[time_interval*i+time_interval] - torq.sen)/10000.0f+0.5f; - input_NN[ind] = (f_future[time_interval*i+time_interval])/10000.0f+0.5f; + input_NN[ind] = (f_future[time_interval*i+time_interval] - torq.sen)/10000.0f+0.5f; +// input_NN[ind] = (f_future[time_interval*i+time_interval])/10000.0f+0.5f; ind = ind + 1; }