/branches/salvo_gps/Basis_v0067g/trunk/Flight-Ctrl_MEGA644_V0_01a.hex |
---|
0,0 → 1,2288 |
:100000000C946C020C9489020C9489020C94890261 |
:100010000C9489020C9489020C9489020C94890234 |
:100020000C9489020C948D0C0C9489020C94890216 |
:100030000C949F150C9489020C9489020C948902EB |
:100040000C9489020C9489020C948D0B0C948902F7 |
:100050000C94B5070C9489020C94D2040C94890278 |
:100060000C94890D0C9489020C94D4140C9489027C |
:100070000A0A0D004E65757472616C004865616412 |
:10008000696E67486F6C64000A0D5374657565721C |
:10009000756E673A20004F4B0A0D000A0D416267EA |
:1000A0006C65696368204C756674647275636B7304 |
:1000B000656E736F722E2E000A0D42656E75747A2E |
:1000C0006520506172616D657465727361747A2028 |
:1000D0002564000A0D414343206E69636874206102 |
:1000E000626765676C696368656E21000A0D496E19 |
:1000F00069742E20454550524F4D3A2047656E6534 |
:1001000072696572652044656661756C742D506115 |
:1001100072616D657465722E2E2E000A0D3D3D3D97 |
:100120003D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3DFF |
:100130003D3D3D3D3D3D3D3D3D3D3D000A0D466C57 |
:1001400069676874436F6E74726F6C0A0D486172F0 |
:1001500064776172653A25642E25640A0D536F66D3 |
:1001600074776172653A5625642E256425632000F4 |
:100170002E0052616E67653A2533692D253369007B |
:100180005374656C6C756E673A202533690053654E |
:1001900074706F696E742020253369005365727620 |
:1001A0006F202000506F7469343A20202533690095 |
:1001B000506F7469333A202025336900506F746999 |
:1001C000323A202025336900506F7469313A20207B |
:1001D0002533690053746172743A20202020202551 |
:1001E0003569004D657373776572743A2020253543 |
:1001F00069005269636874756E673A202025356915 |
:10020000004B6F6D70617373202020202020200030 |
:10021000456D70662E506567656C3A2535690053EB |
:1002200070616E6E756E673A202025356900486FE3 |
:1002300063682025346920282533692900526F6CB2 |
:100240006C20253469202825336929004E69636BA9 |
:100250002025346920282533692900414343202D76 |
:100260002053656E736F720047696572202534698B |
:1002700020282533692900526F6C6C2025346920B1 |
:100280002825336929004E69636B202534692028AD |
:10029000253369290047696572202534692028259E |
:1002A00033692900526F6C6C20253469202825336E |
:1002B0006929004E69636B2025346920282533693C |
:1002C00029004779726F202D2053656E736F72007D |
:1002D00050333A253469202050343A2534692000BF |
:1002E00050313A253469202050323A2534692000B3 |
:1002F00047733A253469202047693A25346920003C |
:100300004E693A2534692020526F3A25346920001D |
:100310004B373A25346920204B383A253469200080 |
:100320004B353A25346920204B363A253469200074 |
:100330004B333A25346920204B343A253469200068 |
:100340004B313A25346920204B323A25346920005C |
:100350004B6F6D706173733A202020253569005210 |
:100360006F6C6C3A202020202020253569004E69D2 |
:10037000636B3A20202020202025356900616B74B2 |
:100380002E204C6167650048F668656E726567658A |
:100390006C756E67004B65696E6520004F66662060 |
:1003A00020202020203A20253569004C7566746491 |
:1003B0007275636B3A2025356900536F6C6C486F1A |
:1003C0006568653A2025356900486F6568653A209B |
:1003D000202020202535690028632920486F6C677C |
:1003E000657220427573730053657474696E673A61 |
:1003F000202564200048573A5625642E2564205352 |
:10040000573A25642E25642563002B2B204D696BFC |
:10041000726F4B6F70746572202B2B005B25695DCA |
:100420000000001100230034004600570069007AE4 |
:10043000008B009C00AE00BF00D000E100F2000382 |
:100440000114012401350146015601660177018737 |
:10045000019701A701B601C601D501E501F4010329 |
:1004600002120221022F023E024C025A0268027559 |
:1004700002830290029D02AA02B702C302CF02DBEE |
:1004800002E702F302FE02090314031F03290333E8 |
:10049000033D0347035003590362036B0373037B5C |
:1004A0000383038A03920399039F03A603AC03B259 |
:1004B00003B703BC03C103C603CA03CE03D203D6EA |
:1004C00003D903DC03DE03E103E303E403E603E70C |
:1004D00003E703E803E8030011241FBECFEFD0E1D8 |
:1004E000DEBFCDBF13E0A0E0B1E0E6E3FCE802C070 |
:1004F00005900D92A23AB107D9F718E0A2EAB3E04D |
:1005000001C01D92A338B107E1F70E94C8020C9404 |
:100510001A460C94000022E030E0D9010E94064601 |
:10052000802D863028F082E0D901082E0E940E46E8 |
:1005300099270895FB01282F863008F025E0842FA5 |
:100540009927429FD0011124AC59BF4F019724F045 |
:1005500001900E940E46FACFA2E0B0E0022E0E9467 |
:100560000E460895CF93DF93FB01C42FDD2786301D |
:1005700008F085E0489FD0011124AC59BF4F219766 |
:1005800024F00E9406460192FACFDF91CF910895A0 |
:100590001F93CF93DF9314B815B8189B02C08BE05C |
:1005A00001C08AE08093000181EC87B98FEF88B9A0 |
:1005B0008BE184B981E085B98EE38AB9579A87EFD8 |
:1005C0008BB984B7877F84BF8091600088618093F6 |
:1005D00060001092600080ED97E09093C5038093D7 |
:1005E000C4031092620410926104109233071092B7 |
:1005F00032071092600410925F0410925E04109211 |
:100600005D04809100018A3011F4289801C0289A75 |
:100610000E94340D0E9408060E948A150E94830DD4 |
:100620000E94BA1478941092310681E080933206C9 |
:1006300087E0809333062091000181E690E09F934C |
:100640008F9381E090E09F938F931F921F92822F50 |
:100650006AE00E949645892F99279F938F93822F56 |
:100660000E94964599279F938F938CE391E09F93E7 |
:100670008F931F920E94EB088BE191E09F938F93E1 |
:100680001F920E94EB08299AA1E0B0E00E94064662 |
:10069000802D2DB73EB7205F3F4F0FB6F8943EBF79 |
:1006A0000FBE2DBF843409F43FC08CEE90E09F93C1 |
:1006B0008F931F920E94EB080E94C12310E00F90BD |
:1006C0000F900F90123049F40E94302347E46AE5FE |
:1006D00077E082E00E949A0202C0133051F40E9437 |
:1006E000A02247E46AE577E083E00E949A0214E0E2 |
:1006F00002C0143010F00E94302347E46AE577E02E |
:10070000812F0E949A021F5F1630E0F283E022E000 |
:1007100030E0D901082E0E940E4684E4215030407A |
:10072000D901082E0E940E46C4E0D0E0DE010E94EE |
:100730000646802D853050F083ED90E09F938F9397 |
:100740001F920E94EB080F900F900F902297DE01EE |
:100750000E940646802D863028F082E0DE01082EB9 |
:100760000E940E4647E46AE577E00E94B202DE018D |
:100770000E940646802D863028F082E0DE01082E99 |
:100780000E940E4699279F938F9388EB90E09F934A |
:100790008F931F920E94EB08809162070F900F9039 |
:1007A0000F900F900F9080FD03C0C8EED3E020C0E3 |
:1007B0008BE990E09F938F931F920E94EB0888EE45 |
:1007C00093E00E94780CEC010E9425100F900F908E |
:1007D0000F90CE010E94810C8823D9F386E990E026 |
:1007E0009F938F931F920E94EB080F900F900F9092 |
:1007F0000E941A21809100018A3011F4289801C0CA |
:10080000289A469880ED97E09093C5038093C4039F |
:1008100088EE93E090932C0680932B0685E58093D9 |
:10082000260688E890E09F938F931F920E94EB0822 |
:10083000809162070F900F900F9082FF03C08CE7AA |
:1008400090E002C084E790E09F938F931F920E94F4 |
:10085000EB080F900F900F9080E790E09F938F939D |
:100860001F920E94EB080E94691088E893E1909320 |
:100870008603809385030F900F900F908091C103A2 |
:10088000882309F462C01092C1030E9451240E947F |
:10089000D320209100012A3011F4289801C0289A11 |
:1008A00080910301882321F081508093030110C0BF |
:1008B0001092B2031092B30310927D0410927C0444 |
:1008C00010927F0410927E04109281041092800492 |
:1008D00080915C04882329F080915C04815080938E |
:1008E0005C048091850390918603892B01F585E056 |
:1008F00090E090938603809385030E946415809115 |
:100900000403909105038F5F9F4FF9F48091630476 |
:100910008823D9F080E197E29093C5038093C403C4 |
:1009200080E890E090930503809304030EC08091CB |
:1009300085039091860301979093860380938503A6 |
:100940002A3011F4289801C0289A0E9423060E9498 |
:10095000BC06CE010E94810C882309F48FCF209120 |
:1009600008033091090380917207992728173907E6 |
:100970009CF480910403909105038F5F9F4F61F475 |
:1009800080E797E19093C5038093C40380E093E0F0 |
:10099000909305038093040384E690E00E94780C12 |
:1009A000EC016CCF1F920F920FB60F9211248F9310 |
:1009B0009F93EF93FF93809101018823E1F480914D |
:1009C000BD039091BE0301969093BE038093BD0337 |
:1009D000FC01E850FB4FE081ED3019F086399105BC |
:1009E00039F41092BE031092BD0381E0809301019F |
:1009F000E093C60004C01092BE031092BD03FF91A5 |
:100A0000EF919F918F910F900FBE0F901F901895AF |
:100A1000DC0120E030E040E050E0E8EFF4E005C029 |
:100A20008191280F311D4F5F5F4F4A175B07C1F758 |
:100A30003F70C90136E0969587953A95E1F7835C5A |
:100A4000FD01E850FB4F808311962F73235CFD015D |
:100A5000E850FB4F2083A750BB4F8DE08C93109242 |
:100A600001018091F8048093C6000895EF92FF92EF |
:100A70000F931F93CF93DF937A01722F93E290939A |
:100A8000F8046093F9048093FA0403E010E060E056 |
:100A9000ABEFB4E046C0F701E60FF11D90816F5F48 |
:100AA000715019F4E0E040E00FC0F701E60FF11DCE |
:100AB00040816F5F715011F4E0E006C0F701E60F6E |
:100AC000F11DE0816F5F7150892F86958695835C5B |
:100AD0008C935527892F99278370907024E0880F75 |
:100AE000991F2A95E1F79A0194E0369527959A95F2 |
:100AF000E1F7822B835CED0189834F705070440FC6 |
:100B0000551F440F551F8E2F8295869586958370AD |
:100B1000842B835C8A83EF73E35CEB830C5F1F4F52 |
:100B20001496772309F0B7CFC8010E940805DF911A |
:100B3000CF911F910F91FF90EF9008951F93CF9346 |
:100B4000DF93EC0170E0A22FBB27129748C0E42F7F |
:100B5000FF27E55CF94F30814F5FE42FFF27E55C0D |
:100B6000F94F50814F5FE42FFF27E55CF94F10816B |
:100B70004F5FE42FFF27E55CF94F20814F5F842F03 |
:100B80009927A817B90774F15D53FE01E70FF11D0E |
:100B90003D53330F330F852F82958F70382B308361 |
:100BA000613001F1912F9D537F5FFE01E70FF11D31 |
:100BB00071505295507F892F86958695582B50837A |
:100BC00063506F3F79F07E5FFE01E70FF11D929554 |
:100BD000990F990F907C2D53922B90837F5F662302 |
:100BE00009F0B5CFDF91CF911F9108951F93182F72 |
:100BF0008A3019F48DE00E94F6058091C00085FFCF |
:100C0000FCCF1093C60080E090E01F9108950895F6 |
:100C1000E1ECF0E088E18083A0ECB0E08C918260B0 |
:100C20008C938081806880838081806480838AE265 |
:100C30008093C40088EC90E00E94780C9093250685 |
:100C400080932406089580910101882309F493C0BC |
:100C50008091A203882371F080910101882351F0D3 |
:100C60002BE046E256E06091F70487E40E943605E7 |
:100C70001092A20380912406909125060E94810C77 |
:100C8000882321F48091A4038823F9F08091010145 |
:100C90008823D9F022E441ED56E06091F70484E422 |
:100CA0000E9436051092A4038091B5039091B6037B |
:100CB00001969093B6038093B5038AEF90E00E946B |
:100CC000780C9093250680932406609102016F3F73 |
:100CD00089F0462F552734E0440F551F3A95E1F728 |
:100CE0004C5F5E4F605D20E181E40E9436058FEF2E |
:100CF000809302018091A303882359F1809101011F |
:100D0000882339F10E9472101092A3033091AC0332 |
:100D1000932F9F5F9093AC03943021F08091AD03AB |
:100D2000882359F026E14EE257E060E084E30E9418 |
:100D300036058FEF8093AC030CC044E1949FA00173 |
:100D40001124465E5C4F24E160E0832F8F5C0E949B |
:100D500036058091A503882371F0809101018823D5 |
:100D600051F02AE041E356E06091F70486E50E94E5 |
:100D700036051092A50308951F93CF93DF93CDB747 |
:100D8000DEB722970FB6F894DEBF0FBECDBF8091BD |
:100D9000A703882309F4DFC08FEF809303018091BC |
:100DA0003D068B3609F45EC08C3678F4833629F123 |
:100DB000843620F4813609F0CCC013C0873609F49C |
:100DC0005EC0883609F0C5C02BC0813709F45BC00E |
:100DD000813708F480C08437F1F1863709F0B9C053 |
:100DE0004AC02091AA0343E062E0CE0101960E942E |
:100DF0009E05898180930201ACC02091AA0343E043 |
:100E00006BE086E296E00E949E058091F10390914E |
:100E10002806892B8093F10381E08093A40399C075 |
:100E20002091AA0343E062E0CE0101960E949E0554 |
:100E30008091F1039981892B8093F1038A818F3FFF |
:100E400021F481E08093AD0302C01092AD0381E0F4 |
:100E50008093A3037EC02091AA0343E064E08EEA5E |
:100E600093E006C02091AA0343E063E082EB93E0A5 |
:100E70000E949E056EC081E08093A5036AC081E058 |
:100E80008093A20366C02091AA0343E062E0CE01F2 |
:100E900001960E949E0589818F3F89F0863010F06F |
:100EA00085E0898347E46AE577E089810E94B202A0 |
:100EB000898127E44AE557E06091F70408C0109162 |
:100EC000F7040E948B0227E44AE557E0612F855B17 |
:100ED0000E9436053EC02091AA0343E067E48AE5FC |
:100EE00097E00E949E0580913D0647E46AE577E021 |
:100EF0008B560E949A0280913D068B56A2E0B0E08C |
:100F0000082E0E940E46609185077727882799272B |
:100F100024EC39E040E050E00E947745609387037D |
:100F2000709388038093890390938A036091860766 |
:100F30007727882799270E94774560938B037093C2 |
:100F40008C0380938D0390938E030E948B020E94EA |
:100F5000BE201092A70322960FB6F894DEBF0FBEF4 |
:100F6000CDBFDF91CF911F9108951F920F920FB6C1 |
:100F70000F9211242F933F934F935F936F937F931F |
:100F80008F939F93AF93BF93CF93DF93EF93FF9391 |
:100F90008091C6008093A6038091A6030E94113B16 |
:100FA0004091B803463910F01092B7038091A60320 |
:100FB0008D3009F05DC08091B703823009F058C0D0 |
:100FC0001092B703A42FBB27FD01E75CF94F3081D6 |
:100FD000ED01C65CD94F28818091BB039091BC0381 |
:100FE000831B9109821B91099F709093BC0380938E |
:100FF000BB039C01689415F8369527951694E1F784 |
:10100000235C2093BA03982F9F73935C9093B9034A |
:101010008081281729F48881981711F491E006C07F |
:101020008091A9038F5F8093A90390E08091A7032B |
:10103000882309F064C0992309F461C081E080939A |
:10104000A7034093AA03A55CB94F8DE08C938091D0 |
:101050003D06823509F053C088E190E02CE00FB6E0 |
:10106000F894A895809360000FBE2093600047C05D |
:101070008091B7038130D9F0813018F08230E9F5E2 |
:1010800030C08091A603833239F48091A70388236E |
:1010900019F481E08093B7038091A60380933B0607 |
:1010A00081E08093B8038091A603992715C082E060 |
:1010B0008093B703E42FFF278091A603E55CF94FE7 |
:1010C00080834F5F4093B8032091A6038091BB03B8 |
:1010D0009091BC03820F911D9093BC038093BB033E |
:1010E0000EC0E42FFF278091A603E55CF94F8083B3 |
:1010F000463938F31092B703E7CF1092B703FF9148 |
:10110000EF91DF91CF91BF91AF919F918F917F919F |
:101110006F915F914F913F912F910F900FBE0F9064 |
:101120001F901895982F80911307813069F4809152 |
:10113000F003E82FFF27E65EFC4F90838F5F8093DC |
:10114000F00321E030E005C0892F0E94F605282F2A |
:101150003327C90108951F93182F04C080E30E940C |
:10116000920811501116D4F31F9108951F93182F50 |
:1011700004C080E20E94920811501116D4F31F910E |
:1011800008950F931F93CF93DF938C01EB0108C059 |
:10119000F8010F5F1F4FE4918E2F0E949208219754 |
:1011A0002097B1F7DF91CF911F910F9108950F9381 |
:1011B0001F93CF93DF938C01EB0106C0F80181915F |
:1011C0008F010E94920821972097C1F7DF91CF915C |
:1011D0001F910F9108952F923F924F925F926F92BD |
:1011E0007F928F929F92AF92BF92CF92DF92EF92B7 |
:1011F000FF920F931F93CF93DF93CDB7DEB7E397A3 |
:101200000FB6F894DEBF0FBECDBF29968FAD2997DC |
:1012100080931307CE01855B9F4F9D838C832B9614 |
:101220008EAD9FAD2B979FA78EA72224332421013B |
:1012300002C0130124010EA51FA502C00F5F1F4F9E |
:10124000F801F490FF2019F0F5E2FF16B9F7B801A4 |
:101250008EA59FA5681B790B11F00E94C108FF2085 |
:1012600009F442C20F5F1F4F1FA70EA71982AC815E |
:10127000BD811BAA1AAA9FEF99ABEEA5FFA5CF01CE |
:1012800001969FA78EA7B49095E7B91621F08B2DF4 |
:101290008062883789F4EBA9E0FF07C02D903D906C |
:1012A0004D905C901397149607C08D919C91119767 |
:1012B0001C01442455241296F0E2BF1621F48981C2 |
:1012C0008823D9F685C083E2B81609F483C09AE270 |
:1012D000B91621F0EDE2BE1669F408C0FD011296C0 |
:1012E000E081EAABE7FFC9CFE195EAABFBA9F0618A |
:1012F000FF7D72C08BE2B81609F46AC09EE2B9168F |
:10130000B1F52EA53FA52F5F3F4FEEA5FFA5849118 |
:101310008A3221F0B82E20E030E01BC0FD01129689 |
:101320004081518157FF02C04FEF5FEF49AB3FA7AC |
:101330002EA7A3CFC90103E0880F991F0A95E1F7F3 |
:10134000220F331F280F391F2B0D311D2053304022 |
:10135000B49031968B2D80538A3060F3FFA7EEA7AF |
:10136000A90137FF02C04FEF5FEF49AB8DCFF0E32C |
:10137000BF1631F48BA984FD80CF80628BAB7DCF0B |
:101380008B2D81538930E8F420E030E0C901F3E08F |
:10139000880F991FFA95E1F7220F331F280F391F85 |
:1013A0002B0D311D20533040EEA5FFA5CF01019636 |
:1013B0009FA78EA7B4908B2D80538A3038F32AAB29 |
:1013C00063CF98E6B91651F4EBA9E460EBAB55CFC7 |
:1013D000B98253CFFBA9F860FBAB4FCF8CE6B816B0 |
:1013E00021F49BA991609BAB48CFBD83AC83E3E61E |
:1013F000BE1639F41296BD83AC8312978C918E83FE |
:1014000018C1F4E4BF1639F084E6B81639F099E64D |
:10141000B91659F503C0EBA9E160EBABFBA9F0FFEE |
:1014200008C01496BD83AC835E904E903E902E9083 |
:101430000AC01296BD83AC839E918E911C014424F8 |
:1014400037FC4094542C57FC03C08AE088AB92C010 |
:101450005094409430942094211C311C411C511C08 |
:101460008DE289839AE098AB85C0EFE4BE1629F03F |
:10147000FFE6BF1639F488E061C09BA991609BAB81 |
:10148000E8E056C0F0E7BF1671F41296BD83AC8356 |
:101490009E918E911C01442455248BA980648BABB2 |
:1014A00078E7B72E5EC0E3E7BE16D9F51296BD8386 |
:1014B000AC83DE90CE90C114D10489F488E28E838F |
:1014C0008EE68F8385E788878CE689878A8789E21D |
:1014D0008B871C8666E0C62ED12CCC0EDD1EF9A9AA |
:1014E000F7FD13C04F2F552747FD509560E070E082 |
:1014F000C6010E940244009711F419A90DC08C196D |
:1015000019A981174CF4182F07C0F601019000208B |
:10151000E9F731971E2F1C1919824201310140E071 |
:1015200094C085E5B81631F095E7B91649F4EAE0BC |
:10153000E8AB1FC0FBA9F160FBAB8AE088AB19C028 |
:1015400098E5B91621F0E8E7BE1609F06EC0FBA9D0 |
:10155000F3FD02C080E1F2CF2114310441045104B3 |
:1015600019F490E198AB05C0EBA9E064EBABF0E1B6 |
:10157000F8AB198289A987FD03C09BA99F7D9BAB0E |
:10158000211431044104510461F4E9A9EE2349F422 |
:101590006624772443015EE2C52ED12CCC0EDD1EDD |
:1015A0003EC04EE2C42ED12CCC0EDD1EF8A9EF2E8B |
:1015B000FF2400271127C201B101A80197010E9451 |
:1015C000C9456A3020F430E3A32EA60E08C027E5F3 |
:1015D000A22EA60E88E5B81611F49FEDA922F601F9 |
:1015E000A2926F01C201B101A80197010E94C945F1 |
:1015F00039014A012E143F044006510618F0190122 |
:101600002A01D9CFF8A9F83051F48BA983FF07C07C |
:1016100090E3A91621F080E3F60182936F01CE01D9 |
:101620008C19182F125D49A910C0BB2009F45CC0A9 |
:10163000BE8219824201310100E096E0C92ED12C10 |
:10164000CC0EDD1E11E021E005C0212F042F011B6F |
:1016500007FD00E08981882319F0812F8F5F07C083 |
:101660009BA996FD02C0812F02C0822F8E5FA82EFB |
:10167000A00EEBA9EE2EFF2480E3482E512C4E2025 |
:101680005F204114510421F48AA98A190E94B608E6 |
:101690008981882329F061E070E0CE01019609C0BC |
:1016A000E6FE09C080E38A83BB8262E070E0CE017F |
:1016B00002960E94D708F0E24F16510421F48AA93D |
:1016C0008A190E94AB08802F0E94AB08612F7727F0 |
:1016D00067FD7095C6010E94D708E4FEAACD8AA9CD |
:1016E0008A190E94B608A5CDE3960FB6F894DEBF1E |
:1016F0000FBECDBFDF91CF911F910F91FF90EF9063 |
:10170000DF90CF90BF90AF909F908F907F906F9021 |
:101710005F904F903F902F9008951F920F920FB6B9 |
:101720000F9211242F933F935F936F937F938F9327 |
:101730009F93AF93BF938091CD0381508093CD034E |
:101740008F3F11F58091CB039091CC03009729F046 |
:1017500001979093CC038093CB0389E08093CD03D2 |
:10176000809107038F5F817080930703882319F4AA |
:1017700081E08093C1038091BF039091C0030196E3 |
:101780009093C0038093BF038091C4039091C503DD |
:101790000297B8F08091C4039091C503019790938C |
:1017A000C5038093C4038091C4039091C503209125 |
:1017B00004033091050382239323892B09F084C00D |
:1017C00006C08FEF9FEF90930503809304038091F1 |
:1017D00000018A3039F404C05A9A05C0479A03C000 |
:1017E0005A9801C04798349B0AC08091C2039091D7 |
:1017F000C30301969093C3038093C2036BC080918F |
:10180000C2039091C303892B09F440C08091C203A5 |
:101810009091C303805A9F40C8F58FEF90E090935A |
:10182000CC038093CB0380914A0490914B04909316 |
:10183000CA038093C9038091C2039091C303875860 |
:10184000904090934B0480934A0480914A04909175 |
:101850004B0497FF0AC080914A0490914B04885929 |
:101860009E4F90934B0480934A0480914A04909138 |
:101870004B048856914054F080914A0490914B0457 |
:101880008856914090934B0480934A0480914A0477 |
:1018900090914B0420914C0430914D04821B930B8A |
:1018A000845E9D4F68E671E00E94B645845B90407F |
:1018B00090934F0480934E0481E08093C80310926C |
:1018C000C3031092C20306C0809100018A3009F060 |
:1018D00085CF82CFBF91AF919F918F917F916F9173 |
:1018E0005F913F912F910F900FBE0F901F90189511 |
:1018F0002091BF033091C0032F5F3F4F820F931F92 |
:1019000008952091BF033091C003821B930B892F50 |
:10191000992786958074992708951F920F920FB684 |
:101920000F921124EF92FF920F931F932F933F93E7 |
:101930004F935F936F937F938F939F93AF93BF93D7 |
:10194000CF93DF93EF93FF938091060381508093B1 |
:1019500006038F3F09F06DC083E88093B00080914B |
:101960009C03C82FDD27D093C703C093C603809183 |
:101970008F07E0907C0780FF1EC060910E0470917D |
:101980000F048091100490911104FF240027112767 |
:1019900020E830E040E050E00E94EB45C801B7018C |
:1019A0000E94774520E032E040E050E00E94EB45A5 |
:1019B000C20FD31F1DC060910E0470910F0480915F |
:1019C000100490911104FF240027112720E830E033 |
:1019D00040E050E00E94EB45C801B7010E94774506 |
:1019E00020E032E040E050E00E94EB45C21BD30B08 |
:1019F000D093C703C093C6032091C6033091C70399 |
:101A000080917D0799272817390734F080917E0748 |
:101A100099278217930724F49093C7038093C603F2 |
:101A20008091C6038093B30080917F078093060363 |
:101A300004C083E08093B0005F98FF91EF91DF9145 |
:101A4000CF91BF91AF919F918F917F916F915F9156 |
:101A50004F913F912F911F910F91FF90EF900F9019 |
:101A60000FBE0F901F9018958091BF039091C003F7 |
:101A70000B969093CF038093CE0382E085BD83EADB |
:101A800084BD17BC88E788BD96E096BD83EC809343 |
:101A9000B0009093B100E0E7F0E080818260808345 |
:101AA000EEE6F0E08081816080838AE08093B3007D |
:101AB0001092B20008952091BF033091C0032F5FB0 |
:101AC0003F4F280F391F4FEE02C040937A0080919C |
:101AD000BF039091C003B901681B790B77FFF5CF65 |
:101AE00008952091BF033091C0032F5F3F4F280F0F |
:101AF000391F8091BF039091C003A901481B590B66 |
:101B000057FFF7CF089510927C008FEE80937A00F4 |
:101B100008951F920F920FB60F921124DF92EF9249 |
:101B2000FF920F931F932F933F934F935F936F9366 |
:101B30007F938F939F93AF93BF93CF93DF93EF9355 |
:101B4000FF9310927A008091EC03D82ED394D09218 |
:101B5000EC03853009F484C0863090F4823009F4B7 |
:101B600040C0833030F48823F1F0813009F04FC257 |
:101B70002FC0833009F43FC0843009F048C258C0F8 |
:101B8000883009F4C0C0893038F4863009F481C047 |
:101B9000873009F03CC29AC0893009F4D1C08A303C |
:101BA00009F035C2B1C1809178009091790090938D |
:101BB000EB038093EA0381E08093ED038091E403DB |
:101BC0009091E50301969093E5038093E40315C299 |
:101BD00080917800909179009093E9038093E803D5 |
:101BE00090C080917800909179009093E703809362 |
:101BF000E60384E086C14091080350910903809177 |
:101C00007800909179009A01220F331F240F351F1D |
:101C100063E070E00E94A245260F371F3695279596 |
:101C200036952795309309032093080386E069C110 |
:101C300080910604909107042091780030917900FA |
:101C4000821B930B909315078093140780911407C0 |
:101C5000909115079093D7038093D60387E051C1E5 |
:101C600080917800909179002091040430910504CE |
:101C7000821B930B9093200780931F0780911F076F |
:101C8000909120079093D9038093D8031092ED038D |
:101C9000B4C1809100012091EA033091EB038A30B6 |
:101CA00049F48091780090917900820F931F969566 |
:101CB000879506C08091780090917900820F931FDC |
:101CC0009093D5038093D40381E01BC180910001E0 |
:101CD0002091E8033091E9038A3049F4809178003B |
:101CE00090917900820F931F9695879506C08091F9 |
:101CF000780090917900820F931F9093D303809383 |
:101D0000D20382E0FEC0809100012091E603309171 |
:101D1000E7038A3049F48091780090917900820F2E |
:101D2000931F9695879506C08091780090917900D1 |
:101D3000820F931F9093D1038093D00385E0E1C07D |
:101D40006091780070917900E0900804F0900904A7 |
:101D500000910A0410910B04882777FD8095982F35 |
:101D60000E94B544A80197010E940F440E94984424 |
:101D70007093DB036093DA032091DA033091DB0385 |
:101D8000E0911407F091150780911F0790912007AB |
:101D900097FF03C0909581959F4F64E070E00E948B |
:101DA000B645EB01CF01F7FF03C0909581959F4F9A |
:101DB00064E070E00E94B645260F371F2C0F3D1FD0 |
:101DC0003093DB032093DA038091DA039091DB03F5 |
:101DD000029704F1609108047091090480910A044B |
:101DE00090910B0420E030E048E454E40E94BF44AA |
:101DF00088230CF03CC06091080470910904809124 |
:101E00000A0490910B042AE037ED43EA5CE30E9458 |
:101E1000104425C08091DA039091DB038F5F9F4FC0 |
:101E200034F5609108047091090480910A0490913E |
:101E30000B0420E030E046E154E40E94C24418164E |
:101E4000B4F4609108047091090480910A0490919F |
:101E50000B042AE037ED43EA5CE30E940F446093F1 |
:101E600008047093090480930A0490930B0481E0A2 |
:101E70008093E10380917800909179009093170707 |
:101E800080931607209146043091470440914804FE |
:101E9000509149048091DA039091DB03AA2797FDC2 |
:101EA000A095BA2F280F391F4A1F5B1F20934604A5 |
:101EB000309347044093480450934904E09046040B |
:101EC000F090470400914804109149046091460441 |
:101ED00070914704809148049091490420E034E0D7 |
:101EE00040E050E00E94EB45E21AF30A040B150BA8 |
:101EF000E0924604F092470400934804109349048A |
:101F000083E08093ED0379C08091240790912507A9 |
:101F10002091780030917900820F931F90932507CC |
:101F20008093240780911C078F5F80931C0780910A |
:101F30001C07853008F46BC080917800909179007F |
:101F400090930F0380930E0310921C078091180743 |
:101F5000909119072091240730912507821B930B3C |
:101F60002091640430916504821B930B9093E303EA |
:101F70008093E2036091240770912507E0900A03A3 |
:101F8000F0900B0300910C0310910D03882777FD4F |
:101F90008095982FA8019701220F331F441F551FCA |
:101FA0002E0D3F1D401F511F620F731F841F951F71 |
:101FB00024E030E040E050E00E94EB4520930A032B |
:101FC00030930B0340930C0350930D03209118079B |
:101FD0003091190780910A0390910B03A0910C0393 |
:101FE000B0910D03281B390B3093650420936404D2 |
:101FF00010922507109224070AC08091ED03809368 |
:102000007C00DD2051F08FEE80937A0006C01092A4 |
:10201000ED031092EC0310927C00FF91EF91DF91A1 |
:10202000CF91BF91AF919F918F917F916F915F9170 |
:102030004F913F912F911F910F91FF90EF90DF9063 |
:102040000F900FBE0F901F901895CF93DF93A3E0D2 |
:10205000B0E00E940646802DC82FDD27C531D1058E |
:1020600008F02A97C7BD84E690E00E945B0D80913E |
:102070000E0390910F0382559340D0F4C0E0D0E05E |
:1020800017C0C7BD82E390E00E945B0D80E791E03E |
:102090009F938F931F920E94EB0880910E03909163 |
:1020A0000F030F900F900F908458934020F02196CB |
:1020B000CA3FD10530F3A3E0B0E00C2E0E940E46DB |
:1020C000C09321078CE291E00E945B0DDF91CF91DC |
:1020D0000895EAE1F3E080E2819393E0EA36F907BC |
:1020E000D9F70895FF920F931F938091F103282F42 |
:1020F0003327C90181709070682F8823A9F08091DF |
:10210000F203882311F0815002C080916A0380930A |
:10211000F203EAE1F3E080E2819393E0EA36F90723 |
:10212000D9F78FEF8093AC03A9014270507021FF63 |
:1021300010C08091F2038F5F8093F203EAE1F3E035 |
:1021400080E2819393E0EA36F907D9F78FEF809325 |
:10215000AC03662321F0452B11F01092F20381E1CC |
:102160008093F0038091F20399279F938F938CE1E2 |
:1021700094E09F938F9311E0F12EFF920E94EB0861 |
:102180000091F2030F900F900F900F900F90053079 |
:1021900009F4FCC1063090F4023009F4CCC00330DD |
:1021A00030F40023F1F0013009F0D9C361C00330ED |
:1021B00009F416C1043009F0D2C365C1083009F42E |
:1021C00016C3093038F4063009F499C2073009F013 |
:1021D000C6C3EAC2093009F447C30A3009F0BFC3D5 |
:1021E00081C31092F0038AE094E09F938F93FF9253 |
:1021F0000E94EB0884E18093F0032091000181E6C6 |
:1022000090E09F938F9381E090E09F938F931F9234 |
:102210001F92822F6AE00E949645892F99279F93EB |
:102220008F93822F0E94964599279F938F9385EFD6 |
:1022300093E09F938F93FF920E94EB0888E2809334 |
:10224000F0030E948B0299279F938F9388EE93E06F |
:102250009F938F93FF920E94EB088CE38093F0038F |
:1022600088ED93E09F938F93FF920E94EB0898C2B2 |
:102270008091620780FF47C01092F0038091640450 |
:10228000909165049F938F9389EC93E09F938F9334 |
:102290000F930E94EB0884E18093F0038091660421 |
:1022A000909167049F938F938AEB93E09F938F9312 |
:1022B0000F930E94EB0888E28093F00380910E0355 |
:1022C00090910F039F938F938BEA93E09F938F934B |
:1022D0000F930E94EB088CE38093F0038091210719 |
:1022E00099279F938F938CE993E09F938F930F93FC |
:1022F0000E94EB088DB79EB744960FB6F8949EBF28 |
:102300000FBE8DBF31C384E18093F00385E993E074 |
:102310009F938F930F930E94EB0888E28093F003C2 |
:1023200087E893E09F938F930F930E94EB088DB7FC |
:102330009EB70696E2CF1092F0038DE793E09F934D |
:102340008F93FF920E94EB0884E18093F0036091E9 |
:102350000E0470910F04809110049091110420E0FC |
:1023600034E040E050E00E94EB455F934F933F9391 |
:102370002F938EE693E09F938F93FF920E94EB083A |
:1023800088E28093F00360911604709117048091A5 |
:1023900018049091190420E034E040E050E00E94DD |
:1023A000EB455F934F933F932F938FE593E09F937C |
:1023B0008F93FF920E94EB088CE38093F00380914F |
:1023C0004A0490914B049F938F9380E593E09F93F1 |
:1023D0008F93FF920E94EB088DB79EB746968DCFE4 |
:1023E0001092F003809132079091330720913007CB |
:1023F000309131079F938F933F932F9380E493E025 |
:102400009F938F93FF920E94EB0884E18093F003E7 |
:102410008091360790913707209134073091350726 |
:102420009F938F933F932F9380E393E09F938F939A |
:10243000FF920E94EB0888E28093F00380913A07B4 |
:1024400090913B0720913807309139079F938F93E4 |
:102450003F932F9380E293E09F938F93FF920E948C |
:10246000EB088CE38093F00380913E0790913F0747 |
:1024700020913C0730913D079F938F933F932F937B |
:1024800080E193E07AC01092F003E0915B07FF27B0 |
:10249000EE0FFF1FE25DF84F20813181E0915A0776 |
:1024A000FF27EE0FFF1FE25DF84F808191813F9380 |
:1024B0002F939F938F9380E093E09F938F93FF924E |
:1024C0000E94EB0884E18093F003E0915D07FF2711 |
:1024D000EE0FFF1FE25DF84F20813181E0915C0734 |
:1024E000FF27EE0FFF1FE25DF84F808191813F9340 |
:1024F0002F939F938F9380EF92E09F938F93FF9200 |
:102500000E94EB0888E28093F003E0915F07FF27C9 |
:10251000EE0FFF1FE25DF84F20813181E0915E07F1 |
:10252000FF27EE0FFF1FE25DF84F808191813F93FF |
:102530002F939F938F9380EE92E09F938F93FF92C0 |
:102540000E94EB088CE38093F003E0916107FF2782 |
:10255000EE0FFF1FE25DF84F20813181E0916007AF |
:10256000FF27EE0FFF1FE25DF84F808191813F93BF |
:102570002F939F938F9380ED92E09F938F93FF9281 |
:102580000E94EB088DB79EB74C96B7CE1092F00321 |
:1025900082EC92E09F938F93FF920E94EB080F9042 |
:1025A0000F900F90809100018A3009F04AC084E1B9 |
:1025B0008093F0034091FA035091FB038091D00384 |
:1025C0009091D1032091FA033091FB035F934F93D5 |
:1025D000821B930B9F938F9383EB92E09F938F9338 |
:1025E000FF920E94EB0888E28093F0034091FC0385 |
:1025F0005091FD038091D2039091D3032091FC036D |
:102600003091FD035F934F93821B930B9F938F93A6 |
:1026100084EA92E09F938F93FF920E94EB088CE3F1 |
:102620008093F0038091FE039091FF032091CF07E8 |
:102630003091D0079F938F933F932F9385E992E03A |
:1026400055C084E18093F0038091FA039091FB03DD |
:102650002091D0033091D103E091FA03F091FB0374 |
:1026600062E070E00E94B6457F936F932E1B3F0B94 |
:102670003F932F9386E892E09F938F93FF920E945F |
:10268000EB0888E28093F0038091FC039091FD03B6 |
:102690002091D2033091D303E091FC03F091FD032C |
:1026A00062E070E00E94B6457F936F932E1B3F0B54 |
:1026B0003F932F9387E792E09F938F93FF920E941F |
:1026C000EB088CE38093F0038091FE039091FF036D |
:1026D0002091CF073091D00762E070E00E94B645AC |
:1026E0007F936F933F932F9388E692E09F938F930E |
:1026F000FF920E94EB088DB79EB74596FECD1092D3 |
:10270000F0038BE592E09F938F93FF920E94EB087A |
:1027100084E18093F003809104049091050420915A |
:10272000D8033091D9039F938F933F932F938CE4D9 |
:1027300092E09F938F93FF920E94EB0888E2809330 |
:10274000F00380910604909107042091D603309104 |
:10275000D7039F938F933F932F938DE392E09F93A3 |
:102760008F93FF920E94EB088CE38093F0036091BB |
:1027700008047091090480910A0490910B0400915F |
:10278000B3071091B4070E9498447F936F931F93EF |
:102790000F938EE292E09F938F93FF920E94EB083B |
:1027A0008DB79EB74896A9CD84E18093F0038091C0 |
:1027B0000803909109039F938F938FE192E09F9379 |
:1027C0008F93FF920E94EB0888E28093F003809140 |
:1027D0005C0499279F938F9380E192E09F938F935E |
:1027E000FF920E94EB088DB79EB70A9686CD109295 |
:1027F000F00381E092E09F938F93FF920E94EB0899 |
:1028000084E18093F00380914E0490914F049F9354 |
:102810008F9382EF91E09F938F93FF920E94EB083A |
:1028200088E28093F00380914A0490914B049F9337 |
:102830008F9383EE91E09F938F93FF920E94EB081A |
:102840008CE38093F00380914C0490914D049F930E |
:102850008F9384ED91E09F938F93FF920E94EB08FA |
:102860008DB79EB7429649CD1092F00380915404E3 |
:10287000909155049F938F9388EC91E09F938F9351 |
:10288000FF920E94EB0884E18093F003809156044C |
:10289000909157049F938F938CEB91E09F938F932C |
:1028A000FF920E94EB0888E28093F0038091580425 |
:1028B000909159049F938F9380EB91E09F938F9316 |
:1028C000FF920E94EB088CE38093F00380915A04FE |
:1028D00090915B049F938F9384EA91E09F938F93F1 |
:1028E000FF9206CD1092F0038CE991E09F938F93B5 |
:1028F000FF920E94EB0884E18093F00380919C0397 |
:1029000099279F938F938EE891E09F938F93FF92E7 |
:102910000E94EB0888E28093F0038091C6039091B7 |
:10292000C7039F938F9380E891E09F938F93FF92CB |
:102930000E94EB088CE38093F00380917E07992737 |
:102940009F938F9380917D0799279F938F9382E721 |
:1029500091E09F938F93FF920E94EB08CBCC0150A4 |
:1029600000936A031092F2031092F1031F910F91EA |
:10297000FF9008951092B9008AE28093B8000895FC |
:1029800085EA8093BC0080E090E0089584E980931C |
:10299000BC0008951092B9008093BB0085E8809335 |
:1029A000BC0080E090E008951F920F920FB60F9246 |
:1029B00011248F939F93EF93FF938091F3038F5F85 |
:1029C0008093F30381508330A9F1843028F481305F |
:1029D00091F0823008F50AC0853089F18530B8F170 |
:1029E0008630A9F1873009F061C045C08091F403B9 |
:1029F000880F8E5A09C08091F4038F5F8093F4038F |
:102A0000815027C08091A4071092B9008093BB0029 |
:102A100085E88093BC004AC084E98093BC00809123 |
:102A2000F403843018F41092F30302C01092F403FC |
:102A300085EAEFCF8091F503880F8D5AE5CF80911D |
:102A4000BB00E091F503FF27EA5DF84F808380919A |
:102A5000F503813039F08130A8F2823031F08330D3 |
:102A600029F506C08091A907CFCF8091C507CCCFAB |
:102A70008091C907C9CF8091F5039091BB00E82FE1 |
:102A8000FF27EA5DF84F94838F5F8093F5038430CE |
:102A900010F01092F50384E98093BC008AE090E086 |
:102AA00090938603809385031092F3038091BC007A |
:102AB00080688093BC00FF91EF919F918F910F9060 |
:102AC0000FBE0F901F9018954CEB50E084E9DA018F |
:102AD0008C931092F3032BEB30E0F901808110927C |
:102AE000F40380E88C931092BD001092BA0010821B |
:102AF000E9EBF0E01082A8EBB0E01C9210828AE2D1 |
:102B00008C9385EADA018C931082F901108285E8B2 |
:102B10008C93089583EC80938100EFE6F0E0808150 |
:102B2000806280831092FF031092FE031092FD03D7 |
:102B30001092FC031092FB031092FA0308951F9267 |
:102B40000F920FB60F9211240F931F932F933F9361 |
:102B50004F935F936F937F938F939F93AF93BF93A5 |
:102B6000CF93DF93EF93FF932091860030918700FE |
:102B70008091F8039091F903281B390B809186000E |
:102B8000909187009093F9038093F803C9018D54C5 |
:102B90009440C091F603D091F703835F9A4158F4B3 |
:102BA000249714F010926B0381E090E09093F70368 |
:102BB0008093F60363C0CA30D1050CF05FC0C90131 |
:102BC0008B5F9040845B914008F040C0A901425D5A |
:102BD0005140FE01EE0FFF1FE25DF84F80819181B1 |
:102BE000FA01E81BF90BCF01F7FF03C0909581951F |
:102BF0009F4F06974CF480915C04883C28F48091A8 |
:102C00005C04865F80935C04FE01EE0FFF1F8F0162 |
:102C1000025D184FD8012D913C91C901880F991F71 |
:102C2000820F931F840F951F64E070E00E94B645E9 |
:102C3000D8018D919C9111979B01281B390BEC5B5E |
:102C4000F84F3183208311967C936E93FE01319669 |
:102C5000F093F703E093F603E530F10519F45D9A7C |
:102C60005C980BC05D98E630F10511F45C9A05C0E4 |
:102C70005C98379711F45B9A01C05B98FF91EF91D4 |
:102C8000DF91CF91BF91AF919F918F917F916F9184 |
:102C90005F914F913F912F911F910F910F900FBE18 |
:102CA0000F901F9018952F923F924F925F926F92C4 |
:102CB0007F928F929F92AF92BF92CF92DF92EF92CC |
:102CC000FF920F931F93CF93DF93CDB7DEB7229779 |
:102CD0000FB6F894DEBF0FBECDBF8091FE0390917A |
:102CE000FF032091D4033091D503821B930B909363 |
:102CF000D0078093CF078091D2039091D303209186 |
:102D0000FC033091FD03821B930B9093A3078093E8 |
:102D1000A2078091D0039091D1032091FA033091C2 |
:102D2000FB03821B930B9093AB078093AA076091E0 |
:102D3000CC077091CD072091D8033091D903882713 |
:102D400077FD8095982F442737FD4095542F04E058 |
:102D5000220F331F441F551F0A95D1F7620F731FAF |
:102D6000841F951F22E030E040E050E00E94EB45D8 |
:102D70003093CD072093CC076091D6077091D70789 |
:102D80002091D6033091D703882777FD8095982F1F |
:102D9000442737FD4095542F14E0220F331F441F62 |
:102DA000551F1A95D1F7620F731F841F951F22E0DC |
:102DB00030E040E050E00E94EB453093D70720938D |
:102DC000D6076091B3077091B4072091DA03309170 |
:102DD000DB03882777FD8095982F442737FD4095A2 |
:102DE000542F620F731F841F951F22E030E040E0D4 |
:102DF00050E00E94EB453093B4072093B307209135 |
:102E00001E0430911F0440912004509121048091B0 |
:102E1000D8039091D903B4E0880F991FBA95E1F7D0 |
:102E2000AA2797FDA095BA2F280F391F4A1F5B1FAD |
:102E300020931E0430931F044093200450932104D8 |
:102E400020912204309123044091240450912504C0 |
:102E50008091D6039091D703A4E0880F991FAA957B |
:102E6000E1F7AA2797FDA095BA2F280F391F4A1F0F |
:102E70005B1F209322043093230440932404509337 |
:102E80002504609126047091270480912804909174 |
:102E90002904E0901607F0901707A0900804B0905E |
:102EA0000904C0900A04D0900B040E94B5443B0171 |
:102EB0004C010027F7FC0095102FC801B7010E94B4 |
:102EC000B544A60195010E940F449B01AC01C401C9 |
:102ED000B3010E9410440E949844609326047093AA |
:102EE000270480932804909329042091DD073091D2 |
:102EF000DE074091DF075091E0078091CF07909166 |
:102F0000D007AA2797FDA095BA2F280F391F4A1F6F |
:102F10005B1F2093DD073093DE074093DF0750935C |
:102F2000E00720913E0430913F04409140045091CD |
:102F300041048091CF079091D007AA2797FDA095D3 |
:102F4000BA2F280F391F4A1F5B1F20933E0430936E |
:102F50003F04409340045093410420914204309137 |
:102F6000430440914404509145048091CF079091CF |
:102F7000D007AA2797FDA095BA2F280F391F4A1FFF |
:102F80005B1F2093420430934304409344045093C6 |
:102F9000450420916C042A83222309F06BC08091A0 |
:102FA0006D04882309F066C08091620786FF62C0C5 |
:102FB00060912E0470912F0480913004909131041F |
:102FC000E090CF07F090D007A0907A04BB24CC24E7 |
:102FD000DD2420E030E140E050E00E94EB45002796 |
:102FE000F7FC0095102FCA01B901A80197010E94B2 |
:102FF0007745A60195010E94774520E038E040E042 |
:1030000050E00E94EB452093C5043093C6044093E2 |
:10301000C7045093C80460913604709137048091BE |
:10302000380490913904E090CF07F090D00720E069 |
:1030300030E140E050E00E94EB450027F7FC0095AE |
:10304000102FCA01B901A80197010E947745A60176 |
:1030500095010E94774520E038E040E050E00E9472 |
:10306000EB452093C1043093C2044093C3045093B2 |
:10307000C40410C01092C1041092C2041092C30480 |
:103080001092C4041092C5041092C6041092C70492 |
:103090001092C8048091A2079091A3072090C504C4 |
:1030A0003090C6044090C7045090C804820D931D10 |
:1030B0009093A3078093A2070091A2071091A30702 |
:1030C000A090C104B090C204C090C304D090C404C6 |
:1030D00080917B04682E772488249924C601B50149 |
:1030E000A40193010E94774520E032E040E050E0E7 |
:1030F0000E94EB45020F131F1093A3070093A20732 |
:1031000020913A0430913B0440913C0450913D049D |
:103110008091A2079091A307AA2797FDA095BA2FA7 |
:10312000280F391F4A1F5B1F20933A0430933B043A |
:1031300040933C0450933D04209136043091370471 |
:1031400040913804509139048091A2079091A307CF |
:103150006091680470916904861B970BAA2797FDFC |
:10316000A095BA2F280F391F4A1F5B1F20933604E2 |
:1031700030933704409338045093390480913604D7 |
:1031800090913704A0913804B0913904E0908B03FA |
:10319000F0908C0300918D0310918E03E816F906D0 |
:1031A0000A071B0704F580E197E2A0E0B0E08E1962 |
:1031B0009F09A00BB10B8093360490933704A09322 |
:1031C0003804B09339048091360490913704A0916B |
:1031D0003804B091390480933A0490933B04A0934F |
:1031E0003C04B0933D042091360430913704409163 |
:1031F00038045091390488279927DC018E199F09DA |
:10320000A00BB10B281739074A075B0704F580EFBD |
:1032100098EDAFEFBFEFE80EF91E0A1F1B1FE092FB |
:103220003604F092370400933804109339048091E7 |
:10323000360490913704A0913804B09139048093FA |
:103240003A0490933B04A0933C04B0933D048091D6 |
:10325000D2039091D3030F9734F488E19CEF9093BD |
:10326000A3078093A2078091D2039091D30307977D |
:1032700034F480E398EF9093A3078093A207909192 |
:10328000000199839A30A9F48091D2039091D303DD |
:10329000835F934034F088EE93E09093A30780938C |
:1032A000A2078091D2039091D3038A5F9340DCF010 |
:1032B00014C08091D2039091D303855E974034F07F |
:1032C00088EE93E09093A3078093A2078091D203A6 |
:1032D0009091D303835F974034F080ED97E0909313 |
:1032E000A3078093A2078091AA079091AB078A1940 |
:1032F0009B099093AB078093AA070091AA071091AE |
:10330000AB07C201B101A40193010E94774520E0FF |
:1033100032E040E050E00E94EB45021B130B10939B |
:10332000AB070093AA0720913204309133044091F7 |
:103330003404509135048091AA079091AB07AA27D5 |
:1033400097FDA095BA2F280F391F4A1F5B1F2093A6 |
:103350003204309333044093340450933504209165 |
:103360002E0430912F04409130045091310480910B |
:10337000AA079091AB0760916A0470916B04861B59 |
:10338000970BAA2797FDA095BA2F280F391F4A1F20 |
:103390005B1F20932E0430932F04409330045093EE |
:1033A000310480912E0490912F04A0913004B091AB |
:1033B0003104E0908703F090880300918903109115 |
:1033C0008A03E816F9060A071B0704F580E197E26D |
:1033D000A0E0B0E08E199F09A00BB10B80932E04E2 |
:1033E00090932F04A0933004B093310480912E0465 |
:1033F00090912F04A0913004B09131048093320455 |
:1034000090933304A0933404B093350420912E0498 |
:1034100030912F044091300450913104882799272E |
:10342000DC018E199F09A00BB10B281739074A0739 |
:103430005B0704F580EF98EDAFEFBFEFE80EF91EE4 |
:103440000A1F1B1FE0922E04F0922F0400933004F9 |
:103450001093310480912E0490912F04A091300498 |
:10346000B09131048093320490933304A0933404D8 |
:10347000B09335048091D0039091D1030F9734F429 |
:1034800088E19CEF9093AB078093AA078091D003CB |
:103490009091D103079734F480E398EF9093AB07B2 |
:1034A0008093AA0799819A30A9F48091D0039091D2 |
:1034B000D103835F934034F088EE93E09093AB07A1 |
:1034C0008093AA078091D0039091D1038A5F9340A3 |
:1034D000DCF014C08091D0039091D103855E9740B9 |
:1034E00034F088EE93E09093AB078093AA07809125 |
:1034F000D0039091D103835F974034F080ED97E043 |
:103500009093AB078093AA078FEE80937A00809107 |
:103510003E0490913F04A0914004B09141048093F7 |
:103520002A0490932B04A0932C04B0932D04809133 |
:103530002E0490912F04A0913004B0913104809317 |
:103540000E0490930F04A0931004B0931104809183 |
:10355000360490913704A0913804B09139048093D7 |
:10356000160490931704A0931804B0931904809143 |
:10357000320490913304A0913404B09135048093C7 |
:10358000120490931304A0931404B0931504809133 |
:103590003A0490913B04A0913C04B0913D04809387 |
:1035A0001A0490931B04A0931C04B0931D048091F3 |
:1035B000620787FF6BC02A81222309F067C08091D0 |
:1035C0006D04882309F062C08091AA079091AB072F |
:1035D000893C91057CF02091AA073091AB0780913E |
:1035E000AA079091AB07880F991F880F991F205247 |
:1035F000334015C08091AA079091AB0788539F4F25 |
:10360000A4F42091AA073091AB078091AA0790916A |
:10361000AB07880F991F880F991F205E3C4F820FC0 |
:10362000931F9093AB078093AA078091A207909174 |
:10363000A307893C91057CF02091A2073091A30754 |
:103640008091A2079091A307880F991F880F991F57 |
:103650002052334015C08091A2079091A307885350 |
:103660009F4FA4F42091A2073091A3078091A20755 |
:103670009091A307880F991F880F991F205E3C4FD8 |
:10368000820F931F9093A3078093A2072091540465 |
:103690003091550480915E07E82FFF27EE0FFF1F42 |
:1036A000E25DF84F8081918182599F4F2817390739 |
:1036B0001CF42F5F3F4F0CC08081918182599F4F36 |
:1036C000821793074CF42115310531F02150304019 |
:1036D000309355042093540420915604309157049C |
:1036E00080915F07E82FFF27EE0FFF1FE25DF84F85 |
:1036F0008081918182599F4F281739071CF42F5FD1 |
:103700003F4F0CC08081918182599F4F8217930750 |
:103710004CF42115310531F02150304030935704DD |
:1037200020935604209158043091590480916007E9 |
:10373000E82FFF27EE0FFF1FE25DF84F8081918198 |
:1037400082599F4F281739071CF42F5F3F4F0CC039 |
:103750008081918182599F4F821793074CF42115E4 |
:10376000310531F0215030403093590420935804F2 |
:1037700020915A0430915B0480916107E82FFF2764 |
:10378000EE0FFF1FE25DF84F8081918182599F4FBC |
:10379000281739071CF42F5F3F4F0CC0808191819F |
:1037A00082599F4F821793074CF42115310531F050 |
:1037B0002150304030935B0420935A04809154048C |
:1037C0009091550497FF05C010925504109254042F |
:1037D0000AC08F3F910539F034F08FEF90E090935D |
:1037E000550480935404809156049091570497FF98 |
:1037F00005C010925704109256040AC08F3F9105DD |
:1038000039F034F08FEF90E0909357048093560492 |
:10381000809158049091590497FF05C01092590463 |
:10382000109258040AC08F3F910539F034F08FEFA1 |
:1038300090E0909359048093580480915A04909199 |
:103840005B0497FF05C010925B0410925A040AC0F3 |
:103850008F3F910539F034F08FEF90E090935B0447 |
:1038600080935A0422960FB6F894DEBF0FBECDBFE8 |
:10387000DF91CF911F910F91FF90EF90DF90CF904C |
:10388000BF90AF909F908F907F906F905F904F9080 |
:103890003F902F90089510927A008091D0039091DC |
:1038A000D1039093AB078093AA078091D2039091A4 |
:1038B000D3039093A3078093A2078091D4039091A0 |
:1038C000D5039093D0078093CF078091D803909130 |
:1038D000D903AA2797FDA095BA2F74E0880F991FE6 |
:1038E000AA1FBB1F7A95D1F79093CD078093CC0781 |
:1038F0008091D6039091D703AA2797FDA095BA2F60 |
:1039000064E0880F991FAA1FBB1F6A95D1F7909397 |
:10391000D7078093D6078091DA039091DB039093C9 |
:10392000B4078093B3078FEE80937A0020915404FC |
:103930003091550480915E07E82FFF27EE0FFF1F9F |
:10394000E25DF84F8081918182599F4F2817390796 |
:103950001CF42F5F3F4F0CC08081918182599F4F93 |
:10396000821793074CF42115310531F02150304076 |
:1039700030935504209354042091560430915704F9 |
:1039800080915F07E82FFF27EE0FFF1FE25DF84FE2 |
:103990008081918182599F4F281739071CF42F5F2E |
:1039A0003F4F0CC08081918182599F4F82179307AE |
:1039B0004CF42115310531F021503040309357043B |
:1039C0002093560420915804309159048091600747 |
:1039D000E82FFF27EE0FFF1FE25DF84F80819181F6 |
:1039E00082599F4F281739071CF42F5F3F4F0CC097 |
:1039F0008081918182599F4F821793074CF4211542 |
:103A0000310531F02150304030935904209358044F |
:103A100020915A0430915B0480916107E82FFF27C1 |
:103A2000EE0FFF1FE25DF84F8081918182599F4F19 |
:103A3000281739071CF42F5F3F4F0CC080819181FC |
:103A400082599F4F821793074CF42115310531F0AD |
:103A50002150304030935B0420935A0480915404E9 |
:103A60009091550497FF05C010925504109254048C |
:103A70000AC08F3F910539F034F08FEF90E09093BA |
:103A8000550480935404809156049091570497FFF5 |
:103A900005C010925704109256040AC08F3F91053A |
:103AA00039F034F08FEF90E09093570480935604F0 |
:103AB000809158049091590497FF05C010925904C1 |
:103AC000109258040AC08F3F910539F034F08FEFFF |
:103AD00090E0909359048093580480915A049091F7 |
:103AE0005B0497FF05C010925B0410925A040AC051 |
:103AF0008F3F910539F034F08FEF90E090935B04A5 |
:103B000080935A046091850777278827992724ECAA |
:103B100039E040E050E00E9477456093870370935E |
:103B200088038093890390938A0360938B03709337 |
:103B30008C0380938D0390938E0308951F9380913F |
:103B400065078B3F98F08B3F19F4809154040EC0A9 |
:103B50008C3F19F48091560409C08D3F19F480916F |
:103B6000580404C08E3F21F480915A04809394033A |
:103B700080919403882319F41092940304C08F3F1A |
:103B800011F480939403809164078B3F98F08B3FEE |
:103B900019F4809154040EC08C3F19F4809156049E |
:103BA00009C08D3F19F48091580404C08E3F21F460 |
:103BB00080915A048093930380919303882319F48E |
:103BC0001092930305C0843618F084E68093930323 |
:103BD000809166078B3F98F08B3F19F480915404D5 |
:103BE0000EC08C3F19F48091560409C08D3F19F422 |
:103BF0008091580404C08E3F21F480915A04809330 |
:103C0000950380919503882319F41092950305C0BC |
:103C1000843618F084E680939503809168078B3F83 |
:103C200098F08B3F19F4809154040EC08C3F19F426 |
:103C30008091560409C08D3F19F48091580404C046 |
:103C40008E3F21F480915A048093960380919603CD |
:103C5000882319F41092960304C08F3F11F48093C7 |
:103C6000960380916F078B3F98F08B3F19F48091FA |
:103C700054040EC08C3F19F48091560409C08D3F46 |
:103C800019F48091580404C08E3F21F480915A04A5 |
:103C90008093970380919703882319F410929703D8 |
:103CA00004C08F3F11F480939703809170078B3F7E |
:103CB00098F08B3F19F4809154040EC08C3F19F496 |
:103CC0008091560409C08D3F19F48091580404C0B6 |
:103CD0008E3F21F480915A04809398038091980339 |
:103CE0008B3010F48AE002C08F3F11F48093980368 |
:103CF000809171078B3F98F08B3F19F480915404A9 |
:103D00000EC08C3F19F48091560409C08D3F19F400 |
:103D10008091580404C08E3F21F480915A0480930E |
:103D2000990380919903882319F41092990304C090 |
:103D30008F3F11F480939903809176078B3F98F021 |
:103D40008B3F19F4809154040EC08C3F19F480917C |
:103D5000560409C08D3F19F48091580404C08E3F69 |
:103D600021F480915A0480939B0380919B038823C4 |
:103D700019F410929B0304C08F3F11F480939B03AE |
:103D8000809177078B3F98F08B3F19F48091540412 |
:103D90000EC08C3F19F48091560409C08D3F19F470 |
:103DA0008091580404C08E3F21F480915A0480937E |
:103DB000720480917204882319F41092720404C072 |
:103DC0008F3F11F480937204809178078B3F98F0B5 |
:103DD0008B3F19F4809154040EC08C3F19F48091EC |
:103DE000560409C08D3F19F48091580404C08E3FD9 |
:103DF00021F480915A048093730480917304882382 |
:103E000019F41092730404C08F3F11F4809373046B |
:103E1000809179078B3F98F08B3F19F4809154047F |
:103E20000EC08C3F19F48091560409C08D3F19F4DF |
:103E30008091580404C08E3F21F480915A048093ED |
:103E4000740480917404882319F41092740404C0DB |
:103E50008F3F11F48093740480917A078B3F98F020 |
:103E60008B3F19F4809154040EC08C3F19F480915B |
:103E7000560409C08D3F19F48091580404C08E3F48 |
:103E800021F480915A0480937504809175048823ED |
:103E900019F41092750404C08F3F11F480937504D7 |
:103EA00080918A078B3F98F08B3F19F480915404DE |
:103EB0000EC08C3F19F48091560409C08D3F19F44F |
:103EC0008091580404C08E3F21F480915A0480935D |
:103ED000760480917604882319F41092760404C045 |
:103EE0008F3F11F48093760480918B078B3F98F07D |
:103EF0008B3F19F4809154040EC08C3F19F48091CB |
:103F0000560409C08D3F19F48091580404C08E3FB7 |
:103F100021F480915A048093770480917704882358 |
:103F200019F41092770404C08F3F11F48093770442 |
:103F300080918C078B3F98F08B3F19F4809154044B |
:103F40000EC08C3F19F48091560409C08D3F19F4BE |
:103F50008091580404C08E3F21F480915A048093CC |
:103F6000780480917804882319F41092780404C0AE |
:103F70008F3F11F48093780480918D078B3F98F0E8 |
:103F80008B3F19F4809154040EC08C3F19F480913A |
:103F9000560409C08D3F19F48091580404C08E3F27 |
:103FA00021F480915A0480937904809179048823C4 |
:103FB00019F41092790404C08F3F11F480937904AE |
:103FC00080917B078B3F98F08B3F19F480915404CC |
:103FD0000EC08C3F19F48091560409C08D3F19F42E |
:103FE0008091580404C08E3F21F480915A0480933C |
:103FF0009C0380919C03882319F410929C0304C0B5 |
:104000008F3F11F480939C03809180078B3F98F041 |
:104010008B3F19F4809154040EC08C3F19F48091A9 |
:10402000560409C08D3F19F48091580404C08E3F96 |
:1040300021F480915A0480939D0380919D038823ED |
:1040400019F410929D0304C08F3F11F480939D03D7 |
:10405000809183078B3F98F08B3F19F48091540433 |
:104060000EC08C3F19F48091560409C08D3F19F49D |
:104070008091580404C08E3F21F480915A048093AB |
:104080007A0480917A04882319F410927A0404C087 |
:104090008F3F11F480937A04809184078B3F98F0CE |
:1040A0008B3F19F4809154040EC08C3F19F4809119 |
:1040B000560409C08D3F19F48091580404C08E3F06 |
:1040C00021F480915A0480937B0480917B0488239F |
:1040D00019F410927B0404C08F3F11F480937B0489 |
:1040E000809189078B3F98F08B3F19F4809154049D |
:1040F0000EC08C3F19F48091560409C08D3F19F40D |
:104100008091580404C08E3F21F480915A0480931A |
:104110009E0380919E03882319F410929E0304C08D |
:104120008F3F11F480939E0310919B03612F77279B |
:1041300067FD7095872F972F0E94B54417FF06C023 |
:1041400020E030E040E853E40E94104427E137EBE0 |
:1041500041ED58E30E942F4560938F0370939003C5 |
:10416000809391039093920380916D078093CE0783 |
:1041700080916C078093AC071F9108951F93182FAF |
:104180000EC080916304882361F484E690E09093EC |
:10419000C5038093C4038AEF90E00E94710D115013 |
:1041A00080F71F91089580916304882301F5109290 |
:1041B000A9071092A4071092C5071092C907809111 |
:1041C000AE03882311F08093A4078091AF03882366 |
:1041D00011F08093A9078091B003882311F0809398 |
:1041E000C9078091B103882311F08093C50780919E |
:1041F000A40799279093EC068093EB068091A9077A |
:1042000099279093EE068093ED068091C907992730 |
:104210009093F0068093EF068091C50799279093BD |
:10422000F2068093F1061092F3031092F4030E94B9 |
:10423000C0140895469A1092050410920404109236 |
:1042400007041092060480E090E0A0E0B0E08093C4 |
:10425000080490930904A0930A04B0930B041092ED |
:10426000FB031092FA031092FD031092FC031092CC |
:10427000FF031092FE0310927A0410927B040E94B6 |
:104280004B1C84E690E00E945B0D0E944B1C8091C9 |
:10429000620780FF10C080910E0390910F03875B2F |
:1042A000934038F480910E0390910F038E5E9240FC |
:1042B00010F40E9425108091D0039091D103909327 |
:1042C000FB038093FA038091D2039091D3039093E0 |
:1042D000FD038093FC038091D4039091D5039093C8 |
:1042E000FF038093FE038091FC039091FD03909364 |
:1042F0000104809300048091FA039091FB03909352 |
:1043000003048093020444E050E0DA010E94064670 |
:10431000802D853038F18091D6079091D70797FF8F |
:1043200003C0909581959F4F60E170E00E94B64573 |
:1043300070930704609306048091CC079091CD0799 |
:1043400097FF03C0909581959F4F60E170E00E94B8 |
:10435000B64570930504609304046091160770914C |
:10436000170739C0DA010E940646802D4F5F5F4F64 |
:10437000DA010E940646202D9927982F8827820F60 |
:10438000911D90930504809304044F5F5F4FDA0101 |
:104390000E940646802D4F5F5F4FDA010E9406465D |
:1043A000202D9927982F8827820F911D909307041D |
:1043B000809306044F5F5F4FDA010E940646602D2E |
:1043C0004F5F5F4FDA010E940646202D7727762F38 |
:1043D0006627620F711D882777FD8095982F0E94B0 |
:1043E000B544609308047093090480930A04909381 |
:1043F0000B0410922E0410922F041092300410928D |
:10440000310410923204109233041092340410924A |
:10441000350410923604109237041092380410922A |
:10442000390410923A0410923B0410923C0410920A |
:104430003D0410923E0410923F04109240041092EA |
:1044400041041092AB071092AA071092A307109292 |
:10445000A2071092D0071092CF0780910A03909183 |
:104460000B03A0910C03B0910D0390931907809357 |
:1044700018071092E3031092E20310924604109280 |
:104480004704109248041092490480914A04909184 |
:104490004B0490934D0480934C040E94BA3982E3FC |
:1044A00090E09093C5038093C403609185077727BC |
:1044B0008827992724EC39E040E050E00E947745B6 |
:1044C00060938703709388038093890390938A0392 |
:1044D000609186077727882799270E947745609300 |
:1044E0008B0370938C0380938D0390938E031092B3 |
:1044F000A00310929F0320914A0430914B0482EE56 |
:1045000094E0AC01249FC001259F900D349F900D35 |
:104510001124AA2797FDA095BA2F8093DD079093C9 |
:10452000DE07A093DF07B093E0078EE190E0909361 |
:10453000CC048093CB049093CA048093C90408955B |
:1045400081E080935A0752E050935B0743E0409329 |
:104550005C0774E070935D0765E060935E0786E03A |
:1045600080935F0787E08093600798E090936107EE |
:1045700080EC809362078EE1809363078BEF8093DA |
:1045800065073AE03093660722E32093640720939F |
:104590006807509367074093690710926A079093E2 |
:1045A0006B078FE080936C078AEF80936D078AE139 |
:1045B00080936E0780E880936F0788EC8093700784 |
:1045C0008FEA8093710794E6909372078FE580934A |
:1045D00073078CE380937407109275073093760706 |
:1045E00080E58093770710927807109279071092F0 |
:1045F0007A0710928A0710928B0710928C071092FC |
:104600008D0790937B0788E280937C0710928F0739 |
:1046100020937D0786E980937E0760937F07209330 |
:1046200080078AE5809381072093820710928E0786 |
:104630009093830730938407909385079093860720 |
:10464000909387077093880720938907A4E9B7E0C0 |
:10465000ECE6F3E08CE001900D928150E1F70895D3 |
:1046600081E080935A0792E090935B0783E0809308 |
:104670005C0744E040935D0755E050935E0786E099 |
:1046800080935F0787E08093600788E080936107ED |
:1046900080E4809362078EE1809363078BEF8093C1 |
:1046A00065073AE03093660722E32093640720937E |
:1046B0006807909367074093690710926A073093E1 |
:1046C0006B078FE080936C078AEF80936D078AE118 |
:1046D00080936E0780E880936F078FEA809370075E |
:1046E0008093710794E6909372078FE58093730728 |
:1046F0008CE3809374071092750780E280937607AD |
:1047000080E58093770710927807109279071092CE |
:104710007A0710928A0710928B0710928C071092DA |
:104720008D0790937B0788E280937C0710928F0718 |
:1047300020937D0786E980937E0750937F0720931F |
:1047400080078AE5809381072093820710928E0765 |
:1047500090938307309384079093850790938607FF |
:1047600090938707409388078BE480938907A4E997 |
:10477000B7E0E6E7F3E08CE001900D928150E1F7BD |
:10478000089581E080935A0782E080935B0783E07D |
:1047900080935C0734E030935D0765E060935E07CB |
:1047A00086E080935F0787E08093600798E09093AE |
:1047B000610780E4809362078EE1809363078BEF4B |
:1047C000809365075AE05093660722E320936407BD |
:1047D00020936807309367073093690790936A07BF |
:1047E0008EE080936B078FE080936C078AEF809355 |
:1047F0006D078AE180936E0780E880936F0788E7F2 |
:104800008093700746E94093710794E6909372078E |
:104810008FE5809373078CE380937407109275077C |
:1048200080E28093760710927707109278071092B3 |
:10483000790710927A0710928A0710928B071092CC |
:104840008C0710928D0790937B0788E280937C07FA |
:1048500010928F0720937D0740937E0760937F0718 |
:10486000209380078AE58093810720938207109226 |
:104870008E079093830750938407909385079093B6 |
:104880008607209387073093880790938907A4E9C8 |
:10489000B7E0EEE7F3E08CE001900D928150E1F794 |
:1048A00008952F923F924F925F926F927F928F92D4 |
:1048B0009F92AF92BF92CF92DF92EF92FF920F93AF |
:1048C0001F93CF93DF93CDB7DEB766970FB6F894FB |
:1048D000DEBF0FBECDBF0E94531680915408909149 |
:1048E0005508009729F00197909355088093540834 |
:1048F0000E94863A892B39F4809100018A3011F4A4 |
:10490000289A01C02898299A299AE0915C07FF27E4 |
:10491000EE0FFF1FE25DF84F0190F081E02DE858A7 |
:10492000FF4F8091CE07082F112704511040E01748 |
:10493000F1070CF48F012091080330910903809155 |
:10494000720799270297409182045091830482173D |
:104950009307ACF122E04D3B520714F1109283040F |
:1049600010928204E091C904F091CA042091CB0412 |
:104970003091CC04C901880F991F820F931F880FB3 |
:10498000991F880F991F6FE070E00E94B6456E175F |
:104990007F0764F43197F093CA04E093C90406C01A |
:1049A0004F5F5F4F50938304409382048091C9040A |
:1049B0009091CA0480179107F4F1C8013CC033E01C |
:1049C000493E5307BCF02091CB043091CC04C9017F |
:1049D00043E0880F991F4A95E1F7820F931F800FDC |
:1049E000911F6AE070E00E94B6457093CC0460931A |
:1049F000CB0419C0CA01019690938304809382046A |
:104A00006AE070E00E94B645892B89F48091C90460 |
:104A10009091CA048017910734F401969093CA04C8 |
:104A20008093C90404C01093CA040093C904809100 |
:104A3000C9049091CA049C838B8397FF02C01C8297 |
:104A40001B8280915C04843608F05DC08091030174 |
:104A5000882399F480910403909105038F5F9F4F01 |
:104A600061F488E99AE39093C5038093C40380E0DE |
:104A70009CE090930503809304038091A30490919C |
:104A8000A404009731F001979093A4048093A304A9 |
:104A900004C01092630410925004809100018A3087 |
:104AA00011F4289A01C0289880919E0490919F0447 |
:104AB000815D974028F180917307682F77277C8369 |
:104AC0006B8381E080935004E0915A07FF27EE0F3B |
:104AD000FF1FE25DF84F11821082E0915B07FF2714 |
:104AE000EE0FFF1FE25DF84F11821082E0915D072B |
:104AF000FF27EE0FFF1FE25DF84F118210826AC29E |
:104B00001092630467C280915C048D3808F462C21D |
:104B1000109250048091740722E3829FC0011124F7 |
:104B20009093A4048093A3048B819C8189976CF05B |
:104B300080919E0490919F04AFEF8F3F9A0781F17F |
:104B4000019690939F0480939E0480919E0490917F |
:104B50009F04883C910520F0EB81FC81B89704F517 |
:104B60001092BD041092BE041092BF041092C004B3 |
:104B70001092B9041092BA041092BB041092BC04B3 |
:104B800010923E0410923F0410924004109241048F |
:104B9000109242041092430410924404109245046F |
:104BA0002B813C81293C31050CF472C18091630456 |
:104BB000882309F00FC280915D07E82FFF27EE0FD1 |
:104BC000FF1FE25DF84F808191818C3491050CF4D8 |
:104BD000D5C08091A2048F5F8093A204893C08F421 |
:104BE000F9C129980E941A21109263041092A2041C |
:104BF00010929F0410929E0480915A07282F332709 |
:104C0000F901EE0FFF1FE25DF84F8081918187343B |
:104C100091059CF4E0915B07FF27EE0FFF1FE25D1B |
:104C2000F84F0190F081E02DF7FF03C0F095E1957A |
:104C3000FF4FE734F1050CF46CC080915B07682FDF |
:104C40007727DB01AA0FBB1FA25DB84F8D919C9106 |
:104C50001197873491053CF0F901EE0FFF1FE25DDB |
:104C6000F84F808191818D919C918734910564F0FA |
:104C7000F901EE0FFF1FE25DF84F808191818734CB |
:104C8000910514F042E001C041E0FB01EE0FFF1F6F |
:104C9000E25DF84F80819181863491055CF4F901E1 |
:104CA000EE0FFF1FE25DF84F8081918187349105FF |
:104CB0000CF043E0FB01EE0FFF1FE25DF84F808137 |
:104CC00091818A5B9F4F5CF4F901EE0FFF1FE25D5B |
:104CD000F84F80819181873491050CF044E0660F94 |
:104CE000771F625D784FDB018D919C918A5B9F4FAE |
:104CF0005CF4220F331F225D384FF90180819181CE |
:104D0000863491050CF445E0A2E0B0E0042E0E9448 |
:104D10000E460E948B0247E46AE577E00E94B202E9 |
:104D20000E948B020E94BE208091620780FF10C00B |
:104D300080910E0390910F03875B934038F480912C |
:104D40000E0390910F038E5E924010F40E94251086 |
:104D50000E94D93A80913608882309F43BC188EE35 |
:104D600093E00E94710D80ED97E09093C5038093CE |
:104D7000C40384EF91E00E94710D2CC18081918168 |
:104D8000855B9F4F0CF081C08091A2048F5F809360 |
:104D9000A204893C08F41EC129988FEF04E010E0BA |
:104DA000D801082E0E940E46109263041092A204AD |
:104DB00010929F0410929E040E941A218091040474 |
:104DC0009091050460E071E00E94B645D801062E7E |
:104DD0000E940E46809104049091050460E071E009 |
:104DE0000E94B6450F5F1F4FD801082E0E940E4645 |
:104DF000809106049091070460E071E00E94B6453E |
:104E00000F5F1F4FD801062E0E940E4680910604A8 |
:104E10009091070460E071E00E94B6450F5F1F4F5C |
:104E2000D801082E0E940E46609108047091090472 |
:104E300080910A0490910B040E949844DC01CB01FC |
:104E400060E071E00E94B6450F5F1F4FD801062E4B |
:104E50000E940E46609108047091090480910A0432 |
:104E600090910B040E949844DC01CB0160E071E05A |
:104E70000E94B6450F5F1F4FD801082E0E940E46B4 |
:104E80000E948B020E94BE20A5C01092A204A2C064 |
:104E9000EB81FC81B3970CF09DC080915D07482F9A |
:104EA0005527FA01EE0FFF1FE25DF84F80819181D7 |
:104EB000855B9F4F0CF06EC08091A1048F5F809343 |
:104EC000A104893C08F468C0469A88EC8093A10448 |
:104ED00081E090E090939F0480939E0481E0809312 |
:104EE00063041092B5041092B6041092B7041092A5 |
:104EF000B80410923E0410923F04109240041092A5 |
:104F000041041092420410924304109244041092FF |
:104F1000450410922E0410922F0410923004109227 |
:104F20003104109236041092370410923804109213 |
:104F3000390480910E0490910F04A0911004B09157 |
:104F400011048093320490933304A0933404B093FB |
:104F500035048091160490911704A0911804B09123 |
:104F6000190480933A0490933B04A0933C04B093BB |
:104F70003D041092BD041092BE041092BF04109222 |
:104F8000C0041092B9041092BA041092BB0410929B |
:104F9000BC0402C01092A104440F551F425D584F3B |
:104FA000DA018D919C918C34910594F08091A0044C |
:104FB0008F5F8093A004893C68F046981092630448 |
:104FC00088EC8093A00410929F0410929E0402C06B |
:104FD0001092A00480916B03815080936B038091A9 |
:104FE0006B038F3F29F080915004882309F442C35A |
:104FF0000E949E1D80915A07A82EBB24D501AA0F9E |
:10500000BB1FFD01E25DF84F0190F081E02DFC8BAC |
:10501000EB8B80916907E82EFF24AC5BB84F0D90B5 |
:10502000BC91A02DBA8BA98B80916A07482E55247C |
:1050300080915B07C82EDD24C601880F991FDC0113 |
:10504000A25DB84F0D90BC91A02DB88BAF878C5B43 |
:10505000984FFC0120803180E0915D07AE2FBB2787 |
:10506000AA0FBB1FA25DB84F0D90BC91A02DBE87AB |
:10507000AD8710919803612F772767FD7095872F73 |
:10508000972F0E94B54417FF06C020E030E040E8AB |
:1050900053E40E94104420E030E040E251E40E94DA |
:1050A000104420E030E040E85BE30E942F453B01E4 |
:1050B0004C016093D1077093D2078093D3079093EC |
:1050C000D40710919903612F772767FD7095872F7B |
:1050D000972F0E94B54417FF06C020E030E040E85B |
:1050E00053E40E94104420E030EE4BE257E40E946B |
:1050F00052446093C1077093C2078093C307909393 |
:10510000C4072091B303222311F40C94C8388AE019 |
:1051100090E09093C5038093C403E22FFF27E2FF42 |
:1051200009C080917204482F5527440F551F440F22 |
:10513000551F10C0E3FD03C040E050E00BC080915C |
:1051400072049927880F991F880F991F44275527A4 |
:10515000481B590B20917C0430917D04C901F3E078 |
:10516000880F991FFA95E1F7821B930B840F951F07 |
:1051700068E070E00E94B6458B0170937D046093F7 |
:105180007C04E4FF09C080917204482F5527440F26 |
:10519000551F440F551F0FC0E5FD02C00C94DD38AC |
:1051A000809172049927880F991F880F991F4427AF |
:1051B0005527481B590B20917E0430917F04C9016B |
:1051C00063E0880F991F6A95E1F7821B930B840FA8 |
:1051D000951F68E070E00E94B6457E8B6D8B7093E2 |
:1051E0007F0460937E048091B203282F332723FF2E |
:1051F00003C082E390E004C022FF07C08EEC9FEF63 |
:10520000909381048093800404C0109281041092D2 |
:10521000800421FF09C080919F039091A003019613 |
:105220009093A00380939F0324FF09C080919F0364 |
:105230009091A00301979093A00380939F034B89C3 |
:105240005C894E9D90014F9D300D5E9D300D112467 |
:1052500069897A89649DC001659D900D749D900D4A |
:105260001124280F391FC80168E070E00E94B6457C |
:10527000260F371F3C8B2B8B30935E0420935D04ED |
:105280008F8598898E9D80018F9D100D9E9D100D9C |
:105290001124249CC001259C900D349C900D112458 |
:1052A000080F191F8D899E8968E070E00E94B6453D |
:1052B000060F171F1093600400935F048091800411 |
:1052C00090918104AD85BE858A1B9B0B90936204EF |
:1052D000809361048091620782FF0CC080E090E0BF |
:1052E000A0E0B0E08093C1079093C207A093C307EA |
:1052F000B093C40720E030E040E050E0C401B301C7 |
:105300000E94BF44882364F480E090E0A0E0B0E015 |
:105310008093D1079093D207A093D307B093D4077B |
:1053200020E030E040E050E06091C1077091C2079A |
:105330008091C3079091C4070E94BF44882364F4FE |
:1053400080E090E0A0E0B0E08093C1079093C207B6 |
:10535000A093C307B093C40780918E07682F772767 |
:1053600034E0832E912C8622972262FDC5C063FD16 |
:10537000C3C080910E0490910F04A0911004B091CD |
:10538000110481569A4EA040B0404CF1C70123E071 |
:10539000880F991F2A95E1F7EB89FC89E81BF90B27 |
:1053A000F0935E04E0935D0480910E0490910F04ED |
:1053B000A0911004B091110481589843A140B040CD |
:1053C0000CF441C0C701B4E0880F991FBA95E1F70A |
:1053D000E81BF90BF0935E04E0935D0434C0809108 |
:1053E0000E0490910F04A0911004B0911104805A02 |
:1053F0009541AF4FBF4F3CF59701A3E0220F331FFC |
:10540000AA95E1F74B895C89240F351F30935E0420 |
:1054100020935D0480910E0490910F04A0911004DC |
:10542000B091110481589843A140B04064F0C70185 |
:10543000F4E0880F991FFA95E1F7281B390B309398 |
:105440005E0420935D048091160490911704A0914E |
:105450001804B091190481569A4EA040B040DCF077 |
:10546000C701E3E0880F991FEA95E1F79801281B2F |
:10547000390B3093600420935F048091160490915F |
:105480001704A0911804B091190481589843A140C1 |
:10549000B04094F126C08091160490911704A09119 |
:1054A0001804B0911904805A9541AF4FBF4F24F5AD |
:1054B000970173E0220F331F7A95E1F7200F311F18 |
:1054C0003093600420935F04809116049091170438 |
:1054D000A0911804B091190481589843A140B0409C |
:1054E0005CF054E0EE0CFF1C5A95E1F72E193F09D1 |
:1054F0003093600420935F04F601EE0FFF1FE25D1E |
:10550000F84F2081318180918107482F552742171C |
:10551000530734F4892821F081E080936E0411C090 |
:10552000F601EE0FFF1FE25DF84F2081318180917F |
:105530008207DA01A81BB1092A173B0714F410925D |
:105540006E04F601EE0FFF1FE25DF84F808191813E |
:10555000AA27BB27A41BB50B8A179B0734F463FF4C |
:1055600004C081E080936F0417C080916F0488238A |
:1055700099F0CC0CDD1CEEE2F7E0CE0EDF1EF6015A |
:1055800020813181809182079927841B950B821796 |
:10559000930714F410926F04F501EE0FFF1FE25D04 |
:1055A000F84F808191814817590734F460FF04C097 |
:1055B00081E08093710415C080917104882389F083 |
:1055C000F501EE0FFF1FE25DF84F208131818091E0 |
:1055D0008207FA01E81BF1092E173F0714F4109215 |
:1055E0007104F501EE0FFF1FE25DF84F808191819C |
:1055F0008A179B0734F461FF04C081E08093700434 |
:1056000017C080917004882399F0AA0CBB1C2EE26D |
:1056100037E0A20EB31ED5012D913C9180918207F7 |
:105620009927841B950B8217930714F4109270042A |
:1056300080916E04882321F480916F04882321F0E7 |
:1056400081E080936D0402C010926D04809171041A |
:10565000882321F480917004882351F081E08093A5 |
:105660006C0410926D0410926E0410926F040EC0C0 |
:1056700010926C0480916D04882311F40C94E1382D |
:1056800084E690E09093C5038093C40380918007E3 |
:105690009927EB81FC818E179F0714F49C838B83E1 |
:1056A00080915004882341F11092620410926104A9 |
:1056B00010925E0410925D041092600410925F04D8 |
:1056C0008DEC9CECACECBDE38093D1079093D207BA |
:1056D000A093D307B093D4078AE097EDA3EABBE386 |
:1056E0008093C1079093C207A093C307B093C407E8 |
:1056F00010926D0410926C048091B7079091B807D6 |
:10570000A091B907B091BA0720910E0430910F040F |
:105710004091100450911104820F931FA41FB51FD4 |
:105720008093B7079093B807A093B907B093BA07CF |
:105730008091BB079091BC07A091BD07B091BE07B7 |
:1057400020911604309117044091180450911904C7 |
:10575000820F931FA41FB51F8093BB079093BC07B4 |
:10576000A093BD07B093BE078091AF079091B0079B |
:10577000A091B107B091B2072091120430911304A7 |
:105780004091140450911504820F931FA41FB51F5C |
:105790008093AF079093B007A093B107B093B2077F |
:1057A0008091A5079091A607A091A707B091A8079F |
:1057B00020911A0430911B0440911C0450911D0447 |
:1057C000820F931FA41FB51F8093A5079093A60770 |
:1057D000A093A707B093A80750906C04552011F030 |
:1057E0000C94413980916D04882311F00C94413957 |
:1057F0000C94E938F0EE6F16FFEF7F06FFEF8F068F |
:10580000FFEF9F0644F4E0EE6E2EEFEF7E2EEFEFFB |
:105810008E2EEFEF9E2E213231054105510534F0D9 |
:1058200070E2E72EF12C012D112D0DC0205E3F4FAF |
:105830004F4F5F4F44F460EEE62E6FEFF62E6FEFA2 |
:10584000062F6FEF162F80912E0490912F04A091B8 |
:105850003004B091310486199709A809B9098093D9 |
:105860002E0490932F04A0933004B09331048091C0 |
:10587000360490913704A0913804B09139048E1900 |
:105880009F09A00BB10B8093360490933704A0932B |
:105890003804B09339048091E4039091E5038F3F7D |
:1058A000910509F008F47DC4552009F0FEC38091EC |
:1058B0006D04882309F0F9C36091B7077091B807A8 |
:1058C0008091B9079091BA0720E031E040E050E0C4 |
:1058D0000E94EB452093B7073093B8074093B90770 |
:1058E0005093BA076091BB077091BC078091BD07C8 |
:1058F0009091BE0720E031E040E050E00E94EB458F |
:105900002093BB073093BC074093BD075093BE075D |
:10591000E0906E07FF240027112720911E0430918C |
:105920001F044091200450912104C801B7010E9436 |
:10593000774520E031E040E050E00E94EB452093C5 |
:105940001E0430931F04409320045093210420919F |
:105950002204309123044091240450912504C8016D |
:10596000B7010E94774520E031E040E050E00E941E |
:10597000EB45209322043093230440932404509356 |
:105980002504609126047091270480912804909149 |
:10599000290420E031E040E050E00E94EB452093F4 |
:1059A00026043093270440932804509329046091DF |
:1059B000B7077091B8078091B9079091BA07209105 |
:1059C0001E0430911F044091200450912104E09066 |
:1059D0008707FF2400271127621B730B840B950B8D |
:1059E000A80197010E94EB452093960430939704F9 |
:1059F0004093980450939904CA01B90120E031E022 |
:105A000040E050E00E94EB45390130936B04209355 |
:105A10006A046091BB077091BC078091BD079091AB |
:105A2000BE07209122043091230440912404509118 |
:105A30002504621B730B840B950BA80197010E9430 |
:105A4000EB45CA01B90120E031E040E050E00E949E |
:105A5000EB45490130936904209368046091AF07D6 |
:105A60007091B0078091B1079091B20720E031E0CA |
:105A700040E050E00E94EB452093AF073093B00721 |
:105A80004093B1075093B2076091A5077091A607A4 |
:105A90008091A7079091A80720E031E040E050E016 |
:105AA0000E94EB452093A5073093A6074093A707D4 |
:105AB0005093A807E0901204F0901304009114048E |
:105AC0001091150480910E0490910F04A091100480 |
:105AD000B0911104E81AF90A0A0B1B0BE092B10409 |
:105AE000F092B2040093B3041093B404A0901A048B |
:105AF000B0901B04C0901C04D0901D04809116042B |
:105B000090911704A0911804B0911904A81AB90A29 |
:105B1000CA0ADB0AA092AD04B092AE04C092AF04F0 |
:105B2000D092B004E092A904F092AA040093AB04CE |
:105B30001093AC04A092A504B092A604C092A7044E |
:105B4000D092A8048091320490913304A09134043F |
:105B5000B09135048E199F09A00BB10B80933204CC |
:105B600090933304A0933404B093350480913A04A5 |
:105B700090913B04A0913C04B0913D048A199B098B |
:105B8000AC09BD0980933A0490933B04A0933C0474 |
:105B9000B0933D048091DD079091DE07A091DF076F |
:105BA000B091E007805D9D4DA640B040A4F080918B |
:105BB000DD079091DE07A091DF07B091E007805DDF |
:105BC0009D4DA640B0408093DD079093DE07A093E3 |
:105BD000DF07B093E0078091DD079091DE07A09189 |
:105BE000DF07B091E007B7FF14C08091DD07909107 |
:105BF000DE07A091DF07B091E00780539242A94FE2 |
:105C0000BF4F8093DD079093DE07A093DF07B0932B |
:105C1000E007809100018A3011F4289801C0289A89 |
:105C200081E090E090939104809390048091B70775 |
:105C30009091B807A091B907B091BA072091880454 |
:105C40003091890440918A0450918B04281B390BB0 |
:105C50004A0B5B0B57FF07C0509540953095219537 |
:105C60003F4F4F4F5F4F20523E44404050400CF05A |
:105C7000B9C091E0E91690E1F90690E0090790E0DB |
:105C800019070CF44EC080918F04882309F445C095 |
:105C9000D801C7015CE0B595A795979587955A956A |
:105CA000D1F701969093910480939004D801C70195 |
:105CB00043E0B595A795979587954A95D1F7809339 |
:105CC000960490939704A0939804B09399048958EC |
:105CD0009341A040B04064F088E893E1A0E0B0E0D8 |
:105CE0008093960490939704A0939804B09399049A |
:105CF0006091960470919704809198049091990412 |
:105D000020E031E040E050E00E94EB45620E731E5F |
:105D100070926B0460926A0462C081E080938F0489 |
:105D20005EC010928F04F0E0EF16F0EFFF06FFEF79 |
:105D30000F07FFEF1F070CF052C080918E048823DD |
:105D400009F449C088279927DC018E199F09A00B07 |
:105D5000B10B3CE0B595A795979587953A95D1F706 |
:105D600001969093910480939004C801B70128E0B4 |
:105D700030E040E050E00E94EB45209396043093E1 |
:105D80009704409398045093990428573C4E4F4FE2 |
:105D90005F4F64F488E79CEEAFEFBFEF809396040B |
:105DA00090939704A0939804B093990460919604FB |
:105DB00070919704809198049091990420E031E0CB |
:105DC00040E050E00E94EB45620E731E70926B043F |
:105DD00060926A040BC081E080938E0407C0109229 |
:105DE0008E0404C010929104109290048091880750 |
:105DF000682E77248091900490919104681679061A |
:105E000024F4709291046092900471E0E71674E0BB |
:105E1000F70670E0070770E017075CF08091FA035F |
:105E20009091FB032091900430919104820F931F75 |
:105E300013C080E0E8168CEFF8068FEF08078FEFAD |
:105E4000180774F48091FA039091FB032091900459 |
:105E500030919104821B930B9093FB038093FA0380 |
:105E600081E090E0909391048093900410929204CA |
:105E70001092930410929404109295048091BB07A1 |
:105E80009091BC07A091BD07B091BE0720918404FA |
:105E9000309185044091860450918704281B390B6A |
:105EA0004A0B5B0B57FF07C05095409530952195E5 |
:105EB0003F4F4F4F5F4F20523E44404050400CF008 |
:105EC000B9C0A1E0AA16A0E1BA06A0E0CA06A0E007 |
:105ED000DA060CF44EC080918D04882309F445C085 |
:105EE000D601C5012CE0B595A795979587952A957C |
:105EF000D1F701969093910480939004D601C50147 |
:105F000003E0B595A795979587950A95D1F7809366 |
:105F1000920490939304A0939404B09395048958A9 |
:105F20009341A040B04064F088E893E1A0E0B0E085 |
:105F30008093920490939304A0939404B093950457 |
:105F400060919204709193048091940490919504CF |
:105F500020E031E040E050E00E94EB45820E931ECD |
:105F6000909269048092680462C081E080938D04FD |
:105F70005EC010928D04F0E0AF16F0EFBF06FFEFA9 |
:105F8000CF06FFEFDF060CF052C080918C0488230F |
:105F900009F449C088279927DC018A199B09AC09B3 |
:105FA000BD091CE0B595A795979587951A95D1F7EA |
:105FB00001969093910480939004C601B50128E066 |
:105FC00030E040E050E00E94EB4520939204309393 |
:105FD0009304409394045093950428573C4E4F4F9C |
:105FE0005F4F64F488E79CEEAFEFBFEF80939204BD |
:105FF00090939304A0939404B093950460919204B9 |
:1060000070919304809194049091950420E031E084 |
:1060100040E050E00E94EB45820E931E909269048E |
:10602000809268040BC081E080938C0407C01092BA |
:106030008C0404C0109291041092900480919004FA |
:10604000909191046816790624F4709291046092FC |
:10605000900471E0A71674E0B70670E0C70670E020 |
:10606000D7065CF08091FC039091FD032091900491 |
:1060700030919104820F931F13C080E0A8168CEF1B |
:10608000B8068FEFC8068FEFD806BCF48091FC03EA |
:106090009091FD032091900430919104821B930B09 |
:1060A0009093FD038093FC0308C010926904109242 |
:1060B000680410926B0410926A0420E030E040E023 |
:1060C00050E06091C1077091C2078091C307909121 |
:1060D000C4070E94BF44882341F4109269041092BF |
:1060E000680410926B0410926A048091B707909133 |
:1060F000B807A091B907B091BA078093880490932C |
:106100008904A0938A04B0938B048091BB0790917B |
:10611000BC07A091BD07B091BE0780938404909303 |
:106120008504A0938604B093870410921E041092F5 |
:106130001F04109220041092210410922204109245 |
:106140002304109224041092250410922604109225 |
:10615000270410922804109229041092B707109275 |
:10616000B8071092B9071092BA071092BB071092A5 |
:10617000BC071092BD071092BE071092AF07109295 |
:10618000B0071092B1071092B2071092A5071092B3 |
:10619000A6071092A7071092A8071092E503109285 |
:1061A000E4038090610490906204940197FE04C01F |
:1061B0002227332728193909253131053CF08091F0 |
:1061C000620784FD03C081E080939A04E0906B072E |
:1061D0005901CC24B7FCC094DC2CB401882777FD8E |
:1061E0008095982F2E2D3327442755270E947745D9 |
:1061F0009B01AC01C601B5010E94774520E032E069 |
:1062000040E050E00E94EB4589019A01FF24E89CA0 |
:10621000C001E99C900DF89C900D112464E070E0A1 |
:106220000E94B645600F711F882777FD8095982FD3 |
:106230006093B5047093B6048093B7049093B80448 |
:1062400020913E0430913F0440914004509141041C |
:10625000261B370B480B590B20933E0430933F0409 |
:10626000409340045093410480913E0490913F0438 |
:10627000A0914004B09141048155934CA040B0409E |
:1062800064F080E593ECA0E0B0E080933E0490934E |
:106290003F04A0934004B093410480913E04909148 |
:1062A0003F04A0914004B0914104805B9C43AF4FF8 |
:1062B000BF4F64F480EB9CE3AFEFBFEF80933E04ED |
:1062C00090933F04A0934004B09341048091C8038D |
:1062D000882309F4CFC01092C8032091CC073091D5 |
:1062E000CD0737FF03C0309521953F4F3093AE0760 |
:1062F0002093AD078091D6079091D70797FF03C0F1 |
:10630000909581959F4F9093C8078093C707243637 |
:1063100031050CF0ADC0843691050CF0A9C0209178 |
:106320004A0430914B048091C9039091CA03281B01 |
:10633000390B37FF03C0309521953F4F263031058B |
:106340000CF098C081E0809352046091DD07709159 |
:10635000DE078091DF079091E00722EE34E040E015 |
:1063600050E00E94EB452093DD073093DE07409319 |
:10637000DF075093E00720914A0430914B0480914D |
:10638000DD079091DE07A091DF07B091E007281BA1 |
:10639000390B3093AE072093AD07C9010197833BBA |
:1063A0009105C0F0243B310534F4C9018C549F4F52 |
:1063B000843B910560F48091DD079091DE07A09108 |
:1063C000DF07B091E0070197A109B1090EC02C5475 |
:1063D0003F4F9CF48091DD079091DE07A091DF078D |
:1063E000B091E0070196A11DB11D8093DD07909348 |
:1063F000DE07A093DF07B093E0078091DD0790915F |
:10640000DE07A091DF07B091E007B7FF14C08091CD |
:10641000DD079091DE07A091DF07B091E007885972 |
:106420009E4FAF4FBF4F8093DD079093DE07A09341 |
:10643000DF07B093E0076091DD077091DE07809180 |
:10644000DF079091E00728E631E040E050E00E944D |
:10645000EB4522EE34E040E050E00E947745609347 |
:10646000DD077093DE078093DF079093E00702C09B |
:10647000109252048091620785FF3EC0E0915A0756 |
:10648000FF27EE0FFF1FE25DF84F0190F081E02D36 |
:10649000F7FF03C0F095E195FF4F79976CF5E09118 |
:1064A0005B07FF27EE0FFF1FE25DF84F0190F081C1 |
:1064B000E02DF7FF03C0F095E195FF4F7997E4F4E5 |
:1064C0008091540890915508892BB1F080919403E4 |
:1064D00090915304893C20F0933021F084E006C071 |
:1064E000943019F41092530403C083E08093530452 |
:1064F00080915304992708C080915304882331F078 |
:106500001092530480E090E00E942E3C80914A0457 |
:1065100090914B04892B09F461C08091620783FF3D |
:106520005DC08091CB039091CC03892B09F456C0B8 |
:106530002091C7073091C8078091AD079091AE07B1 |
:106540008217930724F43093AE072093AD07209170 |
:106550005204222371F080919A04882351F0809193 |
:106560004A0490914B0490934D0480934C041092F4 |
:106570009A0480919703482F55275093AE07409374 |
:10658000AD071416150654F5222341F100913E047F |
:1065900010913F04209140043091410480914E04B9 |
:1065A00090914F04BC01649FC001659F900D749F42 |
:1065B000900D112460E270E00E94B645882777FDB7 |
:1065C0008095982F060F171F281F391F00933E0430 |
:1065D00010933F04209340043093410480919B0426 |
:1065E000815080939B048F3F09F006C188E180931E |
:1065F0009B0460910E0470910F048091100490919F |
:106600001104E0906E07FF2400271127A8019701CD |
:106610000E94EB453093D4062093D3066091160474 |
:10662000709117048091180490911904A8019701A2 |
:106630000E94EB453093D6062093D5068091CC0777 |
:106640009091CD079093D8068093D7068091D60776 |
:106650009091D7079093DA068093D9068091CF075F |
:106660009091D0079093DC068093DB0680916404C0 |
:10667000909165049093DE068093DD066091460458 |
:1066800070914704809148049091490420E032E0E1 |
:1066900040E050E00E94EB453093E0062093DF0697 |
:1066A00080914A0490914B049093E4068093E30612 |
:1066B0006091DD077091DE078091DF079091E00720 |
:1066C00022EE34E040E050E00E94EB453093E606D5 |
:1066D0002093E5068091B5039091B6039093F4065C |
:1066E0008093F30680910803909109039093F60636 |
:1066F0008093F5068091AA079091AB079093F806D6 |
:106700008093F7068091A2079091A3079093FA06D1 |
:106710008093F9068091CF079091D0079093FC0663 |
:106720008093FB0680915D0490915E049093FE0639 |
:106730008093FD0680915F04909160049093000720 |
:106740008093FF0680916104909162049093020708 |
:10675000809301078091720499279093E8068093B3 |
:10676000E7068091740499279093EA068093E906DE |
:106770008091CD049091CE049093040780930307F9 |
:106780008091CF049091D0049093060780930507E1 |
:1067900080916308909164086AE070E00E94B645B9 |
:1067A00070930807609307078091650890916608C9 |
:1067B0006AE070E00E94B64570930A07609309078B |
:1067C00080916708909168086AE070E00E94B64581 |
:1067D00070930C0760930B072091530484E1289F6A |
:1067E000900111248091700890917108820F931F7D |
:1067F00090930E0780930D0780916C048823A9F075 |
:106800006091AA077091AB07882777FD8095982F34 |
:106810000E94B5442091D1073091D2074091D3070F |
:106820005091D4070E942F4532C060910E047091A0 |
:106830000F048091100490911104E090AA07F09049 |
:10684000AB070E94B5442091C1073091C207409127 |
:10685000C3075091C4070E942F455B016C010027BC |
:10686000F7FC0095102FC801B7010E94B544209194 |
:10687000D1073091D2074091D3075091D4070E949D |
:106880002F459B01AC01C601B5010E9410440E9436 |
:1068900098447093AB076093AA0780916D04882396 |
:1068A000A9F06091A2077091A307882777FD8095D2 |
:1068B000982F0E94B5442091D1073091D207409182 |
:1068C000D3075091D4070E942F4532C0609116041F |
:1068D000709117048091180490911904E090A20718 |
:1068E000F090A3070E94B5442091C1073091C207E0 |
:1068F0004091C3075091C4070E942F455B016C0172 |
:106900000027F7FC0095102FC801B7010E94B5447D |
:106910002091D1073091D2074091D3075091D407ED |
:106920000E942F459B01AC01C601B5010E94104495 |
:106930000E9498447093A3076093A2076091CF07C9 |
:106940007091D007E0902A04F0902B0400912C0461 |
:1069500010912D042090C1073090C2074090C307CA |
:106960005090C407882777FD8095982F0E94B544E2 |
:106970002091D1073091D2074091D3075091D4078D |
:106980000E942F455B016C01C801B7010E94B5440C |
:10699000A20191010E942F4520E030E040E05FE33A |
:1069A0000E942F459B01AC01C601B5010E94104415 |
:1069B0000E9498447093D0076093CF078091AA07F4 |
:1069C0009091AB078150984034F080E098E090932C |
:1069D000AB078093AA078091AA079091AB078050DC |
:1069E000984F34F480E098EF9093AB078093AA0718 |
:1069F0008091A2079091A3078150984034F080E0E5 |
:106A000098E09093A3078093A2078091A2079091AA |
:106A1000A3078050984F34F480E098EF9093A30739 |
:106A20008093A2078091CF079091D0078150984022 |
:106A300034F080E098E09093D0078093CF07809166 |
:106A4000CF079091D0078050984F34F480E098EFB2 |
:106A50009093D0078093CF0780916207992780FF9A |
:106A6000D9C04091940381FF0EC0423310F580914C |
:106A7000640490916504449790936704809366043E |
:106A80001092510419C020919F033091A003240F4C |
:106A9000311D809167079927AC01249FC001259F74 |
:106AA000900D349F900D1124449790936704809328 |
:106AB000660481E08093510480915004882321F082 |
:106AC000109267041092660420916404309165046A |
:106AD0004091660450916704421753070CF09AC026 |
:106AE00080915104882309F495C0241B350B8091B3 |
:106AF00095039927BC01269FC001279F900D369FC3 |
:106B0000900D112460E170E00E94B6450B811C815C |
:106B1000061B170B2091E2033091E303809193034E |
:106B20009927DC012A9FC0012B9F900D3A9F900D61 |
:106B3000112468E070E00E94B645061B170B6091B7 |
:106B4000460470914704809148049091490420E0E4 |
:106B500032E040E050E00E94EB45CA01B9012091CB |
:106B600096033327442755270E94774520E230E0DB |
:106B700040E050E00E94EB45BFEF2E3C3B0714F491 |
:106B80002EEC3FEF80919C0490919D04AC0164E059 |
:106B9000440F551F6A95E1F7481B590B2333310504 |
:106BA00014F022E330E0021B130BCA01800F911F87 |
:106BB00060E170E00E94B64570939D0460939C0470 |
:106BC000809163079927681779078CF4EB81FC8122 |
:106BD000E817F9072CF090939D0480939C0407C05C |
:106BE0002B813C8130939D0420939C040DC08091A7 |
:106BF0009C0490919D044B815C814817590724F4B3 |
:106C000050939D0440939C0460919C0470919D045A |
:106C10007C836B838B819C819093E2068093E10659 |
:106C2000E090CF07F090D0070091B5041091B60422 |
:106C30002091B7043091B8048091CE07682E772454 |
:106C4000AB81BC8154971CF41E821D8229C08B81AC |
:106C50009C8162E070E00E94B6459701201B310BD9 |
:106C6000CB01261737070CF4C901709561957F4F4A |
:106C7000681779070CF4BC01C301EB81FC818E1B02 |
:106C80009F0B681779070CF4CB012B813C812619E7 |
:106C900037093E832D832817390714F49E838D838B |
:106CA0002091AA073091AB0780905D0490905E041C |
:106CB0008091CD049091CE04881A990A2819390937 |
:106CC0003093B6072093B50720E030E040E050E075 |
:106CD000C201B1010E94BF448823E1F1E0900E049B |
:106CE000F0900F0400911004109111046091BD0404 |
:106CF0007091BE048091BF049091C0040E94B5447D |
:106D00005B016C01C801B7010E94B544A201910169 |
:106D10000E942F457B018C01B401882777FD809567 |
:106D2000982F0E94B5449B01AC01C801B7010E9495 |
:106D30000F449B01AC01C601B5010E9410440E94A2 |
:106D400098446093BD047093BE048093BF049093F5 |
:106D5000C0041CC02091B5073091B607442737FD09 |
:106D60004095542F8091BD049091BE04A091BF0422 |
:106D7000B091C004820F931FA41FB51F8093BD0460 |
:106D80009093BE04A093BF04B093C0048091BD044F |
:106D90009091BE04A091BF04B091C00418161906CA |
:106DA0001A061B0624F40297A109B10903C0029632 |
:106DB000A11DB11D8093BD049093BE04A093BF0498 |
:106DC000B093C0048091BD049091BE04A091BF0413 |
:106DD000B091C00481383EE3930730E0A30730E070 |
:106DE000B3072CF080E89EE3A0E0B0E009C0805833 |
:106DF000914CAF4FBF4F64F480E891ECAFEFBFEF21 |
:106E00008093BD049093BE04A093BF04B093C004CC |
:106E10006091B5077091B60780918F0390919003B0 |
:106E2000A0919103B091920389879A87AB87BC8721 |
:106E3000882777FD8095982F0E94B5447B018C01AF |
:106E40006091BD047091BE048091BF049091C00414 |
:106E50000E94B5449B01AC0169857A858B859C8530 |
:106E60000E942F459B01AC01C801B7010E9410444C |
:106E70000E9498445B016C014B0180919E03E82EB7 |
:106E8000FF24002711278D819E8197FF03C09095D5 |
:106E900081959F4F62E070E00E94B6459B01AB81F7 |
:106EA000BC812A0F3B1F442737FD4095542FC80152 |
:106EB000B7010E94774520E430E040E050E00E94B6 |
:106EC000EB453A832983821693060CF49501498198 |
:106ED0005A81509541955F4F58874F83421753070A |
:106EE0000CF4A9018B819C816D817E81860F971F97 |
:106EF000840F951F97FF03C020E030E005C0930189 |
:106F0000861597050CF49C018091AC07882E992476 |
:106F1000C401821693060CF4C9018093A4078B81E7 |
:106F20009C81841B950BAD81BE818A0F9B1F97FFAF |
:106F300003C020E030E005C09301861597050CF4EE |
:106F40009C01C401821693060CF4C9018093A90721 |
:106F50002091A2073091A307E0915F04F0916004B3 |
:106F60008091CF049091D004E81BF90BFC8BEB8B44 |
:106F70002E1B3F0B3093A1072093A00720E030E0A9 |
:106F800040E050E0C201B1010E94BF448823F1F10A |
:106F9000E0901604F0901704009118041091190461 |
:106FA0006091B9047091BA048091BB049091BC04C3 |
:106FB0000E94B5445B016C01C801B7010E94B54451 |
:106FC000A20191010E942F457B018C012B893C89F4 |
:106FD000B901882777FD8095982F0E94B5449B01C1 |
:106FE000AC01C801B7010E940F449B01AC01C6016E |
:106FF000B5010E9410440E9498446093B9047093B4 |
:10700000BA048093BB049093BC041CC02091A007D9 |
:107010003091A107442737FD4095542F8091B90442 |
:107020009091BA04A091BB04B091BC04820F931F4D |
:10703000A41FB51F8093B9049093BA04A093BB0416 |
:10704000B093BC048091B9049091BA04A091BB04A0 |
:10705000B091BC04181619061A061B0624F40297F0 |
:10706000A109B10903C00296A11DB11D8093B90405 |
:107070009093BA04A093BB04B093BC048091B9046C |
:107080009091BA04A091BB04B091BC0481383EE356 |
:10709000930730E0A30730E0B3072CF080E89EE3CD |
:1070A000A0E0B0E009C08058914CAF4FBF4F64F4EE |
:1070B00080E891ECAFEFBFEF8093B9049093BA04EE |
:1070C000A093BB04B093BC046091A0077091A1078A |
:1070D000882777FD8095982F0E94B5447B018C010D |
:1070E0006091B9047091BA048091BB049091BC0482 |
:1070F0000E94B5449B01AC0169857A858B859C858E |
:107100000E942F459B01AC01C801B7010E941044A9 |
:107110000E94984429813A81621773070CF49B01FD |
:107120008F819885821793070CF4C9014B815C818C |
:10713000480F591F6D817E81461B570B57FF03C0B7 |
:1071400060E070E005C0B301461557050CF4BA01C4 |
:10715000A401861697060CF4AB014093C9072B8156 |
:107160003C81281B390B8D819E81281B390B37FFF1 |
:1071700003C040E050E005C0A301261537050CF41C |
:10718000A901C401841695060CF0D9C0CA01D7C064 |
:1071900020917C0430917D04C90113E0880F991F70 |
:1071A0001A95E1F7821B930B68E070E00E94B645E8 |
:1071B0008B0170937D0460937C0440E050E00C945C |
:1071C000DB2880916C04882311F40C94502B0C94D0 |
:1071D000462B60910E0470910F04809110049091E1 |
:1071E0001104A0906E07BB24CC24DD24E090CC07D2 |
:1071F000F090CD07A60195010E94EB450027F7FC12 |
:107200000095102F2E193F09400B510BCA01B901EF |
:1072100020E130E040E050E00E94EB4539014A01B6 |
:1072200060911604709117048091180490911904CC |
:10723000E090D607F090D707A60195010E94EB4594 |
:107240000027F7FC0095102F2E193F09400B510B1A |
:10725000CA01B90120E130E040E050E00E94EB4576 |
:1072600079018A0191E2691671048104910414F490 |
:107270000C94FA2BB0E26B2E712C812C912C0C9477 |
:107280000B2C10921E0410921F04109220041092D6 |
:1072900021041092220410922304109224041092CC |
:1072A00025041092B7071092B8071092B9071092F0 |
:1072B000BA071092BB071092BC071092BD0710923C |
:1072C000BE071092AF071092B0071092B10710924C |
:1072D000B2071092A5071092A6071092A707109266 |
:1072E000A80780912E0490912F04A0913004B091B2 |
:1072F00031048093320490933304A0933404B09308 |
:1073000035048091360490913704A0913804B091EF |
:10731000390480933A0490933B04A0933C04B093C7 |
:107320003D041092E5031092E40310926B04109256 |
:107330006A0410926904109268040C944B2C809398 |
:10734000C50766960FB6F894DEBF0FBECDBFDF91BE |
:10735000CF911F910F91FF90EF90DF90CF90BF9052 |
:10736000AF909F908F907F906F905F904F903F90E5 |
:107370002F9008951092D2041092D10410923808E0 |
:10738000109237081092710810927008109223081A |
:1073900010920508109282081092360810924B083D |
:1073A000109269081092CE041092CD041092D0046D |
:1073B0001092CF0410926F0810926E08109253082A |
:1073C000109252081092100810920F08109255084F |
:1073D00010925408089580912308882319F481E0BD |
:1073E00090E0089580918208882309F48CC08091F0 |
:1073F0000508882309F487C080917608992783704F |
:10740000907002970CF474C08091770880FF70C070 |
:1074100060911508709116088091170890911808CE |
:107420002AE030E040E050E00E94EB45209339082C |
:1074300030933A0840933B0850933C0860911908F8 |
:1074400070911A0880911B0890911C082AE030E086 |
:1074500040E050E00E94EB4520933D0830933E0809 |
:1074600040933F085093400860911D0870911E089A |
:1074700080911F08909120082AE030E040E050E021 |
:107480000E94EB4520934108309342084093430803 |
:10749000509344086091F5077091F6078091F707C3 |
:1074A0009091F8072AE030E040E050E00E94C945A2 |
:1074B0002093450830934608409347085093480866 |
:1074C0006091F9077091FA078091FB079091FC0792 |
:1074D00020EA36E841E050E00E94EB4530934A084C |
:1074E0002093490881E080934B0880E090E004C03D |
:1074F00010924B0882E090E01092230810928208CC |
:1075000010920508089581E090E008950E94EB39FB |
:10751000181619060CF44CC0809154089091550827 |
:1075200021E08039920730F4845D9E4F9093550896 |
:1075300080935408809136088823B1F180913908EE |
:1075400090913A082091240830912508821B930BD2 |
:10755000909364088093630880913D0890913E0861 |
:107560002091280830912908821B930B909366087C |
:1075700080936508809141089091420820912C08E1 |
:1075800030912D08821B930B9093680880936708B5 |
:1075900081E08093690881E090E090936F08809388 |
:1075A0006E0880E090E008951092690882E090E013 |
:1075B00008950E94EB39892B99F5809139089091B3 |
:1075C0003A08A0913B08B0913C088093240890931E |
:1075D0002508A0932608B093270880913D08909134 |
:1075E0003E08A0913F08B0914008809328089093EE |
:1075F0002908A0932A08B0932B0880914108909104 |
:107600004208A0914308B091440880932C089093BD |
:107610002D08A0932E08B0932F0881E080933608A0 |
:107620000895482F2091D1043091D204253031059E |
:1076300009F49AC0263031058CF42130310529F146 |
:10764000223031051CF4232BD1F003C12230310547 |
:1076500071F12330310509F0FCC02FC0273031050E |
:1076600009F4E2C0273031050CF490C02830310510 |
:1076700009F4E5C02930310509F0EBC0A2C0853B13 |
:1076800009F0E7C081E090E0D5C0823639F482E0AD |
:1076900090E09093D2048093D10404C01092D2045D |
:1076A0001092D1041092E7041092E80408958130FA |
:1076B00009F0CFC083E090E0BDC0883031F0823166 |
:1076C00051F1833009F044C013C023E238E0309315 |
:1076D000F6042093F504809123088823C9F52251EC |
:1076E00030403093F4042093F3042E5E3F4F25C0C6 |
:1076F00022E838E03093F6042093F5048091820864 |
:10770000882331F5205130403093F4042093F30462 |
:10771000205F3F4F12C025E038E03093F6042093FD |
:10772000F50480910508882399F424523040309361 |
:10773000F4042093F3042C5D3F4F3093EC0420932A |
:10774000EB0485E090E09093D2048093D10404C0D0 |
:107750001092D2041092D104842F8F5F8093E7049B |
:107760008F5F8093E804089599279093EA048093AB |
:10777000E9049091E704940F9093E7048091E80462 |
:10778000890F8093E80486E090E054C0282F3327C7 |
:10779000322F22278091E9049091EA04820F931FEF |
:1077A0009093EA048093E9049091E704940F9093F6 |
:1077B000E7048091E804890F8093E80489E090E071 |
:1077C00039C06091E9047091EA046115710509F40A |
:1077D00040C0E091F304F091F40480838091E704C9 |
:1077E000840F8093E7049091E804980F9093E80445 |
:1077F000CB0101979093EA048093E904892B89F0E7 |
:107800008091EB049091EC048E179F0750F0319615 |
:10781000F093F404E093F3043093D2042093D10462 |
:10782000089587E090E006C08091E704481789F446 |
:1078300088E090E09093D2048093D10408958091E1 |
:10784000E804481731F4E091F504F091F60481E082 |
:1078500080831092D2041092D10408952F923F9207 |
:107860004F925F926F927F928F929F92AF92BF9250 |
:10787000CF92DF92EF92FF920F931F93CF93DF93FC |
:107880003C018330910509F4C4C08430910521F096 |
:10789000892B09F422C1BAC02091370830913808E9 |
:1078A000C9010197029708F435C18091E5049091D0 |
:1078B000E60401969093E6048093E504855F914089 |
:1078C00008F4FBC51092E6041092E5041092EE0451 |
:1078D0001092ED041092F0041092EF041092F20452 |
:1078E0001092F1041092E4041092E3041092E20466 |
:1078F0001092E10410926B0810926A0810926D08C1 |
:1079000010926C081092DE041092DD041092E004D4 |
:107910001092DF041092D8041092D7041092D6046B |
:107920001092D5041092DC041092DB041092DA0459 |
:107930001092D90410924C0810924D0810924E08E3 |
:1079400010924F081092D4041092D3041092710830 |
:107950001092700880916908882309F451C08091C1 |
:1079600063089091640890935D0880935C0860912F |
:1079700065087091660870935F0860935E0821E067 |
:1079800020936208909309088093080870930B086D |
:1079900060930A0820930E08709561957F4F90952B |
:1079A00081959F4F0E9475429C019093510880934E |
:1079B0005008E0915C08F0915D08F7FF03C08AE58C |
:1079C00090E002C08EE091E0821B930B90935108EF |
:1079D00080935008409150085091510860915E0882 |
:1079E00070915F08CF010E94AF4370935908609374 |
:1079F000580882E090E0909338088093370860C57B |
:107A000010926208109238081092370882E090E0D5 |
:107A100059C58091370890913808019709F4FAC147 |
:107A20008091E5049091E60401969093E60480939A |
:107A3000E504855F914008F440C51092E604109279 |
:107A4000E50480916908882309F444C01092F00489 |
:107A50001092EF041092F2041092F1041092E404D8 |
:107A60001092E3041092E2041092E10410926B0869 |
:107A700010926A0810926D0810926C081092DE0441 |
:107A80001092DD041092E0041092DF041092D804EA |
:107A90001092D7041092D6041092D5041092DC04F0 |
:107AA0001092DB041092DA041092D90480916308DA |
:107AB0009091640890930908809308088091650864 |
:107AC0009091660890930B0880930A0881E0809358 |
:107AD0000E089DC110920E0895CF1092E6041092E8 |
:107AE000E5041092CE041092CD041092D0041092AE |
:107AF000CF0410925308109252081092100810925E |
:107B00000F081092710810927008109238081092A5 |
:107B10003708D6C42130310509F47CC12230310543 |
:107B200041F0232B09F06ECF1092E6041092E50489 |
:107B3000C7C480916208882309F464CF80916E08DD |
:107B400090916F08181619060CF061C180917008A9 |
:107B500090917108099709F45AC18091ED049091B0 |
:107B6000EE0401969093EE048093ED046091080872 |
:107B70007091090880916308909164086B01C81A9C |
:107B8000D90AD7FE04C0D094C194D108D394E0910F |
:107B90000A08F0910B088091650890916608DF0152 |
:107BA000A81BB90BB7FF03C0B095A195BF4F20919B |
:107BB0004C0830914D0840914E0850914F088091EB |
:107BC000580890915908821B930B833391050CF44C |
:107BD00044C08CE3C816D1042CF5DC971CF58091C9 |
:107BE000D3049091D4048C3091052CF40196909399 |
:107BF000D4048093D3048091D3049091D404AA2711 |
:107C000097FDA095BA2F280F391F4A1F5B1F20939D |
:107C10004C0830934D0840934E0850934F0883E032 |
:107C200090E041C08091D3049091D40482309105BA |
:107C30002CF001979093D4048093D3042F5F3F4F8F |
:107C40004F4F5F4F20934C0830934D0840934E08A0 |
:107C500050934F0884E090E026C04F970CF484C006 |
:107C600098E2C916D1048CF498977CF42A5F3F4FB0 |
:107C70004F4F5F4F20934C0830934D0840934E0870 |
:107C800050934F0885E090E00EC02F5F3F4F4F4F5D |
:107C90005F4F20934C0830934D0840934E0850930B |
:107CA0004F0886E090E090937108809370081092DE |
:107CB000F2041092F10481E090E09093F00480933C |
:107CC000EF0460904C0870904D0880904E089090A2 |
:107CD0004F0880915008909151080E9451437C01B7 |
:107CE00020904C0830904D0840904E0850904F081E |
:107CF00080915008909151080E94A7435C01002791 |
:107D0000F7FC0095102FC401B301A80197010E9450 |
:107D1000774528EE33E040E050E00E94EB4580914B |
:107D20005C0890915D08820F931F909309088093DF |
:107D30000808CC24B7FCC094DC2CC201B101A60118 |
:107D400095010E94774528EE33E040E050E00E9424 |
:107D5000EB4580915E0890915F08820F931F90938E |
:107D60000B0880930A0853C028E2C216D1040CF015 |
:107D700048C098970CF045C087E090E09093710858 |
:107D8000809370081092F0041092EF041092F204A5 |
:107D90001092F104633071051CF06350704006C00E |
:107DA0003FEF6E3F730734F46D5F7F4F70930908A8 |
:107DB00060930808E330F10514F0339705C04FEFE6 |
:107DC000EE3FF4072CF43396F0930B08E0930A0887 |
:107DD000809108089091090803960797C0F4809154 |
:107DE0000A0890910B080396079788F410920908E7 |
:107DF0001092080810920B0810920A0889E090E08F |
:107E000002C088E090E0909371088093700881E050 |
:107E100090E0F1CD80916E0890916F0818161906C8 |
:107E20000CF046C310926F0810926E082091DD048A |
:107E30003091DE044091DF045091E004A0900808E6 |
:107E4000B09009088091630890916408A81AB90A53 |
:107E5000B092DE04A092DD04C0910A08D0910B0814 |
:107E60008091650890916608C81BD90BD093E004F7 |
:107E7000C093DF04C090E304D090E404CA0CDB1C80 |
:107E8000D092E404C092E3040091E1041091E20472 |
:107E90000C0F1D1F1093E2040093E104F501E21B97 |
:107EA000F30BF093DC04E093DB047E01E41AF50AA3 |
:107EB000F092DA04E092D9048091EF049091F004FA |
:107EC0002091D7043091D8048090D5049090D604A6 |
:107ED00018161906FCF4C901880F991F63E070E0B9 |
:107EE0000E94B6459B01CF0163E070E00E94B64559 |
:107EF000260F371F3093D8042093D704C401880F6E |
:107F0000991F63E070E00E94B6459B01C70163E0E2 |
:107F100070E022C0C90164E070E00E94B6459B0198 |
:107F2000CF01880F991F8E0F9F1F64E070E00E94A1 |
:107F3000B645260F371F3093D8042093D704C401C9 |
:107F400064E070E00E94B6459B01C701880F991F4D |
:107F50008E0D9F1D64E070E00E94B645260F371F0E |
:107F60003093D6042093D504C601D7FE04C08827D9 |
:107F700099278C199D098153954754F4C80117FF1F |
:107F800004C088279927801B910B8153954764F083 |
:107F9000CA18DB08D092E404C092E3040C1B1D0B4A |
:107FA0001093E2040093E1048091F1049091F204B3 |
:107FB0001816190644F41092E4041092E304109287 |
:107FC000E2041092E104B501B7FE03C0709561951B |
:107FD0007F4FCE01D7FF03C0909581959F4F0E94A0 |
:107FE00075426091DF047091E004AC018091DD0482 |
:107FF0009091DE040E94AF439B01AC018091EF049D |
:108000009091F004892B81F4CA01B90123E030E09A |
:1080100040E050E00E94EB45E9012A96C531D105C8 |
:1080200094F0C4E1D0E00FC0CA01B9012AE030E009 |
:1080300040E050E00E94EB45E9012A96C031D105AD |
:1080400014F0CFE0D0E0E0907304FF240027112764 |
:108050006091E3047091E404882777FD8095982F60 |
:10806000A80197010E94774520E031E040E050E010 |
:108070000E94EB4559016A016091E1047091E204AC |
:10808000882777FD8095982FA80197010E94774552 |
:1080900020E031E040E050E00E94EB453093E20404 |
:1080A0002093E10430E6A3163FEFB3063FEFC3068B |
:1080B0003FEFD30644F460E6A62E6FEFB62E6FEFC7 |
:1080C000C62E6FEFD62E9801870100364FEF1407AA |
:1080D0004FEF24074FEF340724F400E61FEF2FEF94 |
:1080E0003FEF80917204869586958695E82EFF2451 |
:1080F00080917404869586958695882E992451EAF8 |
:10810000A516B104C104D1042CF050EAA52EB12C5F |
:10811000C12CD12C8091DD049091DE04880F991F31 |
:10812000AC01E49EC001E59E900DF49E900D1124DB |
:1081300060E170E00E94B645FB01EA0DFB1D8091F5 |
:10814000D7049091D804AC01849EC001859E900D07 |
:10815000949E900D1124AC01C49FC001C59F900D49 |
:10816000D49F900D11246AE070E00E94B645E60F9E |
:10817000F71FF0936B08E0936A0858016901013A10 |
:108180001105210531052CF030EAA32EB12CC12CAC |
:10819000D12C8091DF049091E004880F991F9C01FD |
:1081A000E29EC001E39E900DF29E900D112460E1CD |
:1081B00070E00E94B6459B012A0D3B1D8091D504BD |
:1081C0009091D604AC01849EC001859E900D949E32 |
:1081D000900D1124AC01C49FC001C59F900DD49F88 |
:1081E000900D11246AE070E00E94B645260F371FFB |
:1081F00030936D0820936C08B901CF010E9475423D |
:108200009C0190935B0880935A0800916A08109132 |
:108210006B0817FD03C08AE590E002C08EE091E094 |
:10822000821B930B90935B0880935A086091DD0743 |
:108230007091DE078091DF079091E007C0915A08A6 |
:10824000D0915B0822EE34E040E050E00E94EB4524 |
:10825000CE01821B930B9C01909307088093060824 |
:10826000853B91057CF0C43BD1051CF0285631407C |
:108270000FC088E691E0821B930B909307088093D0 |
:1082800006080AC09FEF2C34390734F428593E4FB2 |
:108290003093070820930608C0906C08D0906D08B2 |
:1082A000980117FF04C022273327201B310BC6017A |
:1082B000D7FE04C0882799278C199D098217930738 |
:1082C00054F4CE010E9451437C01B801882777FD08 |
:1082D0008095982F09C0CE010E94A7437C01B6016A |
:1082E000882777FD8095982F28EE33E040E050E016 |
:1082F0000E9477450027F7FC0095102FA8019701F1 |
:108300000E94EB45B90137FF03C0709561957F4F1F |
:108310005B01CC24B7FCC094DC2CB0925708A0922F |
:10832000560880910608909107080E9451439C01CD |
:10833000442737FD4095542FC601B5010E9477456B |
:1083400028EE33E040E050E00E94EB453093D0044B |
:108350002093CF0480910608909107080E94A743BC |
:108360009C01442737FD4095542FC601B5010E945A |
:10837000774528EE33E040E050E00E94EB45309531 |
:1083800021953F4F3093CE042093CD048091CF04AC |
:108390009091D00441E0813494071CF080E491E096 |
:1083A00005C0805C9E4F34F480EC9EEF9093D00427 |
:1083B0008093CF0481E0213438071CF080E491E001 |
:1083C00005C0205C3E4F34F480EC9EEF9093CE04C9 |
:1083D0008093CD048091CF049091D0040AE510E001 |
:1083E0009C01209FC001219F900D309F900D112472 |
:1083F00060E471E00E94B645CB010E945143AA2778 |
:1084000097FDA095BA2FBC01CD0129E130E040E0F5 |
:1084100050E00E94EB453093D0042093CF0480912C |
:10842000CD049091CE04AC01409FC001419F900DBE |
:10843000509F900D112460E471E00E94B645CB017D |
:108440000E945143AA2797FDA095BA2FBC01CD01E8 |
:1084500029E130E040E050E00E94EB453093CE044B |
:108460002093CD048091DD049091DE0497FF03C03A |
:10847000909581959F4F8159914064F48091DF04DC |
:108480009091E00497FF03C0909581959F4F81598B |
:1084900091404CF01092D0041092CF041092CE0470 |
:1084A0001092CD04AFCA34E06316710449F4A1CA36 |
:1084B00044E06416710421F49CCA81E090E002C09B |
:1084C00080E090E0DF91CF911F910F91FF90EF90AE |
:1084D000DF90CF90BF90AF909F908F907F906F90E4 |
:1084E0005F904F903F902F900895EF92FF920F93DF |
:1084F0001F93CF93DF938C01EB019C0197FF04C086 |
:1085000022273327281B390BCE01D7FF04C0882729 |
:1085100099278C1B9D0B821793073CF4CE01E80131 |
:108520008C01B1E0EB2EF12C02C0EE24FF24209749 |
:1085300041F40115110529F461E070E080E090E05C |
:1085400024C0B801882777FD8095982F28EE33E066 |
:1085500040E050E00E9477459E01442737FD40955A |
:10856000542F0E94EB45B90137FF03C07095619508 |
:108570007F4F882777FD8095982F6D3021E0720717 |
:1085800020E0820720E0920704F524E630E040E096 |
:1085900050E00E9477452CE031E040E050E00E943E |
:1085A000EB45CA01B901A4E0660F771F881F991F28 |
:1085B000AA95D1F7621B730B840B950B24E630E070 |
:1085C00040E050E00E94EB4553C0633422E0720764 |
:1085D00020E0820720E0920734F524E630E040E016 |
:1085E00050E00E947745605B78468040904026E3EB |
:1085F00031E040E050E00E94EB45CA01B901F4E0EF |
:10860000660F771F881F991FFA95D1F7621B730BAE |
:10861000840B950B24E630E040E050E00E94EB45EF |
:10862000215F3F4F25C022E330E040E050E00E9450 |
:108630007745645E70478040904026EA31E040E034 |
:1086400050E00E94EB45CA01B901E4E0660F771FD4 |
:10865000881F991FEA95D1F7621B730B840B950B4A |
:1086600022E330E040E050E00E94EB45225E3F4FC5 |
:10867000EF2829F48AE590E0821B930B9C0117FDFB |
:1086800003C0D7FF06C002C0D7FD03C030952195B7 |
:108690003F4FC901DF91CF911F910F91FF90EF9054 |
:1086A0000895FC01F7FF04C0882799278E1B9F0BB4 |
:1086B0008856914034F0CF0168E671E00E94B645DB |
:1086C000FC01F7FD03C041E050E005C0F095E195E5 |
:1086D000FF4F4FEF5FEFCF018B5590408A359105EB |
:1086E00030F484EB90E08E1B9F0BFC010FC0CF0198 |
:1086F000855B90408A35910518F4E45BF0400EC02C |
:10870000CF018F5091408A35910518F021E030E07B |
:1087100007C088E691E08E1B9F0BFC012FEF3FEF17 |
:10872000EE0FFF1FEF5DFB4F85919491BC01629F9F |
:10873000C001639F900D729F900D11249C01429F78 |
:10874000C001439F900D529F900D112408952AE57A |
:1087500030E0281B390BC9010E9451430895EF9264 |
:10876000FF920F931F93CF93DF93EA01AC0197FF22 |
:1087700004C044275527481B590B9B0177FF04C0B1 |
:1087800022273327261B370B2417350794F49C0127 |
:10879000B901882777FD8095982F28EE33E040E0D7 |
:1087A00050E00E9477457B018C01CE010E9451432D |
:1087B0000FC0882777FD8095982F28EE33E040E0A2 |
:1087C00050E00E9477457B018C01CE010E94A743B7 |
:1087D0009C01442737FD4095542FC801B7010E94E2 |
:1087E000EB45B90137FF03C0709561957F4F88272E |
:1087F00077FD8095982FDF91CF911F910F91FF907A |
:10880000EF900895FC014150504030F00190061661 |
:10881000D1F73197CF0108958827992708955058A7 |
:10882000192EEFD001D0D2C0BA17620773078407A0 |
:108830009507B1F188F40EF410940B2EBA2FA02DE9 |
:10884000062E622F202D072E732F302D082E842FF9 |
:10885000402D092E952F502DFF275523B9F0591B78 |
:1088600049F0573E98F0469537952795A795F040E3 |
:108870005395C9F776F0BA0F621F731F841F30F447 |
:10888000879577956795B795F040939517FA0F2ED2 |
:108890000895BF1BBB27BA0B620B730B840BF6CF7B |
:1088A000DEF6DBC0AED001D091C0552359F099233C |
:1088B00069F09F575F57951B33F442F4903811F4D9 |
:1088C000915805C09BC091589F3F09F4C6C0BB2773 |
:1088D000112462177307840730F4660F771F881F0F |
:1088E000BB1F915098F311D00F920FD00F920DD063 |
:1088F000A0E82617370748071B0609F0A048BA2F3B |
:10890000602D7F918F9100240895A0E800246217C4 |
:1089100073078407B10528F0621B730B840BB10940 |
:108920000A2A660F771F881FBB1FA69581F7089537 |
:1089300097FB73D09F3738F0FEE9F91B982F872FEC |
:10894000762F6B2F05C086C096958795779567958E |
:10895000F150D0F73EF490958095709561957F4FDA |
:108960008F4F9F4F0895E89403C097FB0EF4F3DFF9 |
:10897000B62F672F782F892F9EE9002427C00ED0AD |
:108980005EF004C00BD026F001C008D019F020F42E |
:108990008FEF089580E0089581E0089597FB092EF8 |
:1089A000052600F8689430D0E89407FC07C06217E9 |
:1089B00073078407950721F008F4009407949894AE |
:1089C00008959A95BB0F661F771F881F112499235E |
:1089D000A1F08823B2F79F3F59F0BB0F48F421F470 |
:1089E000002011F460FF04C06F5F7F4F8F4F9F4FD7 |
:1089F000881F9795879597F908952CC09FEF80EC75 |
:108A00000895052E092607FA440F551F5F3F79F098 |
:108A1000AA27A51708F051E04795880F991F9F3F97 |
:108A200031F0BB27B91708F091E0879508959F9121 |
:108A30009F911124E3CF97FB880F991F9F3F31F03F |
:108A4000BB27B91708F091E0879508959F919F91F2 |
:108A50001124D4CF66277727882799270895D1DF57 |
:108A600001D0B4CF992339F0552329F09F575F5790 |
:108A7000950F13F49AF1F1CF91589F3FE1F3629F64 |
:108A8000A12D0F92BB27639FA00DB11DEE27729FF2 |
:108A9000A00DB11DEE1FAF93AA27649FB00DE11D7D |
:108AA000739FB00DE11DAA1F6627829FB00DE11DC7 |
:108AB000A61F5527749FE00DA11D551F839FE00D34 |
:108AC000A11D561F849FA00D511D852F7A2F6E2F3B |
:108AD0001F900F9088231AF4939539F48FCF000CD0 |
:108AE000111CBB1F661F771F881F01280895629FF6 |
:108AF000D001739FF001829FE00DF11D649FE00D96 |
:108B0000F11D929FF00D839FF00D749FF00D659FF6 |
:108B1000F00D9927729FB00DE11DF91F639FB00DF5 |
:108B2000E11DF91FBD01CF0111240895991B79E0C2 |
:108B300004C0991F961708F0961B881F7A95C9F7ED |
:108B400080950895AA1BBB1B51E107C0AA1FBB1F3C |
:108B5000A617B70710F0A61BB70B881F991F5A95C9 |
:108B6000A9F780959095BC01CD01089597FB092E3A |
:108B700007260AD077FD04D0E5DF06D000201AF4DE |
:108B8000709561957F4F0895F6F7909581959F4F69 |
:108B90000895A1E21A2EAA1BBB1BFD010DC0AA1F3E |
:108BA000BB1FEE1FFF1FA217B307E407F50720F056 |
:108BB000A21BB30BE40BF50B661F771F881F991FD1 |
:108BC0001A9469F760957095809590959B01AC011A |
:108BD000BD01CF01089597FB092E05260ED057FD44 |
:108BE00004D0D7DF0AD0001C38F45095409530955A |
:108BF00021953F4F4F4F5F4F0895F6F79095809521 |
:108C0000709561957F4F8F4F9F4F0895F999FECFD3 |
:108C1000B2BDA1BDF89A119600B40895F999FECF9E |
:108C2000B2BDA1BD00BC11960FB6F894FA9AF99A9C |
:068C30000FBE0895FFCF06 |
:108C36000A01FF64496E74656772616C4E69636B05 |
:108C460020202020496E74656772616C526F6C6CCF |
:108C5600202020204163634E69636B202020202062 |
:108C660020202020416363526F6C6C20202020203E |
:108C7600202020204779726F4769657220202020C6 |
:108C860020202020486F6568656E57657274202025 |
:108C9600202020204163635A2020202020202020ED |
:108CA6002020202047617320202020202020202003 |
:108CB600202020204B6F6D7061737356616C756553 |
:108CC6002020202045727361747A6B6F6D7061731A |
:108CD600732020205573725F50617231202020204E |
:108CE600202020205573725F70617233202020206F |
:108CF600202020204D6F746F725F566F726E652054 |
:108D0600202020204D6F746F725F48696E74656E07 |
:108D1600202020204D6F746F725F4C696E6B73203C |
:108D2600202020204D6F746F725F526563687473E4 |
:108D360020202020496E64657820202020202020D5 |
:108D46002020202055426174202020202020202031 |
:108D5600202020204D657373776572745F4E6963BA |
:108D66006B2020204D657373776572745F526F6C4C |
:108D76006C2020204D657373776572745F47696553 |
:108D860072202020537469636B5F4E69636B2020E9 |
:108D960020202020537469636B5F526F6C6C202017 |
:108DA60009200000537469636B5F47696572202070 |
:108DB600202020204750535F4E69636B20202020DF |
:108DC600202020204750535F526F6C6C20202020BB |
:108DD6002020202075746D5F65617374202020202B |
:108DE6002020202075746D5F6E6F727468202020BD |
:108DF6002020202075746D5F616C74202020202057 |
:108E0600202020206770735F7374617465202020B2 |
:108E160020202020492D4C616765526F6C6C202004 |
:108E260020202020537469636B526F6C6C202020C5 |
:108E360020202020FFFF0A016400007D0000FF03C0 |
:108E46000102030405060708090A48616C6C6F20D5 |
:108E560057656C7400000000000000000000000070 |
:108E660000000000000000000000000000000000FC |
:108E760000000000000000000000000000000000EC |
:108E860000000000000000000000000000000000DC |
:108E9600000000000000000000000A01426567694A |
:108EA6006E6E657200004E6F726D616C00005370DD |
:108EB6006F72740000640090D0030090D003001716 |
:108EC600B7D13830FB103A409696020A644664ECF5 |
:028ED600FF009B |
:00000001FF |
/branches/salvo_gps/Basis_v0067g/trunk/GPS.c |
---|
0,0 → 1,640 |
/* |
This program (files gps.c and gps.h) is free software; you can redistribute it and/or modify |
it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; |
either version 3 of the License, or (at your option) any later version. |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License and GNU Lesser General Public License for more details. |
You should have received a copy of GNU General Public License (License_GPL.txt) and |
GNU Lesser General Public License (License_LGPL.txt) along with this program. |
If not, see <http://www.gnu.org/licenses/>. |
Please note: All the other files for the project "Mikrokopter" by H.Buss are under the license (license_buss.txt) published by www.mikrokopter.de |
*/ |
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
Peter Muehlenbrock |
Auswertung der Daten vom GPS im ublox Format |
Hold Modus mit PID Regler |
Rückstuerz zur Basis Funktion |
Stand 24.10.2007 |
Anederung: 24.10. Altitude in relativer Position jetzt auch drin |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
*/ |
#include "main.h" |
#include "math.h" |
//#include "gps.h" |
// Defines fuer ublox Messageformat um Auswertung zu steuern |
#define UBLOX_IDLE 0 |
#define UBLOX_SYNC1 1 |
#define UBLOX_SYNC2 2 |
#define UBLOX_CLASS 3 |
#define UBLOX_ID 4 |
#define UBLOX_LEN1 5 |
#define UBLOX_LEN2 6 |
#define UBLOX_CKA 7 |
#define UBLOX_CKB 8 |
#define UBLOX_PAYLOAD 9 |
// ublox Protokoll Identifier |
#define UBLOX_NAV_POSUTM 0x08 |
#define UBLOX_NAV_STATUS 0x03 |
#define UBLOX_NAV_VELED 0x12 |
#define UBLOX_NAV_CLASS 0x01 |
#define UBLOX_SYNCH1_CHAR 0xB5 |
#define UBLOX_SYNCH2_CHAR 0x62 |
signed int GPS_Nick = 0; |
signed int GPS_Roll = 0; |
short int ublox_msg_state = UBLOX_IDLE; |
static uint8_t chk_a =0; //Checksum |
static uint8_t chk_b =0; |
short int gps_state,gps_sub_state; //Zustaende der Statemachine |
short int gps_updte_flag; |
signed int GPS_hdng_abs_2trgt; //Winkel zum Ziel bezogen auf Nordpol |
signed int GPS_hdng_rel_2trgt; //Winkel zum Ziel bezogen auf Nordachse des Kopters |
signed int GPS_dist_2trgt; //vorzeichenlose Distanz zum Ziel |
signed int gps_int_x,gps_int_y,gps_reg_x,gps_reg_y; |
static unsigned int rx_len; |
static unsigned int ptr_payload_data_end; |
unsigned int gps_alive_cnt; // Wird bei jedem gueltigen GPS Telegramm hochgezaehlt |
signed int hdng_2home,dist_2home; //Richtung und Entfernung zur home Position |
static signed gps_tick; //wird bei jedem Update durch das GPS Modul hochgezaehlt |
static short int hold_fast,hold_reset_int; //Flags fuer Hold Regler |
static uint8_t *ptr_payload_data; |
static uint8_t *ptr_pac_status; |
long int dist_flown; |
short int Get_GPS_data(void); |
NAV_POSUTM_t actual_pos; // Aktuelle Nav Daten werden hier im ublox Format abgelegt |
NAV_STATUS_t actual_status; // Aktueller Nav Status |
NAV_VELNED_t actual_speed; // Aktueller Geschwindigkeits und Richtungsdaten |
GPS_ABS_POSITION_t gps_act_position; // Alle wichtigen Daten zusammengefasst |
GPS_ABS_POSITION_t gps_home_position; // Die Startposition, beim Kalibrieren ermittelt |
GPS_REL_POSITION_t gps_rel_act_position; // Die aktuelle relative Position bezogen auf Home Position |
GPS_REL_POSITION_t gps_rel_hold_position; // Die gespeicherte Sollposition fuer GPS_ Hold Mode |
GPS_REL_POSITION_t gps_rel_start_position; // Die gespeicherte Ausgangsposition fuer GPS_ Home Mode |
// Initialisierung |
void GPS_Neutral(void) |
{ |
ublox_msg_state = UBLOX_IDLE; |
gps_state = GPS_CRTL_IDLE; |
gps_sub_state = GPS_CRTL_IDLE; |
actual_pos.status = 0; |
actual_speed.status = 0; |
actual_status.status = 0; |
gps_home_position.status = 0; // Noch keine gueltige Home Position |
gps_act_position.status = 0; |
gps_rel_act_position.status = 0; |
GPS_Nick = 0; |
GPS_Roll = 0; |
gps_updte_flag = 0; |
gps_int_x = 0; |
gps_int_y = 0; |
gps_alive_cnt = 0; |
} |
// Home Position sichern falls Daten verfuegbar sind. |
void GPS_Save_Home(void) |
{ |
short int n; |
n = Get_GPS_data(); |
if (n == 0) // Gueltige und aktuelle Daten ? |
{ |
// Neue GPS Daten liegen vor |
gps_home_position.utm_east = gps_act_position.utm_east; |
gps_home_position.utm_north = gps_act_position.utm_north; |
gps_home_position.utm_alt = gps_act_position.utm_alt; |
gps_home_position.status = 1; // Home Position gueltig |
} |
} |
// Relative Position zur Home Position bestimmen |
// Rueckgabewert 0= Daten sind aktuell und gueltig. 1= Keine Aenderung. 2= Daten ungueltig |
short int Get_Rel_Position(void) |
{ |
short int n = 0; |
n = Get_GPS_data(); |
if (n >=1) return (n); // nix zu tun, weil keine neue Daten da sind |
if (gps_alive_cnt < 400) gps_alive_cnt += 300; // Timeoutzaehler. Wird in Motorregler Routine ueberwacht und dekrementiert |
if (gps_home_position.status > 0) //Nur wenn Home Position vorliegt |
{ |
gps_rel_act_position.utm_east = (int) (gps_act_position.utm_east - gps_home_position.utm_east); |
gps_rel_act_position.utm_north = (int) (gps_act_position.utm_north - gps_home_position.utm_north); |
gps_rel_act_position.utm_alt = (int) (gps_act_position.utm_alt - gps_home_position.utm_alt); |
gps_rel_act_position.status = 1; // gueltige Positionsdaten |
n = 0; |
gps_updte_flag = 1; // zeigt an, dass neue Daten vorliegen. |
} |
else |
{ |
n = 2; //keine gueltigen Daten vorhanden |
gps_rel_act_position.status = 0; //keine gueltige Position weil keine home Position da ist. |
} |
return (n); |
} |
// Daten aus aktuellen ublox Messages extrahieren |
// Rueckgabewert 0= Daten sind aktuell und gueltig. 1= Keine Aenderung. 2= Daten ungueltig |
short int Get_GPS_data(void) |
{ |
short int n = 1; |
if (actual_pos.status == 0) return (1); //damit es schnell geht, wenn nix zu tun ist |
if ((actual_pos.status > 0) && (actual_status.status > 0) && (actual_speed.status > 0)) |
{ |
if (((actual_status.gpsfix_type & 0x03) >=2) && ((actual_status.nav_status_flag & 0x01) >=1)) // nur wenn Daten aktuell und gueltig sind |
{ |
gps_act_position.utm_east = actual_pos.utm_east/10; |
gps_act_position.utm_north = actual_pos.utm_north/10; |
gps_act_position.utm_alt = actual_pos.utm_alt/10; |
gps_act_position.speed_gnd = actual_speed.speed_gnd/10; |
gps_act_position.speed_gnd = actual_speed.speed_gnd/10; |
gps_act_position.heading = actual_speed.heading/100000; |
gps_act_position.status = 1; |
n = 0; //Daten gueltig |
} |
else |
{ |
gps_act_position.status = 0; //Keine gueltigen Daten |
n = 2; |
} |
actual_pos.status = 0; //neue ublox Messages anfordern |
actual_status.status = 0; |
actual_speed.status = 0; |
} |
return (n); |
} |
/* |
Daten vom GPS im ublox MSG Format auswerten |
Die Routine wird bei jedem Empfang eines Zeichens vom GPS Modul durch den UART IRQ aufgerufen |
// Die UBX Messages NAV_POSUTM, NAV_STATUS und NAV_VALED muessen aktiviert sein |
*/ |
void Get_Ublox_Msg(uint8_t rx) |
{ |
switch (ublox_msg_state) |
{ |
case UBLOX_IDLE: // Zuerst Synchcharacters pruefen |
if ( rx == UBLOX_SYNCH1_CHAR ) ublox_msg_state = UBLOX_SYNC1; |
else ublox_msg_state = UBLOX_IDLE; |
break; |
case UBLOX_SYNC1: |
if (rx == UBLOX_SYNCH2_CHAR) ublox_msg_state = UBLOX_SYNC2; |
else ublox_msg_state = UBLOX_IDLE; |
chk_a = 0,chk_b = 0; |
break; |
case UBLOX_SYNC2: |
if (rx == UBLOX_NAV_CLASS) ublox_msg_state = UBLOX_CLASS; |
else ublox_msg_state = UBLOX_IDLE; |
break; |
case UBLOX_CLASS: // Nur NAV Meldungen auswerten |
switch (rx) |
{ |
case UBLOX_NAV_POSUTM: |
ptr_pac_status = &actual_pos.status; |
if (*ptr_pac_status > 0) ublox_msg_state = UBLOX_IDLE; //Abbruch weil Daten noch nicht verwendet wurden |
else |
{ |
ptr_payload_data = &actual_pos; |
ptr_payload_data_end = &actual_pos.status; |
ublox_msg_state = UBLOX_LEN1; |
} |
break; |
case UBLOX_NAV_STATUS: |
ptr_pac_status = &actual_status.status; |
if (*ptr_pac_status > 0) ublox_msg_state = UBLOX_IDLE; |
else |
{ |
ptr_payload_data = &actual_status; |
ptr_payload_data_end = &actual_status.status; |
ublox_msg_state = UBLOX_LEN1; |
} |
break; |
case UBLOX_NAV_VELED: |
ptr_pac_status = &actual_speed.status; |
if (*ptr_pac_status > 0) ublox_msg_state = UBLOX_IDLE; |
else |
{ |
ptr_payload_data = &actual_speed; |
ptr_payload_data_end = &actual_speed.status; |
ublox_msg_state = UBLOX_LEN1; |
} |
break; |
default: |
ublox_msg_state = UBLOX_IDLE; |
break; |
} |
chk_a = UBLOX_NAV_CLASS + rx; |
chk_b = UBLOX_NAV_CLASS + chk_a; |
break; |
case UBLOX_LEN1: // Laenge auswerten |
rx_len = rx; |
chk_a += rx; |
chk_b += chk_a; |
ublox_msg_state = UBLOX_LEN2; |
break; |
case UBLOX_LEN2: // Laenge auswerten |
rx_len = rx_len + (rx *256); // Laenge ermitteln |
chk_a += rx; |
chk_b += chk_a; |
ublox_msg_state = UBLOX_PAYLOAD; |
break; |
case UBLOX_PAYLOAD: // jetzt Nutzdaten einlesen |
if (rx_len > 0) |
{ |
*ptr_payload_data = rx; |
chk_a += rx; |
chk_b += chk_a; |
--rx_len; |
if ((rx_len > 0) && (ptr_payload_data <= ptr_payload_data_end)) |
{ |
ptr_payload_data++; |
ublox_msg_state = UBLOX_PAYLOAD; |
} |
else ublox_msg_state = UBLOX_CKA; |
} |
else ublox_msg_state = UBLOX_IDLE; // Abbruch wegen Fehler |
break; |
case UBLOX_CKA: // Checksum pruefen |
if (rx == chk_a) ublox_msg_state = UBLOX_CKB; |
else ublox_msg_state = UBLOX_IDLE; // Abbruch wegen Fehler |
break; |
case UBLOX_CKB: // Checksum pruefen |
if (rx == chk_b) *ptr_pac_status = 1; // Paket ok |
ublox_msg_state = UBLOX_IDLE; |
break; |
default: |
ublox_msg_state = UBLOX_IDLE; |
break; |
} |
} |
//Zentrale Statemachine fuer alle GPS relevanten Regelungsablauefe |
short int GPS_CRTL(short int cmd) |
{ |
static unsigned int cnt; //Zaehler fuer diverse Verzoegerungen |
static signed int int_east,int_north; //Integrierer |
static signed int dist_north,dist_east; |
static signed int diff_east,diff_north; // Differenzierer (Differenz zum vorhergehenden x bzw. y Wert) |
static signed int diff_east_f,diff_north_f; // Differenzierer, gefiltert |
signed int n,diff_v; |
static signed int gps_g2t_act_v; // Aktuelle Geschwindigkeitsvorgabe fuer Home Funktion |
long signed int dev,n_l; |
signed int dist_frm_start_east,dist_frm_start_north; |
switch (cmd) |
{ |
case GPS_CMD_REQ_HOME: // Es soll zum Startpunkt zurueckgeflogen werden. |
if ((gps_state != GPS_CRTL_HOLD_ACTIVE) && (gps_state != GPS_CRTL_HOME_ACTIVE)) |
{ |
cnt++; |
if (cnt > 500) // erst nach Verzoegerung |
{ |
// Erst mal initialisieren |
cnt = 0; |
gps_tick = 0; |
hold_fast = 0; |
hold_reset_int = 0; // Integrator enablen |
int_east = 0, int_north = 0; |
gps_reg_x = 0, gps_reg_y = 0; |
dist_east = 0, dist_north = 0; |
diff_east_f = 0, diff_north_f= 0; |
diff_east = 0, diff_north = 0; |
dist_flown = 0; |
gps_g2t_act_v = 0; |
gps_sub_state = GPS_CRTL_IDLE; |
// aktuelle positionsdaten abspeichern |
if (gps_rel_act_position.status > 0) |
{ |
gps_rel_start_position.utm_east = gps_rel_act_position.utm_east; |
gps_rel_start_position.utm_north= gps_rel_act_position.utm_north; |
gps_rel_start_position.status = 1; // gueltige Positionsdaten |
gps_rel_hold_position.utm_east = gps_rel_act_position.utm_east; |
gps_rel_hold_position.utm_north = gps_rel_act_position.utm_north; |
gps_rel_hold_position.status = 1; // gueltige Positionsdaten |
//Richtung zur Home Position bezogen auf Nordpol bestimmen |
hdng_2home = arctan_i(-gps_rel_start_position.utm_east,-gps_rel_start_position.utm_north); |
// in Winkel 0...360 Grad umrechnen |
if (( gps_rel_start_position.utm_east < 0)) hdng_2home = ( 90-hdng_2home); |
else hdng_2home = (270 - hdng_2home); |
dist_2home = (int) get_dist(gps_rel_start_position.utm_east,gps_rel_start_position.utm_north,hdng_2home); //Entfernung zur Home Position bestimmen |
gps_state = GPS_CRTL_HOME_ACTIVE; |
return (GPS_STST_OK); |
} |
else |
{ |
gps_rel_start_position.status = 0; //Keine Daten verfuegbar |
gps_state = GPS_CRTL_IDLE; |
return(GPS_STST_ERR); // Keine Daten da |
} |
} |
else return(GPS_STST_PEND); // noch warten |
} |
break; |
// ****************************** |
case GPS_CMD_REQ_HOLD: // Die Lageregelung soll aktiviert werden. |
if (gps_state != GPS_CRTL_HOLD_ACTIVE) |
{ |
cnt++; |
if (cnt > 500) // erst nach Verzoegerung |
{ |
cnt = 0; |
// aktuelle positionsdaten abspeichern |
if (gps_rel_act_position.status > 0) |
{ |
hold_fast = 0; |
hold_reset_int = 0; // Integrator enablen |
int_east = 0, int_north = 0; |
gps_reg_x = 0, gps_reg_y = 0; |
dist_east = 0, dist_north = 0; |
diff_east_f = 0, diff_north_f= 0; |
diff_east = 0, diff_north = 0; |
gps_rel_hold_position.utm_east = gps_rel_act_position.utm_east; |
gps_rel_hold_position.utm_north = gps_rel_act_position.utm_north; |
gps_rel_hold_position.status = 1; // gueltige Positionsdaten |
gps_state = GPS_CRTL_HOLD_ACTIVE; |
return (GPS_STST_OK); |
} |
else |
{ |
gps_rel_hold_position.status = 0; //Keine Daten verfuegbar |
gps_state = GPS_CRTL_IDLE; |
return(GPS_STST_ERR); // Keine Daten da |
} |
} |
else return(GPS_STST_PEND); // noch warten |
} |
break; |
case GPS_CMD_STOP: // Lageregelung beenden |
cnt = 0; |
GPS_Nick = 0; |
GPS_Roll = 0; |
gps_int_x = 0; |
gps_int_y = 0; |
gps_sub_state = GPS_CRTL_IDLE; |
gps_state = GPS_CRTL_IDLE; |
return (GPS_STST_OK); |
break; |
default: |
return (GPS_STST_ERR); |
break; |
} |
switch (gps_state) |
{ |
case GPS_CRTL_IDLE: |
cnt = 0; |
return (GPS_STST_OK); |
break; |
case GPS_CRTL_HOME_ACTIVE: // Rueckflug zur Basis |
//Der Sollwert des Lagereglers wird der Homeposition angenaehert |
if (gps_rel_start_position.status >0) |
{ |
if ((gps_updte_flag > 0) && (gps_sub_state !=GPS_HOME_FINISHED)) // nur wenn neue GPS Daten vorliegen und nicht schon alles fertig ist |
{ |
gps_tick++; |
int d1,d2,d3; |
d1 = abs (gps_rel_hold_position.utm_east - gps_rel_act_position.utm_east ); |
d2 = abs (gps_rel_hold_position.utm_north - gps_rel_act_position.utm_north ); |
d3 = (dist_2home - (int)dist_flown); // Restdistanz zum Ziel |
if (d3 > GPS_G2T_DIST_MAX_STOP) // Schneller Rueckflug, noch weit weg vom Ziel |
{ |
if ((d1 < GPS_G2T_FAST_TOL) && (d2 < GPS_G2T_FAST_TOL)) //nur weiter wenn Lage innerhalb der Toleranz |
{ |
if (gps_g2t_act_v < GPS_G2T_V_MAX) gps_g2t_act_v++; //Geschwindigkeit langsam erhoehen |
dist_flown +=(long)gps_g2t_act_v; // Vorgabe der Strecke anhand der Geschwindigkeit |
gps_sub_state = GPS_HOME_FAST_IN_TOL; |
} |
else //Den Lageregler in Ruhe arbeiten lassen weil ausserhalb der Toleranz |
{ |
if (gps_g2t_act_v > 1) gps_g2t_act_v--; // Geschwindigkeit reduzieren |
dist_flown++; //Auch ausserhalb der Toleranz langsam erhoehen |
gps_sub_state = GPS_HOME_FAST_OUTOF_TOL; |
} |
hold_reset_int = 0; // Integrator einsschalten |
hold_fast = 1; // Regler fuer schnellen Flug |
dist_frm_start_east = (int)((dist_flown * (long)sin_i(hdng_2home))/1000); |
dist_frm_start_north = (int)((dist_flown * (long)cos_i(hdng_2home))/1000); |
gps_rel_hold_position.utm_east = gps_rel_start_position.utm_east + dist_frm_start_east; //naechster Zielpunkt |
gps_rel_hold_position.utm_north = gps_rel_start_position.utm_north + dist_frm_start_north; //naechster Zielpunkt |
} |
else if (d3 > GPS_G2T_DIST_HOLD) //Das Ziel naehert sich, deswegen abbremsen |
{ |
if ((d1 < GPS_G2T_NRML_TOL) && (d2 < GPS_G2T_NRML_TOL)) |
{ |
dist_flown += GPS_G2T_V_RAMP_DWN; // Vorgabe der Strecke anhand der Geschwindigkeit |
gps_sub_state = GPS_HOME_RMPDWN_IN_TOL; |
} |
else |
{ |
dist_flown++; //Auch ausserhalb der Toleranz langsam erhoehen |
gps_sub_state = GPS_HOME_RMPDWN_OUTOF_TOL; |
} |
hold_reset_int = 0; // Integrator ausschalten |
hold_fast = 1; // Wieder normal regeln |
dist_frm_start_east = (int)((dist_flown * (long)sin_i(hdng_2home))/1000); |
dist_frm_start_north = (int)((dist_flown * (long)cos_i(hdng_2home))/1000); |
gps_rel_hold_position.utm_east = gps_rel_start_position.utm_east + dist_frm_start_east; //naechster Zielpunkt |
gps_rel_hold_position.utm_north = gps_rel_start_position.utm_north + dist_frm_start_north; //naechster Zielpunkt |
} |
else //Soll-Ziel fast erreicht, Jetzt noch Reste ausgleichen, weil Zielpunkt nicht exakt bestimmt werden konnte (Fehler in Winkelfkt) |
{ |
if ((d1 < GPS_G2T_NRML_TOL) && (d2 < GPS_G2T_NRML_TOL)) // Jetzt bis zum Zielpunkt regeln |
{ |
gps_sub_state = GPS_HOME_IN_TOL; |
hold_fast = 0; // Wieder normal regeln |
hold_reset_int = 0; // Integrator wieder aktivieren |
if (gps_rel_hold_position.utm_east >= GPS_G2T_V_MIN) gps_rel_hold_position.utm_east -= GPS_G2T_V_MIN; |
else if (gps_rel_hold_position.utm_east <= -GPS_G2T_V_MIN ) gps_rel_hold_position.utm_east += GPS_G2T_V_MIN; |
if (gps_rel_hold_position.utm_north >= GPS_G2T_V_MIN) gps_rel_hold_position.utm_north -= GPS_G2T_V_MIN; |
else if (gps_rel_hold_position.utm_north <= - GPS_G2T_V_MIN ) gps_rel_hold_position.utm_north += GPS_G2T_V_MIN; |
if ((abs(gps_rel_hold_position.utm_east) <= GPS_G2T_V_MIN) && (abs(gps_rel_hold_position.utm_north) <=GPS_G2T_V_MIN)) |
{ |
gps_rel_hold_position.utm_east = 0; |
gps_rel_hold_position.utm_north = 0; |
gps_sub_state = GPS_HOME_FINISHED; |
} |
} |
else gps_sub_state = GPS_HOME_OUTOF_TOL; |
} |
} |
gps_state = GPS_CRTL_HOLD_ACTIVE; //Zwischensprung |
return (GPS_STST_OK); |
} |
else // Keine GPS Daten verfuegbar, deswegen Abbruch |
{ |
gps_state = GPS_CRTL_IDLE; |
return (GPS_STST_ERR); |
} |
break; |
case GPS_CRTL_HOLD_ACTIVE: // Hier werden die Daten fuer Nick und Roll errechnet |
if (gps_updte_flag >0) // nur wenn neue GPS Daten vorliegen |
{ |
gps_updte_flag = 0; |
// ab hier wird geregelt |
diff_east = -dist_east; //Alten Wert fuer Differenzier schon mal abziehen |
diff_north = -dist_north; |
dist_east = gps_rel_hold_position.utm_east - gps_rel_act_position.utm_east; |
dist_north = gps_rel_hold_position.utm_north - gps_rel_act_position.utm_north; |
int_east += dist_east; |
int_north += dist_north; |
diff_east += dist_east; // Differenz zur vorhergehenden East Position |
diff_north += dist_north; // Differenz zur vorhergehenden North Position |
if (hold_fast > 0) // wegen Sollpositionsspruengen im Fast Mode Differenzierer daempfen |
{ |
diff_east_f = ((diff_east_f *2)/3) + (diff_east *1/3); //Differenzierer filtern |
diff_north_f = ((diff_north_f *2)/3) + (diff_north*1/3); //Differenzierer filtern |
} |
else // schwache Filterung |
{ |
diff_east_f = ((diff_east_f * 1)/4) + ((diff_east *3)/4); //Differenzierer filtern |
diff_north_f = ((diff_north_f * 1)/4) + ((diff_north*3)/4); //Differenzierer filtern |
} |
#define GPSINT_MAX 30000 //neuer Wert ab 7.10.2007 Begrenzung |
if ((abs(int_east) > GPSINT_MAX) || (abs(int_north)> GPSINT_MAX)) //Bei zu hohem Wert Integrator auf Wert halten |
{ |
int_east -= dist_east; |
int_north -= dist_north; |
} |
if (hold_reset_int > 0) //Im Schnellen Mode Integrator abschalten |
{ |
int_east = 0; |
int_north = 0; |
} |
// Variable Verstarkung fuer Differenzierer ermitteln. Je weiter vom Ziel wir entfernt sind |
// desto groesser wird der Faktor. Es gibt aber einen Maximalwert. Bei 0 ist die Verstaerkung immer 1 |
signed long dist,int_east1,int_north1; |
int phi; |
phi = arctan_i(abs(dist_north),abs(dist_east)); |
dist = get_dist(dist_east,dist_north,phi); //Zunaechst Entfernung zum Ziel ermitteln |
if (hold_fast == 0) // je Nach Modus andere Verstaerkungskurve fuer Differenzierer |
{ |
diff_v = (int)((dist * (GPS_DIFF_NRML_MAX_V - 10)) / GPS_DIFF_NRML_MAX_D) +10; //Verstaerkung * 10 |
if (diff_v > GPS_DIFF_NRML_MAX_V) diff_v = GPS_DIFF_NRML_MAX_V; //begrenzen |
} |
else |
{ |
diff_v = (int)((dist * (GPS_DIFF_FAST_MAX_V - 10)) / GPS_DIFF_FAST_MAX_D) +10; //Verstaerkung * 10 |
if (diff_v > GPS_DIFF_FAST_MAX_V) diff_v = GPS_DIFF_FAST_MAX_V; //begrenzen |
} |
int diff_p; //Vom Modus abhaengige zusaetzliche Verstaerkung |
if (hold_fast > 0) diff_p = GPS_PROP_FAST_V; |
else diff_p = GPS_PROP_NRML_V; |
//I Werte begrenzen |
#define INT1_MAX (20 * GPS_V) |
int_east1 = ((((long)int_east) * Parameter_UserParam2)/32)/GPS_USR_PAR_FKT; |
int_north = ((((long)int_north) * Parameter_UserParam2)/32)/GPS_USR_PAR_FKT; |
if (int_east1 > INT1_MAX) int_east1 = INT1_MAX; //begrenzen |
else if (int_east1 < -INT1_MAX) int_east1 = -INT1_MAX; |
if (int_north1 > INT1_MAX) int_north1 = INT1_MAX; //begrenzen |
else if (int_north1 < -INT1_MAX) int_north1 = -INT1_MAX; |
//PID Regler Werte aufsummieren |
gps_reg_x = ((int)int_east1 + ((dist_east * (Parameter_UserParam1/GPS_USR_PAR_FKT) * diff_p)/(8*2))+ ((diff_east_f * diff_v * (Parameter_UserParam3/GPS_USR_PAR_FKT))/10)); // I + P +D Anteil X Achse |
gps_reg_y = ((int)int_north1 + ((dist_north * (Parameter_UserParam1/GPS_USR_PAR_FKT) * diff_p)/(8*2))+ ((diff_north_f * diff_v * (Parameter_UserParam3/GPS_USR_PAR_FKT))/10)); // I + P +D Anteil Y Achse |
//Ziel-Richtung bezogen auf Nordpol bestimmen |
GPS_hdng_abs_2trgt = arctan_i(gps_reg_x,gps_reg_y); |
// in Winkel 0...360 Grad umrechnen |
if ((gps_reg_x >= 0)) GPS_hdng_abs_2trgt = ( 90-GPS_hdng_abs_2trgt); |
else GPS_hdng_abs_2trgt = (270 - GPS_hdng_abs_2trgt); |
// Relative Richtung in bezug auf Nordachse des Kopters errechen |
n= GyroKomp_Int/GYROKOMP_INC_GRAD_DEFAULT; |
GPS_hdng_rel_2trgt = GPS_hdng_abs_2trgt - n; |
if ((GPS_hdng_rel_2trgt >180) && (GPS_hdng_abs_2trgt >=180)) GPS_hdng_rel_2trgt = GPS_hdng_rel_2trgt-360; |
else if (GPS_hdng_rel_2trgt >180) GPS_hdng_rel_2trgt = 360 - GPS_hdng_rel_2trgt; |
else if (GPS_hdng_rel_2trgt <-180) GPS_hdng_rel_2trgt = 360 + GPS_hdng_rel_2trgt; |
// Regelabweichung aus x,y zu Ziel in Distanz umrechnen |
if (abs(gps_reg_x) > abs(gps_reg_y) ) |
{ |
dev = (long)gps_reg_x; //Groesseren Wert wegen besserer Genauigkeit nehmen |
dev = abs((dev *1000) / (long) sin_i(GPS_hdng_abs_2trgt)); |
} |
else |
{ |
dev = (long)gps_reg_y; |
dev = abs((dev *1000) / (long) cos_i(GPS_hdng_abs_2trgt)); |
} |
GPS_dist_2trgt = (int) dev; |
// Winkel und Distanz in Nick und Rollgroessen umrechnen |
GPS_Roll = (int) +( (dev * (long) sin_i(GPS_hdng_rel_2trgt))/1000); |
GPS_Nick = (int) -( (dev * (long) cos_i(GPS_hdng_rel_2trgt))/1000); |
if (GPS_Roll > (GPS_NICKROLL_MAX * GPS_V)) GPS_Roll = (GPS_NICKROLL_MAX * GPS_V); |
else if (GPS_Roll < -(GPS_NICKROLL_MAX * GPS_V)) GPS_Roll = -(GPS_NICKROLL_MAX * GPS_V); |
if (GPS_Nick > (GPS_NICKROLL_MAX * GPS_V)) GPS_Nick = (GPS_NICKROLL_MAX * GPS_V); |
else if (GPS_Nick < -(GPS_NICKROLL_MAX * GPS_V)) GPS_Nick = -(GPS_NICKROLL_MAX * GPS_V); |
//Kleine Werte verstaerken, Grosse abschwaechen |
n = sin_i((GPS_Roll*90)/(GPS_NICKROLL_MAX * GPS_V)); |
n_l = ((long) GPS_NICKROLL_MAX * (long) n)/1000; |
GPS_Roll = (int) n_l; |
n = sin_i((GPS_Nick*90)/(GPS_NICKROLL_MAX * GPS_V)); |
n_l = ((long) GPS_NICKROLL_MAX * (long) n)/1000; |
GPS_Nick = (int) n_l; |
if ((abs(dist_east) > GPS_DIST_MAX) || (abs(dist_north) > GPS_DIST_MAX)) // bei zu grossem Abstand abbrechen |
{ |
GPS_Roll = 0; |
GPS_Nick = 0; |
gps_state = GPS_CRTL_IDLE; |
return (GPS_STST_ERR); |
break; |
} |
else |
{ |
if ( cmd == GPS_CMD_REQ_HOME ) gps_state = GPS_CRTL_HOME_ACTIVE; // State umsetzen |
return (GPS_STST_OK); |
} |
} |
else |
{ |
if ( cmd == GPS_CMD_REQ_HOME ) gps_state = GPS_CRTL_HOME_ACTIVE; // State umsetzen |
return (GPS_STST_OK); |
} |
break; |
default: |
gps_state = GPS_CRTL_IDLE; |
return (GPS_STST_ERR); |
break; |
} |
return (GPS_STST_ERR); |
} |
/branches/salvo_gps/Basis_v0067g/trunk/License_GPL.txt |
---|
0,0 → 1,674 |
GNU GENERAL PUBLIC LICENSE |
Version 3, 29 June 2007 |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
Everyone is permitted to copy and distribute verbatim copies |
of this license document, but changing it is not allowed. |
Preamble |
The GNU General Public License is a free, copyleft license for |
software and other kinds of works. |
The licenses for most software and other practical works are designed |
to take away your freedom to share and change the works. By contrast, |
the GNU General Public License is intended to guarantee your freedom to |
share and change all versions of a program--to make sure it remains free |
software for all its users. We, the Free Software Foundation, use the |
GNU General Public License for most of our software; it applies also to |
any other work released this way by its authors. You can apply it to |
your programs, too. |
When we speak of free software, we are referring to freedom, not |
price. Our General Public Licenses are designed to make sure that you |
have the freedom to distribute copies of free software (and charge for |
them if you wish), that you receive source code or can get it if you |
want it, that you can change the software or use pieces of it in new |
free programs, and that you know you can do these things. |
To protect your rights, we need to prevent others from denying you |
these rights or asking you to surrender the rights. Therefore, you have |
certain responsibilities if you distribute copies of the software, or if |
you modify it: responsibilities to respect the freedom of others. |
For example, if you distribute copies of such a program, whether |
gratis or for a fee, you must pass on to the recipients the same |
freedoms that you received. You must make sure that they, too, receive |
or can get the source code. And you must show them these terms so they |
know their rights. |
Developers that use the GNU GPL protect your rights with two steps: |
(1) assert copyright on the software, and (2) offer you this License |
giving you legal permission to copy, distribute and/or modify it. |
For the developers' and authors' protection, the GPL clearly explains |
that there is no warranty for this free software. For both users' and |
authors' sake, the GPL requires that modified versions be marked as |
changed, so that their problems will not be attributed erroneously to |
authors of previous versions. |
Some devices are designed to deny users access to install or run |
modified versions of the software inside them, although the manufacturer |
can do so. This is fundamentally incompatible with the aim of |
protecting users' freedom to change the software. The systematic |
pattern of such abuse occurs in the area of products for individuals to |
use, which is precisely where it is most unacceptable. Therefore, we |
have designed this version of the GPL to prohibit the practice for those |
products. If such problems arise substantially in other domains, we |
stand ready to extend this provision to those domains in future versions |
of the GPL, as needed to protect the freedom of users. |
Finally, every program is threatened constantly by software patents. |
States should not allow patents to restrict development and use of |
software on general-purpose computers, but in those that do, we wish to |
avoid the special danger that patents applied to a free program could |
make it effectively proprietary. To prevent this, the GPL assures that |
patents cannot be used to render the program non-free. |
The precise terms and conditions for copying, distribution and |
modification follow. |
TERMS AND CONDITIONS |
0. Definitions. |
"This License" refers to version 3 of the GNU General Public License. |
"Copyright" also means copyright-like laws that apply to other kinds of |
works, such as semiconductor masks. |
"The Program" refers to any copyrightable work licensed under this |
License. Each licensee is addressed as "you". "Licensees" and |
"recipients" may be individuals or organizations. |
To "modify" a work means to copy from or adapt all or part of the work |
in a fashion requiring copyright permission, other than the making of an |
exact copy. The resulting work is called a "modified version" of the |
earlier work or a work "based on" the earlier work. |
A "covered work" means either the unmodified Program or a work based |
on the Program. |
To "propagate" a work means to do anything with it that, without |
permission, would make you directly or secondarily liable for |
infringement under applicable copyright law, except executing it on a |
computer or modifying a private copy. Propagation includes copying, |
distribution (with or without modification), making available to the |
public, and in some countries other activities as well. |
To "convey" a work means any kind of propagation that enables other |
parties to make or receive copies. Mere interaction with a user through |
a computer network, with no transfer of a copy, is not conveying. |
An interactive user interface displays "Appropriate Legal Notices" |
to the extent that it includes a convenient and prominently visible |
feature that (1) displays an appropriate copyright notice, and (2) |
tells the user that there is no warranty for the work (except to the |
extent that warranties are provided), that licensees may convey the |
work under this License, and how to view a copy of this License. If |
the interface presents a list of user commands or options, such as a |
menu, a prominent item in the list meets this criterion. |
1. Source Code. |
The "source code" for a work means the preferred form of the work |
for making modifications to it. "Object code" means any non-source |
form of a work. |
A "Standard Interface" means an interface that either is an official |
standard defined by a recognized standards body, or, in the case of |
interfaces specified for a particular programming language, one that |
is widely used among developers working in that language. |
The "System Libraries" of an executable work include anything, other |
than the work as a whole, that (a) is included in the normal form of |
packaging a Major Component, but which is not part of that Major |
Component, and (b) serves only to enable use of the work with that |
Major Component, or to implement a Standard Interface for which an |
implementation is available to the public in source code form. A |
"Major Component", in this context, means a major essential component |
(kernel, window system, and so on) of the specific operating system |
(if any) on which the executable work runs, or a compiler used to |
produce the work, or an object code interpreter used to run it. |
The "Corresponding Source" for a work in object code form means all |
the source code needed to generate, install, and (for an executable |
work) run the object code and to modify the work, including scripts to |
control those activities. However, it does not include the work's |
System Libraries, or general-purpose tools or generally available free |
programs which are used unmodified in performing those activities but |
which are not part of the work. For example, Corresponding Source |
includes interface definition files associated with source files for |
the work, and the source code for shared libraries and dynamically |
linked subprograms that the work is specifically designed to require, |
such as by intimate data communication or control flow between those |
subprograms and other parts of the work. |
The Corresponding Source need not include anything that users |
can regenerate automatically from other parts of the Corresponding |
Source. |
The Corresponding Source for a work in source code form is that |
same work. |
2. Basic Permissions. |
All rights granted under this License are granted for the term of |
copyright on the Program, and are irrevocable provided the stated |
conditions are met. This License explicitly affirms your unlimited |
permission to run the unmodified Program. The output from running a |
covered work is covered by this License only if the output, given its |
content, constitutes a covered work. This License acknowledges your |
rights of fair use or other equivalent, as provided by copyright law. |
You may make, run and propagate covered works that you do not |
convey, without conditions so long as your license otherwise remains |
in force. You may convey covered works to others for the sole purpose |
of having them make modifications exclusively for you, or provide you |
with facilities for running those works, provided that you comply with |
the terms of this License in conveying all material for which you do |
not control copyright. Those thus making or running the covered works |
for you must do so exclusively on your behalf, under your direction |
and control, on terms that prohibit them from making any copies of |
your copyrighted material outside their relationship with you. |
Conveying under any other circumstances is permitted solely under |
the conditions stated below. Sublicensing is not allowed; section 10 |
makes it unnecessary. |
3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
No covered work shall be deemed part of an effective technological |
measure under any applicable law fulfilling obligations under article |
11 of the WIPO copyright treaty adopted on 20 December 1996, or |
similar laws prohibiting or restricting circumvention of such |
measures. |
When you convey a covered work, you waive any legal power to forbid |
circumvention of technological measures to the extent such circumvention |
is effected by exercising rights under this License with respect to |
the covered work, and you disclaim any intention to limit operation or |
modification of the work as a means of enforcing, against the work's |
users, your or third parties' legal rights to forbid circumvention of |
technological measures. |
4. Conveying Verbatim Copies. |
You may convey verbatim copies of the Program's source code as you |
receive it, in any medium, provided that you conspicuously and |
appropriately publish on each copy an appropriate copyright notice; |
keep intact all notices stating that this License and any |
non-permissive terms added in accord with section 7 apply to the code; |
keep intact all notices of the absence of any warranty; and give all |
recipients a copy of this License along with the Program. |
You may charge any price or no price for each copy that you convey, |
and you may offer support or warranty protection for a fee. |
5. Conveying Modified Source Versions. |
You may convey a work based on the Program, or the modifications to |
produce it from the Program, in the form of source code under the |
terms of section 4, provided that you also meet all of these conditions: |
a) The work must carry prominent notices stating that you modified |
it, and giving a relevant date. |
b) The work must carry prominent notices stating that it is |
released under this License and any conditions added under section |
7. This requirement modifies the requirement in section 4 to |
"keep intact all notices". |
c) You must license the entire work, as a whole, under this |
License to anyone who comes into possession of a copy. This |
License will therefore apply, along with any applicable section 7 |
additional terms, to the whole of the work, and all its parts, |
regardless of how they are packaged. This License gives no |
permission to license the work in any other way, but it does not |
invalidate such permission if you have separately received it. |
d) If the work has interactive user interfaces, each must display |
Appropriate Legal Notices; however, if the Program has interactive |
interfaces that do not display Appropriate Legal Notices, your |
work need not make them do so. |
A compilation of a covered work with other separate and independent |
works, which are not by their nature extensions of the covered work, |
and which are not combined with it such as to form a larger program, |
in or on a volume of a storage or distribution medium, is called an |
"aggregate" if the compilation and its resulting copyright are not |
used to limit the access or legal rights of the compilation's users |
beyond what the individual works permit. Inclusion of a covered work |
in an aggregate does not cause this License to apply to the other |
parts of the aggregate. |
6. Conveying Non-Source Forms. |
You may convey a covered work in object code form under the terms |
of sections 4 and 5, provided that you also convey the |
machine-readable Corresponding Source under the terms of this License, |
in one of these ways: |
a) Convey the object code in, or embodied in, a physical product |
(including a physical distribution medium), accompanied by the |
Corresponding Source fixed on a durable physical medium |
customarily used for software interchange. |
b) Convey the object code in, or embodied in, a physical product |
(including a physical distribution medium), accompanied by a |
written offer, valid for at least three years and valid for as |
long as you offer spare parts or customer support for that product |
model, to give anyone who possesses the object code either (1) a |
copy of the Corresponding Source for all the software in the |
product that is covered by this License, on a durable physical |
medium customarily used for software interchange, for a price no |
more than your reasonable cost of physically performing this |
conveying of source, or (2) access to copy the |
Corresponding Source from a network server at no charge. |
c) Convey individual copies of the object code with a copy of the |
written offer to provide the Corresponding Source. This |
alternative is allowed only occasionally and noncommercially, and |
only if you received the object code with such an offer, in accord |
with subsection 6b. |
d) Convey the object code by offering access from a designated |
place (gratis or for a charge), and offer equivalent access to the |
Corresponding Source in the same way through the same place at no |
further charge. You need not require recipients to copy the |
Corresponding Source along with the object code. If the place to |
copy the object code is a network server, the Corresponding Source |
may be on a different server (operated by you or a third party) |
that supports equivalent copying facilities, provided you maintain |
clear directions next to the object code saying where to find the |
Corresponding Source. Regardless of what server hosts the |
Corresponding Source, you remain obligated to ensure that it is |
available for as long as needed to satisfy these requirements. |
e) Convey the object code using peer-to-peer transmission, provided |
you inform other peers where the object code and Corresponding |
Source of the work are being offered to the general public at no |
charge under subsection 6d. |
A separable portion of the object code, whose source code is excluded |
from the Corresponding Source as a System Library, need not be |
included in conveying the object code work. |
A "User Product" is either (1) a "consumer product", which means any |
tangible personal property which is normally used for personal, family, |
or household purposes, or (2) anything designed or sold for incorporation |
into a dwelling. In determining whether a product is a consumer product, |
doubtful cases shall be resolved in favor of coverage. For a particular |
product received by a particular user, "normally used" refers to a |
typical or common use of that class of product, regardless of the status |
of the particular user or of the way in which the particular user |
actually uses, or expects or is expected to use, the product. A product |
is a consumer product regardless of whether the product has substantial |
commercial, industrial or non-consumer uses, unless such uses represent |
the only significant mode of use of the product. |
"Installation Information" for a User Product means any methods, |
procedures, authorization keys, or other information required to install |
and execute modified versions of a covered work in that User Product from |
a modified version of its Corresponding Source. The information must |
suffice to ensure that the continued functioning of the modified object |
code is in no case prevented or interfered with solely because |
modification has been made. |
If you convey an object code work under this section in, or with, or |
specifically for use in, a User Product, and the conveying occurs as |
part of a transaction in which the right of possession and use of the |
User Product is transferred to the recipient in perpetuity or for a |
fixed term (regardless of how the transaction is characterized), the |
Corresponding Source conveyed under this section must be accompanied |
by the Installation Information. But this requirement does not apply |
if neither you nor any third party retains the ability to install |
modified object code on the User Product (for example, the work has |
been installed in ROM). |
The requirement to provide Installation Information does not include a |
requirement to continue to provide support service, warranty, or updates |
for a work that has been modified or installed by the recipient, or for |
the User Product in which it has been modified or installed. Access to a |
network may be denied when the modification itself materially and |
adversely affects the operation of the network or violates the rules and |
protocols for communication across the network. |
Corresponding Source conveyed, and Installation Information provided, |
in accord with this section must be in a format that is publicly |
documented (and with an implementation available to the public in |
source code form), and must require no special password or key for |
unpacking, reading or copying. |
7. Additional Terms. |
"Additional permissions" are terms that supplement the terms of this |
License by making exceptions from one or more of its conditions. |
Additional permissions that are applicable to the entire Program shall |
be treated as though they were included in this License, to the extent |
that they are valid under applicable law. If additional permissions |
apply only to part of the Program, that part may be used separately |
under those permissions, but the entire Program remains governed by |
this License without regard to the additional permissions. |
When you convey a copy of a covered work, you may at your option |
remove any additional permissions from that copy, or from any part of |
it. (Additional permissions may be written to require their own |
removal in certain cases when you modify the work.) You may place |
additional permissions on material, added by you to a covered work, |
for which you have or can give appropriate copyright permission. |
Notwithstanding any other provision of this License, for material you |
add to a covered work, you may (if authorized by the copyright holders of |
that material) supplement the terms of this License with terms: |
a) Disclaiming warranty or limiting liability differently from the |
terms of sections 15 and 16 of this License; or |
b) Requiring preservation of specified reasonable legal notices or |
author attributions in that material or in the Appropriate Legal |
Notices displayed by works containing it; or |
c) Prohibiting misrepresentation of the origin of that material, or |
requiring that modified versions of such material be marked in |
reasonable ways as different from the original version; or |
d) Limiting the use for publicity purposes of names of licensors or |
authors of the material; or |
e) Declining to grant rights under trademark law for use of some |
trade names, trademarks, or service marks; or |
f) Requiring indemnification of licensors and authors of that |
material by anyone who conveys the material (or modified versions of |
it) with contractual assumptions of liability to the recipient, for |
any liability that these contractual assumptions directly impose on |
those licensors and authors. |
All other non-permissive additional terms are considered "further |
restrictions" within the meaning of section 10. If the Program as you |
received it, or any part of it, contains a notice stating that it is |
governed by this License along with a term that is a further |
restriction, you may remove that term. If a license document contains |
a further restriction but permits relicensing or conveying under this |
License, you may add to a covered work material governed by the terms |
of that license document, provided that the further restriction does |
not survive such relicensing or conveying. |
If you add terms to a covered work in accord with this section, you |
must place, in the relevant source files, a statement of the |
additional terms that apply to those files, or a notice indicating |
where to find the applicable terms. |
Additional terms, permissive or non-permissive, may be stated in the |
form of a separately written license, or stated as exceptions; |
the above requirements apply either way. |
8. Termination. |
You may not propagate or modify a covered work except as expressly |
provided under this License. Any attempt otherwise to propagate or |
modify it is void, and will automatically terminate your rights under |
this License (including any patent licenses granted under the third |
paragraph of section 11). |
However, if you cease all violation of this License, then your |
license from a particular copyright holder is reinstated (a) |
provisionally, unless and until the copyright holder explicitly and |
finally terminates your license, and (b) permanently, if the copyright |
holder fails to notify you of the violation by some reasonable means |
prior to 60 days after the cessation. |
Moreover, your license from a particular copyright holder is |
reinstated permanently if the copyright holder notifies you of the |
violation by some reasonable means, this is the first time you have |
received notice of violation of this License (for any work) from that |
copyright holder, and you cure the violation prior to 30 days after |
your receipt of the notice. |
Termination of your rights under this section does not terminate the |
licenses of parties who have received copies or rights from you under |
this License. If your rights have been terminated and not permanently |
reinstated, you do not qualify to receive new licenses for the same |
material under section 10. |
9. Acceptance Not Required for Having Copies. |
You are not required to accept this License in order to receive or |
run a copy of the Program. Ancillary propagation of a covered work |
occurring solely as a consequence of using peer-to-peer transmission |
to receive a copy likewise does not require acceptance. However, |
nothing other than this License grants you permission to propagate or |
modify any covered work. These actions infringe copyright if you do |
not accept this License. Therefore, by modifying or propagating a |
covered work, you indicate your acceptance of this License to do so. |
10. Automatic Licensing of Downstream Recipients. |
Each time you convey a covered work, the recipient automatically |
receives a license from the original licensors, to run, modify and |
propagate that work, subject to this License. You are not responsible |
for enforcing compliance by third parties with this License. |
An "entity transaction" is a transaction transferring control of an |
organization, or substantially all assets of one, or subdividing an |
organization, or merging organizations. If propagation of a covered |
work results from an entity transaction, each party to that |
transaction who receives a copy of the work also receives whatever |
licenses to the work the party's predecessor in interest had or could |
give under the previous paragraph, plus a right to possession of the |
Corresponding Source of the work from the predecessor in interest, if |
the predecessor has it or can get it with reasonable efforts. |
You may not impose any further restrictions on the exercise of the |
rights granted or affirmed under this License. For example, you may |
not impose a license fee, royalty, or other charge for exercise of |
rights granted under this License, and you may not initiate litigation |
(including a cross-claim or counterclaim in a lawsuit) alleging that |
any patent claim is infringed by making, using, selling, offering for |
sale, or importing the Program or any portion of it. |
11. Patents. |
A "contributor" is a copyright holder who authorizes use under this |
License of the Program or a work on which the Program is based. The |
work thus licensed is called the contributor's "contributor version". |
A contributor's "essential patent claims" are all patent claims |
owned or controlled by the contributor, whether already acquired or |
hereafter acquired, that would be infringed by some manner, permitted |
by this License, of making, using, or selling its contributor version, |
but do not include claims that would be infringed only as a |
consequence of further modification of the contributor version. For |
purposes of this definition, "control" includes the right to grant |
patent sublicenses in a manner consistent with the requirements of |
this License. |
Each contributor grants you a non-exclusive, worldwide, royalty-free |
patent license under the contributor's essential patent claims, to |
make, use, sell, offer for sale, import and otherwise run, modify and |
propagate the contents of its contributor version. |
In the following three paragraphs, a "patent license" is any express |
agreement or commitment, however denominated, not to enforce a patent |
(such as an express permission to practice a patent or covenant not to |
sue for patent infringement). To "grant" such a patent license to a |
party means to make such an agreement or commitment not to enforce a |
patent against the party. |
If you convey a covered work, knowingly relying on a patent license, |
and the Corresponding Source of the work is not available for anyone |
to copy, free of charge and under the terms of this License, through a |
publicly available network server or other readily accessible means, |
then you must either (1) cause the Corresponding Source to be so |
available, or (2) arrange to deprive yourself of the benefit of the |
patent license for this particular work, or (3) arrange, in a manner |
consistent with the requirements of this License, to extend the patent |
license to downstream recipients. "Knowingly relying" means you have |
actual knowledge that, but for the patent license, your conveying the |
covered work in a country, or your recipient's use of the covered work |
in a country, would infringe one or more identifiable patents in that |
country that you have reason to believe are valid. |
If, pursuant to or in connection with a single transaction or |
arrangement, you convey, or propagate by procuring conveyance of, a |
covered work, and grant a patent license to some of the parties |
receiving the covered work authorizing them to use, propagate, modify |
or convey a specific copy of the covered work, then the patent license |
you grant is automatically extended to all recipients of the covered |
work and works based on it. |
A patent license is "discriminatory" if it does not include within |
the scope of its coverage, prohibits the exercise of, or is |
conditioned on the non-exercise of one or more of the rights that are |
specifically granted under this License. You may not convey a covered |
work if you are a party to an arrangement with a third party that is |
in the business of distributing software, under which you make payment |
to the third party based on the extent of your activity of conveying |
the work, and under which the third party grants, to any of the |
parties who would receive the covered work from you, a discriminatory |
patent license (a) in connection with copies of the covered work |
conveyed by you (or copies made from those copies), or (b) primarily |
for and in connection with specific products or compilations that |
contain the covered work, unless you entered into that arrangement, |
or that patent license was granted, prior to 28 March 2007. |
Nothing in this License shall be construed as excluding or limiting |
any implied license or other defenses to infringement that may |
otherwise be available to you under applicable patent law. |
12. No Surrender of Others' Freedom. |
If conditions are imposed on you (whether by court order, agreement or |
otherwise) that contradict the conditions of this License, they do not |
excuse you from the conditions of this License. If you cannot convey a |
covered work so as to satisfy simultaneously your obligations under this |
License and any other pertinent obligations, then as a consequence you may |
not convey it at all. For example, if you agree to terms that obligate you |
to collect a royalty for further conveying from those to whom you convey |
the Program, the only way you could satisfy both those terms and this |
License would be to refrain entirely from conveying the Program. |
13. Use with the GNU Affero General Public License. |
Notwithstanding any other provision of this License, you have |
permission to link or combine any covered work with a work licensed |
under version 3 of the GNU Affero General Public License into a single |
combined work, and to convey the resulting work. The terms of this |
License will continue to apply to the part which is the covered work, |
but the special requirements of the GNU Affero General Public License, |
section 13, concerning interaction through a network will apply to the |
combination as such. |
14. Revised Versions of this License. |
The Free Software Foundation may publish revised and/or new versions of |
the GNU General Public License from time to time. Such new versions will |
be similar in spirit to the present version, but may differ in detail to |
address new problems or concerns. |
Each version is given a distinguishing version number. If the |
Program specifies that a certain numbered version of the GNU General |
Public License "or any later version" applies to it, you have the |
option of following the terms and conditions either of that numbered |
version or of any later version published by the Free Software |
Foundation. If the Program does not specify a version number of the |
GNU General Public License, you may choose any version ever published |
by the Free Software Foundation. |
If the Program specifies that a proxy can decide which future |
versions of the GNU General Public License can be used, that proxy's |
public statement of acceptance of a version permanently authorizes you |
to choose that version for the Program. |
Later license versions may give you additional or different |
permissions. However, no additional obligations are imposed on any |
author or copyright holder as a result of your choosing to follow a |
later version. |
15. Disclaimer of Warranty. |
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
16. Limitation of Liability. |
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
SUCH DAMAGES. |
17. Interpretation of Sections 15 and 16. |
If the disclaimer of warranty and limitation of liability provided |
above cannot be given local legal effect according to their terms, |
reviewing courts shall apply local law that most closely approximates |
an absolute waiver of all civil liability in connection with the |
Program, unless a warranty or assumption of liability accompanies a |
copy of the Program in return for a fee. |
END OF TERMS AND CONDITIONS |
How to Apply These Terms to Your New Programs |
If you develop a new program, and you want it to be of the greatest |
possible use to the public, the best way to achieve this is to make it |
free software which everyone can redistribute and change under these terms. |
To do so, attach the following notices to the program. It is safest |
to attach them to the start of each source file to most effectively |
state the exclusion of warranty; and each file should have at least |
the "copyright" line and a pointer to where the full notice is found. |
<one line to give the program's name and a brief idea of what it does.> |
Copyright (C) <year> <name of author> |
This program is free software: you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation, either version 3 of the License, or |
(at your option) any later version. |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
Also add information on how to contact you by electronic and paper mail. |
If the program does terminal interaction, make it output a short |
notice like this when it starts in an interactive mode: |
<program> Copyright (C) <year> <name of author> |
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
This is free software, and you are welcome to redistribute it |
under certain conditions; type `show c' for details. |
The hypothetical commands `show w' and `show c' should show the appropriate |
parts of the General Public License. Of course, your program's commands |
might be different; for a GUI interface, you would use an "about box". |
You should also get your employer (if you work as a programmer) or school, |
if any, to sign a "copyright disclaimer" for the program, if necessary. |
For more information on this, and how to apply and follow the GNU GPL, see |
<http://www.gnu.org/licenses/>. |
The GNU General Public License does not permit incorporating your program |
into proprietary programs. If your program is a subroutine library, you |
may consider it more useful to permit linking proprietary applications with |
the library. If this is what you want to do, use the GNU Lesser General |
Public License instead of this License. But first, please read |
<http://www.gnu.org/philosophy/why-not-lgpl.html>. |
/branches/salvo_gps/Basis_v0067g/trunk/License_LPGL.txt |
---|
0,0 → 1,165 |
GNU LESSER GENERAL PUBLIC LICENSE |
Version 3, 29 June 2007 |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
Everyone is permitted to copy and distribute verbatim copies |
of this license document, but changing it is not allowed. |
This version of the GNU Lesser General Public License incorporates |
the terms and conditions of version 3 of the GNU General Public |
License, supplemented by the additional permissions listed below. |
0. Additional Definitions. |
As used herein, "this License" refers to version 3 of the GNU Lesser |
General Public License, and the "GNU GPL" refers to version 3 of the GNU |
General Public License. |
"The Library" refers to a covered work governed by this License, |
other than an Application or a Combined Work as defined below. |
An "Application" is any work that makes use of an interface provided |
by the Library, but which is not otherwise based on the Library. |
Defining a subclass of a class defined by the Library is deemed a mode |
of using an interface provided by the Library. |
A "Combined Work" is a work produced by combining or linking an |
Application with the Library. The particular version of the Library |
with which the Combined Work was made is also called the "Linked |
Version". |
The "Minimal Corresponding Source" for a Combined Work means the |
Corresponding Source for the Combined Work, excluding any source code |
for portions of the Combined Work that, considered in isolation, are |
based on the Application, and not on the Linked Version. |
The "Corresponding Application Code" for a Combined Work means the |
object code and/or source code for the Application, including any data |
and utility programs needed for reproducing the Combined Work from the |
Application, but excluding the System Libraries of the Combined Work. |
1. Exception to Section 3 of the GNU GPL. |
You may convey a covered work under sections 3 and 4 of this License |
without being bound by section 3 of the GNU GPL. |
2. Conveying Modified Versions. |
If you modify a copy of the Library, and, in your modifications, a |
facility refers to a function or data to be supplied by an Application |
that uses the facility (other than as an argument passed when the |
facility is invoked), then you may convey a copy of the modified |
version: |
a) under this License, provided that you make a good faith effort to |
ensure that, in the event an Application does not supply the |
function or data, the facility still operates, and performs |
whatever part of its purpose remains meaningful, or |
b) under the GNU GPL, with none of the additional permissions of |
this License applicable to that copy. |
3. Object Code Incorporating Material from Library Header Files. |
The object code form of an Application may incorporate material from |
a header file that is part of the Library. You may convey such object |
code under terms of your choice, provided that, if the incorporated |
material is not limited to numerical parameters, data structure |
layouts and accessors, or small macros, inline functions and templates |
(ten or fewer lines in length), you do both of the following: |
a) Give prominent notice with each copy of the object code that the |
Library is used in it and that the Library and its use are |
covered by this License. |
b) Accompany the object code with a copy of the GNU GPL and this license |
document. |
4. Combined Works. |
You may convey a Combined Work under terms of your choice that, |
taken together, effectively do not restrict modification of the |
portions of the Library contained in the Combined Work and reverse |
engineering for debugging such modifications, if you also do each of |
the following: |
a) Give prominent notice with each copy of the Combined Work that |
the Library is used in it and that the Library and its use are |
covered by this License. |
b) Accompany the Combined Work with a copy of the GNU GPL and this license |
document. |
c) For a Combined Work that displays copyright notices during |
execution, include the copyright notice for the Library among |
these notices, as well as a reference directing the user to the |
copies of the GNU GPL and this license document. |
d) Do one of the following: |
0) Convey the Minimal Corresponding Source under the terms of this |
License, and the Corresponding Application Code in a form |
suitable for, and under terms that permit, the user to |
recombine or relink the Application with a modified version of |
the Linked Version to produce a modified Combined Work, in the |
manner specified by section 6 of the GNU GPL for conveying |
Corresponding Source. |
1) Use a suitable shared library mechanism for linking with the |
Library. A suitable mechanism is one that (a) uses at run time |
a copy of the Library already present on the user's computer |
system, and (b) will operate properly with a modified version |
of the Library that is interface-compatible with the Linked |
Version. |
e) Provide Installation Information, but only if you would otherwise |
be required to provide such information under section 6 of the |
GNU GPL, and only to the extent that such information is |
necessary to install and execute a modified version of the |
Combined Work produced by recombining or relinking the |
Application with a modified version of the Linked Version. (If |
you use option 4d0, the Installation Information must accompany |
the Minimal Corresponding Source and Corresponding Application |
Code. If you use option 4d1, you must provide the Installation |
Information in the manner specified by section 6 of the GNU GPL |
for conveying Corresponding Source.) |
5. Combined Libraries. |
You may place library facilities that are a work based on the |
Library side by side in a single library together with other library |
facilities that are not Applications and are not covered by this |
License, and convey such a combined library under terms of your |
choice, if you do both of the following: |
a) Accompany the combined library with a copy of the same work based |
on the Library, uncombined with any other library facilities, |
conveyed under the terms of this License. |
b) Give prominent notice with the combined library that part of it |
is a work based on the Library, and explaining where to find the |
accompanying uncombined form of the same work. |
6. Revised Versions of the GNU Lesser General Public License. |
The Free Software Foundation may publish revised and/or new versions |
of the GNU Lesser General Public License from time to time. Such new |
versions will be similar in spirit to the present version, but may |
differ in detail to address new problems or concerns. |
Each version is given a distinguishing version number. If the |
Library as you received it specifies that a certain numbered version |
of the GNU Lesser General Public License "or any later version" |
applies to it, you have the option of following the terms and |
conditions either of that published version or of any later version |
published by the Free Software Foundation. If the Library as you |
received it does not specify a version number of the GNU Lesser |
General Public License, you may choose any version of the GNU Lesser |
General Public License ever published by the Free Software Foundation. |
If the Library as you received it specifies that a proxy can decide |
whether future versions of the GNU Lesser General Public License shall |
apply, that proxy's public statement of acceptance of any version is |
permanent authorization for you to choose that version for the |
Library. |
/branches/salvo_gps/Basis_v0067g/trunk/License_buss.txt |
---|
0,0 → 1,52 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + Nur für den privaten Gebrauch |
// + www.MikroKopter.com |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation), |
// + dass eine Nutzung (auch auszugsweise) nur für den privaten und nichtkommerziellen Gebrauch zulässig ist. |
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt |
// + bzgl. der Nutzungsbedingungen aufzunehmen. |
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen, |
// + Verkauf von Luftbildaufnahmen, usw. |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, |
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts |
// + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de" |
// + eindeutig als Ursprung verlinkt und genannt werden |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion |
// + Benutzung auf eigene Gefahr |
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Die Portierung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur |
// + mit unserer Zustimmung zulässig |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Redistributions of source code (with or without modifications) must retain the above copyright notice, |
// + this list of conditions and the following disclaimer. |
// + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived |
// + from this software without specific prior written permission. |
// + * The use of this project (hardware, software, binary files, sources and documentation) is only permittet |
// + for non-profit use (directly or indirectly) |
// + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted |
// + with our written permission |
// + * If sources or documentations are redistributet, our webpage (http://www.MikroKopter.de) must be |
// + clearly linked and named as origin |
// + * porting to systems other than hardware from www.mikrokopter.de is not allowed |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
// + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
// + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
// + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
// + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
// + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
// + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
// + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
// + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
// + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// + POSSIBILITY OF SUCH DAMAGE. |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
/branches/salvo_gps/Basis_v0067g/trunk/README_Gps.txt |
---|
0,0 → 1,76 |
********************************************************************* |
GPS Implementierung von Peter Muehlenbrock ("Salvo") für Mikrokopter/FlightCrtl |
Stand 10.12.2007 |
Verwendung der SW ohne Gewaehr. Siehe auch die Lizenzbedingungen in File Licensce_LPGL.txt und Licensce_GPL.txt |
Die Version basiert auf Holgers V00.67g. |
********************************************************************* |
Hardware-Voraussetzungen: |
Kalibrierter Kompass vom Typ CMPS03, waagrecht eingebaut |
GPS Modul vom Typ ublox, Die Meldungungen "NAV_STATUS", "NAV_POSUTM" und "NAV_VELNED" |
mussen mit 4 HZ Updaterate aktiviert sein. Anschluss an RX Port der FlightCRtl. Baudrate ist 57600 wie beim Kopter Tool. |
Software-Voraussetzungen: |
In timer0.h muss die Ausrichtung des Kompasses bezogen auf die Nordachse des Kopters |
eingetragen sein. KOMPASS_OFFSET legt diesen Wert fest. |
Betriebs-Voraussetzungen: |
Damit der Kompass sauber funktioniert, muss die waagrechte Lage (Gashebel Vollanschlag und Gier rechts) |
im Eeprom abgespeichert worden sein. |
Parametrierung: |
Der GPS Hold Regler ist ein PID Regler, der ueber die UserParameter1(P), 2(I) und D(3) gesteuert wird. |
UserParameter1 beschreibt den P-Anteil, UserParameter2 den I-Anteil und UserParameter3 den D-Anteil. |
Hier kann und muss gespielt werden.Alle Parameter koennen direkt im Mikrokoptertool in den Settings eingestellt werden. |
Standardwert ist 128 für den P-Anteil, 16 für den I-Anteil und 160 für den D-Anteil. |
Je größer die Werte desto "ruckeliger" reagiert die Regelung aber desto schneller und stärker greift sie auch. |
Wenn alle 0 sind, ist der Regler deaktiviert. |
Voraussetzungen für GPS_Hold: |
Neben den genannten HW und SW Voraussetzungen muß beim Kalibrieren das GPS MOdul bereits Positionsdaten liefern. |
Nur dann wird die Home Position abgespeichert und nur dann wird GPS_Hold aktiviert. |
Kenntlich gemacht wird dies durch einen etwas längeren Piepser nach dem Kalibrieren. |
Das GPS Aktiv Flag im Setting muss aktiviert sein. |
Eine Ausrichtung des Kopters nach Nord etc. ist nicht erforderlich. |
Aktivierung GPS_Hold im Flug: |
Wenn alle genannten Voraussetzungen erfüllt sind, wird GPS Hold im Flug automatisch aktiviert, sobald der Nick und Roll Stick |
fürca. 500msec in Neutrallage sind. Weicht einer der Sticks davon ab (Parameter GPS_STICK_HOLDOFF) oder liefert das GPS Modul oder fällt der |
Kompass aus wird GPS_Hold sofort deaktiviert. |
Damit kann jederzeit die manuelle Kontrolle wieder übernommen werden. |
GPS_Hold regelt nur horizontale Abweichungen, keine Hoehe. |
Der Magnetkompass wird nur in waagrechter Lage dazu benutzt einen internen aus dem Giergyro ermittelten "Ersatz"kompasswert |
nach zu kalibrieren. Daher funktioniert die Bstimmung der Kopterausrichtung in jeder Lebenslage, sofern nur ab und zu |
der Magnetkompass in die waagrechte Lage kommt. |
Ein 3D Kompass ist damit überflüssig. |
GPS Rücksturz zur Basis (GPS Home) Funktion |
Voraussetzungen wie bei GPS Hold. |
Die Funktion kann im Flug aktiviert werden durch Setzen des Hoehenreglerschalters. |
Holgers Code habe ich so abgeändert daß der Höhenregler mit "Parameter_MaxHoehe" ab 50 aktiviert wird. |
Mit einem Schalter mit Neutrallage können damit die Funktionen |
Alles aus - Hoehenregler ein, GPS Home Aus - Hoehenregler Ein UND GPS Home ein |
aktiviert werden. Ist noch nicht die beste Lösung und werde ich noch anpassen |
Weitere Änderungen: |
Bei Unterschreiten der eingestellten Warnschwelle für UBAT ertönt zunächst wie gewohnt der Piepser. Geht die Spannung weiter |
runter wird zwangsweise die Gaseinstellung langsam reduziert um den Kopter zum Landen zu bringen. |
Der Ausgang PC6 kann benutzt werden um einen Externen Multiplexer zu schalten. Dieser schaltet entweder die GPS Daten |
(Wenn Motoren eingeschaltet sind) oder den Ausgang des Bluetoothmoduls (wenn Motoren ausgeschaltet sind) auf den RX |
Eingang der FlightCrtl. Damit kann eine zweite UART Schnittstelle bzw. die manuelle Umschaltung entfallen |
Bekannte Schwächen: |
Bei längerer Neigung weicht der Ersatzkompass ab, was zu Lageregelungsfehlern bis zum Ausbrechen führen kann. |
/branches/salvo_gps/Basis_v0067g/trunk/Settings.h |
---|
--- _Settings.h (nonexistent) |
+++ _Settings.h (revision 544) |
@@ -0,0 +1,50 @@ |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+// Testmodi |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+#define MOTOR_OFF 0 |
+#define MOTOR_TEST 0 |
+ |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+// Abstimmung |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+#define ACC_AMPLIFY 16 |
+#define FAKTOR_P 1 |
+#define FAKTOR_I 0.0001 |
+ |
+ |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+// Debug-Interface |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+#define SIO_DEBUG 1 // Soll der Debugger aktiviert sein? |
+#define MIN_DEBUG_INTERVALL 250 // in diesem Intervall werden Debugdaten ohne Aufforderung gesendet |
+ |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+// Sender |
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
+ #define K_NICK 0 |
+ #define K_ROLL 1 |
+ #define K_GAS 2 |
+ #define K_GIER 3 |
+ #define K_POTI1 4 |
+ #define K_POTI2 5 |
+ #define K_POTI3 6 |
+ #define K_POTI4 7 |
+// +++++++++++++++++++++++++++++++ |
+// + Getestete Settings: |
+// +++++++++++++++++++++++++++++++ |
+// Setting: Kamera |
+// Stick_P:3 |
+// Stick_D:0 |
+// Gyro_P: 175 |
+// Gyro_I: 175 |
+// Ki_Anteil: 10 |
+// +++++++++++++++++++++++++++++++ |
+// + Getestete Settings: |
+// +++++++++++++++++++++++++++++++ |
+// Setting: Normal |
+// Stick_P:2 |
+// Stick_D:8 |
+// Gyro_P: 80 |
+// Gyro_I: 150 |
+// Ki_Anteil: 5 |
+ |
/branches/salvo_gps/Basis_v0067g/trunk/analog.c |
---|
0,0 → 1,145 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az, UBat = 100; |
volatile int AdWertNick = 0, AdWertRoll = 0, AdWertGier = 0; |
volatile int AdWertAccRoll = 0,AdWertAccNick = 0,AdWertAccHoch = 0; |
volatile char MessanzahlNick = 0, MessanzahlRoll = 0, MessanzahlGier = 0; |
volatile char messanzahl_AccNick = 0, messanzahl_AccRoll = 0, messanzahl_AccHoch = 0; |
volatile long Luftdruck = 32000; |
volatile int StartLuftdruck; |
volatile unsigned int MessLuftdruck = 1023; |
unsigned char DruckOffsetSetting; |
volatile int HoeheD = 0; |
volatile char messanzahl_Druck; |
volatile int tmpLuftdruck; |
volatile unsigned int ZaehlMessungen = 0; |
//####################################################################################### |
// |
void ADC_Init(void) |
//####################################################################################### |
{ |
ADMUX = 0;//Referenz ist extern |
ADCSRA=(1<<ADEN)|(1<<ADSC)|(1<<ADATE)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)|(1<<ADIE); |
//Free Running Mode, Division Factor 128, Interrupt on |
} |
void SucheLuftruckOffset(void) |
{ |
unsigned int off; |
off = eeprom_read_byte(&EEPromArray[EEPROM_ADR_LAST_OFFSET]); |
if(off > 20) off -= 10; |
OCR0A = off; |
Delay_ms_Mess(100); |
if(MessLuftdruck < 850) off = 0; |
for(; off < 250;off++) |
{ |
OCR0A = off; |
Delay_ms_Mess(50); |
printf("."); |
if(MessLuftdruck < 900) break; |
} |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_LAST_OFFSET], off); |
DruckOffsetSetting = off; |
Delay_ms_Mess(300); |
} |
//####################################################################################### |
// |
SIGNAL(SIG_ADC) |
//####################################################################################### |
{ |
static unsigned char kanal=0,state = 0; |
static unsigned int gier1, roll1, nick1; |
ANALOG_OFF; |
switch(state++) |
{ |
case 0: |
gier1 = ADC; |
kanal = 1; |
ZaehlMessungen++; |
break; |
case 1: |
roll1 = ADC; |
kanal = 2; |
break; |
case 2: |
nick1 = ADC; |
kanal = 4; |
break; |
case 3: |
UBat = (3 * UBat + ADC / 3) / 4;//(UBat + ((ADC * 39) / 256) + 19) / 2; |
kanal = 6; |
break; |
case 4: |
Aktuell_ay = NeutralAccY - ADC; |
AdWertAccRoll = Aktuell_ay; |
kanal = 7; |
break; |
case 5: |
Aktuell_ax = ADC - NeutralAccX; |
AdWertAccNick = Aktuell_ax; |
kanal = 0; |
break; |
case 6: |
if(PlatinenVersion == 10) AdWertGier = (ADC + gier1) / 2; |
else AdWertGier = ADC + gier1; |
kanal = 1; |
break; |
case 7: |
if(PlatinenVersion == 10) AdWertRoll = (ADC + roll1) / 2; |
else AdWertRoll = ADC + roll1; |
kanal = 2; |
break; |
case 8: |
if(PlatinenVersion == 10) AdWertNick = (ADC + nick1) / 2; |
else AdWertNick = ADC + nick1; |
kanal = 5; |
break; |
case 9: |
AdWertAccHoch = (signed int) ADC - NeutralAccZ; |
AdWertAccHoch += abs(Aktuell_ay) / 4 + abs(Aktuell_ax) / 4; |
if(AdWertAccHoch > 1) |
{ |
if(NeutralAccZ < 800) NeutralAccZ+= 0.02; |
} |
else if(AdWertAccHoch < -1) |
{ |
if(NeutralAccZ > 600) NeutralAccZ-= 0.02; |
} |
messanzahl_AccHoch = 1; |
Aktuell_az = ADC; |
Mess_Integral_Hoch += AdWertAccHoch; // Integrieren |
Mess_Integral_Hoch -= Mess_Integral_Hoch / 1024; // dämfen |
kanal = 3; |
break; |
case 10: |
tmpLuftdruck += ADC; |
if(++messanzahl_Druck >= 5) |
{ |
MessLuftdruck = ADC; |
messanzahl_Druck = 0; |
HoeheD = (int)(StartLuftdruck - tmpLuftdruck - HoehenWert); // D-Anteil = neuerWert - AlterWert |
Luftdruck = (tmpLuftdruck + 3 * Luftdruck) / 4; |
HoehenWert = StartLuftdruck - Luftdruck; |
tmpLuftdruck = 0; |
} |
kanal = 0; |
state = 0; |
break; |
default: |
kanal = 0; |
state = 0; |
break; |
} |
ADMUX = kanal; |
if(state != 0) ANALOG_ON; |
} |
/branches/salvo_gps/Basis_v0067g/trunk/analog.h |
---|
0,0 → 1,24 |
/*####################################################################################### |
#######################################################################################*/ |
extern volatile int UBat; |
extern volatile int AdWertNick, AdWertRoll, AdWertGier; |
extern volatile int AdWertAccRoll,AdWertAccNick,AdWertAccHoch; |
extern volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az; |
extern volatile long Luftdruck; |
extern volatile char messanzahl_Druck; |
extern volatile unsigned int ZaehlMessungen; |
extern unsigned char DruckOffsetSetting; |
extern volatile int HoeheD; |
extern volatile unsigned int MessLuftdruck; |
extern volatile int StartLuftdruck; |
extern volatile char MessanzahlNick; |
unsigned int ReadADC(unsigned char adc_input); |
void ADC_Init(void); |
void SucheLuftruckOffset(void); |
#define ANALOG_OFF ADCSRA=0 |
#define ANALOG_ON ADCSRA=(1<<ADEN)|(1<<ADSC)|(1<<ADATE)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)|(1<<ADIE) |
/branches/salvo_gps/Basis_v0067g/trunk/eeprom.c |
---|
0,0 → 1,182 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Konstanten |
// + 0-250 -> normale Werte |
// + 251 -> Poti1 |
// + 252 -> Poti2 |
// + 253 -> Poti3 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
void DefaultKonstanten1(void) |
{ |
EE_Parameter.Kanalbelegung[K_NICK] = 1; |
EE_Parameter.Kanalbelegung[K_ROLL] = 2; |
EE_Parameter.Kanalbelegung[K_GAS] = 3; |
EE_Parameter.Kanalbelegung[K_GIER] = 4; |
EE_Parameter.Kanalbelegung[K_POTI1] = 5; |
EE_Parameter.Kanalbelegung[K_POTI2] = 6; |
EE_Parameter.Kanalbelegung[K_POTI3] = 7; |
EE_Parameter.Kanalbelegung[K_POTI4] = 8; |
EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV;//CFG_HOEHENREGELUNG | /*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV | CFG_KOMPASS_FIX;//0x01; |
EE_Parameter.Hoehe_MinGas = 30; |
EE_Parameter.MaxHoehe = 251; // Wert : 0-250 251 -> Poti1 |
EE_Parameter.Hoehe_P = 10; // Wert : 0-32 |
EE_Parameter.Luftdruck_D = 50; // Wert : 0-250 |
EE_Parameter.Hoehe_ACC_Wirkung = 50; // Wert : 0-250 |
EE_Parameter.Hoehe_Verstaerkung = 4; // Wert : 0-50 |
EE_Parameter.Stick_P = 4; //2 // Wert : 1-6 |
EE_Parameter.Stick_D = 8; //8 // Wert : 0-64 |
EE_Parameter.Gier_P = 14; // Wert : 1-20 |
EE_Parameter.Gas_Min = 15; // Wert : 0-32 |
EE_Parameter.Gas_Max = 250; // Wert : 33-250 |
EE_Parameter.GyroAccFaktor = 26; // Wert : 1-64 |
EE_Parameter.KompassWirkung = 128; // Wert : 0-250 |
EE_Parameter.Gyro_P = 120; //80 // Wert : 0-250 |
EE_Parameter.Gyro_I = 150; // Wert : 0-250 |
EE_Parameter.UnterspannungsWarnung = 100; // Wert : 0-250 |
EE_Parameter.NotGas = 95; // Wert : 0-250 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 60; // Wert : 0-250 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.UfoAusrichtung = 0; // X oder + Formation |
EE_Parameter.I_Faktor = 32; |
EE_Parameter.UserParam1 = 0; //zur freien Verwendung |
EE_Parameter.UserParam2 = 0; //zur freien Verwendung |
EE_Parameter.UserParam3 = 0; //zur freien Verwendung |
EE_Parameter.UserParam4 = 0; //zur freien Verwendung |
EE_Parameter.UserParam5 = 0; // zur freien Verwendung |
EE_Parameter.UserParam6 = 0; // zur freien Verwendung |
EE_Parameter.UserParam7 = 0; // zur freien Verwendung |
EE_Parameter.UserParam8 = 0; // zur freien Verwendung |
EE_Parameter.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
EE_Parameter.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
EE_Parameter.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
EE_Parameter.ServoNickMin = 50; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickMax = 150; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickRefresh = 5; |
EE_Parameter.LoopGasLimit = 50; |
EE_Parameter.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
EE_Parameter.LoopHysterese = 50; |
EE_Parameter.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
EE_Parameter.AchsKopplung1 = 100; |
EE_Parameter.AchsGegenKopplung1 = 10; |
EE_Parameter.WinkelUmschlagNick = 100; |
EE_Parameter.WinkelUmschlagRoll = 100; |
EE_Parameter.GyroAccAbgleich = 50; // 1/k |
EE_Parameter.Driftkomp = 4; |
EE_Parameter.DynamicStability = 100; |
memcpy(EE_Parameter.Name, "Sport\0", 12); |
} |
void DefaultKonstanten2(void) |
{ |
EE_Parameter.Kanalbelegung[K_NICK] = 1; |
EE_Parameter.Kanalbelegung[K_ROLL] = 2; |
EE_Parameter.Kanalbelegung[K_GAS] = 3; |
EE_Parameter.Kanalbelegung[K_GIER] = 4; |
EE_Parameter.Kanalbelegung[K_POTI1] = 5; |
EE_Parameter.Kanalbelegung[K_POTI2] = 6; |
EE_Parameter.Kanalbelegung[K_POTI3] = 7; |
EE_Parameter.Kanalbelegung[K_POTI4] = 8; |
EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV;//CFG_HOEHENREGELUNG | /*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV;//0x01; |
EE_Parameter.Hoehe_MinGas = 30; |
EE_Parameter.MaxHoehe = 251; // Wert : 0-250 251 -> Poti1 |
EE_Parameter.Hoehe_P = 10; // Wert : 0-32 |
EE_Parameter.Luftdruck_D = 50; // Wert : 0-250 |
EE_Parameter.Hoehe_ACC_Wirkung = 50; // Wert : 0-250 |
EE_Parameter.Hoehe_Verstaerkung = 2; // Wert : 0-50 |
EE_Parameter.Stick_P = 4; //2 // Wert : 1-6 |
EE_Parameter.Stick_D = 0; //8 // Wert : 0-64 |
EE_Parameter.Gier_P = 10; // Wert : 1-20 |
EE_Parameter.Gas_Min = 15; // Wert : 0-32 |
EE_Parameter.Gas_Max = 250; // Wert : 33-250 |
EE_Parameter.GyroAccFaktor = 26; // Wert : 1-64 |
EE_Parameter.KompassWirkung = 128; // Wert : 0-250 |
EE_Parameter.Gyro_P = 175; //80 // Wert : 0-250 |
EE_Parameter.Gyro_I = 175; // Wert : 0-250 |
EE_Parameter.UnterspannungsWarnung = 100; // Wert : 0-250 |
EE_Parameter.NotGas = 95; // Wert : 0-250 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 60; // Wert : 0-250 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.UfoAusrichtung = 0; // X oder + Formation |
EE_Parameter.I_Faktor = 32; |
EE_Parameter.UserParam1 = 20 * 4; // zur freien Verwendung |
EE_Parameter.UserParam2 = 0; // zur freien Verwendung |
EE_Parameter.UserParam3 = 0; // zur freien Verwendung |
EE_Parameter.UserParam4 = 0; // zur freien Verwendung |
EE_Parameter.UserParam5 = 0; // zur freien Verwendung |
EE_Parameter.UserParam6 = 0; // zur freien Verwendung |
EE_Parameter.UserParam7 = 0; // zur freien Verwendung |
EE_Parameter.UserParam8 = 0; // zur freien Verwendung |
EE_Parameter.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
EE_Parameter.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
EE_Parameter.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
EE_Parameter.ServoNickMin = 50; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickMax = 150; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickRefresh = 5; |
EE_Parameter.LoopGasLimit = 50; |
EE_Parameter.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
EE_Parameter.LoopHysterese = 50; |
EE_Parameter.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts |
EE_Parameter.AchsKopplung1 = 100; // Faktor, mit dem Gier die Achsen Roll und Nick verkoppelt |
EE_Parameter.AchsGegenKopplung1 = 10; |
EE_Parameter.WinkelUmschlagNick = 100; |
EE_Parameter.WinkelUmschlagRoll = 100; |
EE_Parameter.GyroAccAbgleich = 100; // 1/k |
EE_Parameter.Driftkomp = 4; |
EE_Parameter.DynamicStability = 75; |
memcpy(EE_Parameter.Name, "Normal\0", 12); |
} |
void DefaultKonstanten3(void) |
{ |
EE_Parameter.Kanalbelegung[K_NICK] = 1; |
EE_Parameter.Kanalbelegung[K_ROLL] = 2; |
EE_Parameter.Kanalbelegung[K_GAS] = 3; |
EE_Parameter.Kanalbelegung[K_GIER] = 4; |
EE_Parameter.Kanalbelegung[K_POTI1] = 5; |
EE_Parameter.Kanalbelegung[K_POTI2] = 6; |
EE_Parameter.Kanalbelegung[K_POTI3] = 7; |
EE_Parameter.Kanalbelegung[K_POTI4] = 8; |
EE_Parameter.GlobalConfig = CFG_DREHRATEN_BEGRENZER | CFG_ACHSENKOPPLUNG_AKTIV;///*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV;//0x01; |
EE_Parameter.Hoehe_MinGas = 30; |
EE_Parameter.MaxHoehe = 251; // Wert : 0-250 251 -> Poti1 |
EE_Parameter.Hoehe_P = 10; // Wert : 0-32 |
EE_Parameter.Luftdruck_D = 50; // Wert : 0-250 |
EE_Parameter.Hoehe_ACC_Wirkung = 50; // Wert : 0-250 |
EE_Parameter.Hoehe_Verstaerkung = 2; // Wert : 0-50 |
EE_Parameter.Stick_P = 3; //2 // Wert : 1-6 |
EE_Parameter.Stick_D = 0; //8 // Wert : 0-64 |
EE_Parameter.Gier_P = 8; // Wert : 1-20 |
EE_Parameter.Gas_Min = 15; // Wert : 0-32 |
EE_Parameter.Gas_Max = 250; // Wert : 33-250 |
EE_Parameter.GyroAccFaktor = 26; // Wert : 1-64 |
EE_Parameter.KompassWirkung = 128; // Wert : 0-250 |
EE_Parameter.Gyro_P = 200; //80 // Wert : 0-250 |
EE_Parameter.Gyro_I = 175; // Wert : 0-250 |
EE_Parameter.UnterspannungsWarnung = 100; // Wert : 0-250 |
EE_Parameter.NotGas = 95; // Wert : 0-250 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 60; // Wert : 0-250 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.UfoAusrichtung = 0; // X oder + Formation |
EE_Parameter.I_Faktor = 10; |
EE_Parameter.UserParam1 = 20 * 4; // zur freien Verwendung |
EE_Parameter.UserParam2 = 0; // zur freien Verwendung |
EE_Parameter.UserParam3 = 0; // zur freien Verwendung |
EE_Parameter.UserParam4 = 0; // zur freien Verwendung |
EE_Parameter.UserParam5 = 0; // zur freien Verwendung |
EE_Parameter.UserParam6 = 0; // zur freien Verwendung |
EE_Parameter.UserParam7 = 0; // zur freien Verwendung |
EE_Parameter.UserParam8 = 0; // zur freien Verwendung |
EE_Parameter.ServoNickControl = 100; // Wert : 0-250 // Stellung des Servos |
EE_Parameter.ServoNickComp = 40; // Wert : 0-250 // Einfluss Gyro/Servo |
EE_Parameter.ServoNickCompInvert = 0; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
EE_Parameter.ServoNickMin = 50; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickMax = 150; // Wert : 0-250 // Anschlag |
EE_Parameter.ServoNickRefresh = 5; |
EE_Parameter.LoopGasLimit = 50; |
EE_Parameter.LoopThreshold = 90; // Wert: 0-250 Schwelle für Stickausschlag |
EE_Parameter.LoopHysterese = 50; |
EE_Parameter.LoopConfig = 0; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts |
EE_Parameter.AchsKopplung1 = 100; // Faktor, mit dem Gier die Achsen Roll und Nick verkoppelt |
EE_Parameter.AchsGegenKopplung1 = 10; |
EE_Parameter.WinkelUmschlagNick = 100; |
EE_Parameter.WinkelUmschlagRoll = 100; |
EE_Parameter.GyroAccAbgleich = 100; // 1/k |
EE_Parameter.Driftkomp = 4; |
EE_Parameter.DynamicStability = 50; |
memcpy(EE_Parameter.Name, "Beginner\0", 12); |
} |
/branches/salvo_gps/Basis_v0067g/trunk/fc.c |
---|
0,0 → 1,1297 |
/*####################################################################################### |
Flight Control |
#######################################################################################*/ |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + Nur für den privaten Gebrauch |
// + www.MikroKopter.com |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation), |
// + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulässig ist. |
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt |
// + bzgl. der Nutzungsbedingungen aufzunehmen. |
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen, |
// + Verkauf von Luftbildaufnahmen, usw. |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, |
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts |
// + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de" |
// + eindeutig als Ursprung verlinkt werden |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion |
// + Benutzung auf eigene Gefahr |
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Die Portierung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur |
// + mit unserer Zustimmung zulässig |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Redistributions of source code (with or without modifications) must retain the above copyright notice, |
// + this list of conditions and the following disclaimer. |
// + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived |
// + from this software without specific prior written permission. |
// + * The use of this project (hardware, software, binary files, sources and documentation) is only permittet |
// + for non-commercial use (directly or indirectly) |
// + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted |
// + with our written permission |
// + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be |
// + clearly linked as origin |
// + * porting to systems other than hardware from www.mikrokopter.de is not allowed |
// + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
// + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
// + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
// + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
// + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
// + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
// + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
// + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN// + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
// + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// + POSSIBILITY OF SUCH DAMAGE. |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Aenderungen von Peter Muehlenbrock ("Salvo") Stand 6.10.2007 |
/* |
Driftkompensation fuer Gyros verbessert |
Linearsensor mit fixem Neutralwert |
Ersatzkompass abgeleitet aus Magnetkompass und Giergyro fuer nahezu neigungsunabhaengige Kompassfunktion |
*/ |
#include "main.h" |
#include "eeprom.c" |
unsigned char h,m,s; |
volatile unsigned int I2CTimeout = 100; |
volatile int MesswertNick,MesswertRoll,MesswertGier; |
volatile int AdNeutralNick = 0,AdNeutralRoll = 0,AdNeutralGier = 0,StartNeutralRoll = 0,StartNeutralNick = 0; |
volatile int Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch, NeutralAccX=0, NeutralAccY=0; |
volatile float NeutralAccZ = 0; |
unsigned char CosinusNickWinkel = 0, CosinusRollWinkel = 0; |
volatile long IntegralNick = 0,IntegralNick2 = 0; |
volatile long IntegralRoll = 0,IntegralRoll2 = 0; |
volatile long IntegralAccNick = 0,IntegralAccRoll = 0,IntegralAccZ = 0; |
volatile long Integral_Gier = 0; |
volatile long Mess_IntegralNick = 0,Mess_IntegralNick2 = 0; |
volatile long Mess_IntegralRoll = 0,Mess_IntegralRoll2 = 0; |
volatile long Mess_Integral_Gier = 0,Mess_Integral_Gier2 = 0; |
volatile long MittelIntegralNick,MittelIntegralRoll,MittelIntegralNick2,MittelIntegralRoll2; |
volatile long Mess_Integral_Hoch = 0; |
volatile int KompassValue = 0; |
volatile int KompassStartwert = 0; |
volatile int KompassRichtung = 0; |
unsigned char MAX_GAS,MIN_GAS; |
unsigned char Notlandung = 0; |
unsigned char HoehenReglerAktiv = 0; |
long Umschlag180Nick = 250000L, Umschlag180Roll = 250000L; |
//Salvo 12.10.2007 |
uint8_t magkompass_ok=0; |
uint8_t gps_cmd = GPS_CMD_STOP; |
static int ubat_cnt =0; |
static int gas_actual,gas_mittel; //Parameter fuer Gasreduzierung bei unterspannung |
int w,v; |
//Salvo End |
//Salvo 2.9.2007 Ersatzkompass |
volatile long GyroKomp_Int; |
volatile int GyroKomp_Value; // Der ermittelte Kompasswert aus Gyro und Magnetkompass |
// Salvo End |
float GyroFaktor; |
float IntegralFaktor; |
volatile int DiffNick,DiffRoll; |
int Poti1 = 0, Poti2 = 0, Poti3 = 0, Poti4 = 0; |
volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count; |
unsigned char MotorWert[5]; |
volatile unsigned char SenderOkay = 0; |
int StickNick = 0,StickRoll = 0,StickGier = 0; |
char MotorenEin = 0; |
int HoehenWert = 0; |
int SollHoehe = 0; |
int LageKorrekturRoll = 0,LageKorrekturNick = 0; |
float Ki = FAKTOR_I; |
unsigned char Looping_Nick = 0,Looping_Roll = 0; |
unsigned char Looping_Links = 0, Looping_Rechts = 0, Looping_Unten = 0, Looping_Oben = 0; |
unsigned char Parameter_Luftdruck_D = 48; // Wert : 0-250 |
unsigned char Parameter_MaxHoehe = 251; // Wert : 0-250 |
unsigned char Parameter_Hoehe_P = 16; // Wert : 0-32 |
unsigned char Parameter_Hoehe_ACC_Wirkung = 58; // Wert : 0-250 |
unsigned char Parameter_KompassWirkung = 64; // Wert : 0-250 |
unsigned char Parameter_Gyro_P = 150; // Wert : 10-250 |
unsigned char Parameter_Gyro_I = 150; // Wert : 0-250 |
unsigned char Parameter_Gier_P = 2; // Wert : 1-20 |
unsigned char Parameter_I_Faktor = 10; // Wert : 1-20 |
unsigned char Parameter_UserParam1 = 0; |
unsigned char Parameter_UserParam2 = 0; |
unsigned char Parameter_UserParam3 = 0; |
unsigned char Parameter_UserParam4 = 0; |
unsigned char Parameter_UserParam5 = 0; |
unsigned char Parameter_UserParam6 = 0; |
unsigned char Parameter_UserParam7 = 0; |
unsigned char Parameter_UserParam8 = 0; |
unsigned char Parameter_ServoNickControl = 100; |
unsigned char Parameter_LoopGasLimit = 70; |
unsigned char Parameter_AchsKopplung1 = 0; |
unsigned char Parameter_AchsGegenKopplung1 = 0; |
unsigned char Parameter_DynamicStability = 100; |
struct mk_param_struct EE_Parameter; |
signed int ExternStickNick = 0,ExternStickRoll = 0,ExternStickGier = 0, ExternHoehenValue = -20; |
void Piep(unsigned char Anzahl) |
{ |
while(Anzahl--) |
{ |
if(MotorenEin) return; //auf keinen Fall im Flug! |
beeptime = 100; |
Delay_ms(250); |
} |
} |
//############################################################################ |
// Nullwerte ermitteln |
void SetNeutral(void) |
//############################################################################ |
{ |
// Salvo 9.12.2007 |
RX_SWTCH_ON; //GPS Daten auf RX eingang schalten |
// Salvo End |
NeutralAccX = 0; |
NeutralAccY = 0; |
NeutralAccZ = 0; |
AdNeutralNick = 0; |
AdNeutralRoll = 0; |
AdNeutralGier = 0; |
Parameter_AchsKopplung1 = 0; |
Parameter_AchsGegenKopplung1 = 0; |
CalibrierMittelwert(); |
Delay_ms_Mess(100); |
CalibrierMittelwert(); |
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)) // Höhenregelung aktiviert? |
{ |
if((MessLuftdruck > 950) || (MessLuftdruck < 750)) SucheLuftruckOffset(); |
} |
AdNeutralNick= AdWertNick; |
AdNeutralRoll= AdWertRoll; |
AdNeutralGier= AdWertGier; |
StartNeutralRoll = AdNeutralRoll; |
StartNeutralNick = AdNeutralNick; |
if(eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_NICK]) > 4) |
{ |
NeutralAccY = abs(Mittelwert_AccRoll) / ACC_AMPLIFY; |
NeutralAccX = abs(Mittelwert_AccNick) / ACC_AMPLIFY; |
NeutralAccZ = Aktuell_az; |
} |
else |
{ |
NeutralAccX = (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_NICK]) * 256 + (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_NICK+1]); |
NeutralAccY = (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_ROLL]) * 256 + (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_ROLL+1]); |
NeutralAccZ = (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_Z]) * 256 + (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_Z+1]); |
} |
Mess_IntegralNick = 0; |
Mess_IntegralNick2 = 0; |
Mess_IntegralRoll = 0; |
Mess_IntegralRoll2 = 0; |
Mess_Integral_Gier = 0; |
MesswertNick = 0; |
MesswertRoll = 0; |
MesswertGier = 0; |
StartLuftdruck = Luftdruck; |
HoeheD = 0; |
Mess_Integral_Hoch = 0; |
KompassStartwert = KompassValue; |
GPS_Neutral(); |
beeptime = 50; |
Umschlag180Nick = (long) EE_Parameter.WinkelUmschlagNick * 2500L; |
Umschlag180Roll = (long) EE_Parameter.WinkelUmschlagRoll * 2500L; |
ExternHoehenValue = 0; |
//Salvo 13.10.2007 Ersatzkompass und Gas |
GyroKomp_Int = KompassValue * GYROKOMP_INC_GRAD_DEFAULT; //Neu ab 3.1.2007 |
gas_mittel = 30; |
gas_actual = gas_mittel; |
// Salvo End |
} |
//############################################################################ |
// Bearbeitet die Messwerte |
void Mittelwert(void) |
//############################################################################ |
{ |
static signed long tmpl,tmpl2; |
MesswertGier = (signed int) AdNeutralGier - AdWertGier; |
MesswertRoll = (signed int) AdWertRoll - AdNeutralRoll; |
MesswertNick = (signed int) AdWertNick - AdNeutralNick; |
// Beschleunigungssensor ++++++++++++++++++++++++++++++++++++++++++++++++ |
Mittelwert_AccNick = ((long)Mittelwert_AccNick * 1 + ((ACC_AMPLIFY * (long)AdWertAccNick))) / 2L; |
Mittelwert_AccRoll = ((long)Mittelwert_AccRoll * 1 + ((ACC_AMPLIFY * (long)AdWertAccRoll))) / 2L; |
Mittelwert_AccHoch = ((long)Mittelwert_AccHoch * 1 + ((long)AdWertAccHoch)) / 2L; |
IntegralAccNick += ACC_AMPLIFY * AdWertAccNick; |
IntegralAccRoll += ACC_AMPLIFY * AdWertAccRoll; |
IntegralAccZ += Aktuell_az - NeutralAccZ; |
// Gier ++++++++++++++++++++++++++++++++++++++++++++++++ |
//Salvo 12.11.2007 |
GyroKomp_Int += MesswertGier; |
//Salvo End |
Mess_Integral_Gier += MesswertGier; |
Mess_Integral_Gier2 += MesswertGier; |
// Kopplungsanteil +++++++++++++++++++++++++++++++++++++ |
if(!Looping_Nick && !Looping_Roll && (EE_Parameter.GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) |
{ |
tmpl = Mess_IntegralNick / 4096L; |
tmpl *= MesswertGier; |
tmpl *= Parameter_AchsKopplung1; //125 |
tmpl /= 2048L; |
tmpl2 = Mess_IntegralRoll / 4096L; |
tmpl2 *= MesswertGier; |
tmpl2 *= Parameter_AchsKopplung1; |
tmpl2 /= 2048L; |
} |
else tmpl = tmpl2 = 0; |
// Roll ++++++++++++++++++++++++++++++++++++++++++++++++ |
MesswertRoll += tmpl; |
MesswertRoll += (tmpl2*Parameter_AchsGegenKopplung1)/512L; //109 |
Mess_IntegralRoll2 += MesswertRoll; |
Mess_IntegralRoll += MesswertRoll - LageKorrekturRoll; |
if(Mess_IntegralRoll > Umschlag180Roll) |
{ |
Mess_IntegralRoll = -(Umschlag180Roll - 10000L); |
Mess_IntegralRoll2 = Mess_IntegralRoll; |
} |
if(Mess_IntegralRoll <-Umschlag180Roll) |
{ |
Mess_IntegralRoll = (Umschlag180Roll - 10000L); |
Mess_IntegralRoll2 = Mess_IntegralRoll; |
} |
if(AdWertRoll < 15) MesswertRoll = -1000; |
if(AdWertRoll < 7) MesswertRoll = -2000; |
if(PlatinenVersion == 10) |
{ |
if(AdWertRoll > 1010) MesswertRoll = +1000; |
if(AdWertRoll > 1017) MesswertRoll = +2000; |
} |
else |
{ |
if(AdWertRoll > 2020) MesswertRoll = +1000; |
if(AdWertRoll > 2034) MesswertRoll = +2000; |
} |
// Nick ++++++++++++++++++++++++++++++++++++++++++++++++ |
MesswertNick -= tmpl2; |
MesswertNick -= (tmpl*Parameter_AchsGegenKopplung1)/512L; |
Mess_IntegralNick2 += MesswertNick; |
Mess_IntegralNick += MesswertNick - LageKorrekturNick; |
if(Mess_IntegralNick > Umschlag180Nick) |
{ |
Mess_IntegralNick = -(Umschlag180Nick - 10000L); |
Mess_IntegralNick2 = Mess_IntegralNick; |
} |
if(Mess_IntegralNick <-Umschlag180Nick) |
{ |
Mess_IntegralNick = (Umschlag180Nick - 10000L); |
Mess_IntegralNick2 = Mess_IntegralNick; |
} |
if(AdWertNick < 15) MesswertNick = -1000; |
if(AdWertNick < 7) MesswertNick = -2000; |
if(PlatinenVersion == 10) |
{ |
if(AdWertNick > 1010) MesswertNick = +1000; |
if(AdWertNick > 1017) MesswertNick = +2000; |
} |
else |
{ |
if(AdWertNick > 2020) MesswertNick = +1000; |
if(AdWertNick > 2034) MesswertNick = +2000; |
} |
//++++++++++++++++++++++++++++++++++++++++++++++++ |
// ADC einschalten |
ANALOG_ON; |
//++++++++++++++++++++++++++++++++++++++++++++++++ |
Integral_Gier = Mess_Integral_Gier; |
IntegralNick = Mess_IntegralNick; |
IntegralRoll = Mess_IntegralRoll; |
IntegralNick2 = Mess_IntegralNick2; |
IntegralRoll2 = Mess_IntegralRoll2; |
if(EE_Parameter.GlobalConfig & CFG_DREHRATEN_BEGRENZER && !Looping_Nick && !Looping_Roll) |
{ |
if(MesswertNick > 200) MesswertNick += 4 * (MesswertNick - 200); |
else if(MesswertNick < -200) MesswertNick += 4 * (MesswertNick + 200); |
if(MesswertRoll > 200) MesswertRoll += 4 * (MesswertRoll - 200); |
else if(MesswertRoll < -200) MesswertRoll += 4 * (MesswertRoll + 200); |
} |
if(Poti1 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110) Poti1++; else if(Poti1 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110 && Poti1) Poti1--; |
if(Poti2 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110) Poti2++; else if(Poti2 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110 && Poti2) Poti2--; |
if(Poti3 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110) Poti3++; else if(Poti3 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110 && Poti3) Poti3--; |
if(Poti4 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110) Poti4++; else if(Poti4 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110 && Poti4) Poti4--; |
if(Poti1 < 0) Poti1 = 0; else if(Poti1 > 255) Poti1 = 255; |
if(Poti2 < 0) Poti2 = 0; else if(Poti2 > 255) Poti2 = 255; |
if(Poti3 < 0) Poti3 = 0; else if(Poti3 > 255) Poti3 = 255; |
if(Poti4 < 0) Poti4 = 0; else if(Poti4 > 255) Poti4 = 255; |
} |
//############################################################################ |
// Messwerte beim Ermitteln der Nullage |
void CalibrierMittelwert(void) |
//############################################################################ |
{ |
// ADC auschalten, damit die Werte sich nicht während der Berechnung ändern |
ANALOG_OFF; |
MesswertNick = AdWertNick; |
MesswertRoll = AdWertRoll; |
MesswertGier = AdWertGier; |
Mittelwert_AccNick = ACC_AMPLIFY * (long)AdWertAccNick; |
Mittelwert_AccRoll = ACC_AMPLIFY * (long)AdWertAccRoll; |
Mittelwert_AccHoch = (long)AdWertAccHoch; |
// ADC einschalten |
ANALOG_ON; |
if(Poti1 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110) Poti1++; else if(Poti1 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110 && Poti1) Poti1--; |
if(Poti2 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110) Poti2++; else if(Poti2 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110 && Poti2) Poti2--; |
if(Poti3 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110) Poti3++; else if(Poti3 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110 && Poti3) Poti3--; |
if(Poti4 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110) Poti4++; else if(Poti4 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110 && Poti4) Poti4--; |
if(Poti1 < 0) Poti1 = 0; else if(Poti1 > 255) Poti1 = 255; |
if(Poti2 < 0) Poti2 = 0; else if(Poti2 > 255) Poti2 = 255; |
if(Poti3 < 0) Poti3 = 0; else if(Poti3 > 255) Poti3 = 255; |
if(Poti4 < 0) Poti4 = 0; else if(Poti4 > 255) Poti4 = 255; |
Umschlag180Nick = (long) EE_Parameter.WinkelUmschlagNick * 2500L; |
Umschlag180Roll = (long) EE_Parameter.WinkelUmschlagNick * 2500L; |
} |
//############################################################################ |
// Senden der Motorwerte per I2C-Bus |
void SendMotorData(void) |
//############################################################################ |
{ |
if(MOTOR_OFF || !MotorenEin) |
{ |
Motor_Hinten = 0; |
Motor_Vorne = 0; |
Motor_Rechts = 0; |
Motor_Links = 0; |
if(MotorTest[0]) Motor_Vorne = MotorTest[0]; |
if(MotorTest[1]) Motor_Hinten = MotorTest[1]; |
if(MotorTest[2]) Motor_Links = MotorTest[2]; |
if(MotorTest[3]) Motor_Rechts = MotorTest[3]; |
} |
DebugOut.Analog[12] = Motor_Vorne; |
DebugOut.Analog[13] = Motor_Hinten; |
DebugOut.Analog[14] = Motor_Links; |
DebugOut.Analog[15] = Motor_Rechts; |
//Start I2C Interrupt Mode |
twi_state = 0; |
motor = 0; |
i2c_start(); |
} |
//############################################################################ |
// Trägt ggf. das Poti als Parameter ein |
void ParameterZuordnung(void) |
//############################################################################ |
{ |
#define CHK_POTI(b,a,min,max) { if(a > 250) { if(a == 251) b = Poti1; else if(a == 252) b = Poti2; else if(a == 253) b = Poti3; else if(a == 254) b = Poti4;} else b = a; if(b <= min) b = min; else if(b >= max) b = max;} |
CHK_POTI(Parameter_MaxHoehe,EE_Parameter.MaxHoehe,0,255); |
CHK_POTI(Parameter_Luftdruck_D,EE_Parameter.Luftdruck_D,0,100); |
CHK_POTI(Parameter_Hoehe_P,EE_Parameter.Hoehe_P,0,100); |
CHK_POTI(Parameter_Hoehe_ACC_Wirkung,EE_Parameter.Hoehe_ACC_Wirkung,0,255); |
CHK_POTI(Parameter_KompassWirkung,EE_Parameter.KompassWirkung,0,255); |
CHK_POTI(Parameter_Gyro_P,EE_Parameter.Gyro_P,10,255); |
CHK_POTI(Parameter_Gyro_I,EE_Parameter.Gyro_I,0,255); |
CHK_POTI(Parameter_I_Faktor,EE_Parameter.I_Faktor,0,255); |
CHK_POTI(Parameter_UserParam1,EE_Parameter.UserParam1,0,255); |
CHK_POTI(Parameter_UserParam2,EE_Parameter.UserParam2,0,255); |
CHK_POTI(Parameter_UserParam3,EE_Parameter.UserParam3,0,255); |
CHK_POTI(Parameter_UserParam4,EE_Parameter.UserParam4,0,255); |
CHK_POTI(Parameter_UserParam5,EE_Parameter.UserParam5,0,255); |
CHK_POTI(Parameter_UserParam6,EE_Parameter.UserParam6,0,255); |
CHK_POTI(Parameter_UserParam7,EE_Parameter.UserParam7,0,255); |
CHK_POTI(Parameter_UserParam8,EE_Parameter.UserParam8,0,255); |
CHK_POTI(Parameter_ServoNickControl,EE_Parameter.ServoNickControl,0,255); |
CHK_POTI(Parameter_LoopGasLimit,EE_Parameter.LoopGasLimit,0,255); |
CHK_POTI(Parameter_AchsKopplung1, EE_Parameter.AchsKopplung1,0,255); |
CHK_POTI(Parameter_AchsGegenKopplung1,EE_Parameter.AchsGegenKopplung1,0,255); |
CHK_POTI(Parameter_DynamicStability,EE_Parameter.DynamicStability,0,255); |
Ki = (float) Parameter_I_Faktor * 0.0001; |
MAX_GAS = EE_Parameter.Gas_Max; |
MIN_GAS = EE_Parameter.Gas_Min; |
} |
//############################################################################ |
// |
void MotorRegler(void) |
//############################################################################ |
{ |
int motorwert,pd_ergebnis,h,tmp_int; |
int GierMischanteil,GasMischanteil; |
static long SummeNick=0,SummeRoll=0; |
static long sollGier = 0,tmp_long,tmp_long2; |
static long IntegralFehlerNick = 0; |
static long IntegralFehlerRoll = 0; |
static unsigned int RcLostTimer; |
static unsigned char delay_neutral = 0; |
static unsigned char delay_einschalten = 0,delay_ausschalten = 0; |
static unsigned int modell_fliegt = 0; |
static int hoehenregler = 0; |
static char TimerWerteausgabe = 0; |
static char NeueKompassRichtungMerken = 0; |
static long ausgleichNick, ausgleichRoll; |
Mittelwert(); |
//****** GPS Daten holen *************** |
short int n; |
if (gps_alive_cnt > 0) gps_alive_cnt--; //Dekrementieren. Wenn 0 kommen keine ausreichenden GPS Meldungen (Timeout) |
n = Get_Rel_Position(); |
if (n == 0) |
{ |
ROT_ON; //led blitzen lassen |
} |
//******PROVISORISCH*************** |
GRN_ON; |
GRN_ON; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gaswert ermitteln |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
GasMischanteil = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] + 120; |
if(GasMischanteil > MAX_GAS - 20) GasMischanteil = MAX_GAS - 20; |
//Salvo 13.10.2007 langsame Gasreduktion bei Unterspannung. Als Ausgangswert wird der bei UBAT=k gemessen Mittelwert genommen |
// und dieser dann langsam zwangsweise reduziert |
if (UBat <= EE_Parameter.UnterspannungsWarnung - 2) //Unterhalb der Piepser Schwelle aktivieren |
{ |
if (ubat_cnt > 700) |
{ |
ubat_cnt = 0; |
if (gas_actual > ((gas_mittel*12)/15)) gas_actual--; |
} |
else ubat_cnt++; |
if (GasMischanteil > gas_actual) GasMischanteil = gas_actual; |
} |
else //Falls UBAT wieder ok ist |
{ |
if (ubat_cnt > 1000) |
{ |
gas_mittel = ((gas_mittel*9) + GasMischanteil)/10; //Filtern |
gas_actual = GasMischanteil; |
} |
else |
{ |
ubat_cnt++; |
if ((ubat_cnt % 10) == 0) |
{ |
if (gas_actual < GasMischanteil) gas_actual++; |
else gas_actual = GasMischanteil; |
} |
} |
GasMischanteil = gas_actual; |
} |
// Salvo End |
if(GasMischanteil < 0) GasMischanteil = 0; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Empfang schlecht |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(SenderOkay < 100) |
{ |
if(!PcZugriff) |
{ |
if(BeepMuster == 0xffff) |
{ |
beeptime = 15000; |
BeepMuster = 0x0c00; |
} |
} |
if(RcLostTimer) RcLostTimer--; |
else |
{ |
MotorenEin = 0; |
Notlandung = 0; |
} |
ROT_ON; |
if(modell_fliegt > 2000) // wahrscheinlich in der Luft --> langsam absenken |
{ |
GasMischanteil = EE_Parameter.NotGas; |
Notlandung = 1; |
PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] = 0; |
PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] = 0; |
PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] = 0; |
} |
else MotorenEin = 0; |
} |
else |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Emfang gut |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(SenderOkay > 140) |
{ |
Notlandung = 0; |
RcLostTimer = EE_Parameter.NotGasZeit * 50; |
if(GasMischanteil > 40) |
{ |
if(modell_fliegt < 0xffff) modell_fliegt++; |
} |
if((modell_fliegt < 200) || (GasMischanteil < 40)) |
{ |
SummeNick = 0; |
SummeRoll = 0; |
Mess_Integral_Gier = 0; |
Mess_Integral_Gier2 = 0; |
} |
if((GasMischanteil > 200) && MotorenEin == 0) |
{ |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// auf Nullwerte kalibrieren |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 75) // Neutralwerte |
{ |
if(++delay_neutral > 200) // nicht sofort |
{ |
GRN_OFF; |
SetNeutral(); |
MotorenEin = 0; |
delay_neutral = 0; |
modell_fliegt = 0; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > 70 || abs(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]) > 70) |
{ |
unsigned char setting=1; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > 70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] < 70) setting = 1; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > 70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > 70) setting = 2; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] < 70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > 70) setting = 3; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] <-70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > 70) setting = 4; |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] <-70 && PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] < 70) setting = 5; |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], setting); // aktiven Datensatz merken |
} |
ReadParameterSet(GetActiveParamSetNumber(), (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
Piep(GetActiveParamSetNumber()); |
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)) // Höhenregelung aktiviert? |
{ |
if((MessLuftdruck > 950) || (MessLuftdruck < 750)) SucheLuftruckOffset(); |
} |
GPS_Save_Home(); //Daten sind jetzt hoffentlich verfuegbar |
if (gps_home_position.status > 0 ) |
{ |
Delay_ms(1000); //akustisch verkuenden dass GPS Home Daten da sind |
beeptime = 2000; |
Delay_ms(500); |
} |
} |
} |
else |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] < -75) // ACC Neutralwerte speichern |
{ |
if(++delay_neutral > 200) // nicht sofort |
{ |
GRN_OFF; |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACC_NICK],0xff); // Werte löschen |
MotorenEin = 0; |
delay_neutral = 0; |
modell_fliegt = 0; |
SetNeutral(); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACC_NICK],NeutralAccX / 256); // ACC-NeutralWerte speichern |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACC_NICK+1],NeutralAccX % 256); // ACC-NeutralWerte speichern |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACC_ROLL],NeutralAccY / 256); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACC_ROLL+1],NeutralAccY % 256); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACC_Z],(int)NeutralAccZ / 256); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACC_Z+1],(int)NeutralAccZ % 256); |
Piep(GetActiveParamSetNumber()); |
} |
} |
else delay_neutral = 0; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gas ist unten |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(GasMischanteil < 35) |
{ |
// Starten |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] < -75) |
{ |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Einschalten |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(++delay_einschalten > 200) |
{ |
// Salvo 9.12.2007 |
RX_SWTCH_ON; //GPS Daten auf RX eingang schalten |
// Salvo End |
delay_einschalten = 200; |
modell_fliegt = 1; |
MotorenEin = 1; |
sollGier = 0; |
Mess_Integral_Gier = 0; |
Mess_Integral_Gier2 = 0; |
Mess_IntegralNick = 0; |
Mess_IntegralRoll = 0; |
Mess_IntegralNick2 = IntegralNick; |
Mess_IntegralRoll2 = IntegralRoll; |
SummeNick = 0; |
SummeRoll = 0; |
} |
} |
else delay_einschalten = 0; |
//Auf Neutralwerte setzen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Auschalten |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 75) |
{ |
if(++delay_ausschalten > 200) // nicht sofort |
{ |
// Salvo 9.12.2007 |
RX_SWTCH_OFF; //Bluetooth Daten auf RX eingang schalten |
// Salvo End |
MotorenEin = 0; |
delay_ausschalten = 200; |
modell_fliegt = 0; |
} |
} |
else delay_ausschalten = 0; |
} |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// neue Werte von der Funke |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(!NewPpmData-- || Notlandung) |
{ |
int tmp_int; |
ParameterZuordnung(); |
StickNick = PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] * EE_Parameter.Stick_P; |
StickNick += PPM_diff[EE_Parameter.Kanalbelegung[K_NICK]] * EE_Parameter.Stick_D; |
StickRoll = PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_P; |
StickRoll += PPM_diff[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_D; |
StickGier = -PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]; |
GyroFaktor = ((float)Parameter_Gyro_P + 10.0) / 256.0; |
IntegralFaktor = ((float) Parameter_Gyro_I) / 44000; |
#define KEY_VALUE (Parameter_UserParam1 * 4) //(Poti3 * 8) |
if(DubWiseKeys[1]) beeptime = 10; |
if(DubWiseKeys[1] & DUB_KEY_UP) tmp_int = KEY_VALUE; else |
if(DubWiseKeys[1] & DUB_KEY_DOWN) tmp_int = -KEY_VALUE; else tmp_int = 0; |
ExternStickNick = (ExternStickNick * 7 + tmp_int) / 8; |
if(DubWiseKeys[1] & DUB_KEY_LEFT) tmp_int = KEY_VALUE; else |
if(DubWiseKeys[1] & DUB_KEY_RIGHT) tmp_int = -KEY_VALUE; else tmp_int = 0; |
ExternStickRoll = (ExternStickRoll * 7 + tmp_int) / 8; |
if(DubWiseKeys[0] & 8) ExternStickGier = 50;else |
if(DubWiseKeys[0] & 4) ExternStickGier =-50;else ExternStickGier = 0; |
if(DubWiseKeys[0] & 2) ExternHoehenValue++; |
if(DubWiseKeys[0] & 16) ExternHoehenValue--; |
StickNick += ExternStickNick / 8; |
StickRoll += ExternStickRoll / 8; |
StickGier += ExternStickGier; |
if(EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) IntegralFaktor = 0; |
if(GyroFaktor < 0) GyroFaktor = 0; |
if(IntegralFaktor < 0) IntegralFaktor = 0; |
// greift in den Stick ein, um ungewolltes überschlagen zu verhindern |
if(!(EE_Parameter.LoopConfig & CFG_LOOP_LINKS) && !(EE_Parameter.LoopConfig & CFG_LOOP_RECHTS)) |
{ |
if(IntegralNick > 60000) |
{ |
StickNick -= 8 * EE_Parameter.Stick_P; |
if(IntegralNick > 80000) StickNick -= 16 * EE_Parameter.Stick_P; |
} |
else |
if(IntegralNick < -60000) |
{ |
StickNick += 8 * EE_Parameter.Stick_P; |
if(IntegralNick > 80000) StickNick -= 16 * EE_Parameter.Stick_P; |
} |
if(IntegralRoll > 60000) |
{ |
StickRoll -= 8 * EE_Parameter.Stick_P; |
if(IntegralRoll > 80000) StickRoll -= 16 * EE_Parameter.Stick_P; |
} |
else |
if(IntegralRoll < -60000) |
{ |
StickRoll += 8 * EE_Parameter.Stick_P; |
if(IntegralRoll > 80000) StickRoll -= 16 * EE_Parameter.Stick_P; |
} |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Looping? |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if((PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > EE_Parameter.LoopThreshold) && EE_Parameter.LoopConfig & CFG_LOOP_LINKS) Looping_Links = 1; |
else |
{ |
{ |
if((PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] < (EE_Parameter.LoopThreshold - EE_Parameter.LoopHysterese))) Looping_Links = 0; |
} |
} |
if((PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] < -EE_Parameter.LoopThreshold) && EE_Parameter.LoopConfig & CFG_LOOP_RECHTS) Looping_Rechts = 1; |
else |
{ |
if(Looping_Rechts) // Hysterese |
{ |
if(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] > -(EE_Parameter.LoopThreshold - EE_Parameter.LoopHysterese)) Looping_Rechts = 0; |
} |
} |
if((PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > EE_Parameter.LoopThreshold) && EE_Parameter.LoopConfig & CFG_LOOP_OBEN) Looping_Oben = 1; |
else |
{ |
if(Looping_Oben) // Hysterese |
{ |
if((PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] < (EE_Parameter.LoopThreshold - EE_Parameter.LoopHysterese))) Looping_Oben = 0; |
} |
} |
if((PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] < -EE_Parameter.LoopThreshold) && EE_Parameter.LoopConfig & CFG_LOOP_UNTEN) Looping_Unten = 1; |
else |
{ |
if(Looping_Unten) // Hysterese |
{ |
if(PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] > -(EE_Parameter.LoopThreshold - EE_Parameter.LoopHysterese)) Looping_Unten = 0; |
} |
} |
if(Looping_Links || Looping_Rechts) Looping_Roll = 1; else Looping_Roll = 0; |
if(Looping_Oben || Looping_Unten) {Looping_Nick = 1; Looping_Roll = 0; Looping_Links = 0; Looping_Rechts = 0;} else Looping_Nick = 0; |
} // Ende neue Funken-Werte |
if(Looping_Roll) beeptime = 100; |
if(Looping_Roll || Looping_Nick) |
{ |
if(GasMischanteil > EE_Parameter.LoopGasLimit) GasMischanteil = EE_Parameter.LoopGasLimit; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Bei Empfangsausfall im Flug |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(Notlandung) |
{ |
StickGier = 0; |
StickNick = 0; |
StickRoll = 0; |
GyroFaktor = 0.1; |
IntegralFaktor = 0.005; |
Looping_Roll = 0; |
Looping_Nick = 0; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Integrale auf ACC-Signal abgleichen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#define ABGLEICH_ANZAHL 256L |
MittelIntegralNick += IntegralNick; // Für die Mittelwertbildung aufsummieren |
MittelIntegralRoll += IntegralRoll; |
MittelIntegralNick2 += IntegralNick2; |
MittelIntegralRoll2 += IntegralRoll2; |
if(Looping_Nick || Looping_Roll) |
{ |
IntegralAccNick = 0; |
IntegralAccRoll = 0; |
MittelIntegralNick = 0; |
MittelIntegralRoll = 0; |
MittelIntegralNick2 = 0; |
MittelIntegralRoll2 = 0; |
Mess_IntegralNick2 = Mess_IntegralNick; |
Mess_IntegralRoll2 = Mess_IntegralRoll; |
ZaehlMessungen = 0; |
LageKorrekturNick = 0; |
LageKorrekturRoll = 0; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(!Looping_Nick && !Looping_Roll) |
{ |
long tmp_long, tmp_long2; |
tmp_long = (long)(IntegralNick / EE_Parameter.GyroAccFaktor - (long)Mittelwert_AccNick); |
tmp_long /= 16; |
tmp_long2 = (long)(IntegralRoll / EE_Parameter.GyroAccFaktor - (long)Mittelwert_AccRoll); |
tmp_long2 /= 16; |
#define AUSGLEICH 32 //(Parameter_UserParam1 / 2) |
if(tmp_long > AUSGLEICH) tmp_long = AUSGLEICH; |
if(tmp_long < -AUSGLEICH) tmp_long =-AUSGLEICH; |
if(tmp_long2 > AUSGLEICH) tmp_long2 = AUSGLEICH; |
if(tmp_long2 <-AUSGLEICH) tmp_long2 =-AUSGLEICH; |
Mess_IntegralNick -= tmp_long; |
Mess_IntegralRoll -= tmp_long2; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(ZaehlMessungen >= ABGLEICH_ANZAHL) |
{ |
static int cnt = 0; |
static char last_n_p,last_n_n,last_r_p,last_r_n; |
static long MittelIntegralNick_Alt,MittelIntegralRoll_Alt; |
if(!Looping_Nick && !Looping_Roll) |
{ |
MittelIntegralNick /= ABGLEICH_ANZAHL; |
MittelIntegralRoll /= ABGLEICH_ANZAHL; |
IntegralAccNick = (EE_Parameter.GyroAccFaktor * IntegralAccNick) / ABGLEICH_ANZAHL; |
IntegralAccRoll = (EE_Parameter.GyroAccFaktor * IntegralAccRoll) / ABGLEICH_ANZAHL; |
IntegralAccZ = IntegralAccZ / ABGLEICH_ANZAHL; |
#define MAX_I 0//(Poti2/10) |
// Nick ++++++++++++++++++++++++++++++++++++++++++++++++ |
IntegralFehlerNick = (long)(MittelIntegralNick - (long)IntegralAccNick); |
ausgleichNick = IntegralFehlerNick / EE_Parameter.GyroAccAbgleich; |
LageKorrekturNick = ausgleichNick / ABGLEICH_ANZAHL; |
// Roll ++++++++++++++++++++++++++++++++++++++++++++++++ |
IntegralFehlerRoll = (long)(MittelIntegralRoll - (long)IntegralAccRoll); |
ausgleichRoll = IntegralFehlerRoll / EE_Parameter.GyroAccAbgleich; |
LageKorrekturRoll = ausgleichRoll / ABGLEICH_ANZAHL; |
// Mess_IntegralNick -= ausgleichNick; |
// Mess_IntegralRoll -= ausgleichRoll; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gyro-Drift ermitteln |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
MittelIntegralNick2 /= ABGLEICH_ANZAHL; |
MittelIntegralRoll2 /= ABGLEICH_ANZAHL; |
// tmp_long = (long)(MittelIntegralNick2 - (long)IntegralAccNick); |
// tmp_long2 = (long)(MittelIntegralRoll2 - (long)IntegralAccRoll); |
tmp_long = IntegralNick2 - IntegralNick; |
tmp_long2 = IntegralRoll2 - IntegralRoll; |
//DebugOut.Analog[25] = MittelIntegralRoll2 / 26; |
IntegralFehlerNick = tmp_long; |
IntegralFehlerRoll = tmp_long2; |
Mess_IntegralNick2 -= IntegralFehlerNick; |
Mess_IntegralRoll2 -= IntegralFehlerRoll; |
// IntegralFehlerNick = (IntegralFehlerNick * 1 + tmp_long) / 2; |
// IntegralFehlerRoll = (IntegralFehlerRoll * 1 + tmp_long2) / 2; |
//Salvo Ersatzkompass Ueberlauf korrigieren |
if (GyroKomp_Int >= ((long)360 * GYROKOMP_INC_GRAD_DEFAULT)) GyroKomp_Int = GyroKomp_Int - (GYROKOMP_INC_GRAD_DEFAULT *(long)360); //neu ab 3.11.2007 |
if (GyroKomp_Int < 0) GyroKomp_Int = GyroKomp_Int + (GYROKOMP_INC_GRAD_DEFAULT *(long)360); //neu ab 3.11.2007 |
ROT_OFF; |
// Salvo End |
/*DebugOut.Analog[17] = IntegralAccNick / 26; |
DebugOut.Analog[18] = IntegralAccRoll / 26; |
DebugOut.Analog[19] = IntegralFehlerNick;// / 26; |
DebugOut.Analog[20] = IntegralFehlerRoll;// / 26; |
DebugOut.Analog[21] = MittelIntegralNick / 26; |
DebugOut.Analog[22] = MittelIntegralRoll / 26; |
DebugOut.Analog[28] = ausgleichNick; |
DebugOut.Analog[29] = ausgleichRoll; |
DebugOut.Analog[30] = LageKorrekturRoll * 10; |
*/ |
#define FEHLER_LIMIT (ABGLEICH_ANZAHL * 4) |
#define FEHLER_LIMIT2 (ABGLEICH_ANZAHL * 16) |
#define BEWEGUNGS_LIMIT 20000 |
// Nick +++++++++++++++++++++++++++++++++++++++++++++++++ |
cnt = 1;// + labs(IntegralFehlerNick) / 4096; |
if(labs(MittelIntegralNick_Alt - MittelIntegralNick) < BEWEGUNGS_LIMIT) |
{ |
if(IntegralFehlerNick > FEHLER_LIMIT2) |
{ |
if(last_n_p) |
{ |
cnt += labs(IntegralFehlerNick) / FEHLER_LIMIT2; |
ausgleichNick = IntegralFehlerNick / 8; |
if(ausgleichNick > 5000) ausgleichNick = 5000; |
LageKorrekturNick += ausgleichNick / ABGLEICH_ANZAHL; |
} |
else last_n_p = 1; |
} else last_n_p = 0; |
if(IntegralFehlerNick < -FEHLER_LIMIT2) |
{ |
if(last_n_n) |
{ |
cnt += labs(IntegralFehlerNick) / FEHLER_LIMIT2; |
ausgleichNick = IntegralFehlerNick / 8; |
if(ausgleichNick < -5000) ausgleichNick = -5000; |
LageKorrekturNick += ausgleichNick / ABGLEICH_ANZAHL; |
} |
else last_n_n = 1; |
} else last_n_n = 0; |
} else cnt = 0; |
if(cnt > EE_Parameter.Driftkomp) cnt = EE_Parameter.Driftkomp; |
if(IntegralFehlerNick > FEHLER_LIMIT) AdNeutralNick += cnt; |
if(IntegralFehlerNick < -FEHLER_LIMIT) AdNeutralNick -= cnt; |
// Roll +++++++++++++++++++++++++++++++++++++++++++++++++ |
cnt = 1;// + labs(IntegralFehlerNick) / 4096; |
ausgleichRoll = 0; |
if(labs(MittelIntegralRoll_Alt - MittelIntegralRoll) < BEWEGUNGS_LIMIT) |
{ |
if(IntegralFehlerRoll > FEHLER_LIMIT2) |
{ |
if(last_r_p) |
{ |
cnt += labs(IntegralFehlerRoll) / FEHLER_LIMIT2; |
ausgleichRoll = IntegralFehlerRoll / 8; |
if(ausgleichRoll > 5000) ausgleichRoll = 5000; |
LageKorrekturRoll += ausgleichRoll / ABGLEICH_ANZAHL; |
} |
else last_r_p = 1; |
} else last_r_p = 0; |
if(IntegralFehlerRoll < -FEHLER_LIMIT2) |
{ |
if(last_r_n) |
{ |
cnt += labs(IntegralFehlerRoll) / FEHLER_LIMIT2; |
ausgleichRoll = IntegralFehlerRoll / 8; |
if(ausgleichRoll < -5000) ausgleichRoll = -5000; |
LageKorrekturRoll += ausgleichRoll / ABGLEICH_ANZAHL; |
} |
else last_r_n = 1; |
} else last_r_n = 0; |
} else |
{ |
cnt = 0; |
} |
//DebugOut.Analog[27] = ausgleichRoll; |
if(cnt > EE_Parameter.Driftkomp) cnt = EE_Parameter.Driftkomp; |
//if(cnt > 1) beeptime = 50; |
if(IntegralFehlerRoll > FEHLER_LIMIT) AdNeutralRoll += cnt; |
if(IntegralFehlerRoll < -FEHLER_LIMIT) AdNeutralRoll -= cnt; |
//DebugOut.Analog[23] = AdNeutralNick;//10*(AdNeutralNick - StartNeutralNick); |
//DebugOut.Analog[24] = 10*(AdNeutralRoll - StartNeutralRoll); |
} |
else |
{ |
LageKorrekturRoll = 0; |
LageKorrekturNick = 0; |
} |
if(!IntegralFaktor) { LageKorrekturRoll = 0; LageKorrekturNick = 0;} // z.B. bei HH |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++ |
MittelIntegralNick_Alt = MittelIntegralNick; |
MittelIntegralRoll_Alt = MittelIntegralRoll; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++ |
IntegralAccNick = 0; |
IntegralAccRoll = 0; |
IntegralAccZ = 0; |
MittelIntegralNick = 0; |
MittelIntegralRoll = 0; |
MittelIntegralNick2 = 0; |
MittelIntegralRoll2 = 0; |
ZaehlMessungen = 0; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gieren |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(abs(StickGier) > 20) // war 35 |
{ |
if(!(EE_Parameter.GlobalConfig & CFG_KOMPASS_FIX)) NeueKompassRichtungMerken = 1; |
} |
tmp_int = (long) EE_Parameter.Gier_P * ((long)StickGier * abs(StickGier)) / 512L; // expo y = ax + bx² |
tmp_int += (EE_Parameter.Gier_P * StickGier) / 4; |
sollGier = tmp_int; |
Mess_Integral_Gier -= tmp_int; |
if(Mess_Integral_Gier > 50000) Mess_Integral_Gier = 50000; // begrenzen |
if(Mess_Integral_Gier <-50000) Mess_Integral_Gier =-50000; |
// Salvo Ersatzkompass 26.9.2007 ********************** |
if ((Kompass_Neuer_Wert > 0)) |
{ |
Kompass_Neuer_Wert = 0; |
w = (abs(Mittelwert_AccNick)); |
v = (abs(Mittelwert_AccRoll)); |
if ((w < ACC_WAAGRECHT_LIMIT) && (v < ACC_WAAGRECHT_LIMIT)) //Ersatzkompass nur mit Magnetkompass aktualisieren wenn alles ok |
{ |
if ((abs(KompassValue - Kompass_Value_Old)) <= 5) // Aufeinanderfolgende Werte duerfen nur minimal abweichen |
{ |
magkompass_ok = 1; // Flag dass Magnetkompass stabil arbeitet |
GyroKomp_Int = (GyroKomp_Int )/GYROKOMP_INC_GRAD_DEFAULT; |
w = KompassValue - GyroKomp_Int; |
if ((w > 0) && (w < 180)) |
{ |
++GyroKomp_Int; |
} |
else if ((w > 0) && (w >= 180)) |
{ |
--GyroKomp_Int; |
} |
else if ((w < 0) && (w >= -180)) |
{ |
--GyroKomp_Int; |
} |
else if ((w < 0) && (w < -180)) |
{ |
++GyroKomp_Int; |
} |
if (GyroKomp_Int < 0) GyroKomp_Int = GyroKomp_Int + 360; |
GyroKomp_Int = (GyroKomp_Int%360) * GYROKOMP_INC_GRAD_DEFAULT; // An Magnetkompasswert annaehern |
} |
} |
else magkompass_ok = 0; |
} |
// Salvo End ************************* |
// Salvo 6.10.2007 |
// GPS Home aktivieren wenn Knueppel in Ruhelage und Hoehenschalter aktiviert ist |
//GPS Hold Aktiveren wenn Knueppel in Ruhelage sind |
if ((EE_Parameter.GlobalConfig & CFG_GPS_AKTIV) && (abs(PPM_in[EE_Parameter.Kanalbelegung[K_NICK]]) < GPS_STICK_HOLDOFF) |
&& (abs(PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]) < GPS_STICK_HOLDOFF) && (gps_alive_cnt > 0)) |
{ |
if (Parameter_MaxHoehe > 200) |
{ |
if ( gps_cmd == GPS_CMD_REQ_HOLD) gps_cmd = GPS_CMD_STOP; // erst mal stoppen, denn altes Kommando wurde noch nicht beendet |
else gps_cmd = GPS_CMD_REQ_HOME; |
n = GPS_CRTL(gps_cmd); |
} |
else |
{ |
if ( gps_cmd == GPS_CMD_REQ_HOME) gps_cmd = GPS_CMD_STOP; // erst mal stoppen, denn altes Kommando wurde noch nicht beendet |
else gps_cmd = GPS_CMD_REQ_HOLD; |
n= GPS_CRTL(gps_cmd); |
} |
} |
else |
{ |
if (gps_cmd != GPS_CMD_STOP) |
{ |
gps_cmd = GPS_CMD_STOP; |
n= GPS_CRTL(gps_cmd); //GPS Lageregelung beenden |
} |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Kompass |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(KompassValue && (EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV) && (Kompass_present > 0)) |
{ |
if(v > w) w = v; // grösste Neigung ermitteln |
// Salvo 13.9.2007 Nur wenn Magnetkompass ordentliche Werte liefert |
if ((magkompass_ok > 0) && NeueKompassRichtungMerken) |
{ |
KompassStartwert = KompassValue; |
NeueKompassRichtungMerken = 0; |
} |
// Salvo 13.9.2007 |
w=0; |
// Salvo End |
w = (w * Parameter_KompassWirkung) / 64; // auf die Wirkung normieren |
w = Parameter_KompassWirkung - w; // Wirkung ggf drosseln |
if(w > 0) |
{ |
// Salvo Kompasssteuerung ********************** |
if (magkompass_ok > 0) Mess_Integral_Gier += (KompassRichtung * w) / 32; // nach Kompass ausrichten |
// Salvo End |
} |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Debugwerte zuordnen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(!TimerWerteausgabe--) |
{ |
TimerWerteausgabe = 24; |
DebugOut.Analog[0] = IntegralNick / EE_Parameter.GyroAccFaktor; |
DebugOut.Analog[1] = IntegralRoll / EE_Parameter.GyroAccFaktor; |
DebugOut.Analog[2] = Mittelwert_AccNick; |
DebugOut.Analog[3] = Mittelwert_AccRoll; |
DebugOut.Analog[4] = MesswertGier; |
DebugOut.Analog[5] = HoehenWert; |
DebugOut.Analog[6] =(Mess_Integral_Hoch / 512); |
DebugOut.Analog[8] = KompassValue; |
DebugOut.Analog[9] = GyroKomp_Int/GYROKOMP_INC_GRAD_DEFAULT; |
// Diverse parameter Debugging |
DebugOut.Analog[16] = dataset_cnt; |
DebugOut.Analog[17] = UBat; |
DebugOut.Analog[18] = MesswertNick; |
DebugOut.Analog[19] = MesswertRoll; |
DebugOut.Analog[20] = MesswertGier; |
DebugOut.Analog[21] = StickNick; |
DebugOut.Analog[22] = StickRoll; |
DebugOut.Analog[23] = StickGier; |
// GPS Debugging |
// DebugOut.Analog[10] = GPS_dist_2trgt/10; |
// DebugOut.Analog[11] = GPS_hdng_rel_2trgt; |
DebugOut.Analog[10] = Parameter_UserParam1; |
DebugOut.Analog[11] = Parameter_UserParam3; |
DebugOut.Analog[24] = GPS_Nick; |
DebugOut.Analog[25] = GPS_Roll; |
DebugOut.Analog[26] = gps_rel_act_position.utm_east/10; //in m ausgeben |
DebugOut.Analog[27] = gps_rel_act_position.utm_north/10; |
DebugOut.Analog[28] = gps_rel_act_position.utm_alt/10; |
DebugOut.Analog[29] = gps_sub_state+(20*gps_cmd); |
/* DebugOut.Analog[16] = motor_rx[0]; |
DebugOut.Analog[17] = motor_rx[1]; |
DebugOut.Analog[18] = motor_rx[2]; |
DebugOut.Analog[19] = motor_rx[3]; |
DebugOut.Analog[20] = motor_rx[0] + motor_rx[1] + motor_rx[2] + motor_rx[3]; |
DebugOut.Analog[20] /= 14; |
DebugOut.Analog[21] = motor_rx[4]; |
DebugOut.Analog[22] = motor_rx[5]; |
DebugOut.Analog[23] = motor_rx[6]; |
DebugOut.Analog[24] = motor_rx[7]; |
DebugOut.Analog[25] = motor_rx[4] + motor_rx[5] + motor_rx[6] + motor_rx[7]; |
*/ |
// DebugOut.Analog[9] = MesswertNick; |
// DebugOut.Analog[9] = SollHoehe; |
// DebugOut.Analog[10] = Mess_Integral_Gier / 128; |
// DebugOut.Analog[11] = KompassStartwert; |
// DebugOut.Analog[10] = Parameter_Gyro_I; |
// DebugOut.Analog[10] = EE_Parameter.Gyro_I; |
// DebugOut.Analog[9] = KompassRichtung; |
// DebugOut.Analog[10] = GasMischanteil; |
// DebugOut.Analog[3] = HoeheD * 32; |
// DebugOut.Analog[4] = hoehenregler; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Drehgeschwindigkeit und -winkel zu einem Istwert zusammenfassen |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(Looping_Nick) MesswertNick = MesswertNick * GyroFaktor; |
else MesswertNick = IntegralNick * IntegralFaktor + MesswertNick * GyroFaktor; |
if(Looping_Roll) MesswertRoll = MesswertRoll * GyroFaktor; |
else MesswertRoll = IntegralRoll * IntegralFaktor + MesswertRoll * GyroFaktor; |
// MesswertGier = MesswertGier * (GyroFaktor/2) + Integral_Gier * IntegralFaktor; |
MesswertGier = MesswertGier * (GyroFaktor) + Integral_Gier * IntegralFaktor/2; |
//DebugOut.Analog[28] = MesswertRoll; |
//DebugOut.Analog[25] = IntegralRoll * IntegralFaktor; |
//DebugOut.Analog[31] = StickRoll;// / (26*IntegralFaktor); |
// Maximalwerte abfangen |
#define MAX_SENSOR 2048 |
if(MesswertNick > MAX_SENSOR) MesswertNick = MAX_SENSOR; |
if(MesswertNick < -MAX_SENSOR) MesswertNick = -MAX_SENSOR; |
if(MesswertRoll > MAX_SENSOR) MesswertRoll = MAX_SENSOR; |
if(MesswertRoll < -MAX_SENSOR) MesswertRoll = -MAX_SENSOR; |
if(MesswertGier > MAX_SENSOR) MesswertGier = MAX_SENSOR; |
if(MesswertGier < -MAX_SENSOR) MesswertGier = -MAX_SENSOR; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Höhenregelung |
// Die Höhenregelung schwächt lediglich das Gas ab, erhöht es allerdings nicht |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//OCR0B = 180 - (Poti1 + 120) / 4; |
//DruckOffsetSetting = OCR0B; |
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)) // Höhenregelung |
{ |
int tmp_int; |
if(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER) // Regler wird über Schalter gesteuert |
{ |
if(Parameter_MaxHoehe < 50) |
{ |
SollHoehe = HoehenWert - 20; // Parameter_MaxHoehe ist der PPM-Wert des Schalters |
HoehenReglerAktiv = 0; |
} |
else |
HoehenReglerAktiv = 1; |
} |
else |
{ |
SollHoehe = ((int) ExternHoehenValue + (int) Parameter_MaxHoehe) * (int)EE_Parameter.Hoehe_Verstaerkung - 20; |
HoehenReglerAktiv = 1; |
} |
if(Notlandung) SollHoehe = 0; |
h = HoehenWert; |
if((h > SollHoehe) && HoehenReglerAktiv) // zu hoch --> drosseln |
{ h = ((h - SollHoehe) * (int) Parameter_Hoehe_P) / 16; // Differenz bestimmen --> P-Anteil |
h = GasMischanteil - h; // vom Gas abziehen |
h -= (HoeheD * Parameter_Luftdruck_D)/8; // D-Anteil |
tmp_int = ((Mess_Integral_Hoch / 512) * (signed long) Parameter_Hoehe_ACC_Wirkung) / 32; |
if(tmp_int > 50) tmp_int = 50; |
else if(tmp_int < -50) tmp_int = -50; |
h -= tmp_int; |
hoehenregler = (hoehenregler*15 + h) / 16; |
if(hoehenregler < EE_Parameter.Hoehe_MinGas) // nicht unter MIN |
{ |
if(GasMischanteil >= EE_Parameter.Hoehe_MinGas) hoehenregler = EE_Parameter.Hoehe_MinGas; |
if(GasMischanteil < EE_Parameter.Hoehe_MinGas) hoehenregler = GasMischanteil; |
} |
if(hoehenregler > GasMischanteil) hoehenregler = GasMischanteil; // nicht mehr als Gas |
GasMischanteil = hoehenregler; |
} |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Mischer und PI-Regler |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
DebugOut.Analog[7] = GasMischanteil; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Gier-Anteil |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#define MUL_G 1.0 |
GierMischanteil = MesswertGier - sollGier; // Regler für Gier |
//GierMischanteil = 0; |
if(GierMischanteil > (GasMischanteil / 2)) GierMischanteil = GasMischanteil / 2; |
if(GierMischanteil < -(GasMischanteil / 2)) GierMischanteil = -(GasMischanteil / 2); |
if(GierMischanteil > ((MAX_GAS - GasMischanteil))) GierMischanteil = ((MAX_GAS - GasMischanteil)); |
if(GierMischanteil < -((MAX_GAS - GasMischanteil))) GierMischanteil = -((MAX_GAS - GasMischanteil)); |
if(GasMischanteil < 20) GierMischanteil = 0; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Nick-Achse |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
DiffNick = MesswertNick - (StickNick - GPS_Nick); // Differenz bestimmen |
if(IntegralFaktor) SummeNick += IntegralNick * IntegralFaktor - (StickNick - GPS_Nick); // I-Anteil bei Winkelregelung |
else SummeNick += DiffNick; // I-Anteil bei HH |
if(SummeNick > 0) SummeNick-= 2 ; else SummeNick += 2 ; |
if(SummeNick > 16000) SummeNick = 16000; |
if(SummeNick < -16000) SummeNick = -16000; |
pd_ergebnis = DiffNick + Ki * SummeNick; // PI-Regler für Nick |
// Motor Vorn |
tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs(GierMischanteil)/2)) / 64; |
if(pd_ergebnis > tmp_int) pd_ergebnis = tmp_int; |
if(pd_ergebnis < -tmp_int) pd_ergebnis = -tmp_int; |
motorwert = GasMischanteil + pd_ergebnis + GierMischanteil; // Mischer |
if ((motorwert < 0)) motorwert = 0; |
else if(motorwert > MAX_GAS) motorwert = MAX_GAS; |
if (motorwert < MIN_GAS) motorwert = MIN_GAS; |
Motor_Vorne = motorwert; |
// Motor Heck |
motorwert = GasMischanteil - pd_ergebnis + GierMischanteil; |
if ((motorwert < 0)) motorwert = 0; |
else if(motorwert > MAX_GAS) motorwert = MAX_GAS; |
if (motorwert < MIN_GAS) motorwert = MIN_GAS; |
Motor_Hinten = motorwert; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Roll-Achse |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
DiffRoll = MesswertRoll - (StickRoll - GPS_Roll); // Differenz bestimmen |
if(IntegralFaktor) SummeRoll += IntegralRoll * IntegralFaktor - (StickRoll - GPS_Roll);// I-Anteil bei Winkelregelung |
else SummeRoll += DiffRoll; // I-Anteil bei HH |
if(SummeRoll > 0) SummeRoll-= 2 ; else SummeRoll += 2 ; |
if(SummeRoll > 16000) SummeRoll = 16000; |
if(SummeRoll < -16000) SummeRoll = -16000; |
pd_ergebnis = DiffRoll + Ki * SummeRoll; // PI-Regler für Roll |
tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs(GierMischanteil)/2)) / 64; |
if(pd_ergebnis > tmp_int) pd_ergebnis = tmp_int; |
if(pd_ergebnis < -tmp_int) pd_ergebnis = -tmp_int; |
// Motor Links |
motorwert = GasMischanteil + pd_ergebnis - GierMischanteil; |
if ((motorwert < 0)) motorwert = 0; |
else if(motorwert > MAX_GAS) motorwert = MAX_GAS; |
if (motorwert < MIN_GAS) motorwert = MIN_GAS; |
Motor_Links = motorwert; |
// Motor Rechts |
motorwert = GasMischanteil - pd_ergebnis - GierMischanteil; |
if ((motorwert < 0)) motorwert = 0; |
else if(motorwert > MAX_GAS) motorwert = MAX_GAS; |
if (motorwert < MIN_GAS) motorwert = MIN_GAS; |
Motor_Rechts = motorwert; |
// +++++++++++++++++++++++++++++++++++++++++++++++ |
} |
/branches/salvo_gps/Basis_v0067g/trunk/fc.h |
---|
0,0 → 1,162 |
/*####################################################################################### |
Flight Control |
#######################################################################################*/ |
#ifndef _FC_H |
#define _FC_H |
extern volatile unsigned int I2CTimeout; |
//Salvo 9.12.2007 Neutralwerte fuer ACC Sensor nur noch infohalber drin |
#define ACC_NICK_NEUTRAL 518 // ADC Wandler Wert in Neutrallage (0g): Vom individuellen Sensor abhaengig |
#define ACC_ROLL_NEUTRAL 516 // ADC Wandler wert in Neutrallage (0g) |
#define ACC_WAAGRECHT_LIMIT 100 // Nick und Roll kleiner als dieser Wert gelten als Kriterium fuer waagrechte Lage |
// Salvo End |
//Salvo 2.9.2007 Ersatzkompass: Gyroincrements/Grad als Defaultwert ***** |
// Laut Datenblatt sind die Werte ueber Zeit und Temperatur sehr stabil. |
#define GYROKOMP_INC_GRAD_DEFAULT 1250 // Gyroincrements/Grad als Defaultwert |
// Salvo End |
extern unsigned char Sekunde,Minute; |
extern volatile long IntegralNick,IntegralNick2; |
extern volatile long IntegralRoll,IntegralRoll2; |
extern volatile long Mess_IntegralNick,Mess_IntegralNick2; |
extern volatile long Mess_IntegralRoll,Mess_IntegralRoll2; |
extern volatile long IntegralAccNick,IntegralAccRoll; |
extern volatile long Mess_Integral_Hoch; |
extern volatile long Integral_Gier,Mess_Integral_Gier,Mess_Integral_Gier2; |
extern volatile int KompassValue; |
extern volatile int KompassStartwert; |
extern volatile int KompassRichtung; |
extern int HoehenWert; |
extern int SollHoehe; |
extern volatile int MesswertNick,MesswertRoll,MesswertGier; |
extern volatile int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll; |
extern volatile int NeutralAccX, NeutralAccY,Mittelwert_AccHoch; |
extern volatile float NeutralAccZ; |
extern long Umschlag180Nick, Umschlag180Roll; |
extern signed int ExternStickNick,ExternStickRoll,ExternStickGier; |
extern unsigned char Parameter_UserParam1,Parameter_UserParam2,Parameter_UserParam3,Parameter_UserParam4,Parameter_UserParam5,Parameter_UserParam6,Parameter_UserParam7,Parameter_UserParam8; |
//Salvo 2.9.2007 Ersatzkompass |
extern volatile long GyroKomp_Int; |
extern volatile int GyroKomp_Inc_Grad; |
extern volatile int GyroKomp_Value; // Der ermittelte Kompasswert aus Gyro und Magnetkompass |
// Salvo End |
void MotorRegler(void); |
void SendMotorData(void); |
void CalibrierMittelwert(void); |
void Mittelwert(void); |
void SetNeutral(void); |
void Piep(unsigned char Anzahl); |
extern void DefaultKonstanten(void); |
void DefaultKonstanten1(void); |
void DefaultKonstanten2(void); |
extern unsigned char h,m,s; |
extern volatile unsigned char Timeout ; |
extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
extern volatile long IntegralNick,IntegralNick2; |
extern volatile long IntegralRoll,IntegralRoll2; |
extern volatile long Integral_Gier; |
extern volatile long Mess_IntegralNick,Mess_IntegralNick2; |
extern volatile long Mess_IntegralRoll,Mess_IntegralRoll2; |
extern volatile long Mess_Integral_Gier; |
extern volatile int DiffNick,DiffRoll; |
extern int Poti1, Poti2, Poti3, Poti4; |
extern volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count; |
extern unsigned char MotorWert[5]; |
extern volatile unsigned char SenderOkay; |
extern int StickNick,StickRoll,StickGier; |
extern char MotorenEin; |
extern void DefaultKonstanten1(void); |
extern void DefaultKonstanten2(void); |
#define STRUCT_PARAM_LAENGE 71 |
struct mk_param_struct |
{ |
unsigned char Kanalbelegung[8]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
unsigned char Hoehe_MinGas; // Wert : 0-100 |
unsigned char Luftdruck_D; // Wert : 0-250 |
unsigned char MaxHoehe; // Wert : 0-32 |
unsigned char Hoehe_P; // Wert : 0-32 |
unsigned char Hoehe_Verstaerkung; // Wert : 0-50 |
unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250 |
unsigned char Stick_P; // Wert : 1-6 |
unsigned char Stick_D; // Wert : 0-64 |
unsigned char Gier_P; // Wert : 1-20 |
unsigned char Gas_Min; // Wert : 0-32 |
unsigned char Gas_Max; // Wert : 33-250 |
unsigned char GyroAccFaktor; // Wert : 1-64 |
unsigned char KompassWirkung; // Wert : 0-32 |
unsigned char Gyro_P; // Wert : 10-250 |
unsigned char Gyro_I; // Wert : 0-250 |
unsigned char UnterspannungsWarnung; // Wert : 0-250 |
unsigned char NotGas; // Wert : 0-250 //Gaswert bei Empängsverlust |
unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen |
unsigned char UfoAusrichtung; // X oder + Formation |
unsigned char I_Faktor; // Wert : 0-250 |
unsigned char UserParam1; // Wert : 0-250 |
unsigned char UserParam2; // Wert : 0-250 |
unsigned char UserParam3; // Wert : 0-250 |
unsigned char UserParam4; // Wert : 0-250 |
unsigned char ServoNickControl; // Wert : 0-250 // Stellung des Servos |
unsigned char ServoNickComp; // Wert : 0-250 // Einfluss Gyro/Servo |
unsigned char ServoNickMin; // Wert : 0-250 // Anschlag |
unsigned char ServoNickMax; // Wert : 0-250 // Anschlag |
unsigned char ServoNickRefresh; // |
unsigned char LoopGasLimit; // Wert: 0-250 max. Gas während Looping |
unsigned char LoopThreshold; // Wert: 0-250 Schwelle für Stickausschlag |
unsigned char LoopHysterese; // Wert: 0-250 Hysterese für Stickausschlag |
unsigned char AchsKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung) |
unsigned char AchsGegenKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick Gegenkoppelt (NickRollGegenkopplung) |
unsigned char WinkelUmschlagNick; // Wert: 0-250 180°-Punkt |
unsigned char WinkelUmschlagRoll; // Wert: 0-250 180°-Punkt |
unsigned char GyroAccAbgleich; // 1/k (Koppel_ACC_Wirkung) |
unsigned char Driftkomp; |
unsigned char DynamicStability; |
unsigned char UserParam5; // Wert : 0-250 |
unsigned char UserParam6; // Wert : 0-250 |
unsigned char UserParam7; // Wert : 0-250 |
unsigned char UserParam8; // Wert : 0-250 |
//------------------------------------------------ |
unsigned char LoopConfig; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
unsigned char ServoNickCompInvert; // Wert : 0-250 0 oder 1 // WICHTIG!!! am Ende lassen |
unsigned char Reserved[4]; |
char Name[12]; |
}; |
/* |
unsigned char ServoNickMax; // Wert : 0-250 |
unsigned char ServoNickRefresh; // |
unsigned char LoopGasLimit; // Wert: 0-250 max. Gas während Looping |
unsigned char LoopThreshold; // Wert: 0-250 Schwelle für Stickausschlag |
//------------------------------------------------ |
unsigned char LoopConfig; // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
unsigned char ServoNickCompInvert; // Wert : 0-250 0 oder 1 // WICHTIG!!! am Ende lassen |
unsigned char Reserved[4]; |
char Name[12]; |
*/ |
extern struct mk_param_struct EE_Parameter; |
extern unsigned char Parameter_Luftdruck_D; |
extern unsigned char Parameter_MaxHoehe; |
extern unsigned char Parameter_Hoehe_P; |
extern unsigned char Parameter_Hoehe_ACC_Wirkung; |
extern unsigned char Parameter_KompassWirkung; |
extern unsigned char Parameter_Gyro_P; |
extern unsigned char Parameter_Gyro_I; |
extern unsigned char Parameter_Gier_P; |
extern unsigned char Parameter_ServoNickControl; |
extern unsigned char Parameter_AchsKopplung1; |
extern unsigned char Parameter_AchsGegenKopplung1; |
#endif //_FC_H |
/branches/salvo_gps/Basis_v0067g/trunk/flightctrl.aws |
---|
0,0 → 1,0 |
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA644"/><Files><File00000 Name="G:\Mikrokopter\Flight_Crtl\v0067g\timer0.c" Position="266 101 1248 593" LineCol="65 0" State="Maximized"/><File00001 Name="G:\Mikrokopter\Flight_Crtl\v0067g\analog.h" Position="288 130 1262 592" LineCol="0 0" State="Maximized"/><File00002 Name="G:\Mikrokopter\Flight_Crtl\v0067g\makefile" Position="262 71 1402 774" LineCol="6 22" State="Maximized"/><File00003 Name="G:\Mikrokopter\Flight_Crtl\v0067g\main.c" Position="332 188 1306 650" LineCol="101 0" State="Maximized"/><File00004 Name="G:\Mikrokopter\Flight_Crtl\v0067g\fc.c" Position="354 217 1328 679" LineCol="1011 0" State="Maximized"/><File00005 Name="G:\Mikrokopter\Flight_Crtl\v0067g\gps.h" Position="376 246 1350 708" LineCol="108 24" State="Maximized"/><File00006 Name="G:\Mikrokopter\Flight_Crtl\v0067g\fc.h" Position="398 275 1376 741" LineCol="0 0" State="Maximized"/><File00007 Name="G:\Mikrokopter\Flight_Crtl\v0067g\GPS.c" Position="420 304 1398 770" LineCol="533 25" State="Maximized"/></Files></AVRWorkspace> |
/branches/salvo_gps/Basis_v0067g/trunk/gps.h |
---|
0,0 → 1,141 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Peter Muehlenbrock ("Salvo") |
// Definitionen fuer Modul GPS |
// Stand 12.10.007 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
extern signed int GPS_Nick; |
extern signed int GPS_Roll; |
extern signed int GPS_dist_2trgt; //vorzeichenlose Distanz zum Ziel |
extern signed int GPS_hdng_rel_2trgt; //Winkel zum Ziel bezogen auf Nordachse des Kopters |
extern void GPS_Neutral(void); |
extern void Get_Ublox_Msg(uint8_t rx) ; |
//extern short int Get_GPS_data(void); |
extern short int Get_Rel_Position(void); |
extern void GPS_Save_Home(void); |
extern short int GPS_CRTL(short int cmd); |
typedef struct { |
unsigned long utm_itow; // time of week |
long utm_east; // UTM Ost in cm |
long utm_north; // UTM Nord in cm |
long utm_alt; // hoehe in cm |
uint8_t utm_zone; // |
uint8_t utm_hem; // Hemisphere Indicator |
uint8_t status; // 0: kein gueltiges Paket 1: alles ok |
} NAV_POSUTM_t; |
typedef struct { |
unsigned long itow; // time of week |
uint8_t gpsfix_type;// 3=3D Fix |
uint8_t nav_status_flag; |
uint8_t nav_diff_status; |
uint8_t nav_resevd; |
long nav_tff; // Time to First Fix in ms |
long nav_msss; // ms since startup |
uint8_t status; // 0: kein gueltiges Paket 1: alles ok |
} NAV_STATUS_t; |
typedef struct { |
unsigned long itow; |
long speed_n; // in cm/s |
long speed_e; // in cm/s |
long speed_alt; // in cm/s |
unsigned long speed_3d; // in cm/s |
unsigned long speed_gnd; // V ueber Grund in cm/s |
long heading; // Richtung in deg/10000 |
unsigned long sacc; // Speed Genauigkeit in cm/s |
unsigned long cacc; // Richtungsgenauigkeit in deg |
uint8_t status; // 0: kein gueltiges Paket 1: alles ok |
} NAV_VELNED_t; |
typedef struct { |
long utm_east; // UTM Ost in 10 cm |
long utm_north; // UTM Nord in 10 cm |
long utm_alt; // hoehe in 10 cm |
unsigned long speed_gnd; // V ueber Grund in 10cm/s |
unsigned heading; // Richtung in Grad |
uint8_t status; // 0: keine gueltigen Daten 1: alles ok |
} GPS_ABS_POSITION_t; |
typedef struct { // Struktur fuer Relative GPS Daten (bezogen z.B. auf Home Position) |
int utm_east; // UTM Ost in 10 cm |
int utm_north; // UTM Nord in 10 cm |
int utm_alt ; // UTM Altiude in 10 cm |
uint8_t status; // 0: keine gueltigen Daten 1: alles ok |
} GPS_REL_POSITION_t; |
extern GPS_ABS_POSITION_t gps_act_position; |
extern GPS_ABS_POSITION_t gps_home_position; |
extern GPS_REL_POSITION_t gps_rel_act_position; |
extern GPS_REL_POSITION_t gps_rel_hold_position; |
extern short int gps_state,gps_sub_state; |
extern signed int GPS_hdng_abs_2trgt; |
extern signed int GPS_hdng_rel_2trgt; |
extern signed int GPS_dist_2trgt; |
extern signed int gps_reg_x,gps_reg_y; |
extern signed int GPS_dist_2trgt; |
extern unsigned int gps_alive_cnt; |
//nur provisorisch fuer Debugausgaben |
extern signed hdng_2home,dist_2home; //Richtung und Entfernung zur home Position |
extern long int dist_flown; |
#define GPS_USR_PAR_FKT 8 //Faktor durch den die Userparameter getielt werden |
// Zustaende der zentralen GPS statemachine |
#define GPS_CRTL_IDLE 0 // |
#define GPS_CRTL_HOLD_ACTIVE 1 // Lageregelung aktiv |
#define GPS_CRTL_HOME_ACTIVE 2 // Rueckflug zur Basis Aktiv |
#define GPS_HOME_FAST_IN_TOL 3 // Rueckflug: Aktuelle Position innerhalb der Toleranz |
#define GPS_HOME_FAST_OUTOF_TOL 4 // Rueckflug: Aktuelle Position ausserhalb der Toleranz |
#define GPS_HOME_RMPDWN_IN_TOL 5 // Rueckflug: beim Abbremsen Position innerhalb der Toleranz |
#define GPS_HOME_RMPDWN_OUTOF_TOL 6 // Rueckflug: beim Abbremsen Position ausserhalb der Toleranz |
#define GPS_HOME_IN_TOL 7 // Rueckflug: Nahe am Ziel innerhalb der Toleranz |
#define GPS_HOME_OUTOF_TOL 8 // Rueckflug: Nahe am Ziel ausserhalb der Toleranz |
#define GPS_HOME_FINISHED 9 // Rueckflug zur Basis abgeschlossen |
// Kommandokonstanten fuer die zentrale GPS Statemachine |
#define GPS_CMD_STOP 0 // Lageregelung soll deaktiviert werden |
#define GPS_CMD_REQ_INIT 1 // Initialisierung |
#define GPS_CMD_REQ_HOLD 3 // Lageregelung soll aktiviert werden |
#define GPS_CMD_REQ_HOME 4 // Das Heimfliegen soll aktiviert werden |
// Statusmeldungen der zentralen GPS statemachine |
#define GPS_STST_OK 0 // Kommando erfolgreich und abgeschlossen |
#define GPS_STST_PEND 1 // Kommando noch nicht komplett durchgefuehrt |
#define GPS_STST_ERR 2 // Fehler |
// GPS Lageregler |
#define GPS_NICKROLL_MAX 40 // Maximaler Einfluss des GPS Lagereglers auf Nick und Roll |
#define GPS_DIST_MAX 400 // Maximal zulaessige Distanz bevor Regelung gestoppt wird (in 10cm) |
#define GPS_STICK_HOLDOFF 25 // Wenn der Nick oder Roll Stickwerte groesser sind, wird GPS_HOLD deaktiviert |
#define GPS_V 8 // Teilerfaktor Regelabweichung zu Ausgabewert |
// Differenzierer Kennwerte fuer von Distanz abhaengige Verstaerkung, abhaengig vom Modus. |
#define GPS_DIFF_NRML_MAX_V 20 //maximale Verstaerkung * 10 |
#define GPS_DIFF_NRML_MAX_D 30 //Entfernung bei der maximale Verstaerkung erreicht wird in 10cm |
#define GPS_DIFF_FAST_MAX_V 15 //maximale Verstaerkung * 10 im Fast mode |
#define GPS_DIFF_FAST_MAX_D 50 //Entfernung bei der maximale Verstaerkung erreicht wird in 10cm im Fast mode |
// P-Regler Verstaerkung |
#define GPS_PROP_NRML_V 2 //maximale Verstaerkung * 2 |
#define GPS_PROP_FAST_V 2 //maximale Verstaerkung * 2 im Fast mode |
// GPS G2T /Go to Target Regler |
#define GPS_G2T_DIST_MAX_STOP 50 // Ab dieser Entfernung vom Zielpunkt soll die Geschwindigkeit runtergeregelt werden( in 10 cm) |
#define GPS_G2T_DIST_HOLD 30 // Ab dieser Entfernung vom Zielpunkt wird mit Minimaler Geschwindigkeit eingeregelt |
#define GPS_G2T_V_MAX 12 // Maximale Geschwindigkeit (in 10cm/0.25 Sekunden) mit der der Sollpunkt geaendert wird. |
#define GPS_G2T_V_RAMP_DWN 6 // Geschwindigkeit (in 10cm/0.25ekunden) in der Naehe der Home Position um abzubremsen |
#define GPS_G2T_V_MIN 3 // Minimale (in 10cm/0.25 Sekunden) ganz nahe an Homeposition. |
#define GPS_G2T_FAST_TOL 60 // Bei grosser Entfernung vom Ziel: Der Sollwert wird nur geaendert wenn die aktuelle Position nicht mehr als diesem Wert vom Sollwert abweicht |
#define GPS_G2T_NRML_TOL 40 // Bei kleiner Entfernung vom Ziel: Der Sollwert wird nur geaendert wenn die aktuelle Position nicht mehr als diesem Wert vom Sollwert abweicht |
/branches/salvo_gps/Basis_v0067g/trunk/main.c |
---|
0,0 → 1,253 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + Nur für den privaten Gebrauch |
// + www.MikroKopter.com |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation), |
// + dass eine Nutzung (auch auszugsweise) nur für den privaten und nicht-kommerziellen Gebrauch zulässig ist. |
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt |
// + bzgl. der Nutzungsbedingungen aufzunehmen. |
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen, |
// + Verkauf von Luftbildaufnahmen, usw. |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, |
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts |
// + auf anderen Webseiten oder Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de" |
// + eindeutig als Ursprung verlinkt und genannt werden |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion |
// + Benutzung auf eigene Gefahr |
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Die Portierung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur |
// + mit unserer Zustimmung zulässig |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Redistributions of source code (with or without modifications) must retain the above copyright notice, |
// + this list of conditions and the following disclaimer. |
// + * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived |
// + from this software without specific prior written permission. |
// + * The use of this project (hardware, software, binary files, sources and documentation) is only permittet |
// + for non-commercial use (directly or indirectly) |
// + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted |
// + with our written permission |
// + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be |
// + clearly linked as origin |
// + * porting to systems other than hardware from www.mikrokopter.de is not allowed |
// + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
// + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
// + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
// + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
// + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
// + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
// + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
// + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
// + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
// + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
// + POSSIBILITY OF SUCH DAMAGE. |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
unsigned char EEPromArray[E2END+1] EEMEM; |
unsigned char PlatinenVersion = 10; |
// -- Parametersatz aus EEPROM lesen --- |
// number [0..5] |
void ReadParameterSet(unsigned char number, unsigned char *buffer, unsigned char length) |
{ |
if (number > 5) number = 5; |
eeprom_read_block(buffer, &EEPromArray[EEPROM_ADR_PARAM_BEGIN + length * number], length); |
} |
// -- Parametersatz ins EEPROM schreiben --- |
// number [0..5] |
void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length) |
{ |
if(number > 5) number = 5; |
eeprom_write_block(buffer, &EEPromArray[EEPROM_ADR_PARAM_BEGIN + length * number], length); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], number); // diesen Parametersatz als aktuell merken |
} |
unsigned char GetActiveParamSetNumber(void) |
{ |
unsigned char set; |
set = eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET]); |
if(set > 5) |
{ |
set = 2; |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], set); // diesen Parametersatz als aktuell merken |
} |
return(set); |
} |
//############################################################################ |
//Hauptprogramm |
int main (void) |
//############################################################################ |
{ |
unsigned int timer; |
//unsigned int timer2 = 0; |
DDRB = 0x00; |
PORTB = 0x00; |
for(timer = 0; timer < 1000; timer++); // verzögern |
if(PINB & 0x01) PlatinenVersion = 11; else PlatinenVersion = 10; |
// Salvo 9.12.2007 PC6 als Ausgang |
// DDRC = 0x81; // SCL |
DDRC = 0xC1; // SCL und PC6 als Ausgang |
PORTC = 0xff; // Pullup SDA |
DDRB = 0x1B; // LEDs und Druckoffset |
PORTB = 0x01; // LED_Rot |
DDRD = 0x3E; // Speaker & TXD & J3 J4 J5 |
DDRD |=0x80; // J7 |
PORTD = 0xF7; // LED |
MCUSR &=~(1<<WDRF); |
WDTCSR |= (1<<WDCE)|(1<<WDE); |
WDTCSR = 0; |
beeptime = 2000; |
StickGier = 0; PPM_in[K_GAS] = 0;StickRoll = 0; StickNick = 0; |
ROT_OFF; |
Timer_Init(); |
UART_Init(); |
rc_sum_init(); |
ADC_Init(); |
i2c_init(); |
// SPI_MasterInit(); |
sei(); |
VersionInfo.Hauptversion = VERSION_HAUPTVERSION; |
VersionInfo.Nebenversion = VERSION_NEBENVERSION; |
VersionInfo.PCKompatibel = VERSION_KOMPATIBEL; |
printf("\n\rFlightControl\n\rHardware:%d.%d\n\rSoftware:V%d.%d%c ",PlatinenVersion/10,PlatinenVersion%10, VERSION_HAUPTVERSION, VERSION_NEBENVERSION,VERSION_INDEX + 'a'); |
printf("\n\r=============================="); |
GRN_ON; |
#define EE_DATENREVISION 68 // wird angepasst, wenn sich die EEPROM-Daten geändert haben |
if(eeprom_read_byte(&EEPromArray[EEPROM_ADR_VALID]) != EE_DATENREVISION) |
{ |
printf("\n\rInit. EEPROM: Generiere Default-Parameter..."); |
DefaultKonstanten1(); |
for (unsigned char i=0;i<6;i++) |
{ |
if(i==2) DefaultKonstanten2(); // Kamera |
if(i==3) DefaultKonstanten3(); // Beginner |
if(i>3) DefaultKonstanten2(); // Kamera |
WriteParameterSet(i, (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
} |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], 3); // default-Setting |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_VALID], EE_DATENREVISION); |
} |
if(eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_NICK]) > 4) |
{ |
printf("\n\rACC nicht abgeglichen!"); |
} |
ReadParameterSet(GetActiveParamSetNumber(), (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
printf("\n\rBenutze Parametersatz %d", GetActiveParamSetNumber()); |
if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG) |
{ |
printf("\n\rAbgleich Luftdrucksensor.."); |
timer = SetDelay(1000); |
SucheLuftruckOffset(); |
while (!CheckDelay(timer)); |
printf("OK\n\r"); |
} |
SetNeutral(); |
ROT_OFF; |
// Salvo 9.12.2007 Defaultwert fuer Umschaltsignal fuer RX: Bluettooth Modul aktiv |
RX_SWTCH_OFF; |
// Salvo End |
beeptime = 2000; |
DebugIn.Analog[1] = 1000; |
DebugIn.Digital[0] = 0x55; |
printf("\n\rSteuerung: "); |
if (EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) printf("HeadingHold"); |
else printf("Neutral"); |
printf("\n\n\r"); |
LcdClear(); |
I2CTimeout = 5000; |
while (1) |
{ |
if (UpdateMotor) // ReglerIntervall |
{ |
// SPI_TransmitByte(); |
UpdateMotor=0; |
//PORTD |= 0x08; |
MotorRegler(); |
//PORTD &= ~0x08; |
SendMotorData(); |
ROT_OFF; |
if(PcZugriff) PcZugriff--; |
else |
{ |
DubWiseKeys[0] = 0; |
DubWiseKeys[1] = 0; |
ExternStickNick = 0; |
ExternStickRoll = 0; |
ExternStickGier = 0; |
} |
if(SenderOkay) SenderOkay--; |
if(!I2CTimeout) |
{ |
I2CTimeout = 5; |
i2c_reset(); |
if((BeepMuster == 0xffff) && MotorenEin) |
{ |
beeptime = 10000; |
BeepMuster = 0x0080; |
} |
} |
else |
{ |
I2CTimeout--; |
ROT_OFF; |
} |
} |
if(SIO_DEBUG) |
{ |
DatenUebertragung(); |
BearbeiteRxDaten(); |
} |
else BearbeiteRxDaten(); |
if(CheckDelay(timer)) |
{ |
if(UBat < EE_Parameter.UnterspannungsWarnung) |
{ |
if(BeepMuster == 0xffff) |
{ |
beeptime = 6000; |
BeepMuster = 0x0300; |
} |
} |
// SPI_StartTransmitPacket(); |
timer = SetDelay(100); |
} |
} |
return (1); |
} |
/branches/salvo_gps/Basis_v0067g/trunk/main.h |
---|
0,0 → 1,108 |
#ifndef _MAIN_H |
#define _MAIN_H |
//Hier die Quarz Frequenz einstellen |
#if defined (__AVR_ATmega32__) |
#define SYSCLK 20000000L //Quarz Frequenz in Hz |
#endif |
#if defined (__AVR_ATmega644__) |
#define SYSCLK 20000000L //Quarz Frequenz in Hz |
//#define SYSCLK 16000000L //Quarz Frequenz in Hz |
#endif |
// neue Hardware |
#define ROT_OFF {if(PlatinenVersion == 10) PORTB &=~0x01; else PORTB |= 0x01;} |
#define ROT_ON {if(PlatinenVersion == 10) PORTB |= 0x01; else PORTB &=~0x01;} |
#define ROT_FLASH PORTB ^= 0x01 |
#define GRN_OFF PORTB &=~0x02 |
#define GRN_ON PORTB |= 0x02 |
#define GRN_FLASH PORTB ^= 0x02 |
//Salvo 9.12.2007 Umschaltsignal fuer Bluetooth bzw. GPS Daten auf PC7 |
#define RX_SWTCH_ON PORTC |= 0x40 |
#define RX_SWTCH_OFF PORTC &= ~0x40 |
//Salvo End |
#define F_CPU SYSCLK |
//#ifndef F_CPU |
//#error ################## F_CPU nicht definiert oder ungültig ############# |
//#endif |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#define EEPROM_ADR_VALID 1 |
#define EEPROM_ADR_ACTIVE_SET 2 |
#define EEPROM_ADR_LAST_OFFSET 3 |
#define EEPROM_ADR_ACC_NICK 4 |
#define EEPROM_ADR_ACC_ROLL 6 |
#define EEPROM_ADR_ACC_Z 8 |
#define EEPROM_ADR_PARAM_BEGIN 100 |
#define CFG_HOEHENREGELUNG 0x01 |
#define CFG_HOEHEN_SCHALTER 0x02 |
#define CFG_HEADING_HOLD 0x04 |
#define CFG_KOMPASS_AKTIV 0x08 |
#define CFG_KOMPASS_FIX 0x10 |
#define CFG_GPS_AKTIV 0x20 |
#define CFG_ACHSENKOPPLUNG_AKTIV 0x40 |
#define CFG_DREHRATEN_BEGRENZER 0x80 |
#define CFG_LOOP_OBEN 0x01 |
#define CFG_LOOP_UNTEN 0x02 |
#define CFG_LOOP_LINKS 0x04 |
#define CFG_LOOP_RECHTS 0x08 |
//#define SYSCLK |
//extern unsigned long SYSCLK; |
extern volatile int i_Nick[20],i_Roll[20],DiffNick,DiffRoll; |
extern volatile unsigned char SenderOkay; |
extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
extern unsigned char PlatinenVersion; |
void ReadParameterSet (unsigned char number, unsigned char *buffer, unsigned char length); |
void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length); |
extern unsigned char GetActiveParamSetNumber(void); |
extern unsigned char EEPromArray[]; |
#include <stdlib.h> |
#include <string.h> |
#include <avr/io.h> |
#include <avr/pgmspace.h> |
#include <avr/interrupt.h> |
#include <avr/eeprom.h> |
#include <avr/boot.h> |
#include <avr/wdt.h> |
#include "old_macros.h" |
#include "_Settings.h" |
#include "printf_P.h" |
#include "timer0.h" |
#include "uart.h" |
#include "analog.h" |
#include "twimaster.h" |
#include "menu.h" |
#include "rc.h" |
#include "fc.h" |
#include "gps.h" |
#include "spi.h" |
#ifndef EEMEM |
#define EEMEM __attribute__ ((section (".eeprom"))) |
#endif |
#define DEBUG_DISPLAY_INTERVALL 123 // in ms |
#define DELAY_US(x) ((unsigned int)( (x) * 1e-6 * F_CPU )) |
#endif //_MAIN_H |
/branches/salvo_gps/Basis_v0067g/trunk/makefile |
---|
0,0 → 1,411 |
#-------------------------------------------------------------------- |
# MCU name |
MCU = atmega644 |
F_CPU = 20000000 |
#------------------------------------------------------------------- |
HAUPT_VERSION = 0 |
NEBEN_VERSION = 01 |
VERSION_INDEX = 0 |
VERSION_KOMPATIBEL = 7 # PC-Kompatibilität |
#------------------------------------------------------------------- |
ifeq ($(MCU), atmega32) |
# FUSE_SETTINGS= -u -U lfuse:w:0xff:m -U hfuse:w:0xcf:m |
HEX_NAME = MEGA32 |
endif |
ifeq ($(MCU), atmega644) |
FUSE_SETTINGS = -u -U lfuse:w:0xff:m -U hfuse:w:0xdf:m |
#FUSE_SETTINGS = -U lfuse:w:0xff:m -U hfuse:w:0xdf:m |
# -u bei neuen Controllern wieder einspielen |
HEX_NAME = MEGA644 |
endif |
ifeq ($(F_CPU), 16000000) |
QUARZ = 16MHZ |
endif |
ifeq ($(F_CPU), 20000000) |
QUARZ = 20MHZ |
endif |
# Output format. (can be srec, ihex, binary) |
FORMAT = ihex |
# Target file name (without extension). |
ifeq ($(VERSION_INDEX), 0) |
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(HAUPT_VERSION)_$(NEBEN_VERSION)a |
endif |
ifeq ($(VERSION_INDEX), 1) |
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(HAUPT_VERSION)_$(NEBEN_VERSION)b |
endif |
ifeq ($(VERSION_INDEX), 2) |
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(HAUPT_VERSION)_$(NEBEN_VERSION)c |
endif |
ifeq ($(VERSION_INDEX), 3) |
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(HAUPT_VERSION)_$(NEBEN_VERSION)d |
endif |
ifeq ($(VERSION_INDEX), 4) |
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(HAUPT_VERSION)_$(NEBEN_VERSION)e |
endif |
ifeq ($(VERSION_INDEX), 5) |
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(HAUPT_VERSION)_$(NEBEN_VERSION)f |
endif |
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization. |
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) |
OPT = s |
########################################################################################################## |
# List C source files here. (C dependencies are automatically generated.) |
SRC = main.c uart.c printf_P.c timer0.c analog.c menu.c |
SRC += twimaster.c rc.c fc.c GPS.c math.c |
#spi.c |
########################################################################################################## |
# List Assembler source files here. |
# Make them always end in a capital .S. Files ending in a lowercase .s |
# will not be considered source files but generated files (assembler |
# output from the compiler), and will be deleted upon "make clean"! |
# Even though the DOS/Win* filesystem matches both .s and .S the same, |
# it will preserve the spelling of the filenames, and gcc itself does |
# care about how the name is spelled on its command-line. |
ASRC = |
# List any extra directories to look for include files here. |
# Each directory must be seperated by a space. |
EXTRAINCDIRS = |
# Optional compiler flags. |
# -g: generate debugging information (for GDB, or for COFF conversion) |
# -O*: optimization level |
# -f...: tuning, see gcc manual and avr-libc documentation |
# -Wall...: warning level |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create assembler listing |
CFLAGS = -O$(OPT) \ |
-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \ |
-Wall -Wstrict-prototypes \ |
-Wa,-adhlns=$(<:.c=.lst) \ |
$(patsubst %,-I%,$(EXTRAINCDIRS)) |
# Set a "language standard" compiler flag. |
# Unremark just one line below to set the language standard to use. |
# gnu99 = C99 + GNU extensions. See GCC manual for more information. |
#CFLAGS += -std=c89 |
#CFLAGS += -std=gnu89 |
#CFLAGS += -std=c99 |
CFLAGS += -std=gnu99 |
CFLAGS += -DVERSION_HAUPTVERSION=$(HAUPT_VERSION) -DVERSION_NEBENVERSION=$(NEBEN_VERSION) -DVERSION_KOMPATIBEL=$(VERSION_KOMPATIBEL) -DVERSION_INDEX=$(VERSION_INDEX) |
# Optional assembler flags. |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create listing |
# -gstabs: have the assembler create line number information; note that |
# for use in COFF files, additional information about filenames |
# and function names needs to be present in the assembler source |
# files -- see avr-libc docs [FIXME: not yet described there] |
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
# Optional linker flags. |
# -Wl,...: tell GCC to pass this to linker. |
# -Map: create map file |
# --cref: add cross reference to map file |
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref |
# Additional libraries |
# Minimalistic printf version |
#LDFLAGS += -Wl,-u,vfprintf -lprintf_min |
# Floating point printf version (requires -lm below) |
#LDFLAGS += -Wl,-u,vfprintf -lprintf_flt |
# -lm = math library |
LDFLAGS += -lm |
##LDFLAGS += -T./linkerfile/avr5.x |
# Programming support using avrdude. Settings and variables. |
# Programming hardware: alf avr910 avrisp bascom bsd |
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 |
# |
# Type: avrdude -c ? |
# to get a full listing. |
# |
#AVRDUDE_PROGRAMMER = stk200 |
AVRDUDE_PROGRAMMER = dt006 |
#AVRDUDE_PROGRAMMER = ponyser |
#falls Ponyser ausgewählt wird, muss sich unsere avrdude-Configdatei im Bin-Verzeichnis des Compilers befinden |
#AVRDUDE_PORT = com1 # programmer connected to serial device |
AVRDUDE_PORT = lpt1 # programmer connected to parallel port |
#AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex |
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex $(FUSE_SETTINGS) |
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep |
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) |
# Uncomment the following if you want avrdude's erase cycle counter. |
# Note that this counter needs to be initialized first using -Yn, |
# see avrdude manual. |
#AVRDUDE_ERASE += -y |
# Uncomment the following if you do /not/ wish a verification to be |
# performed after programming the device. |
AVRDUDE_FLAGS += -V |
# Increase verbosity level. Please use this when submitting bug |
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> |
# to submit bug reports. |
#AVRDUDE_FLAGS += -v -v |
# --------------------------------------------------------------------------- |
# Define directories, if needed. |
DIRAVR = c:/winavr |
DIRAVRBIN = $(DIRAVR)/bin |
DIRAVRUTILS = $(DIRAVR)/utils/bin |
DIRINC = . |
DIRLIB = $(DIRAVR)/avr/lib |
# Define programs and commands. |
SHELL = sh |
CC = avr-gcc |
OBJCOPY = avr-objcopy |
OBJDUMP = avr-objdump |
SIZE = avr-size |
# Programming support using avrdude. |
AVRDUDE = avrdude |
REMOVE = rm -f |
COPY = cp |
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex |
ELFSIZE = $(SIZE) -A $(TARGET).elf |
# Define Messages |
# English |
MSG_ERRORS_NONE = Errors: none |
MSG_BEGIN = -------- begin -------- |
MSG_END = -------- end -------- |
MSG_SIZE_BEFORE = Size before: |
MSG_SIZE_AFTER = Size after: |
MSG_COFF = Converting to AVR COFF: |
MSG_EXTENDED_COFF = Converting to AVR Extended COFF: |
MSG_FLASH = Creating load file for Flash: |
MSG_EEPROM = Creating load file for EEPROM: |
MSG_EXTENDED_LISTING = Creating Extended Listing: |
MSG_SYMBOL_TABLE = Creating Symbol Table: |
MSG_LINKING = Linking: |
MSG_COMPILING = Compiling: |
MSG_ASSEMBLING = Assembling: |
MSG_CLEANING = Cleaning project: |
# Define all object files. |
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) |
# Define all listing files. |
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst) |
# Combine all necessary flags and optional flags. |
# Add target processor to flags. |
#ALL_CFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -I. $(CFLAGS) |
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) |
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) |
# Default target. |
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \ |
$(TARGET).lss $(TARGET).sym sizeafter finished end |
# Eye candy. |
# AVR Studio 3.x does not check make's exit code but relies on |
# the following magic strings to be generated by the compile job. |
begin: |
@echo |
@echo $(MSG_BEGIN) |
finished: |
@echo $(MSG_ERRORS_NONE) |
end: |
@echo $(MSG_END) |
@echo |
# Display size of file. |
sizebefore: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi |
sizeafter: |
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi |
# Display compiler version information. |
gccversion : |
@$(CC) --version |
# Convert ELF to COFF for use in debugging / simulating in |
# AVR Studio or VMLAB. |
COFFCONVERT=$(OBJCOPY) --debugging \ |
--change-section-address .data-0x800000 \ |
--change-section-address .bss-0x800000 \ |
--change-section-address .noinit-0x800000 \ |
--change-section-address .eeprom-0x810000 |
coff: $(TARGET).elf |
@echo |
@echo $(MSG_COFF) $(TARGET).cof |
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof |
extcoff: $(TARGET).elf |
@echo |
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof |
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof |
# Program the device. |
program: $(TARGET).hex $(TARGET).eep |
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) |
# Create final output files (.hex, .eep) from ELF output file. |
%.hex: %.elf |
@echo |
@echo $(MSG_FLASH) $@ |
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ |
%.eep: %.elf |
@echo |
@echo $(MSG_EEPROM) $@ |
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ |
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@ |
# Create extended listing file from ELF output file. |
%.lss: %.elf |
@echo |
@echo $(MSG_EXTENDED_LISTING) $@ |
$(OBJDUMP) -h -S $< > $@ |
# Create a symbol table from ELF output file. |
%.sym: %.elf |
@echo |
@echo $(MSG_SYMBOL_TABLE) $@ |
avr-nm -n $< > $@ |
# Link: create ELF output file from object files. |
.SECONDARY : $(TARGET).elf |
.PRECIOUS : $(OBJ) |
%.elf: $(OBJ) |
@echo |
@echo $(MSG_LINKING) $@ |
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS) |
# Compile: create object files from C source files. |
%.o : %.c |
@echo |
@echo $(MSG_COMPILING) $< |
$(CC) -c $(ALL_CFLAGS) $< -o $@ |
# Compile: create assembler files from C source files. |
%.s : %.c |
$(CC) -S $(ALL_CFLAGS) $< -o $@ |
# Assemble: create object files from assembler source files. |
%.o : %.S |
@echo |
@echo $(MSG_ASSEMBLING) $< |
$(CC) -c $(ALL_ASFLAGS) $< -o $@ |
# Target: clean project. |
clean: begin clean_list finished end |
clean_list : |
@echo |
@echo $(MSG_CLEANING) |
# $(REMOVE) $(TARGET).hex |
$(REMOVE) $(TARGET).eep |
$(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).cof |
$(REMOVE) $(TARGET).elf |
$(REMOVE) $(TARGET).map |
$(REMOVE) $(TARGET).obj |
$(REMOVE) $(TARGET).a90 |
$(REMOVE) $(TARGET).sym |
$(REMOVE) $(TARGET).lnk |
$(REMOVE) $(TARGET).lss |
$(REMOVE) $(OBJ) |
$(REMOVE) $(LST) |
$(REMOVE) $(SRC:.c=.s) |
$(REMOVE) $(SRC:.c=.d) |
# Automatically generate C source code dependencies. |
# (Code originally taken from the GNU make user manual and modified |
# (See README.txt Credits).) |
# |
# Note that this will work with sh (bash) and sed that is shipped with WinAVR |
# (see the SHELL variable defined above). |
# This may not work with other shells or other seds. |
# |
%.d: %.c |
set -e; $(CC) -MM $(ALL_CFLAGS) $< \ |
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \ |
[ -s $@ ] || rm -f $@ |
# Remove the '-' if you want to see the dependency files generated. |
-include $(SRC:.c=.d) |
# Listing of phony targets. |
.PHONY : all begin finish end sizebefore sizeafter gccversion coff extcoff \ |
clean clean_list program |
/branches/salvo_gps/Basis_v0067g/trunk/math.c |
---|
0,0 → 1,127 |
/* |
This program (files math.c and math.h) is free software; you can redistribute it and/or modify |
it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; |
either version 3 of the License, or (at your option) any later version. |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License and GNU Lesser General Public License for more details. |
You should have received a copy of GNU General Public License (License_GPL.txt) and |
GNU Lesser General Public License (License_LGPL.txt) along with this program. |
If not, see <http://www.gnu.org/licenses/>. |
Please note: All the other files for the project "Mikrokopter" by H.Buss are under the license (license_buss.txt) published by www.mikrokopter.de |
*/ |
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
Peter Muehlenbrock |
Winkelfunktionen sin, cos und arctan in |
brute-force Art: Sehr Schnell, nicht sonderlich genau, aber ausreichend |
get_dist Funktion fuer Entfernungsermittlung |
Stand 12.10.2007 |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
*/ |
#include "main.h" |
#include "math.h" |
// arctan Funktion: Eingabewert x,y Rueckgabe =arctan(x,y) in grad |
int arctan_i( signed int x, signed int y) |
{ |
short int change_xy = 0; |
signed int i; |
long signed int wert; |
int return_value; |
if ((abs(x)) > (abs(y))) // x,y Werte vertauschen damit arctan <45 grad bleibt |
{ |
change_xy = 1; |
i = x; |
x = y; |
y = i; |
} |
// Quadranten ermitteln |
// Wert durch lineare Interpolation ermitteln |
if ((y == 0) && (x == 0)) wert =1; // Division durch 0 nicht erlaubt |
else wert= abs(((long)x*1000)/((long)y)); |
if (wert <=268) //0...0.0,268 entsprechend 0..15 Grad |
{ |
return_value = (signed int)((wert*100)/(268-0)*(15-0)/100) +0; |
} |
else if (wert <=578) //0,268...0.0,568 entsprechend 15..30 Grad |
{ |
return_value = (signed int)((((wert-268)*100)/(578-268)*(30-15))/100) +15; |
} |
else //0,568...1 entsprechend 30..45 Grad |
{ |
return_value = (signed int)((((wert-578)*50)/(1000-578)*(45-30))/50) +30; |
} |
if (change_xy == 0) return_value = 90-return_value; //Quadrant 45..90 Grad |
if ((x >= 0) && (y <0)) return_value = - return_value; |
else if ((x < 0) && (y >= 0)) return_value = - return_value; |
return return_value; |
} |
// cosinus Funktion: Eingabewert Winkel in Grad, Rueckgabe =cos(winkel)*1000 |
signed int cos_i(signed int winkel) |
{ |
winkel = sin_i(90-winkel); |
return winkel; |
} |
const unsigned int pgm_sinus[91] PROGMEM = {0,17,35,52,70,87,105,122,139,156,174,191,208,225,242,259,276,292,309,326,342,358,375,391,407,423,438,454,469,485,500,515,530,545,559,574,588,602,616,629,643,656,669,682,695,707,719,731,743,755,766,777,788,799,809,819,829,839,848,857,866,875,883,891,899,906,914,921,927,934,940,946,951,956,961,966,970,974,978,982,985,988,990,993,995,996,998,999,999,1000,1000}; |
//von Nick666, Stand 28.9.2007 |
// sinus Funktion: Eingabewert Winkel in Grad, Rueckgabe =sin(winkel)*1000 |
signed int sin_i(signed int winkel) |
{ |
short int m,n; |
if (abs(winkel) >=360) winkel = winkel % 360; |
if (winkel < 0) |
{ |
m = -1; |
winkel = abs(winkel); |
} |
else m = +1; |
n =1; |
// Quadranten auswerten |
if ((winkel > 90 ) && (winkel <= 180)) winkel = 180 - winkel; |
else if ((winkel > 180 ) && (winkel <= 270)) |
{ |
winkel = winkel -180; |
n = -1; |
} |
else if ((winkel > 270) && (winkel <= 360)) |
{ |
winkel = 360 - winkel; |
n = -1; |
} |
// else //0 - 90 Grad |
winkel = pgm_read_word(&pgm_sinus[winkel]); |
return (winkel*m*n); |
} |
// Aus x,y und Winkel Distanz ermitteln |
long get_dist(signed int x, signed int y, signed int phi) |
{ |
long dist; |
if (abs(x) > abs(y) ) |
{ |
dist = (long) x; //Groesseren Wert wegen besserer Genauigkeit nehmen |
dist = abs((dist *1000) / (long) sin_i(phi)); |
} |
else |
{ |
dist = (long) y; |
dist = abs((dist *1000) / (long) cos_i(phi)); |
} |
return dist; |
} |
/branches/salvo_gps/Basis_v0067g/trunk/math.h |
---|
0,0 → 1,11 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Peter Muehlenbrock |
// Definitionen fuer Modul math |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
extern signed int sin_i(signed int winkel); |
extern signed int cos_i(signed int winkel); |
extern signed int arctan_i(signed int x, signed int y); |
extern long get_dist(signed int x, signed int y, signed int phi); |
/branches/salvo_gps/Basis_v0067g/trunk/menu.c |
---|
0,0 → 1,127 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
unsigned int TestInt = 0; |
#define ARRAYGROESSE 10 |
unsigned char Array[ARRAYGROESSE] = {1,2,3,4,5,6,7,8,9,10}; |
char DisplayBuff[80] = "Hallo Welt"; |
unsigned char DispPtr = 0; |
unsigned char RemoteTasten = 0; |
#define KEY1 0x01 |
#define KEY2 0x02 |
#define KEY3 0x04 |
#define KEY4 0x08 |
#define KEY5 0x10 |
void LcdClear(void) |
{ |
unsigned char i; |
for(i=0;i<80;i++) DisplayBuff[i] = ' '; |
} |
void Menu(void) |
{ |
static unsigned char MaxMenue = 10,MenuePunkt=0; |
if(RemoteTasten & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue; LcdClear(); RemotePollDisplayLine = -1; } |
if(RemoteTasten & KEY2) { MenuePunkt++; LcdClear(); RemotePollDisplayLine = -1;} |
if((RemoteTasten & KEY1) && (RemoteTasten & KEY2)) MenuePunkt = 0; |
LCD_printfxy(17,0,"[%i]",MenuePunkt); |
switch(MenuePunkt) |
{ |
case 0: |
LCD_printfxy(0,0,"++ MikroKopter ++"); |
LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c",PlatinenVersion/10,PlatinenVersion%10,VERSION_HAUPTVERSION, VERSION_NEBENVERSION,VERSION_INDEX+'a'); |
LCD_printfxy(0,2,"Setting: %d ",GetActiveParamSetNumber()); |
LCD_printfxy(0,3,"(c) Holger Buss"); |
// if(RemoteTasten & KEY3) TestInt--; |
// if(RemoteTasten & KEY4) TestInt++; |
break; |
case 1: |
if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG) |
{ |
LCD_printfxy(0,0,"Hoehe: %5i",HoehenWert); |
LCD_printfxy(0,1,"SollHoehe: %5i",SollHoehe); |
LCD_printfxy(0,2,"Luftdruck: %5i",MessLuftdruck); |
LCD_printfxy(0,3,"Off : %5i",DruckOffsetSetting); |
} |
else |
{ |
LCD_printfxy(0,1,"Keine "); |
LCD_printfxy(0,2,"Höhenregelung"); |
} |
break; |
case 2: |
LCD_printfxy(0,0,"akt. Lage"); |
LCD_printfxy(0,1,"Nick: %5i",IntegralNick/1024); |
LCD_printfxy(0,2,"Roll: %5i",IntegralRoll/1024); |
LCD_printfxy(0,3,"Kompass: %5i",KompassValue); |
break; |
case 3: |
LCD_printfxy(0,0,"K1:%4i K2:%4i ",PPM_in[1],PPM_in[2]); |
LCD_printfxy(0,1,"K3:%4i K4:%4i ",PPM_in[3],PPM_in[4]); |
LCD_printfxy(0,2,"K5:%4i K6:%4i ",PPM_in[5],PPM_in[6]); |
LCD_printfxy(0,3,"K7:%4i K8:%4i ",PPM_in[7],PPM_in[8]); |
break; |
case 4: |
LCD_printfxy(0,0,"Ni:%4i Ro:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_NICK]],PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]); |
LCD_printfxy(0,1,"Gs:%4i Gi:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_GAS]],PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]); |
LCD_printfxy(0,2,"P1:%4i P2:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]],PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]]); |
LCD_printfxy(0,3,"P3:%4i P4:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]],PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]]); |
break; |
case 5: |
LCD_printfxy(0,0,"Gyro - Sensor"); |
if(PlatinenVersion == 10) |
{ |
LCD_printfxy(0,1,"Nick %4i (%3i)",AdWertNick - AdNeutralNick, AdNeutralNick); |
LCD_printfxy(0,2,"Roll %4i (%3i)",AdWertRoll - AdNeutralRoll, AdNeutralRoll); |
LCD_printfxy(0,3,"Gier %4i (%3i)",MesswertGier, AdNeutralGier); |
} |
else |
{ |
LCD_printfxy(0,1,"Nick %4i (%3i)",AdWertNick - AdNeutralNick, AdNeutralNick/2); |
LCD_printfxy(0,2,"Roll %4i (%3i)",AdWertRoll - AdNeutralRoll, AdNeutralRoll/2); |
LCD_printfxy(0,3,"Gier %4i (%3i)",MesswertGier, AdNeutralGier/2); |
} |
break; |
case 6: |
LCD_printfxy(0,0,"ACC - Sensor"); |
LCD_printfxy(0,1,"Nick %4i (%3i)",AdWertAccNick,NeutralAccX); |
LCD_printfxy(0,2,"Roll %4i (%3i)",AdWertAccRoll,NeutralAccY); |
LCD_printfxy(0,3,"Hoch %4i (%3i)",Mittelwert_AccHoch/*accumulate_AccHoch / messanzahl_AccHoch*/,(int)NeutralAccZ); |
break; |
case 7: |
LCD_printfxy(0,1,"Spannung: %5i",UBat); |
LCD_printfxy(0,2,"Empf.Pegel:%5i",SenderOkay); |
break; |
case 8: |
LCD_printfxy(0,0,"Kompass "); |
LCD_printfxy(0,1,"Richtung: %5i",KompassRichtung); |
LCD_printfxy(0,2,"Messwert: %5i",KompassValue); |
LCD_printfxy(0,3,"Start: %5i",KompassStartwert); |
break; |
case 9: |
LCD_printfxy(0,0,"Poti1: %3i",Poti1); |
LCD_printfxy(0,1,"Poti2: %3i",Poti2); |
LCD_printfxy(0,2,"Poti3: %3i",Poti3); |
LCD_printfxy(0,3,"Poti4: %3i",Poti4); |
break; |
case 10: |
LCD_printfxy(0,0,"Servo " ); |
LCD_printfxy(0,1,"Setpoint %3i",Parameter_ServoNickControl); |
LCD_printfxy(0,2,"Stellung: %3i",ServoValue); |
LCD_printfxy(0,3,"Range:%3i-%3i",EE_Parameter.ServoNickMin,EE_Parameter.ServoNickMax); |
break; |
default: MaxMenue = MenuePunkt - 1; |
MenuePunkt = 0; |
break; |
} |
RemoteTasten = 0; |
} |
/branches/salvo_gps/Basis_v0067g/trunk/menu.h |
---|
0,0 → 1,6 |
extern void Menu(void); |
extern void LcdClear(void); |
extern char DisplayBuff[80]; |
extern unsigned char DispPtr; |
extern unsigned char RemoteTasten; |
/branches/salvo_gps/Basis_v0067g/trunk/old_macros.h |
---|
0,0 → 1,47 |
/* |
For backwards compatibility only. |
Ingo Busker ingo@mikrocontroller.com |
*/ |
#ifndef cbi |
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) |
#endif |
#ifndef sbi |
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) |
#endif |
#ifndef inb |
#define inb(sfr) _SFR_BYTE(sfr) |
#endif |
#ifndef outb |
#define outb(sfr, val) (_SFR_BYTE(sfr) = (val)) |
#endif |
#ifndef inw |
#define inw(sfr) _SFR_WORD(sfr) |
#endif |
#ifndef outw |
#define outw(sfr, val) (_SFR_WORD(sfr) = (val)) |
#endif |
#ifndef outp |
#define outp(val, sfr) outb(sfr, val) |
#endif |
#ifndef inp |
#define inp(sfr) inb(sfr) |
#endif |
#ifndef BV |
#define BV(bit) _BV(bit) |
#endif |
#ifndef PRG_RDB |
#define PRG_RDB pgm_read_byte |
#endif |
/branches/salvo_gps/Basis_v0067g/trunk/printf_P.c |
---|
0,0 → 1,480 |
// Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist nicht von der Lizenz für den MikroKopter-Teil unterstellt |
/* |
Copyright (C) 1993 Free Software Foundation |
This file is part of the GNU IO Library. This library is free |
software; you can redistribute it and/or modify it under the |
terms of the GNU General Public License as published by the |
Free Software Foundation; either version 2, or (at your option) |
any later version. |
This library is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this library; see the file COPYING. If not, write to the Free |
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
As a special exception, if you link this library with files |
compiled with a GNU compiler to produce an executable, this does not cause |
the resulting executable to be covered by the GNU General Public License. |
This exception does not however invalidate any other reasons why |
the executable file might be covered by the GNU General Public License. */ |
/* |
* Copyright (c) 1990 Regents of the University of California. |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* 1. Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* 2. Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* 3. [rescinded 22 July 1999] |
* 4. Neither the name of the University nor the names of its contributors |
* may be used to endorse or promote products derived from this software |
* without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
* SUCH DAMAGE. |
*/ |
/****************************************************************************** |
This file is a patched version of printf called _printf_P |
It is made to work with avr-gcc for Atmel AVR MCUs. |
There are some differences from standard printf: |
1. There is no floating point support (with fp the code is about 8K!) |
2. Return type is void |
3. Format string must be in program memory (by using macro printf this is |
done automaticaly) |
4. %n is not implemented (just remove the comment around it if you need it) |
5. If LIGHTPRINTF is defined, the code is about 550 bytes smaller and the |
folowing specifiers are disabled : |
space # * . - + p s o O |
6. A function void uart_sendchar(char c) is used for output. The UART must |
be initialized before using printf. |
Alexander Popov |
sasho@vip.orbitel.bg |
******************************************************************************/ |
/* |
* Actual printf innards. |
* |
* This code is large and complicated... |
*/ |
#include <string.h> |
#ifdef __STDC__ |
#include <stdarg.h> |
#else |
#include <varargs.h> |
#endif |
#include "main.h" |
//#define LIGHTPRINTF |
char PrintZiel; |
char Putchar(char zeichen) |
{ |
if(PrintZiel == OUT_LCD) { DisplayBuff[DispPtr++] = zeichen; return(1);} |
else return(uart_putchar(zeichen)); |
} |
void PRINT(const char * ptr, unsigned int len) |
{ |
for(;len;len--) Putchar(*ptr++); |
} |
void PRINTP(const char * ptr, unsigned int len) |
{ |
for(;len;len--) Putchar(pgm_read_byte(ptr++)); |
} |
void PAD_SP(signed char howmany) |
{ |
for(;howmany>0;howmany--) Putchar(' '); |
} |
void PAD_0(signed char howmany) |
{ |
for(;howmany>0;howmany--) Putchar('0'); |
} |
#define BUF 40 |
/* |
* Macros for converting digits to letters and vice versa |
*/ |
#define to_digit(c) ((c) - '0') |
#define is_digit(c) ((c)<='9' && (c)>='0') |
#define to_char(n) ((n) + '0') |
/* |
* Flags used during conversion. |
*/ |
#define LONGINT 0x01 /* long integer */ |
#define LONGDBL 0x02 /* long double; unimplemented */ |
#define SHORTINT 0x04 /* short integer */ |
#define ALT 0x08 /* alternate form */ |
#define LADJUST 0x10 /* left adjustment */ |
#define ZEROPAD 0x20 /* zero (as opposed to blank) pad */ |
#define HEXPREFIX 0x40 /* add 0x or 0X prefix */ |
void _printf_P (char ziel,char const *fmt0, ...) /* Works with string from FLASH */ |
{ |
va_list ap; |
register const char *fmt; /* format string */ |
register char ch; /* character from fmt */ |
register int n; /* handy integer (short term usage) */ |
register char *cp; /* handy char pointer (short term usage) */ |
const char *fmark; /* for remembering a place in fmt */ |
register unsigned char flags; /* flags as above */ |
signed char width; /* width from format (%8d), or 0 */ |
signed char prec; /* precision from format (%.3d), or -1 */ |
char sign; /* sign prefix (' ', '+', '-', or \0) */ |
unsigned long _ulong=0; /* integer arguments %[diouxX] */ |
#define OCT 8 |
#define DEC 10 |
#define HEX 16 |
unsigned char base; /* base for [diouxX] conversion */ |
signed char dprec; /* a copy of prec if [diouxX], 0 otherwise */ |
signed char dpad; /* extra 0 padding needed for integers */ |
signed char fieldsz; /* field size expanded by sign, dpad etc */ |
/* The initialization of 'size' is to suppress a warning that |
'size' might be used unitialized. It seems gcc can't |
quite grok this spaghetti code ... */ |
signed char size = 0; /* size of converted field or string */ |
char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */ |
char ox[2]; /* space for 0x hex-prefix */ |
PrintZiel = ziel; // bestimmt, LCD oder UART |
va_start(ap, fmt0); |
fmt = fmt0; |
/* |
* Scan the format for conversions (`%' character). |
*/ |
for (;;) { |
for (fmark = fmt; (ch = pgm_read_byte(fmt)) != '\0' && ch != '%'; fmt++) |
/* void */; |
if ((n = fmt - fmark) != 0) { |
PRINTP(fmark, n); |
} |
if (ch == '\0') |
goto done; |
fmt++; /* skip over '%' */ |
flags = 0; |
dprec = 0; |
width = 0; |
prec = -1; |
sign = '\0'; |
rflag: ch = PRG_RDB(fmt++); |
reswitch: |
#ifdef LIGHTPRINTF |
if (ch=='o' || ch=='u' || (ch|0x20)=='x') { |
#else |
if (ch=='u' || (ch|0x20)=='x') { |
#endif |
if (flags&LONGINT) { |
_ulong=va_arg(ap, unsigned long); |
} else { |
register unsigned int _d; |
_d=va_arg(ap, unsigned int); |
_ulong = flags&SHORTINT ? (unsigned long)(unsigned short)_d : (unsigned long)_d; |
} |
} |
#ifndef LIGHTPRINTF |
if(ch==' ') { |
/* |
* ``If the space and + flags both appear, the space |
* flag will be ignored.'' |
* -- ANSI X3J11 |
*/ |
if (!sign) |
sign = ' '; |
goto rflag; |
} else if (ch=='#') { |
flags |= ALT; |
goto rflag; |
} else if (ch=='*'||ch=='-') { |
if (ch=='*') { |
/* |
* ``A negative field width argument is taken as a |
* - flag followed by a positive field width.'' |
* -- ANSI X3J11 |
* They don't exclude field widths read from args. |
*/ |
if ((width = va_arg(ap, int)) >= 0) |
goto rflag; |
width = -width; |
} |
flags |= LADJUST; |
flags &= ~ZEROPAD; /* '-' disables '0' */ |
goto rflag; |
} else if (ch=='+') { |
sign = '+'; |
goto rflag; |
} else if (ch=='.') { |
if ((ch = PRG_RDB(fmt++)) == '*') { |
n = va_arg(ap, int); |
prec = n < 0 ? -1 : n; |
goto rflag; |
} |
n = 0; |
while (is_digit(ch)) { |
n = n*10 + to_digit(ch); |
ch = PRG_RDB(fmt++); |
} |
prec = n < 0 ? -1 : n; |
goto reswitch; |
} else |
#endif /* LIGHTPRINTF */ |
if (ch=='0') { |
/* |
* ``Note that 0 is taken as a flag, not as the |
* beginning of a field width.'' |
* -- ANSI X3J11 |
*/ |
if (!(flags & LADJUST)) |
flags |= ZEROPAD; /* '-' disables '0' */ |
goto rflag; |
} else if (ch>='1' && ch<='9') { |
n = 0; |
do { |
n = 10 * n + to_digit(ch); |
ch = PRG_RDB(fmt++); |
} while (is_digit(ch)); |
width = n; |
goto reswitch; |
} else if (ch=='h') { |
flags |= SHORTINT; |
goto rflag; |
} else if (ch=='l') { |
flags |= LONGINT; |
goto rflag; |
} else if (ch=='c') { |
*(cp = buf) = va_arg(ap, int); |
size = 1; |
sign = '\0'; |
} else if (ch=='D'||ch=='d'||ch=='i') { |
if(ch=='D') |
flags |= LONGINT; |
if (flags&LONGINT) { |
_ulong=va_arg(ap, long); |
} else { |
register int _d; |
_d=va_arg(ap, int); |
_ulong = flags&SHORTINT ? (long)(short)_d : (long)_d; |
} |
if ((long)_ulong < 0) { |
_ulong = -_ulong; |
sign = '-'; |
} |
base = DEC; |
goto number; |
} else |
/* |
if (ch=='n') { |
if (flags & LONGINT) |
*va_arg(ap, long *) = ret; |
else if (flags & SHORTINT) |
*va_arg(ap, short *) = ret; |
else |
*va_arg(ap, int *) = ret; |
continue; // no output |
} else |
*/ |
#ifndef LIGHTPRINTF |
if (ch=='O'||ch=='o') { |
if (ch=='O') |
flags |= LONGINT; |
base = OCT; |
goto nosign; |
} else if (ch=='p') { |
/* |
* ``The argument shall be a pointer to void. The |
* value of the pointer is converted to a sequence |
* of printable characters, in an implementation- |
* defined manner.'' |
* -- ANSI X3J11 |
*/ |
/* NOSTRICT */ |
_ulong = (unsigned int)va_arg(ap, void *); |
base = HEX; |
flags |= HEXPREFIX; |
ch = 'x'; |
goto nosign; |
} else if (ch=='s') { // print a string from RAM |
if ((cp = va_arg(ap, char *)) == NULL) { |
cp=buf; |
cp[0] = '('; |
cp[1] = 'n'; |
cp[2] = 'u'; |
cp[4] = cp[3] = 'l'; |
cp[5] = ')'; |
cp[6] = '\0'; |
} |
if (prec >= 0) { |
/* |
* can't use strlen; can only look for the |
* NUL in the first `prec' characters, and |
* strlen() will go further. |
*/ |
char *p = (char*)memchr(cp, 0, prec); |
if (p != NULL) { |
size = p - cp; |
if (size > prec) |
size = prec; |
} else |
size = prec; |
} else |
size = strlen(cp); |
sign = '\0'; |
} else |
#endif /* LIGHTPRINTF */ |
if(ch=='U'||ch=='u') { |
if (ch=='U') |
flags |= LONGINT; |
base = DEC; |
goto nosign; |
} else if (ch=='X'||ch=='x') { |
base = HEX; |
/* leading 0x/X only if non-zero */ |
if (flags & ALT && _ulong != 0) |
flags |= HEXPREFIX; |
/* unsigned conversions */ |
nosign: sign = '\0'; |
/* |
* ``... diouXx conversions ... if a precision is |
* specified, the 0 flag will be ignored.'' |
* -- ANSI X3J11 |
*/ |
number: if ((dprec = prec) >= 0) |
flags &= ~ZEROPAD; |
/* |
* ``The result of converting a zero value with an |
* explicit precision of zero is no characters.'' |
* -- ANSI X3J11 |
*/ |
cp = buf + BUF; |
if (_ulong != 0 || prec != 0) { |
register unsigned char _d,notlastdigit; |
do { |
notlastdigit=(_ulong>=base); |
_d = _ulong % base; |
if (_d<10) { |
_d+='0'; |
} else { |
_d+='a'-10; |
if (ch=='X') _d&=~0x20; |
} |
*--cp=_d; |
_ulong /= base; |
} while (notlastdigit); |
#ifndef LIGHTPRINTF |
// handle octal leading 0 |
if (base==OCT && flags & ALT && *cp != '0') |
*--cp = '0'; |
#endif |
} |
size = buf + BUF - cp; |
} else { //default |
/* "%?" prints ?, unless ? is NUL */ |
if (ch == '\0') |
goto done; |
/* pretend it was %c with argument ch */ |
cp = buf; |
*cp = ch; |
size = 1; |
sign = '\0'; |
} |
/* |
* All reasonable formats wind up here. At this point, |
* `cp' points to a string which (if not flags&LADJUST) |
* should be padded out to `width' places. If |
* flags&ZEROPAD, it should first be prefixed by any |
* sign or other prefix; otherwise, it should be blank |
* padded before the prefix is emitted. After any |
* left-hand padding and prefixing, emit zeroes |
* required by a decimal [diouxX] precision, then print |
* the string proper, then emit zeroes required by any |
* leftover floating precision; finally, if LADJUST, |
* pad with blanks. |
*/ |
/* |
* compute actual size, so we know how much to pad. |
*/ |
fieldsz = size; |
dpad = dprec - size; |
if (dpad < 0) |
dpad = 0; |
if (sign) |
fieldsz++; |
else if (flags & HEXPREFIX) |
fieldsz += 2; |
fieldsz += dpad; |
/* right-adjusting blank padding */ |
if ((flags & (LADJUST|ZEROPAD)) == 0) |
PAD_SP(width - fieldsz); |
/* prefix */ |
if (sign) { |
PRINT(&sign, 1); |
} else if (flags & HEXPREFIX) { |
ox[0] = '0'; |
ox[1] = ch; |
PRINT(ox, 2); |
} |
/* right-adjusting zero padding */ |
if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD) |
PAD_0(width - fieldsz); |
/* leading zeroes from decimal precision */ |
PAD_0(dpad); |
/* the string or number proper */ |
PRINT(cp, size); |
/* left-adjusting padding (always blank) */ |
if (flags & LADJUST) |
PAD_SP(width - fieldsz); |
} |
done: |
va_end(ap); |
} |
/branches/salvo_gps/Basis_v0067g/trunk/printf_P.h |
---|
0,0 → 1,19 |
#ifndef _PRINTF_P_H_ |
#define _PRINTF_P_H_ |
#include <avr/pgmspace.h> |
#define OUT_V24 0 |
#define OUT_LCD 1 |
void _printf_P (char, char const *fmt0, ...); |
extern char PrintZiel; |
#define printf_P(format, args...) _printf_P(OUT_V24,format , ## args) |
#define printf(format, args...) _printf_P(OUT_V24,PSTR(format) , ## args) |
#define LCD_printfxy(x,y,format, args...) { DispPtr = y * 20 + x; _printf_P(OUT_LCD,PSTR(format) , ## args);} |
#define LCD_printf(format, args...) { _printf_P(OUT_LCD,PSTR(format) , ## args);} |
#endif |
/branches/salvo_gps/Basis_v0067g/trunk/rc.c |
---|
0,0 → 1,84 |
/*####################################################################################### |
Decodieren eines RC Summen Signals |
#######################################################################################*/ |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "rc.h" |
#include "main.h" |
volatile int PPM_in[11]; |
volatile int PPM_diff[11]; // das diffenzierte Stick-Signal |
volatile unsigned char NewPpmData = 1; |
//############################################################################ |
//zum decodieren des PPM-Signals wird Timer1 mit seiner Input |
//Capture Funktion benutzt: |
void rc_sum_init (void) |
//############################################################################ |
{ |
TCCR1B=(1<<CS11)|(1<<CS10)|(1<<ICES1)|(1<<ICNC1);//|(1 << WGM12); //timer1 prescale 64 |
// PWM |
//TCCR1A = (1 << COM1B1) | (1 << WGM11) | (1 << WGM10); |
//TCCR1B |= (1 << WGM12); |
//OCR1B = 55; |
TIMSK1 |= _BV(ICIE1); |
AdNeutralGier = 0; |
AdNeutralRoll = 0; |
AdNeutralNick = 0; |
return; |
} |
//############################################################################ |
//Diese Routine startet und inizialisiert den Timer für RC |
SIGNAL(SIG_INPUT_CAPTURE1) |
//############################################################################ |
{ |
static unsigned int AltICR=0; |
signed int signal = 0,tmp; |
static int index; |
signal = (unsigned int) ICR1 - AltICR; |
AltICR = ICR1; |
//Syncronisationspause? |
// if((signal > (int) Parameter_UserParam2 * 10) && (signal < 8000)) |
if((signal > 1100) && (signal < 8000)) |
{ |
if(index >= 4) NewPpmData = 0; // Null bedeutet: Neue Daten |
index = 1; |
} |
else |
{ |
if(index < 10) |
{ |
if((signal > 250) && (signal < 687)) |
{ |
signal -= 466; |
// Stabiles Signal |
if(abs(signal - PPM_in[index]) < 6) { if(SenderOkay < 200) SenderOkay += 10;} |
tmp = (3 * (PPM_in[index]) + signal) / 4; |
// if(tmp > signal+1) tmp--; else |
// if(tmp < signal-1) tmp++; |
PPM_diff[index] = tmp - PPM_in[index]; |
PPM_in[index] = tmp; |
} |
index++; |
if(index == 5) PORTD |= 0x20; else PORTD &= ~0x20; // Servosignal an J3 anlegen |
if(index == 6) PORTD |= 0x10; else PORTD &= ~0x10; // Servosignal an J4 anlegen |
if(index == 7) PORTD |= 0x08; else PORTD &= ~0x08; // Servosignal an J5 anlegen |
} |
} |
} |
/branches/salvo_gps/Basis_v0067g/trunk/rc.h |
---|
0,0 → 1,29 |
/*####################################################################################### |
Derkodieren eines RC Summen Signals |
#######################################################################################*/ |
#ifndef _RC_H |
#define _RC_H |
#if defined (__AVR_ATmega32__) |
#define TIMER_TEILER CK64 |
#define TIMER_RELOAD_VALUE 250 |
#endif |
#if defined (__AVR_ATmega644__) |
//#define TIMER_TEILER CK64 |
#define TIMER_RELOAD_VALUE 250 |
//#define TIMER_TEILER CK256 // bei 20MHz |
//#define TIMER_RELOAD_VALUE -78 // bei 20MHz |
#endif |
#define GAS PPM_in[2] |
extern void rc_sum_init (void); |
extern volatile int PPM_in[11]; |
extern volatile int PPM_diff[11]; // das diffenzierte Stick-Signal |
extern volatile unsigned char NewPpmData; |
#endif //_RC_H |
/branches/salvo_gps/Basis_v0067g/trunk/spi.c |
---|
0,0 → 1,86 |
// ######################## SPI - FlightCtrl ################### |
#include "main.h" |
struct str_ToNaviCtrl ToNaviCtrl; |
struct str_FromNaviCtrl FromNaviCtrl; |
unsigned char SPI_BufferIndex; |
volatile unsigned char SPI_Buffer[sizeof(FromNaviCtrl)]; |
unsigned char *Ptr_buffer = (unsigned char *) &ToNaviCtrl; |
//------------------------------------------------------ |
void SPI_MasterInit(void) |
{ |
DDR_SPI |= (1<<DD_MOSI)|(1<<DD_SCK); // Set MOSI and SCK output, all others input |
SLAVE_SELECT_DDR_PORT |= (1 << SPI_SLAVE_SELECT); |
SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1)|(0<<SPIE); // Enable SPI, Master, set clock rate fck/64 |
SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); |
} |
//------------------------------------------------------ |
void SPI_StartTransmitPacket(void) |
{ |
if ((SLAVE_SELECT_PORT & (1 << SPI_SLAVE_SELECT)) == 0) return; // transfer of prev. packet not completed |
SLAVE_SELECT_PORT &= ~(1 << SPI_SLAVE_SELECT); // SelectSlave |
UpdateSPI_Buffer(); // update buffer |
SPI_BufferIndex = 1; |
DebugOut.Analog[16]++; |
// -- Debug-Output --- |
cli(); |
DebugOut.Analog[20] = FromNaviCtrl.Comp; |
DebugOut.Analog[21] = FromNaviCtrl.GPS_Nick; |
DebugOut.Analog[22] = FromNaviCtrl.GPS_Roll; |
DebugOut.Analog[23] = FromNaviCtrl.CompassValue; |
sei(); |
//---- |
SPDR = ToNaviCtrl.Comp; // Start transmission |
} |
//------------------------------------------------------ |
//SIGNAL(SIG_SPI) |
void SPI_TransmitByte(void) |
{ |
if (!(SPSR & (1 << SPIF))) return; |
if (SPI_BufferIndex < sizeof(FromNaviCtrl)) |
{ SPI_Buffer[SPI_BufferIndex]= SPDR; // get data |
//if(SPDR!= 0x00) DebugOut.Analog[19]++; ; |
} |
if (SPI_BufferIndex < sizeof(ToNaviCtrl)) |
{ SPDR = Ptr_buffer[SPI_BufferIndex]; |
} |
else |
{ |
unsigned char *ptr = (unsigned char *)&FromNaviCtrl; |
unsigned char i; |
SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); // DeselectSlave |
memcpy(ptr, (unsigned char *) SPI_Buffer, sizeof(SPI_Buffer)); |
} |
SPI_BufferIndex++; |
} |
//------------------------------------------------------ |
void UpdateSPI_Buffer(void) |
{ |
cli(); |
ToNaviCtrl.Comp = SPI_PROTOCOL_COMP; |
ToNaviCtrl.IntegralNick = (int) (IntegralNick >> 4); |
ToNaviCtrl.IntegralRoll = (int) (IntegralRoll >> 4); |
ToNaviCtrl.StickNick = (char) StickNick; |
ToNaviCtrl.StickRoll = (char) StickRoll; |
ToNaviCtrl.StickGier = (char) StickGier; |
sei(); |
} |
/branches/salvo_gps/Basis_v0067g/trunk/spi.h |
---|
0,0 → 1,46 |
// ######################## SPI - FlightCtrl ################### |
#ifndef _SPI_H |
#define _SPI_H |
#define SPI_PROTOCOL_COMP 1 |
//----------------------------------------- |
#define DDR_SPI DDRB |
#define DD_SS PB4 |
#define DD_SCK PB7 |
#define DD_MOSI PB5 |
#define DD_MISO PB6 |
#define SLAVE_SELECT_DDR_PORT DDRC |
#define SLAVE_SELECT_PORT PORTC |
#define SPI_SLAVE_SELECT PC5 |
struct str_ToNaviCtrl |
{ |
unsigned char Comp; |
int IntegralNick; |
int IntegralRoll; |
char StickNick,StickRoll,StickGier; |
}; |
struct str_FromNaviCtrl |
{ |
unsigned char Comp; |
int GPS_Nick; |
int GPS_Roll; |
int CompassValue; |
}; |
extern struct str_ToNaviCtrl ToNaviCtrl; |
extern struct str_FromNaviCtrl FromNaviCtrl; |
extern void SPI_MasterInit(void); |
extern void SPI_StartTransmitPacket(void); |
extern void UpdateSPI_Buffer(void); |
extern void SPI_TransmitByte(void); |
#endif |
/branches/salvo_gps/Basis_v0067g/trunk/timer0.c |
---|
0,0 → 1,191 |
#include "main.h" |
volatile unsigned int CountMilliseconds = 0; |
volatile static unsigned int tim_main; |
volatile unsigned char UpdateMotor = 0; |
volatile unsigned int cntKompass = 0; |
volatile unsigned int beeptime = 0; |
unsigned int BeepMuster = 0xffff; |
int ServoValue = 0; |
//Salvo 8.9.2007 |
volatile uint8_t Kompass_Neuer_Wert= 0; |
volatile unsigned int Kompass_Value_Old = 0; |
// Salvo End |
//Salvo 21.9.2007 |
short unsigned int Kompass_present= 0; //>0 bedeutet dass der Kompass vorhanden ist |
// Salvo End |
enum { |
STOP = 0, |
CK = 1, |
CK8 = 2, |
CK64 = 3, |
CK256 = 4, |
CK1024 = 5, |
T0_FALLING_EDGE = 6, |
T0_RISING_EDGE = 7 |
}; |
// Aenderungen von Peter Muehlenbrock ("Salvo") Stand 21.9.2007 |
/* |
Ersatzkompass abgeleitet aus Magnetkompass und Giergyro fuer nahezu neigungsubhaengige Kompassfunktion |
*/ |
SIGNAL (SIG_OVERFLOW0) // 8kHz |
{ |
static unsigned char cnt_1ms = 1,cnt = 0; |
unsigned char pieper_ein = 0; |
// TCNT0 -= 250;//TIMER_RELOAD_VALUE; |
if(!cnt--) |
{ |
if (Kompass_present > 0) Kompass_present--; //Runterzaehlen. Wenn 0 ist der Kompass nicht vorhanden |
cnt = 9; |
cnt_1ms++; |
cnt_1ms %= 2; |
if(!cnt_1ms) UpdateMotor = 1; |
CountMilliseconds++; |
} |
if(beeptime > 1) |
{ |
beeptime--; |
if(beeptime & BeepMuster) |
{ |
pieper_ein = 1; |
} |
else pieper_ein = 0; |
} |
else |
{ |
pieper_ein = 0; |
BeepMuster = 0xffff; |
} |
if(pieper_ein) |
{ |
if(PlatinenVersion == 10) PORTD |= (1<<2); // Speaker an PORTD.2 |
else PORTC |= (1<<7); // Speaker an PORTC.7 |
} |
else |
{ |
if(PlatinenVersion == 10) PORTD &= ~(1<<2); |
else PORTC &= ~(1<<7); |
} |
// if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV) |
{ |
if(PINC & 0x10) |
{ |
cntKompass++; |
} |
else |
{ |
if((cntKompass) && (cntKompass < 4000)) |
{ |
// Salvo Kompassoffset 30.8.2007 und 21.9.2007 *********** |
Kompass_present = 255; |
Kompass_Value_Old = KompassValue; |
KompassValue = cntKompass -KOMPASS_OFFSET; |
if (KompassValue < 0) |
{ |
KompassValue += 360; |
} |
if (KompassValue >= 360) |
{ |
KompassValue -= 360; |
} |
// Salvo End |
} |
// if(cntKompass < 10) cntKompass = 10; |
// KompassValue = (unsigned long)((unsigned long)(cntKompass-10)*720L + 1L) / 703L; |
KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
//Salvo 13.9.2007 Ok Erkennung des Magnetkompasses |
Kompass_Neuer_Wert = 1; |
// Salvo End |
cntKompass = 0; |
} |
} |
} |
void Timer_Init(void) |
{ |
tim_main = SetDelay(10); |
TCCR0B = CK8; |
TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM |
OCR0A = 0; |
OCR0B = 120; |
TCNT0 = (unsigned char)-TIMER_RELOAD_VALUE; // reload |
//OCR1 = 0x00; |
TCCR2A=(1<<COM2A1)|(1<<COM2A0)|3; |
TCCR2B=(0<<CS20)|(1<<CS21)|(1<<CS22); |
// TIMSK2 |= _BV(TOIE2); |
TIMSK2 |= _BV(OCIE2A); |
TIMSK0 |= _BV(TOIE0); |
OCR2A = 10; |
TCNT2 = 0; |
} |
// ----------------------------------------------------------------------- |
unsigned int SetDelay (unsigned int t) |
{ |
// TIMSK0 &= ~_BV(TOIE0); |
return(CountMilliseconds + t + 1); |
// TIMSK0 |= _BV(TOIE0); |
} |
// ----------------------------------------------------------------------- |
char CheckDelay(unsigned int t) |
{ |
// TIMSK0 &= ~_BV(TOIE0); |
return(((t - CountMilliseconds) & 0x8000) >> 9); |
// TIMSK0 |= _BV(TOIE0); |
} |
// ----------------------------------------------------------------------- |
void Delay_ms(unsigned int w) |
{ |
unsigned int akt; |
akt = SetDelay(w); |
while (!CheckDelay(akt)); |
} |
void Delay_ms_Mess(unsigned int w) |
{ |
unsigned int akt; |
akt = SetDelay(w); |
while (!CheckDelay(akt)) ANALOG_ON; |
} |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Servo ansteuern |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
SIGNAL(SIG_OUTPUT_COMPARE2A) |
{ |
static unsigned char timer = 10; |
if(!timer--) |
{ |
TCCR2A=(1<<COM2A1)|(0<<COM2A0)|3; |
ServoValue = Parameter_ServoNickControl; |
if(EE_Parameter.ServoNickCompInvert & 0x01) ServoValue += ((long) EE_Parameter.ServoNickComp * (IntegralNick / 128)) / 512; |
else ServoValue -= ((long) EE_Parameter.ServoNickComp * (IntegralNick / 128)) / 512; |
if(ServoValue < EE_Parameter.ServoNickMin) ServoValue = EE_Parameter.ServoNickMin; |
else if(ServoValue > EE_Parameter.ServoNickMax) ServoValue = EE_Parameter.ServoNickMax; |
OCR2A = ServoValue;// + 75; |
timer = EE_Parameter.ServoNickRefresh; |
} |
else |
{ |
TCCR2A =3; |
PORTD&=~0x80; |
} |
} |
/branches/salvo_gps/Basis_v0067g/trunk/timer0.h |
---|
0,0 → 1,26 |
#define TIMER_TEILER CK8 |
#define TIMER_RELOAD_VALUE 250 |
// Salvo Kompassoffset 31.8.2007 *********** |
#define KOMPASS_OFFSET 135 // Winkel zwischen Nordachse Kopter und Nordachse Kompass |
// Salvo End |
void Timer_Init(void); |
void Delay_ms(unsigned int); |
void Delay_ms_Mess(unsigned int); |
unsigned int SetDelay (unsigned int t); |
char CheckDelay (unsigned int t); |
extern volatile unsigned int CountMilliseconds; |
extern volatile unsigned char UpdateMotor; |
extern volatile unsigned int beeptime; |
extern volatile unsigned int cntKompass; |
extern int ServoValue; |
extern unsigned int BeepMuster; |
//Salvo 21.9.2007 |
extern volatile uint8_t Kompass_Neuer_Wert; |
extern volatile unsigned int Kompass_Value_Old; |
extern unsigned short int Kompass_present; |
// Salvo End |
/branches/salvo_gps/Basis_v0067g/trunk/twimaster.c |
---|
0,0 → 1,152 |
/*############################################################################ |
############################################################################*/ |
#include "main.h" |
unsigned char twi_state = 0; |
unsigned char motor = 0; |
unsigned char motorread = 0; |
unsigned char motor_rx[8]; |
//############################################################################ |
//Initzialisieren der I2C (TWI) Schnittstelle |
void i2c_init(void) |
//############################################################################ |
{ |
TWSR = 0; |
TWBR = ((SYSCLK/SCL_CLOCK)-16)/2; |
} |
//############################################################################ |
//Start I2C |
char i2c_start(void) |
//############################################################################ |
{ |
TWCR = (1<<TWSTA) | (1<<TWEN) | (1<<TWINT) | (1<<TWIE); |
return(0); |
} |
//############################################################################ |
//Start I2C |
void i2c_stop(void) |
//############################################################################ |
{ |
TWCR = (1<<TWEN) | (1<<TWSTO) | (1<<TWINT); |
} |
void i2c_reset(void) |
//############################################################################ |
{ |
i2c_stop(); |
twi_state = 0; |
motor = TWDR; |
motor = 0; |
TWCR = 0x80; |
TWAMR = 0; |
TWAR = 0; |
TWDR = 0; |
TWSR = 0; |
TWBR = 0; |
i2c_init(); |
i2c_start(); |
i2c_write_byte(0); |
} |
//############################################################################ |
//Start I2C |
char i2c_write_byte(char byte) |
//############################################################################ |
{ |
TWSR = 0x00; |
TWDR = byte; |
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE); |
return(0); |
} |
//############################################################################ |
//Start I2C |
SIGNAL (TWI_vect) |
//############################################################################ |
{ |
switch (twi_state++) |
{ |
case 0: |
i2c_write_byte(0x52+(motor*2)); |
break; |
case 1: |
switch(motor++) |
{ |
case 0: |
i2c_write_byte(Motor_Vorne); |
break; |
case 1: |
i2c_write_byte(Motor_Hinten); |
break; |
case 2: |
i2c_write_byte(Motor_Rechts); |
break; |
case 3: |
i2c_write_byte(Motor_Links); |
break; |
} |
break; |
case 2: |
i2c_stop(); |
if (motor<4) twi_state = 0; |
else motor = 0; |
i2c_start(); |
break; |
//Liest Daten von Motor |
case 3: |
i2c_write_byte(0x53+(motorread*2)); |
break; |
case 4: |
switch(motorread) |
{ |
case 0: |
i2c_write_byte(Motor_Vorne); |
break; |
case 1: |
i2c_write_byte(Motor_Hinten); |
break; |
case 2: |
i2c_write_byte(Motor_Rechts); |
break; |
case 3: |
i2c_write_byte(Motor_Links); |
break; |
} |
break; |
case 5: //1 Byte vom Motor lesen |
motor_rx[motorread] = TWDR; |
case 6: |
switch(motorread) |
{ |
case 0: |
i2c_write_byte(Motor_Vorne); |
break; |
case 1: |
i2c_write_byte(Motor_Hinten); |
break; |
case 2: |
i2c_write_byte(Motor_Rechts); |
break; |
case 3: |
i2c_write_byte(Motor_Links); |
break; |
} |
break; |
case 7: //2 Byte vom Motor lesen |
motor_rx[motorread+4] = TWDR; |
motorread++; |
if (motorread>3) motorread=0; |
i2c_stop(); |
I2CTimeout = 10; |
twi_state = 0; |
} |
TWCR |= 0x80; |
} |
/branches/salvo_gps/Basis_v0067g/trunk/twimaster.h |
---|
0,0 → 1,33 |
/*############################################################################ |
############################################################################*/ |
#ifndef _I2C_MASTER_H |
#define _I2C_MASTER_H |
//############################################################################ |
// I2C Konstanten |
#define SCL_CLOCK 200000L |
#define I2C_TIMEOUT 30000 |
#define I2C_START 0x08 |
#define I2C_REPEATED_START 0x10 |
#define I2C_TX_SLA_ACK 0x18 |
#define I2C_TX_DATA_ACK 0x28 |
#define I2C_RX_SLA_ACK 0x40 |
#define I2C_RX_DATA_ACK 0x50 |
//############################################################################ |
extern unsigned char twi_state; |
extern unsigned char motor; |
extern unsigned char motorread; |
extern unsigned char motor_rx[8]; |
void i2c_reset(void); |
extern void i2c_init (void); // I2C initialisieren |
extern char i2c_start (void); // Start I2C |
extern void i2c_stop (void); // Stop I2C |
extern char i2c_write_byte (char byte); // 1 Byte schreiben |
extern void i2c_reset(void); |
#endif |
/branches/salvo_gps/Basis_v0067g/trunk/uart.c |
---|
0,0 → 1,400 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Copyright (c) 04.2007 Holger Buss |
// + only for non-profit use |
// + www.MikroKopter.com |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#include "main.h" |
#include "uart.h" |
unsigned char DebugGetAnforderung = 0,DebugDisplayAnforderung = 0,DebugDataAnforderung = 0,GetVersionAnforderung = 0; |
unsigned volatile char SioTmp = 0; |
unsigned volatile char SendeBuffer[MAX_SENDE_BUFF]; |
unsigned volatile char RxdBuffer[MAX_EMPFANGS_BUFF]; |
unsigned volatile char NMEABuffer[MAX_EMPFANGS_BUFF]; |
unsigned volatile char NeuerDatensatzEmpfangen = 0; |
unsigned volatile char NeueKoordinateEmpfangen = 0; |
unsigned volatile char UebertragungAbgeschlossen = 1; |
unsigned volatile char CntCrcError = 0; |
unsigned volatile char AnzahlEmpfangsBytes = 0; |
unsigned volatile char PC_DebugTimeout = 0; |
unsigned char RemotePollDisplayLine = 0; |
unsigned char NurKanalAnforderung = 0; |
unsigned char DebugTextAnforderung = 255; |
unsigned char PcZugriff = 100; |
unsigned char MotorTest[4] = {0,0,0,0}; |
unsigned char DubWiseKeys[3] = {0,0,0}; |
unsigned char MeineSlaveAdresse; |
struct str_DebugOut DebugOut; |
struct str_Debug DebugIn; |
struct str_VersionInfo VersionInfo; |
int Debug_Timer; |
//Salvo 26.10.2007 |
int dataset_cnt=0; //Zaehlt die uebertragenen Debugdaten |
//Salvo End |
const unsigned char ANALOG_TEXT[32][16] = |
{ |
//1234567890123456 |
"IntegralNick ", //0 |
"IntegralRoll ", |
"AccNick ", |
"AccRoll ", |
"GyroGier ", |
"HoehenWert ", //5 |
"AccZ ", |
"Gas ", |
"KompassValue ", |
"Ersatzkompass ", |
// "GPS _dist ", //10 |
// "GPS_rel_hdng ", |
"Usr_Par1 ", //10 |
"Usr_par3 ", |
"Motor_Vorne ", |
"Motor_Hinten ", |
"Motor_Links ", |
"Motor_Rechts ", //15 |
"Index ", |
"UBat ", |
"Messwert_Nick ", |
"Messwert_Roll ", |
"Messwert_Gier ", //20 |
"Stick_Nick ", |
"Stick_Roll ", |
"Stick_Gier ", |
"GPS_Nick ", |
"GPS_Roll ", //25 |
"utm_east ", |
"utm_north ", |
"utm_alt ", |
"gps_state ", |
"I-LageRoll ", //30 |
"StickRoll " |
}; |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//++ Sende-Part der Datenübertragung |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
SIGNAL(INT_VEC_TX) |
{ |
static unsigned int ptr = 0; |
unsigned char tmp_tx; |
if(!UebertragungAbgeschlossen) |
{ |
ptr++; // die [0] wurde schon gesendet |
tmp_tx = SendeBuffer[ptr]; |
if((tmp_tx == '\r') || (ptr == MAX_SENDE_BUFF)) |
{ |
ptr = 0; |
UebertragungAbgeschlossen = 1; |
} |
UDR = tmp_tx; |
} |
else ptr = 0; |
} |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//++ Empfangs-Part der Datenübertragung, incl. CRC-Auswertung |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
SIGNAL(INT_VEC_RX) |
{ |
static unsigned int crc; |
static unsigned char crc1,crc2,buf_ptr; |
static unsigned char UartState = 0; |
unsigned char CrcOkay = 0; |
SioTmp = UDR; |
//Salvo 11.9.2007 GPS Daten holen |
Get_Ublox_Msg(SioTmp); // Daten vom GPS Modul holen |
// Salvo End |
if(buf_ptr >= MAX_EMPFANGS_BUFF) UartState = 0; |
if(SioTmp == '\r' && UartState == 2) |
{ |
UartState = 0; |
crc -= RxdBuffer[buf_ptr-2]; |
crc -= RxdBuffer[buf_ptr-1]; |
crc %= 4096; |
crc1 = '=' + crc / 64; |
crc2 = '=' + crc % 64; |
CrcOkay = 0; |
if((crc1 == RxdBuffer[buf_ptr-2]) && (crc2 == RxdBuffer[buf_ptr-1])) CrcOkay = 1; else { CrcOkay = 0; CntCrcError++;}; |
if(!NeuerDatensatzEmpfangen && CrcOkay) // Datensatz schon verarbeitet |
{ |
NeuerDatensatzEmpfangen = 1; |
AnzahlEmpfangsBytes = buf_ptr; |
RxdBuffer[buf_ptr] = '\r'; |
if(RxdBuffer[2] == 'R') wdt_enable(WDTO_250MS); // Reset-Commando |
} |
} |
else |
switch(UartState) |
{ |
case 0: |
if(SioTmp == '#' && !NeuerDatensatzEmpfangen) UartState = 1; // Startzeichen und Daten schon verarbeitet |
buf_ptr = 0; |
RxdBuffer[buf_ptr++] = SioTmp; |
crc = SioTmp; |
break; |
case 1: // Adresse auswerten |
UartState++; |
RxdBuffer[buf_ptr++] = SioTmp; |
crc += SioTmp; |
break; |
case 2: // Eingangsdaten sammeln |
RxdBuffer[buf_ptr] = SioTmp; |
if(buf_ptr < MAX_EMPFANGS_BUFF) buf_ptr++; |
else UartState = 0; |
crc += SioTmp; |
break; |
default: |
UartState = 0; |
break; |
} |
} |
// -------------------------------------------------------------------------- |
void AddCRC(unsigned int wieviele) |
{ |
unsigned int tmpCRC = 0,i; |
for(i = 0; i < wieviele;i++) |
{ |
tmpCRC += SendeBuffer[i]; |
} |
tmpCRC %= 4096; |
SendeBuffer[i++] = '=' + tmpCRC / 64; |
SendeBuffer[i++] = '=' + tmpCRC % 64; |
SendeBuffer[i++] = '\r'; |
UebertragungAbgeschlossen = 0; |
UDR = SendeBuffer[0]; |
} |
// -------------------------------------------------------------------------- |
void SendOutData(unsigned char cmd,unsigned char modul, unsigned char *snd, unsigned char len) |
{ |
unsigned int pt = 0; |
unsigned char a,b,c; |
unsigned char ptr = 0; |
SendeBuffer[pt++] = '#'; // Startzeichen |
SendeBuffer[pt++] = modul; // Adresse (a=0; b=1,...) |
SendeBuffer[pt++] = cmd; // Commando |
while(len) |
{ |
if(len) { a = snd[ptr++]; len--;} else a = 0; |
if(len) { b = snd[ptr++]; len--;} else b = 0; |
if(len) { c = snd[ptr++]; len--;} else c = 0; |
SendeBuffer[pt++] = '=' + (a >> 2); |
SendeBuffer[pt++] = '=' + (((a & 0x03) << 4) | ((b & 0xf0) >> 4)); |
SendeBuffer[pt++] = '=' + (((b & 0x0f) << 2) | ((c & 0xc0) >> 6)); |
SendeBuffer[pt++] = '=' + ( c & 0x3f); |
} |
AddCRC(pt); |
} |
// -------------------------------------------------------------------------- |
void Decode64(unsigned char *ptrOut, unsigned char len, unsigned char ptrIn,unsigned char max) // Wohin mit den Daten; Wie lang; Wo im RxdBuffer |
{ |
unsigned char a,b,c,d; |
unsigned char ptr = 0; |
unsigned char x,y,z; |
while(len) |
{ |
a = RxdBuffer[ptrIn++] - '='; |
b = RxdBuffer[ptrIn++] - '='; |
c = RxdBuffer[ptrIn++] - '='; |
d = RxdBuffer[ptrIn++] - '='; |
if(ptrIn > max - 2) break; // nicht mehr Daten verarbeiten, als empfangen wurden |
x = (a << 2) | (b >> 4); |
y = ((b & 0x0f) << 4) | (c >> 2); |
z = ((c & 0x03) << 6) | d; |
if(len--) ptrOut[ptr++] = x; else break; |
if(len--) ptrOut[ptr++] = y; else break; |
if(len--) ptrOut[ptr++] = z; else break; |
} |
} |
// -------------------------------------------------------------------------- |
void BearbeiteRxDaten(void) |
{ |
if(!NeuerDatensatzEmpfangen) return; |
// unsigned int tmp_int_arr1[1]; |
// unsigned int tmp_int_arr2[2]; |
// unsigned int tmp_int_arr3[3]; |
unsigned char tmp_char_arr2[2]; |
// unsigned char tmp_char_arr3[3]; |
// unsigned char tmp_char_arr4[4]; |
//if(!MotorenEin) |
PcZugriff = 255; |
switch(RxdBuffer[2]) |
{ |
case 'a':// Texte der Analogwerte |
Decode64((unsigned char *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
DebugTextAnforderung = tmp_char_arr2[0]; |
break; |
case 'c':// Debugdaten incl. Externe IOs usw |
Decode64((unsigned char *) &DebugIn,sizeof(DebugIn),3,AnzahlEmpfangsBytes); |
/* for(unsigned char i=0; i<4;i++) |
{ |
EE_CheckAndWrite(&EE_Buffer[EE_DEBUGWERTE + i*2], DebugIn.Analog[i]); |
EE_CheckAndWrite(&EE_Buffer[EE_DEBUGWERTE + i*2 + 1], DebugIn.Analog[i] >> 8); |
}*/ |
RemoteTasten |= DebugIn.RemoteTasten; |
DebugDataAnforderung = 1; |
break; |
case 'h':// x-1 Displayzeilen |
Decode64((unsigned char *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
RemoteTasten |= tmp_char_arr2[0]; |
if(tmp_char_arr2[1] == 255) NurKanalAnforderung = 1; else NurKanalAnforderung = 0; // keine Displaydaten |
DebugDisplayAnforderung = 1; |
break; |
case 't':// Motortest |
Decode64((unsigned char *) &MotorTest[0],sizeof(MotorTest),3,AnzahlEmpfangsBytes); |
break; |
case 'k':// Keys von DubWise |
Decode64((unsigned char *) &DubWiseKeys[0],sizeof(DubWiseKeys),3,AnzahlEmpfangsBytes); |
break; |
case 'v': // Version-Anforderung und Ausbaustufe |
GetVersionAnforderung = 1; |
break; |
case 'g':// "Get"-Anforderung für Debug-Daten |
// Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
DebugGetAnforderung = 1; |
break; |
case 'q':// "Get"-Anforderung für Settings |
// Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
Decode64((unsigned char *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
if(tmp_char_arr2[0] != 0xff) |
{ |
if(tmp_char_arr2[0] > 5) tmp_char_arr2[0] = 5; |
ReadParameterSet(tmp_char_arr2[0], (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
SendOutData('L' + tmp_char_arr2[0] -1,MeineSlaveAdresse,(unsigned char *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE); |
} |
else |
SendOutData('L' + GetActiveParamSetNumber()-1,MeineSlaveAdresse,(unsigned char *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE); |
break; |
case 'l': |
case 'm': |
case 'n': |
case 'o': |
case 'p': // Parametersatz speichern |
Decode64((unsigned char *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE,3,AnzahlEmpfangsBytes); |
WriteParameterSet(RxdBuffer[2] - 'l' + 1, (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], RxdBuffer[2] - 'l' + 1); // aktiven Datensatz merken |
Umschlag180Nick = (long) EE_Parameter.WinkelUmschlagNick * 2500L; |
Umschlag180Roll = (long) EE_Parameter.WinkelUmschlagRoll * 2500L; |
Piep(GetActiveParamSetNumber()); |
break; |
} |
// DebugOut.AnzahlZyklen = Debug_Timer_Intervall; |
NeuerDatensatzEmpfangen = 0; |
} |
//############################################################################ |
//Routine für die Serielle Ausgabe |
int uart_putchar (char c) |
//############################################################################ |
{ |
if (c == '\n') |
uart_putchar('\r'); |
//Warten solange bis Zeichen gesendet wurde |
loop_until_bit_is_set(USR, UDRE); |
//Ausgabe des Zeichens |
UDR = c; |
return (0); |
} |
// -------------------------------------------------------------------------- |
void WriteProgramData(unsigned int pos, unsigned char wert) |
{ |
//if (ProgramLocation == IN_RAM) Buffer[pos] = wert; |
// else eeprom_write_byte(&EE_Buffer[pos], wert); |
// Buffer[pos] = wert; |
} |
//############################################################################ |
//INstallation der Seriellen Schnittstelle |
void UART_Init (void) |
//############################################################################ |
{ |
//Enable TXEN im Register UCR TX-Data Enable & RX Enable |
UCR=(1 << TXEN) | (1 << RXEN); |
// UART Double Speed (U2X) |
USR |= (1<<U2X); |
// RX-Interrupt Freigabe |
UCSRB |= (1<<RXCIE); |
// TX-Interrupt Freigabe |
UCSRB |= (1<<TXCIE); |
//Teiler wird gesetzt |
UBRR=(SYSCLK / (BAUD_RATE * 8L) - 1); |
//UBRR = 33; |
//öffnet einen Kanal für printf (STDOUT) |
//fdevopen (uart_putchar, 0); |
//sbi(PORTD,4); |
Debug_Timer = SetDelay(200); |
} |
//--------------------------------------------------------------------------------------------- |
void DatenUebertragung(void) |
{ |
static char dis_zeile = 0; |
if(!UebertragungAbgeschlossen) return; |
if(DebugGetAnforderung && UebertragungAbgeschlossen) // Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
{ |
SendOutData('G',MeineSlaveAdresse,(unsigned char *) &DebugIn,sizeof(DebugIn)); |
DebugGetAnforderung = 0; |
} |
if((CheckDelay(Debug_Timer) || DebugDataAnforderung) && UebertragungAbgeschlossen) |
{ |
SendOutData('D',MeineSlaveAdresse,(unsigned char *) &DebugOut,sizeof(DebugOut)); |
DebugDataAnforderung = 0; |
//Salvo 26.10.2007 Counter fuer Erkennung von fehlenden Daten per Bluetoothuebertragung |
dataset_cnt++; |
// Salvo End |
Debug_Timer = SetDelay(MIN_DEBUG_INTERVALL); |
} |
if(DebugTextAnforderung != 255) // Texte für die Analogdaten |
{ |
SendOutData('A',DebugTextAnforderung + '0',(unsigned char *) ANALOG_TEXT[DebugTextAnforderung],16); |
DebugTextAnforderung = 255; |
} |
if(DebugDisplayAnforderung && UebertragungAbgeschlossen) |
{ |
Menu(); |
DebugDisplayAnforderung = 0; |
if(++RemotePollDisplayLine == 4 || NurKanalAnforderung) |
{ |
SendOutData('4',0,(unsigned char *)&PPM_in,sizeof(PPM_in)); // DisplayZeile übertragen |
RemotePollDisplayLine = -1; |
} |
else SendOutData('0' + RemotePollDisplayLine,0,(unsigned char *)&DisplayBuff[20 * RemotePollDisplayLine],20); // DisplayZeile übertragen |
} |
if(GetVersionAnforderung && UebertragungAbgeschlossen) |
{ |
SendOutData('V',MeineSlaveAdresse,(unsigned char *) &VersionInfo,sizeof(VersionInfo)); |
GetVersionAnforderung = 0; |
} |
} |
/branches/salvo_gps/Basis_v0067g/trunk/uart.h |
---|
0,0 → 1,106 |
#ifndef _UART_H |
#define _UART_H |
#define MAX_SENDE_BUFF 150 |
#define MAX_EMPFANGS_BUFF 150 |
#define DUB_KEY_UP 4 |
#define DUB_KEY_DOWN 8 |
#define DUB_KEY_RIGHT 32 |
#define DUB_KEY_LEFT 16 |
#define DUB_KEY_FIRE 64 |
//Salvo 26.10.2007 |
extern int dataset_cnt; |
// salvo End |
void BearbeiteRxDaten(void); |
extern unsigned char DebugGetAnforderung; |
extern unsigned volatile char SendeBuffer[MAX_SENDE_BUFF]; |
extern unsigned volatile char RxdBuffer[MAX_EMPFANGS_BUFF]; |
extern unsigned volatile char UebertragungAbgeschlossen; |
extern unsigned volatile char PC_DebugTimeout; |
extern unsigned volatile char NeueKoordinateEmpfangen; |
extern unsigned char MeineSlaveAdresse; |
extern unsigned char PcZugriff; |
extern unsigned char RemotePollDisplayLine; |
extern int Debug_Timer; |
extern void UART_Init (void); |
extern int uart_putchar (char c); |
extern void boot_program_page (uint32_t page, uint8_t *buf); |
extern void DatenUebertragung(void); |
extern void DecodeNMEA(void); |
extern void BearbeiteRxDaten(void); |
extern unsigned char MotorTest[4]; |
extern unsigned char DubWiseKeys[3]; |
struct str_DebugOut |
{ |
unsigned char Digital[2]; |
unsigned int Analog[32]; // Debugwerte |
}; |
extern struct str_DebugOut DebugOut; |
struct str_Debug |
{ |
unsigned char Digital[2]; |
unsigned char RemoteTasten; |
unsigned int Analog[4]; |
}; |
extern struct str_Debug DebugIn; |
struct str_VersionInfo |
{ |
unsigned char Hauptversion; |
unsigned char Nebenversion; |
unsigned char PCKompatibel; |
unsigned char Rserved[7]; |
}; |
extern struct str_VersionInfo VersionInfo; |
//Die Baud_Rate der Seriellen Schnittstelle ist 9600 Baud |
//#define BAUD_RATE 9600 //Baud Rate für die Serielle Schnittstelle |
//#define BAUD_RATE 14400 //Baud Rate für die Serielle Schnittstelle |
//#define BAUD_RATE 28800 //Baud Rate für die Serielle Schnittstelle |
//#define BAUD_RATE 38400 //Baud Rate für die Serielle Schnittstelle |
#define BAUD_RATE 57600 //Baud Rate für die Serielle Schnittstelle |
//Anpassen der seriellen Schnittstellen Register wenn ein ATMega128 benutzt wird |
#if defined (__AVR_ATmega128__) |
# define USR UCSR0A |
# define UCR UCSR0B |
# define UDR UDR0 |
# define UBRR UBRR0L |
# define EICR EICRB |
#endif |
#if defined (__AVR_ATmega32__) |
# define USR UCSRA |
# define UCR UCSRB |
# define UBRR UBRRL |
# define EICR EICRB |
# define INT_VEC_RX SIG_UART_RECV |
# define INT_VEC_TX SIG_UART_TRANS |
#endif |
#if defined (__AVR_ATmega644__) |
# define USR UCSR0A |
# define UCR UCSR0B |
# define UDR UDR0 |
# define UBRR UBRR0L |
# define EICR EICR0B |
# define TXEN TXEN0 |
# define RXEN RXEN0 |
# define RXCIE RXCIE0 |
# define TXCIE TXCIE0 |
# define U2X U2X0 |
# define UCSRB UCSR0B |
# define UDRE UDRE0 |
# define INT_VEC_RX SIG_USART_RECV |
# define INT_VEC_TX SIG_USART_TRANS |
#endif |
#endif //_UART_H |
/branches/salvo_gps/Basis_v0067g/trunk/. |
---|
Property changes: |
Added: svn:ignore |
+*.bak |
+*.aps |
+*.elf |
+*.sym |
+*.map |
+*.lss |
+*.eep |
+*.txt |