/branches/salvo_gps/Basis_v0067g/tags/v0001/Flight-Ctrl_MEGA644_V0_01a.hex |
---|
0,0 → 1,2297 |
: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 |
:1004E000DEBFCDBF13E0A0E0B1E0EAECFCE802C063 |
:1004F00005900D92A23AB107D9F718E0A2EAB3E04D |
:1005000001C01D92A338B107E1F70E94C8020C9404 |
:1005100064460C94000022E030E0D9010E9450466D |
:10052000802D863028F082E0D901082E0E9458469E |
:1005300099270895FB01282F863008F025E0842FA5 |
:100540009927429FD0011124AC59BF4F019724F045 |
:1005500001900E945846FACFA2E0B0E0022E0E941D |
:1005600058460895CF93DF93FB01C42FDD278630D3 |
:1005700008F085E0489FD0011124AC59BF4F219766 |
:1005800024F00E9450460192FACFDF91CF91089556 |
:100590001F93CF93DF9314B815B8189B02C08BE05C |
:1005A00001C08AE08093000181EC87B98FEF88B9A0 |
:1005B0008BE184B981E085B98EE38AB9579A87EFD8 |
:1005C0008BB984B7877F84BF8091600088618093F6 |
:1005D00060001092600080ED97E09093C5038093D7 |
:1005E000C4031092620410926104109233071092B7 |
:1005F00032071092600410925F0410925E04109211 |
:100600005D04809100018A3011F4289801C0289A75 |
:100610000E94340D0E9408060E948A150E94830DD4 |
:100620000E94BA1478941092310681E080933206C9 |
:1006300087E0809333062091000181E690E09F934C |
:100640008F9381E090E09F938F931F921F92822F50 |
:100650006AE00E94E045892F99279F938F93822F0C |
:100660000E94E04599279F938F938CE391E09F939D |
:100670008F931F920E94EB088BE191E09F938F93E1 |
:100680001F920E94EB08299AA1E0B0E00E94504618 |
:10069000802D2DB73EB7205F3F4F0FB6F8943EBF79 |
:1006A0000FBE2DBF843409F43FC08CEE90E09F93C1 |
:1006B0008F931F920E94EB080E94C12310E00F90BD |
:1006C0000F900F90123049F40E94302347E46AE5FE |
:1006D00077E082E00E949A0202C0133051F40E9437 |
:1006E000A02247E46AE577E083E00E949A0214E0E2 |
:1006F00002C0143010F00E94302347E46AE577E02E |
:10070000812F0E949A021F5F1630E0F283E022E000 |
:1007100030E0D901082E0E94584684E42150304030 |
:10072000D901082E0E945846C4E0D0E0DE010E94A4 |
:100730005046802D853050F083ED90E09F938F934D |
:100740001F920E94EB080F900F900F902297DE01EE |
:100750000E945046802D863028F082E0DE01082E6F |
:100760000E94584647E46AE577E00E94B202DE0143 |
:100770000E945046802D863028F082E0DE01082E4F |
:100780000E94584699279F938F9388EB90E09F9300 |
: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 |
:100F0000082E0E94584660918507772788279927E1 |
:100F100024EC39E040E050E00E94C1456093870333 |
:100F2000709388038093890390938A036091860766 |
:100F30007727882799270E94C14560938B03709378 |
:100F40008C0380938D0390938E030E948B020E94EA |
:100F5000BE201092A70322960FB6F894DEBF0FBEF4 |
:100F6000CDBFDF91CF911F9108951F920F920FB6C1 |
:100F70000F9211242F933F934F935F936F937F931F |
:100F80008F939F93AF93BF93CF93DF93EF93FF9391 |
:100F90008091C6008093A6038091A6030E945B3BCC |
: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 |
:1014F000C6010E944C44009711F419A90DC08C1923 |
:1015000019A981174CF4182F07C0F601019000208B |
:10151000E9F731971E2F1C1919824201310140E071 |
:1015200094C085E5B81631F095E7B91649F4EAE0BC |
:10153000E8AB1FC0FBA9F160FBAB8AE088AB19C028 |
:1015400098E5B91621F0E8E7BE1609F06EC0FBA9D0 |
:10155000F3FD02C080E1F2CF2114310441045104B3 |
:1015600019F490E198AB05C0EBA9E064EBABF0E1B6 |
:10157000F8AB198289A987FD03C09BA99F7D9BAB0E |
:10158000211431044104510461F4E9A9EE2349F422 |
:101590006624772443015EE2C52ED12CCC0EDD1EDD |
:1015A0003EC04EE2C42ED12CCC0EDD1EF8A9EF2E8B |
:1015B000FF2400271127C201B101A80197010E9451 |
:1015C00013466A3020F430E3A32EA60E08C027E5A8 |
:1015D000A22EA60E88E5B81611F49FEDA922F601F9 |
:1015E000A2926F01C201B101A80197010E941346A6 |
: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 |
:1018A000845E9D4F68E671E00E940046845B904034 |
:1018B00090934F0480934E0481E08093C80310926C |
:1018C000C3031092C20306C0809100018A3009F060 |
:1018D00085CF82CFBF91AF919F918F917F916F9173 |
:1018E0005F913F912F910F900FBE0F901F90189511 |
:1018F0002091BF033091C0032F5F3F4F820F931F92 |
:1019000008952091BF033091C003821B930B892F50 |
:10191000992786958074992708951F920F920FB684 |
:101920000F921124EF92FF920F931F932F933F93E7 |
:101930004F935F936F937F938F939F93AF93BF93D7 |
:10194000CF93DF93EF93FF938091060381508093B1 |
:1019500006038F3F09F06DC083E88093B00080914B |
:101960009C03C82FDD27D093C703C093C603809183 |
:101970008F07E0907C0780FF1EC060910E0470917D |
:101980000F048091100490911104FF240027112767 |
:1019900020E830E040E050E00E943546C801B70141 |
:1019A0000E94C14520E032E040E050E00E94354610 |
:1019B000C20FD31F1DC060910E0470910F0480915F |
:1019C000100490911104FF240027112720E830E033 |
:1019D00040E050E00E943546C801B7010E94C14571 |
:1019E00020E032E040E050E00E943546C21BD30BBD |
: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 |
:101C100063E070E00E94EC45260F371F369527954C |
:101C200036952795309309032093080386E069C110 |
:101C300080910604909107042091780030917900FA |
:101C4000821B930B909315078093140780911407C0 |
:101C5000909115079093D7038093D60387E051C1E5 |
:101C600080917800909179002091040430910504CE |
:101C7000821B930B9093200780931F0780911F076F |
:101C8000909120079093D9038093D8031092ED038D |
:101C9000B4C1809100012091EA033091EB038A30B6 |
:101CA00049F48091780090917900820F931F969566 |
:101CB000879506C08091780090917900820F931FDC |
:101CC0009093D5038093D40381E01BC180910001E0 |
:101CD0002091E8033091E9038A3049F4809178003B |
:101CE00090917900820F931F9695879506C08091F9 |
:101CF000780090917900820F931F9093D303809383 |
:101D0000D20382E0FEC0809100012091E603309171 |
:101D1000E7038A3049F48091780090917900820F2E |
:101D2000931F9695879506C08091780090917900D1 |
:101D3000820F931F9093D1038093D00385E0E1C07D |
:101D40006091780070917900E0900804F0900904A7 |
:101D500000910A0410910B04882777FD8095982F35 |
:101D60000E94FF44A80197010E9459440E94E24446 |
:101D70007093DB036093DA032091DA033091DB0385 |
:101D8000E0911407F091150780911F0790912007AB |
:101D900097FF03C0909581959F4F64E070E00E948B |
:101DA0000046EB01CF01F7FF03C0909581959F4F4F |
:101DB00064E070E00E940046260F371F2C0F3D1F85 |
:101DC0003093DB032093DA038091DA039091DB03F5 |
:101DD000029704F1609108047091090480910A044B |
:101DE00090910B0420E030E048E454E40E9409455F |
:101DF00088230CF03CC06091080470910904809124 |
:101E00000A0490910B042AE037ED43EA5CE30E9458 |
:101E10005A4425C08091DA039091DB038F5F9F4F76 |
:101E200034F5609108047091090480910A0490913E |
:101E30000B0420E030E046E154E40E940C45181603 |
:101E4000B4F4609108047091090480910A0490919F |
:101E50000B042AE037ED43EA5CE30E9459446093A7 |
:101E600008047093090480930A0490930B0481E0A2 |
:101E70008093E10380917800909179009093170707 |
:101E800080931607209146043091470440914804FE |
:101E9000509149048091DA039091DB03AA2797FDC2 |
:101EA000A095BA2F280F391F4A1F5B1F20934604A5 |
:101EB000309347044093480450934904E09046040B |
:101EC000F090470400914804109149046091460441 |
:101ED00070914704809148049091490420E034E0D7 |
:101EE00040E050E00E943546E21AF30A040B150B5D |
:101EF000E0924604F092470400934804109349048A |
:101F000083E08093ED0379C08091240790912507A9 |
:101F10002091780030917900820F931F90932507CC |
:101F20008093240780911C078F5F80931C0780910A |
:101F30001C07853008F46BC080917800909179007F |
:101F400090930F0380930E0310921C078091180743 |
:101F5000909119072091240730912507821B930B3C |
:101F60002091640430916504821B930B9093E303EA |
:101F70008093E2036091240770912507E0900A03A3 |
:101F8000F0900B0300910C0310910D03882777FD4F |
:101F90008095982FA8019701220F331F441F551FCA |
:101FA0002E0D3F1D401F511F620F731F841F951F71 |
:101FB00024E030E040E050E00E94354620930A03E0 |
:101FC00030930B0340930C0350930D03209118079B |
:101FD0003091190780910A0390910B03A0910C0393 |
:101FE000B0910D03281B390B3093650420936404D2 |
:101FF00010922507109224070AC08091ED03809368 |
:102000007C00DD2051F08FEE80937A0006C01092A4 |
:10201000ED031092EC0310927C00FF91EF91DF91A1 |
:10202000CF91BF91AF919F918F917F916F915F9170 |
:102030004F913F912F911F910F91FF90EF90DF9063 |
:102040000F900FBE0F901F901895CF93DF93A3E0D2 |
:10205000B0E00E945046802DC82FDD27C531D10544 |
:1020600008F02A97C7BD84E690E00E945B0D80913E |
:102070000E0390910F0382559340D0F4C0E0D0E05E |
:1020800017C0C7BD82E390E00E945B0D80E791E03E |
:102090009F938F931F920E94EB0880910E03909163 |
:1020A0000F030F900F900F908458934020F02196CB |
:1020B000CA3FD10530F3A3E0B0E00C2E0E94584691 |
:1020C000C09321078CE291E00E945B0DDF91CF91DC |
:1020D0000895EAE1F3E080E2819393E0EA36F907BC |
:1020E000D9F70895FF920F931F938091F103282F42 |
:1020F0003327C90181709070682F8823A9F08091DF |
:10210000F203882311F0815002C080916A0380930A |
:10211000F203EAE1F3E080E2819393E0EA36F90723 |
:10212000D9F78FEF8093AC03A9014270507021FF63 |
:1021300010C08091F2038F5F8093F203EAE1F3E035 |
:1021400080E2819393E0EA36F907D9F78FEF809325 |
:10215000AC03662321F0452B11F01092F20381E1CC |
:102160008093F0038091F20399279F938F938CE1E2 |
:1021700094E09F938F9311E0F12EFF920E94EB0861 |
:102180000091F2030F900F900F900F900F90053079 |
:1021900009F4FCC1063090F4023009F4CCC00330DD |
:1021A00030F40023F1F0013009F0D9C361C00330ED |
:1021B00009F416C1043009F0D2C365C1083009F42E |
:1021C00016C3093038F4063009F499C2073009F013 |
:1021D000C6C3EAC2093009F447C30A3009F0BFC3D5 |
:1021E00081C31092F0038AE094E09F938F93FF9253 |
:1021F0000E94EB0884E18093F0032091000181E6C6 |
:1022000090E09F938F9381E090E09F938F931F9234 |
:102210001F92822F6AE00E94E045892F99279F93A1 |
:102220008F93822F0E94E04599279F938F9385EF8C |
:1022300093E09F938F93FF920E94EB0888E2809334 |
:10224000F0030E948B0299279F938F9388EE93E06F |
:102250009F938F93FF920E94EB088CE38093F0038F |
:1022600088ED93E09F938F93FF920E94EB0898C2B2 |
:102270008091620780FF47C01092F0038091640450 |
:10228000909165049F938F9389EC93E09F938F9334 |
:102290000F930E94EB0884E18093F0038091660421 |
:1022A000909167049F938F938AEB93E09F938F9312 |
:1022B0000F930E94EB0888E28093F00380910E0355 |
:1022C00090910F039F938F938BEA93E09F938F934B |
:1022D0000F930E94EB088CE38093F0038091210719 |
:1022E00099279F938F938CE993E09F938F930F93FC |
:1022F0000E94EB088DB79EB744960FB6F8949EBF28 |
:102300000FBE8DBF31C384E18093F00385E993E074 |
:102310009F938F930F930E94EB0888E28093F003C2 |
:1023200087E893E09F938F930F930E94EB088DB7FC |
:102330009EB70696E2CF1092F0038DE793E09F934D |
:102340008F93FF920E94EB0884E18093F0036091E9 |
:102350000E0470910F04809110049091110420E0FC |
:1023600034E040E050E00E9435465F934F933F9346 |
:102370002F938EE693E09F938F93FF920E94EB083A |
:1023800088E28093F00360911604709117048091A5 |
:1023900018049091190420E034E040E050E00E94DD |
:1023A00035465F934F933F932F938FE593E09F9331 |
: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 |
:1026600062E070E00E9400467F936F932E1B3F0B49 |
:102670003F932F9386E892E09F938F93FF920E945F |
:10268000EB0888E28093F0038091FC039091FD03B6 |
:102690002091D2033091D303E091FC03F091FD032C |
:1026A00062E070E00E9400467F936F932E1B3F0B09 |
:1026B0003F932F9387E792E09F938F93FF920E941F |
:1026C000EB088CE38093F0038091FE039091FF036D |
:1026D0002091CF073091D00762E070E00E94004661 |
:1026E0007F936F933F932F9388E692E09F938F930E |
:1026F000FF920E94EB088DB79EB74596FECD1092D3 |
:10270000F0038BE592E09F938F93FF920E94EB087A |
:1027100084E18093F003809104049091050420915A |
:10272000D8033091D9039F938F933F932F938CE4D9 |
:1027300092E09F938F93FF920E94EB0888E2809330 |
:10274000F00380910604909107042091D603309104 |
:10275000D7039F938F933F932F938DE392E09F93A3 |
:102760008F93FF920E94EB088CE38093F0036091BB |
:1027700008047091090480910A0490910B0400915F |
:10278000B3071091B4070E94E2447F936F931F93A5 |
: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 |
:102C2000820F931F840F951F64E070E00E9400469E |
:102C3000D8018D919C9111979B01281B390BEC5B5E |
:102C4000F84F3183208311967C936E93FE01319669 |
:102C5000F093F703E093F603E530F10519F45D9A7C |
:102C60005C980BC05D98E630F10511F45C9A05C0E4 |
:102C70005C98379711F45B9A01C05B98FF91EF91D4 |
:102C8000DF91CF91BF91AF919F918F917F916F9184 |
:102C90005F914F913F912F911F910F910F900FBE18 |
:102CA0000F901F9018952F923F924F925F926F92C4 |
:102CB0007F928F929F92AF92BF92CF92DF92EF92CC |
:102CC000FF920F931F93CF93DF93CDB7DEB7229779 |
:102CD0000FB6F894DEBF0FBECDBF8091FE0390917A |
:102CE000FF032091D4033091D503821B930B909363 |
:102CF000D0078093CF078091D2039091D303209186 |
:102D0000FC033091FD03821B930B9093A3078093E8 |
:102D1000A2078091D0039091D1032091FA033091C2 |
:102D2000FB03821B930B9093AB078093AA076091E0 |
:102D3000CC077091CD072091D8033091D903882713 |
:102D400077FD8095982F442737FD4095542F04E058 |
:102D5000220F331F441F551F0A95D1F7620F731FAF |
:102D6000841F951F22E030E040E050E00E9435468D |
:102D70003093CD072093CC076091D6077091D70789 |
:102D80002091D6033091D703882777FD8095982F1F |
:102D9000442737FD4095542F14E0220F331F441F62 |
:102DA000551F1A95D1F7620F731F841F951F22E0DC |
:102DB00030E040E050E00E9435463093D707209342 |
:102DC000D6076091B3077091B4072091DA03309170 |
:102DD000DB03882777FD8095982F442737FD4095A2 |
:102DE000542F620F731F841F951F22E030E040E0D4 |
:102DF00050E00E9435463093B4072093B3072091EA |
:102E00001E0430911F0440912004509121048091B0 |
:102E1000D8039091D903B4E0880F991FBA95E1F7D0 |
:102E2000AA2797FDA095BA2F280F391F4A1F5B1FAD |
:102E300020931E0430931F044093200450932104D8 |
:102E400020912204309123044091240450912504C0 |
:102E50008091D6039091D703A4E0880F991FAA957B |
:102E6000E1F7AA2797FDA095BA2F280F391F4A1F0F |
:102E70005B1F209322043093230440932404509337 |
:102E80002504609126047091270480912804909174 |
:102E90002904E0901607F0901707A0900804B0905E |
:102EA0000904C0900A04D0900B040E94FF443B0127 |
:102EB0004C010027F7FC0095102FC801B7010E94B4 |
:102EC000FF44A60195010E9459449B01AC01C40135 |
:102ED000B3010E945A440E94E24460932604709316 |
:102EE000270480932804909329042091DD073091D2 |
:102EF000DE074091DF075091E0078091CF07909166 |
:102F0000D007AA2797FDA095BA2F280F391F4A1F6F |
:102F10005B1F2093DD073093DE074093DF0750935C |
:102F2000E00720913E0430913F04409140045091CD |
:102F300041048091CF079091D007AA2797FDA095D3 |
:102F4000BA2F280F391F4A1F5B1F20933E0430936E |
:102F50003F04409340045093410420914204309137 |
:102F6000430440914404509145048091CF079091CF |
:102F7000D007AA2797FDA095BA2F280F391F4A1FFF |
:102F80005B1F2093420430934304409344045093C6 |
:102F9000450420916C042A83222309F06BC08091A0 |
:102FA0006D04882309F066C08091620786FF62C0C5 |
:102FB00060912E0470912F0480913004909131041F |
:102FC000E090CF07F090D007A0907A04BB24CC24E7 |
:102FD000DD2420E030E140E050E00E94354600274B |
:102FE000F7FC0095102FCA01B901A80197010E94B2 |
:102FF000C145A60195010E94C14520E038E040E0AE |
:1030000050E00E9435462093C5043093C604409397 |
:10301000C7045093C80460913604709137048091BE |
:10302000380490913904E090CF07F090D00720E069 |
:1030300030E140E050E00E9435460027F7FC009563 |
:10304000102FCA01B901A80197010E94C145A6012C |
:1030500095010E94C14520E038E040E050E00E9428 |
:1030600035462093C1043093C2044093C304509367 |
:10307000C40410C01092C1041092C2041092C30480 |
:103080001092C4041092C5041092C6041092C70492 |
:103090001092C8048091A2079091A3072090C504C4 |
:1030A0003090C6044090C7045090C804820D931D10 |
:1030B0009093A3078093A2070091A2071091A30702 |
:1030C000A090C104B090C204C090C304D090C404C6 |
:1030D00080917B04682E772488249924C601B50149 |
:1030E000A40193010E94C14520E032E040E050E09D |
:1030F0000E943546020F131F1093A3070093A207E7 |
: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 |
:10330000AB07C201B101A40193010E94C14520E0B5 |
:1033100032E040E050E00E943546021B130B109350 |
: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 |
:103B100039E040E050E00E94C14560938703709314 |
: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 |
:1041300067FD7095872F972F0E94FF4417FF06C0D9 |
:1041400020E030E040E853E40E945A4427E137EB96 |
:1041500041ED58E30E94794560938F03709390037B |
: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 |
:1043000003048093020444E050E0DA010E94504626 |
:10431000802D853038F18091D6079091D70797FF8F |
:1043200003C0909581959F4F60E170E00E94004628 |
:1043300070930704609306048091CC079091CD0799 |
:1043400097FF03C0909581959F4F60E170E00E94B8 |
:104350000046709305046093040460911607709101 |
:10436000170739C0DA010E945046802D4F5F5F4F1A |
:10437000DA010E945046202D9927982F8827820F16 |
:10438000911D90930504809304044F5F5F4FDA0101 |
:104390000E945046802D4F5F5F4FDA010E945046C9 |
:1043A000202D9927982F8827820F911D909307041D |
:1043B000809306044F5F5F4FDA010E945046602DE4 |
:1043C0004F5F5F4FDA010E945046202D7727762FEE |
:1043D0006627620F711D882777FD8095982F0E94B0 |
:1043E000FF44609308047093090480930A04909337 |
:1043F0000B0410922E0410922F041092300410928D |
:10440000310410923204109233041092340410924A |
:10441000350410923604109237041092380410922A |
:10442000390410923A0410923B0410923C0410920A |
:104430003D0410923E0410923F04109240041092EA |
:1044400041041092AB071092AA071092A307109292 |
:10445000A2071092D0071092CF0780910A03909183 |
:104460000B03A0910C03B0910D0390931907809357 |
:1044700018071092E3031092E20310924604109280 |
:104480004704109248041092490480914A04909184 |
:104490004B0490934D0480934C040E94043A82E3B1 |
:1044A00090E09093C5038093C403609185077727BC |
:1044B0008827992724EC39E040E050E00E94C1456C |
:1044C00060938703709388038093890390938A0392 |
:1044D000609186077727882799270E94C1456093B6 |
: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 |
:1048F0000E94D03A892B39F4809100018A3011F45A |
:10490000289A01C02898299A299AE0915C07FF27E4 |
:10491000EE0FFF1FE25DF84F0190F081E02DE858A7 |
:10492000FF4F8091CE07082F112704511040E01748 |
:10493000F1070CF48F012091080330910903809155 |
:10494000720799270297409182045091830482173D |
:104950009307ACF122E04D3B520714F1109283040F |
:1049600010928204E091C904F091CA042091CB0412 |
:104970003091CC04C901880F991F820F931F880FB3 |
:10498000991F880F991F6FE070E00E9400466E1714 |
:104990007F0764F43197F093CA04E093C90406C01A |
:1049A0004F5F5F4F50938304409382048091C9040A |
:1049B0009091CA0480179107F4F1C8013CC033E01C |
:1049C000493E5307BCF02091CB043091CC04C9017F |
:1049D00043E0880F991F4A95E1F7820F931F800FDC |
:1049E000911F6AE070E00E9400467093CC046093CF |
:1049F000CB0419C0CA01019690938304809382046A |
:104A00006AE070E00E940046892B89F48091C90415 |
:104A10009091CA048017910734F401969093CA04C8 |
:104A20008093C90404C01093CA040093C904809100 |
:104A3000C9049091CA049A83898397FF02C01A829D |
:104A4000198280915C04843608F05DC08091030176 |
:104A5000882399F480910403909105038F5F9F4F01 |
:104A600061F488E99AE39093C5038093C40380E0DE |
:104A70009CE090930503809304038091A30490919C |
:104A8000A404009731F001979093A4048093A304A9 |
:104A900004C01092630410925004809100018A3087 |
:104AA00011F4289A01C0289880919E0490919F0447 |
:104AB000815D974028F180917307682F77277A836B |
:104AC000698381E080935004E0915A07FF27EE0F3D |
:104AD000FF1FE25DF84F11821082E0915B07FF2714 |
:104AE000EE0FFF1FE25DF84F11821082E0915D072B |
:104AF000FF27EE0FFF1FE25DF84F118210826AC29E |
:104B00001092630467C280915C048D3808F462C21D |
:104B1000109250048091740722E3829FC0011124F7 |
:104B20009093A4048093A30489819A8189976CF05F |
:104B300080919E0490919F04AFEF8F3F9A0781F17F |
:104B4000019690939F0480939E0480919E0490917F |
:104B50009F04883C910520F0E981FA81B89704F51B |
:104B60001092BD041092BE041092BF041092C004B3 |
:104B70001092B9041092BA041092BB041092BC04B3 |
:104B800010923E0410923F0410924004109241048F |
:104B9000109242041092430410924404109245046F |
:104BA00029813A81293C31050CF472C1809163045A |
:104BB000882309F00FC280915D07E82FFF27EE0FD1 |
:104BC000FF1FE25DF84F808191818C3491050CF4D8 |
:104BD000D5C08091A2048F5F8093A204893C08F421 |
:104BE000F9C129980E941A21109263041092A2041C |
:104BF00010929F0410929E0480915A07282F332709 |
:104C0000F901EE0FFF1FE25DF84F8081918187343B |
:104C100091059CF4E0915B07FF27EE0FFF1FE25D1B |
:104C2000F84F0190F081E02DF7FF03C0F095E1957A |
:104C3000FF4FE734F1050CF46CC080915B07682FDF |
:104C40007727DB01AA0FBB1FA25DB84F8D919C9106 |
:104C50001197873491053CF0F901EE0FFF1FE25DDB |
:104C6000F84F808191818D919C918734910564F0FA |
:104C7000F901EE0FFF1FE25DF84F808191818734CB |
:104C8000910514F042E001C041E0FB01EE0FFF1F6F |
:104C9000E25DF84F80819181863491055CF4F901E1 |
:104CA000EE0FFF1FE25DF84F8081918187349105FF |
:104CB0000CF043E0FB01EE0FFF1FE25DF84F808137 |
:104CC00091818A5B9F4F5CF4F901EE0FFF1FE25D5B |
:104CD000F84F80819181873491050CF044E0660F94 |
:104CE000771F625D784FDB018D919C918A5B9F4FAE |
:104CF0005CF4220F331F225D384FF90180819181CE |
:104D0000863491050CF445E0A2E0B0E0042E0E9448 |
:104D100058460E948B0247E46AE577E00E94B2029F |
:104D20000E948B020E94BE208091620780FF10C00B |
:104D300080910E0390910F03875B934038F480912C |
:104D40000E0390910F038E5E924010F40E94251086 |
:104D50000E94233B80913608882309F43BC188EEEA |
:104D600093E00E94710D80ED97E09093C5038093CE |
:104D7000C40384EF91E00E94710D2CC18081918168 |
:104D8000855B9F4F0CF081C08091A2048F5F809360 |
:104D9000A204893C08F41EC129988FEF04E010E0BA |
:104DA000D801082E0E945846109263041092A20463 |
:104DB00010929F0410929E040E941A218091040474 |
:104DC0009091050460E071E00E940046D801062E33 |
:104DD0000E945846809104049091050460E071E0BF |
:104DE0000E9400460F5F1F4FD801082E0E945846B0 |
:104DF000809106049091070460E071E00E940046F3 |
:104E00000F5F1F4FD801062E0E945846809106045E |
:104E10009091070460E071E00E9400460F5F1F4F11 |
:104E2000D801082E0E945846609108047091090428 |
:104E300080910A0490910B040E94E244DC01CB01B2 |
:104E400060E071E00E9400460F5F1F4FD801062E00 |
:104E50000E945846609108047091090480910A04E8 |
:104E600090910B040E94E244DC01CB0160E071E010 |
:104E70000E9400460F5F1F4FD801082E0E9458461F |
:104E80000E948B020E94BE20A5C01092A204A2C064 |
:104E9000E981FA81B3970CF09DC080915D07482F9E |
:104EA0005527FA01EE0FFF1FE25DF84F80819181D7 |
:104EB000855B9F4F0CF06EC08091A1048F5F809343 |
:104EC000A104893C08F468C0469A88EC8093A10448 |
:104ED00081E090E090939F0480939E0481E0809312 |
:104EE00063041092B5041092B6041092B7041092A5 |
:104EF000B80410923E0410923F04109240041092A5 |
:104F000041041092420410924304109244041092FF |
:104F1000450410922E0410922F0410923004109227 |
:104F20003104109236041092370410923804109213 |
:104F3000390480910E0490910F04A0911004B09157 |
:104F400011048093320490933304A0933404B093FB |
:104F500035048091160490911704A0911804B09123 |
:104F6000190480933A0490933B04A0933C04B093BB |
:104F70003D041092BD041092BE041092BF04109222 |
:104F8000C0041092B9041092BA041092BB0410929B |
:104F9000BC0402C01092A104440F551F425D584F3B |
:104FA000DA018D919C918C34910594F08091A0044C |
:104FB0008F5F8093A004893C68F046981092630448 |
:104FC00088EC8093A00410929F0410929E0402C06B |
:104FD0001092A00480916B03815080936B038091A9 |
:104FE0006B038F3F29F080915004882309F442C35A |
:104FF0000E949E1D80915A07682E7724D301AA0F24 |
:10500000BB1FFD01E25DF84F0190F081E02DFC8BAC |
:10501000EB8B80916907E82EFF24AC5BB84F0D90B5 |
:10502000BC91A02DBA8BA98B80916A07C82EDD2474 |
:1050300080915B07882E9924C401880F991FDC0199 |
:10504000A25DB84F0D90BC91A02DB88BAF878C5B43 |
:10505000984FFC01A080B180E0915D07AE2FBB2787 |
:10506000AA0FBB1FA25DB84F0D90BC91A02DBE87AB |
:10507000AD8710919803612F772767FD7095872F73 |
:10508000972F0E94FF4417FF06C020E030E040E861 |
:1050900053E40E945A4420E030E040E251E40E9490 |
:1050A0005A4420E030E040E85BE30E9479451B0170 |
:1050B0002C016093D1077093D2078093D30790930C |
:1050C000D40710919903612F772767FD7095872F7B |
:1050D000972F0E94FF4417FF06C020E030E040E811 |
:1050E00053E40E945A4420E030EE4BE257E40E9421 |
:1050F0009C446093C1077093C2078093C307909349 |
:10510000C4072091B303222311F40C9412398AE0CE |
:1051100090E09093C5038093C403E22FFF27E2FF42 |
:1051200009C080917204482F5527440F551F440F22 |
:10513000551F10C0E3FD03C040E050E00BC080915C |
:1051400072049927880F991F880F991F44275527A4 |
:10515000481B590B20917C0430917D04C901F3E078 |
:10516000880F991FFA95E1F7821B930B840F951F07 |
:1051700068E070E00E9400468B0170937D046093AC |
:105180007C04E4FF09C080917204482F5527440F26 |
:10519000551F440F551F0FC0E5FD02C00C94273961 |
:1051A000809172049927880F991F880F991F4427AF |
:1051B0005527481B590B20917E0430917F04C9016B |
:1051C00063E0880F991F6A95E1F7821B930B840FA8 |
:1051D000951F68E070E00E9400467E8B6D8B709397 |
:1051E0007F0460937E048091B203282F332723FF2E |
:1051F00003C082E390E004C022FF07C08EEC9FEF63 |
:10520000909381048093800404C0109281041092D2 |
:10521000800421FF09C080919F039091A003019613 |
:105220009093A00380939F0324FF09C080919F0364 |
:105230009091A00301979093A00380939F034B89C3 |
:105240005C894E9D90014F9D300D5E9D300D112467 |
:1052500069897A896C9DC0016D9D900D7C9D900D32 |
:105260001124280F391FC80168E070E00E94004631 |
:10527000260F371F3C8B2B8B30935E0420935D04ED |
:105280008F8598898E9D80018F9D100D9E9D100D9C |
:105290001124AC9CC001AD9C900DBC9C900D1124C0 |
:1052A000080F191F8D899E8968E070E00E940046F2 |
:1052B000060F171F1093600400935F048091800411 |
:1052C00090918104AD85BE858A1B9B0B90936204EF |
:1052D000809361048091620782FF0CC080E090E0BF |
:1052E000A0E0B0E08093C1079093C207A093C307EA |
:1052F000B093C40720E030E040E050E0C201B101CB |
:105300000E940945882364F480E090E0A0E0B0E0CA |
:105310008093D1079093D207A093D307B093D4077B |
:1053200020E030E040E050E06091C1077091C2079A |
:105330008091C3079091C4070E940945882364F4B3 |
:1053400080E090E0A0E0B0E08093C1079093C207B6 |
:10535000A093C307B093C40780918E07682F772767 |
:1053600034E0432E512C4622572262FDC5C063FD16 |
:10537000C3C080910E0490910F04A0911004B091CD |
:10538000110481569A4EA040B0404CF1C70123E071 |
:10539000880F991F2A95E1F7EB89FC89E81BF90B27 |
:1053A000F0935E04E0935D0480910E0490910F04ED |
:1053B000A0911004B091110481589843A140B040CD |
:1053C0000CF441C0C701B4E0880F991FBA95E1F70A |
:1053D000E81BF90BF0935E04E0935D0434C0809108 |
:1053E0000E0490910F04A0911004B0911104805A02 |
:1053F0009541AF4FBF4F3CF59701A3E0220F331FFC |
:10540000AA95E1F74B895C89240F351F30935E0420 |
:1054100020935D0480910E0490910F04A0911004DC |
:10542000B091110481589843A140B04064F0C70185 |
:10543000F4E0880F991FFA95E1F7281B390B309398 |
:105440005E0420935D048091160490911704A0914E |
:105450001804B091190481569A4EA040B040DCF077 |
:10546000C701E3E0880F991FEA95E1F79801281B2F |
:10547000390B3093600420935F048091160490915F |
:105480001704A0911804B091190481589843A140C1 |
:10549000B04094F126C08091160490911704A09119 |
:1054A0001804B0911904805A9541AF4FBF4F24F5AD |
:1054B000970173E0220F331F7A95E1F7200F311F18 |
:1054C0003093600420935F04809116049091170438 |
:1054D000A0911804B091190481589843A140B0409C |
:1054E0005CF054E0EE0CFF1C5A95E1F72E193F09D1 |
:1054F0003093600420935F04F401EE0FFF1FE25D20 |
:10550000F84F2081318180918107482F552742171C |
:10551000530734F4452821F081E080936E0411C0D4 |
:10552000F401EE0FFF1FE25DF84F20813181809181 |
:105530008207DA01A81BB1092A173B0714F410925D |
:105540006E04F401EE0FFF1FE25DF84F8081918140 |
:10555000AA27BB27A41BB50B8A179B0734F463FF4C |
:1055600004C081E080936F0417C080916F0488238A |
:1055700099F0880C991CEEE2F7E08E0E9F1EF40164 |
:1055800020813181809182079927841B950B821796 |
:10559000930714F410926F04F301EE0FFF1FE25D06 |
:1055A000F84F808191814817590734F460FF04C097 |
:1055B00081E08093710415C080917104882389F083 |
:1055C000F301EE0FFF1FE25DF84F208131818091E2 |
:1055D0008207FA01E81BF1092E173F0714F4109215 |
:1055E0007104F301EE0FFF1FE25DF84F808191819E |
:1055F0008A179B0734F461FF04C081E08093700434 |
:1056000017C080917004882399F0660C771C2EE2F5 |
:1056100037E0620E731ED3012D913C918091820779 |
:105620009927841B950B8217930714F4109270042A |
:1056300080916E04882321F480916F04882321F0E7 |
:1056400081E080936D0402C010926D04809171041A |
:10565000882321F480917004882351F081E08093A5 |
:105660006C0410926D0410926E0410926F040EC0C0 |
:1056700010926C0480916D04882311F40C942B39E2 |
:1056800084E690E09093C5038093C40380918007E3 |
:105690009927E981FA818E179F0714F49A838983E9 |
:1056A00080915004882341F11092620410926104A9 |
:1056B00010925E0410925D041092600410925F04D8 |
:1056C0008DEC9CECACECBDE38093D1079093D207BA |
:1056D000A093D307B093D4078AE097EDA3EABBE386 |
:1056E0008093C1079093C207A093C307B093C407E8 |
:1056F00010926D0410926C048091B7079091B807D6 |
:10570000A091B907B091BA0720910E0430910F040F |
:105710004091100450911104820F931FA41FB51FD4 |
:105720008093B7079093B807A093B907B093BA07CF |
:105730008091BB079091BC07A091BD07B091BE07B7 |
:1057400020911604309117044091180450911904C7 |
:10575000820F931FA41FB51F8093BB079093BC07B4 |
:10576000A093BD07B093BE078091AF079091B0079B |
:10577000A091B107B091B2072091120430911304A7 |
:105780004091140450911504820F931FA41FB51F5C |
:105790008093AF079093B007A093B107B093B2077F |
:1057A0008091A5079091A607A091A707B091A8079F |
:1057B00020911A0430911B0440911C0450911D0447 |
:1057C000820F931FA41FB51F8093A5079093A60770 |
:1057D000A093A707B093A80750906C04552011F030 |
:1057E0000C948B3980916D04882311F00C948B39C3 |
:1057F0000C943339F0EE6F16FFEF7F06FFEF8F0644 |
:10580000FFEF9F0644F4E0EE6E2EEFEF7E2EEFEFFB |
:105810008E2EEFEF9E2E213231054105510534F0D9 |
:1058200070E2E72EF12C012D112D0DC0205E3F4FAF |
:105830004F4F5F4F44F460EEE62E6FEFF62E6FEFA2 |
:10584000062F6FEF162F80912E0490912F04A091B8 |
:105850003004B091310486199709A809B9098093D9 |
:105860002E0490932F04A0933004B09331048091C0 |
:10587000360490913704A0913804B09139048E1900 |
:105880009F09A00BB10B8093360490933704A0932B |
:105890003804B09339048091E4039091E5038F3F7D |
:1058A000910509F008F4BDC4552009F03EC480916B |
:1058B0006D04882309F039C46091B7077091B80767 |
:1058C0008091B9079091BA0720E031E040E050E0C4 |
:1058D0000E9435462093B7073093B8074093B90725 |
:1058E0005093BA076091BB077091BC078091BD07C8 |
:1058F0009091BE0720E031E040E050E00E94354644 |
:105900002093BB073093BC074093BD075093BE075D |
:10591000E0906E07FF240027112720911E0430918C |
:105920001F044091200450912104C801B7010E9436 |
:10593000C14520E031E040E050E00E943546209330 |
:105940001E0430931F04409320045093210420919F |
:105950002204309123044091240450912504C8016D |
:10596000B7010E94C14520E031E040E050E00E94D4 |
:10597000354620932204309323044093240450930B |
:105980002504609126047091270480912804909149 |
:10599000290420E031E040E050E00E9435462093A9 |
:1059A00026043093270440932804509329046091DF |
:1059B000B7077091B8078091B9079091BA07209105 |
:1059C0001E0430911F044091200450912104E09066 |
:1059D0008707FF2400271127621B730B840B950B8D |
:1059E000A80197010E9435462093960430939704AE |
:1059F0004093980450939904CA01B90120E031E022 |
:105A000040E050E00E943546690130936B042093DA |
:105A10006A046091BB077091BC078091BD079091AB |
:105A2000BE07209122043091230440912404509118 |
:105A30002504621B730B840B950BA80197010E9430 |
:105A40003546CA01B90120E031E040E050E00E9453 |
:105A50003546290130936904209368046091AF07AB |
:105A60007091B0078091B1079091B20720E031E0CA |
:105A700040E050E00E9435462093AF073093B007D6 |
:105A80004093B1075093B2076091A5077091A607A4 |
:105A90008091A7079091A80720E031E040E050E016 |
:105AA0000E9435462093A5073093A6074093A70789 |
:105AB0005093A807E0901204F0901304009114048E |
:105AC0001091150480910E0490910F04A091100480 |
:105AD000B0911104E81AF90A0A0B1B0BE092B10409 |
:105AE000F092B2040093B3041093B40460901A04CB |
:105AF00070901B0480901C0490901D0480911604EB |
:105B000090911704A0911804B0911904681A790AA9 |
:105B10008A0A9B0A6092AD047092AE048092AF0430 |
:105B20009092B004E092A904F092AA040093AB040E |
:105B30001093AC046092A5047092A6048092A7040E |
:105B40009092A8048091320490913304A09134047F |
:105B5000B09135048E199F09A00BB10B80933204CC |
:105B600090933304A0933404B093350480913A04A5 |
:105B700090913B04A0913C04B0913D048619970993 |
:105B8000A809B90980933A0490933B04A0933C047C |
:105B9000B0933D048091DD079091DE07A091DF076F |
:105BA000B091E007805D9D4DA640B040A4F080918B |
:105BB000DD079091DE07A091DF07B091E007805DDF |
:105BC0009D4DA640B0408093DD079093DE07A093E3 |
:105BD000DF07B093E0078091DD079091DE07A09189 |
:105BE000DF07B091E007B7FF14C08091DD07909107 |
:105BF000DE07A091DF07B091E00780539242A94FE2 |
:105C0000BF4F8093DD079093DE07A093DF07B0932B |
:105C1000E007809100018A3011F4289801C0289A89 |
:105C200081E090E090939104809390048091B70775 |
:105C30009091B807A091B907B091BA072091880454 |
:105C40003091890440918A0450918B04281B390BB0 |
:105C50004A0B5B0B57FF07C0509540953095219537 |
:105C60003F4F4F4F5F4F20523E44404050400CF05A |
:105C7000B9C091E0E91690E1F90690E0090790E0DB |
:105C800019070CF44EC080918F04882309F445C095 |
:105C9000D801C7015CE0B595A795979587955A956A |
:105CA000D1F701969093910480939004D801C70195 |
:105CB00043E0B595A795979587954A95D1F7809339 |
:105CC000960490939704A0939804B09399048958EC |
:105CD0009341A040B04064F088E893E1A0E0B0E0D8 |
:105CE0008093960490939704A0939804B09399049A |
:105CF0006091960470919704809198049091990412 |
:105D000020E031E040E050E00E943546C20ED31E54 |
:105D1000D0926B04C0926A0462C081E080938F04C9 |
:105D20005EC010928F04F0E0EF16F0EFFF06FFEF79 |
:105D30000F07FFEF1F070CF052C080918E048823DD |
:105D400009F449C088279927DC018E199F09A00B07 |
:105D5000B10B3CE0B595A795979587953A95D1F706 |
:105D600001969093910480939004C801B70128E0B4 |
:105D700030E040E050E00E94354620939604309396 |
:105D80009704409398045093990428573C4E4F4FE2 |
:105D90005F4F64F488E79CEEAFEFBFEF809396040B |
:105DA00090939704A0939804B093990460919604FB |
:105DB00070919704809198049091990420E031E0CB |
:105DC00040E050E00E943546C20ED31ED0926B04D4 |
:105DD000C0926A040BC081E080938E0407C01092C9 |
:105DE0008E0404C010929104109290048091CC070C |
:105DF0009091CD072091D6073091D70797FF03C028 |
:105E0000909581959F4F843691050CF043C0C90150 |
:105E100037FF03C0909581959F4F84369105D4F547 |
:105E200080918807282F33278091900490919104C6 |
:105E30002817390724F4309391042093900471E0DB |
:105E4000E71674E0F70670E0070770E017075CF0EC |
:105E50008091FA039091FB0320919004309191047A |
:105E6000820F931F13C080E0E8168CEFF8068FEFC7 |
:105E700008078FEF180774F48091FA039091FB03E1 |
:105E80002091900430919104821B930B9093FB031B |
:105E90008093FA0381E090E09093910480939004C2 |
:105EA000109292041092930410929404109295040C |
:105EB0008091BB079091BC07A091BD07B091BE0730 |
:105EC0002091840430918504409186045091870488 |
:105ED000281B390B4A0B5B0B57FF07C050954095A9 |
:105EE000309521953F4F4F4F5F4F20523E444040E9 |
:105EF00050400CF0B9C0A1E06A16A0E17A06A0E01B |
:105F00008A06A0E09A060CF44EC080918D04882386 |
:105F100009F445C0D401C3012CE0B595A795979528 |
:105F200087952A95D1F701969093910480939004D8 |
:105F3000D401C30103E0B595A795979587950A9578 |
:105F4000D1F78093920490939304A0939404B09318 |
:105F5000950489589341A040B04064F088E893E1EB |
:105F6000A0E0B0E08093920490939304A0939404F3 |
:105F7000B09395046091920470919304809194047D |
:105F80009091950420E031E040E050E00E943546D9 |
:105F9000420E531E509269044092680462C081E030 |
:105FA00080938D045EC010928D04F0E06F16F0EFC8 |
:105FB0007F06FFEF8F06FFEF9F060CF052C0809127 |
:105FC0008C04882309F449C088279927DC018619A5 |
:105FD0009709A809B9091CE0B595A79597958795E4 |
:105FE0001A95D1F701969093910480939004C4017F |
:105FF000B30128E030E040E050E00E9435462093B5 |
:10600000920430939304409394045093950428573A |
:106010003C4E4F4F5F4F64F488E79CEEAFEFBFEF0D |
:106020008093920490939304A0939404B093950466 |
:1060300060919204709193048091940490919504DE |
:1060400020E031E040E050E00E943546420E531E11 |
:1060500050926904409268040BC081E080938C04E4 |
:1060600007C010928C0404C0109291041092900406 |
:106070002091CC073091CD0737FF03C03095219593 |
:106080003F4F3093AE072093AD078091D607909194 |
:10609000D70797FF03C0909581959F4F9093C807AE |
:1060A0008093C707243631050CF047C0843691052C |
:1060B0000CF043C080918807282F332780919004EB |
:1060C000909191042817390724F430939104209378 |
:1060D000900471E0671674E0770670E0870670E060 |
:1060E00097065CF08091FC039091FD032091900451 |
:1060F00030919104820F931F13C080E068168CEFDB |
:1061000078068FEF88068FEF9806BCF48091FC0329 |
:106110009091FD032091900430919104821B930B88 |
:106120009093FD038093FC0308C0109269041092C1 |
:10613000680410926B0410926A0420E030E040E0A2 |
:1061400050E06091C1077091C2078091C3079091A0 |
:10615000C4070E940945882341F4109269041092F3 |
:10616000680410926B0410926A048091B7079091B2 |
:10617000B807A091B907B091BA07809388049093AB |
:106180008904A0938A04B0938B048091BB079091FB |
:10619000BC07A091BD07B091BE0780938404909383 |
:1061A0008504A0938604B093870410921E04109275 |
:1061B0001F041092200410922104109222041092C5 |
:1061C00023041092240410922504109226041092A5 |
:1061D000270410922804109229041092B7071092F5 |
:1061E000B8071092B9071092BA071092BB07109225 |
:1061F000BC071092BD071092BE071092AF07109215 |
:10620000B0071092B1071092B2071092A507109232 |
:10621000A6071092A7071092A8071092E503109204 |
:10622000E4038090610490906204940197FE04C09E |
:106230002227332728193909253131053CF080916F |
:10624000620784FD03C081E080939A04E0906B07AD |
:106250005901CC24B7FCC094DC2CB401882777FD0D |
:106260008095982F2E2D3327442755270E94C1450E |
:106270009B01AC01C601B5010E94C14520E032E09E |
:1062800040E050E00E94354689019A01FF24E89CD5 |
:10629000C001E99C900DF89C900D112464E070E021 |
:1062A0000E940046600F711F882777FD8095982F08 |
:1062B0006093B5047093B6048093B7049093B804C8 |
:1062C00020913E0430913F0440914004509141049C |
:1062D000261B370B480B590B20933E0430933F0489 |
:1062E000409340045093410480913E0490913F04B8 |
:1062F000A0914004B09141048155934CA040B0401E |
:1063000064F080E593ECA0E0B0E080933E049093CD |
:106310003F04A0934004B093410480913E049091C7 |
:106320003F04A0914004B0914104805B9C43AF4F77 |
:10633000BF4F64F480EB9CE3AFEFBFEF80933E046C |
:1063400090933F04A0934004B09341048091C8030C |
:10635000882309F4CFC01092C8032091CC07309154 |
:10636000CD0737FF03C0309521953F4F3093AE07DF |
:106370002093AD078091D6079091D70797FF03C070 |
:10638000909581959F4F9093C8078093C7072436B7 |
:1063900031050CF0ADC0843691050CF0A9C02091F8 |
:1063A0004A0430914B048091C9039091CA03281B81 |
:1063B000390B37FF03C0309521953F4F263031050B |
:1063C0000CF098C081E0809352046091DD077091D9 |
:1063D000DE078091DF079091E00722EE34E040E095 |
:1063E00050E00E9435462093DD073093DE0740934E |
:1063F000DF075093E00720914A0430914B048091CD |
:10640000DD079091DE07A091DF07B091E007281B20 |
:10641000390B3093AE072093AD07C9010197833B39 |
:106420009105C0F0243B310534F4C9018C549F4FD1 |
:10643000843B910560F48091DD079091DE07A09187 |
:10644000DF07B091E0070197A109B1090EC02C54F4 |
:106450003F4F9CF48091DD079091DE07A091DF070C |
:10646000B091E0070196A11DB11D8093DD079093C7 |
:10647000DE07A093DF07B093E0078091DD079091DE |
:10648000DE07A091DF07B091E007B7FF14C080914D |
:10649000DD079091DE07A091DF07B091E0078859F2 |
:1064A0009E4FAF4FBF4F8093DD079093DE07A093C1 |
:1064B000DF07B093E0076091DD077091DE07809100 |
:1064C000DF079091E00728E631E040E050E00E94CD |
:1064D000354622EE34E040E050E00E94C145609332 |
:1064E000DD077093DE078093DF079093E00702C01B |
:1064F000109252048091620785FF3EC0E0915A07D6 |
:10650000FF27EE0FFF1FE25DF84F0190F081E02DB5 |
:10651000F7FF03C0F095E195FF4F79976CF5E09197 |
:106520005B07FF27EE0FFF1FE25DF84F0190F08140 |
:10653000E02DF7FF03C0F095E195FF4F7997E4F464 |
:106540008091540890915508892BB1F08091940363 |
:1065500090915304893C20F0933021F084E006C0F0 |
:10656000943019F41092530403C083E080935304D1 |
:1065700080915304992708C080915304882331F0F7 |
:106580001092530480E090E00E94783C80914A048D |
:1065900090914B04892B09F461C08091620783FFBD |
:1065A0005DC08091CB039091CC03892B09F456C038 |
:1065B0002091C7073091C8078091AD079091AE0731 |
:1065C0008217930724F43093AE072093AD072091F0 |
:1065D0005204222371F080919A04882351F0809113 |
:1065E0004A0490914B0490934D0480934C04109274 |
:1065F0009A0480919703482F55275093AE074093F4 |
:10660000AD071416150654F5222341F100913E04FE |
:1066100010913F04209140043091410480914E0438 |
:1066200090914F04BC01649FC001659F900D749FC1 |
:10663000900D112460E270E00E940046882777FDEB |
:106640008095982F060F171F281F391F00933E04AF |
:1066500010933F04209340043093410480919B04A5 |
:10666000815080939B048F3F09F006C188E180939D |
:106670009B0460910E0470910F048091100490911E |
:106680001104E0906E07FF2400271127A80197014D |
:106690000E9435463093D4062093D30660911604A9 |
:1066A000709117048091180490911904A801970122 |
:1066B0000E9435463093D6062093D5068091CC07AC |
:1066C0009091CD079093D8068093D7068091D607F6 |
:1066D0009091D7079093DA068093D9068091CF07DF |
:1066E0009091D0079093DC068093DB068091640440 |
:1066F000909165049093DE068093DD0660914604D8 |
:1067000070914704809148049091490420E032E060 |
:1067100040E050E00E9435463093E0062093DF06CB |
:1067200080914A0490914B049093E4068093E30691 |
:106730006091DD077091DE078091DF079091E0079F |
:1067400022EE34E040E050E00E9435463093E60609 |
:106750002093E5068091B5039091B6039093F406DB |
:106760008093F30680910803909109039093F606B5 |
:106770008093F5068091AA079091AB079093F80655 |
:106780008093F7068091A2079091A3079093FA0651 |
:106790008093F9068091CF079091D0079093FC06E3 |
:1067A0008093FB0680915D0490915E049093FE06B9 |
:1067B0008093FD0680915F049091600490930007A0 |
:1067C0008093FF0680916104909162049093020788 |
:1067D000809301078091720499279093E806809333 |
:1067E000E7068091740499279093EA068093E9065E |
:1067F0008091CD049091CE04909304078093030779 |
:106800008091CF049091D004909306078093050760 |
:1068100080916308909164086AE070E00E940046ED |
:106820007093080760930707809165089091660848 |
:106830006AE070E00E94004670930A0760930907BF |
:1068400080916708909168086AE070E00E940046B5 |
:1068500070930C0760930B072091530484E1289FE9 |
:10686000900111248091700890917108820F931FFC |
:1068700090930E0780930D0780916C048823A9F0F4 |
:106880006091AA077091AB07882777FD8095982FB4 |
:106890000E94FF442091D1073091D2074091D30745 |
:1068A0005091D4070E94794532C060910E047091D6 |
:1068B0000F048091100490911104E090AA07F090C9 |
:1068C000AB070E94FF442091C1073091C20740915D |
:1068D000C3075091C4070E9479455B016C010027F2 |
:1068E000F7FC0095102FC801B7010E94FF442091CA |
:1068F000D1073091D2074091D3075091D4070E941D |
:1069000079459B01AC01C601B5010E945A440E9421 |
:10691000E2447093AB076093AA0780916D048823CB |
:10692000A9F06091A2077091A307882777FD809551 |
:10693000982F0E94FF442091D1073091D2074091B7 |
:10694000D3075091D4070E94794532C06091160454 |
:10695000709117048091180490911904E090A20797 |
:10696000F090A3070E94FF442091C1073091C20715 |
:106970004091C3075091C4070E9479455B016C01A7 |
:106980000027F7FC0095102FC801B7010E94FF44B3 |
:106990002091D1073091D2074091D3075091D4076D |
:1069A0000E9479459B01AC01C601B5010E945A4481 |
:1069B0000E94E2447093A3076093A2076091CF07FF |
:1069C0007091D007E0902A04F0902B0400912C04E1 |
:1069D00010912D048091C1079091C207A091C30727 |
:1069E000B091C40789879A87AB87BC87882777FDD2 |
:1069F0008095982F0E94FF442091D1073091D207B3 |
:106A00004091D3075091D4070E9479455B016C01F6 |
:106A1000C801B7010E94FF4429853A854B855C85F2 |
:106A20000E94794520E030E040E05FE30E94794534 |
:106A30009B01AC01C601B5010E945A440E94E24488 |
:106A40007093D0076093CF078091AA079091AB070E |
:106A50008150984034F080E098E09093AB078093A9 |
:106A6000AA078091AA079091AB078050984F34F401 |
:106A700080E098EF9093AB078093AA078091A207DC |
:106A80009091A3078150984034F080E098E0909373 |
:106A9000A3078093A2078091A2079091A30780503B |
:106AA000984F34F480E098EF9093A3078093A20767 |
:106AB0008091CF079091D0078150984034F080E0CA |
:106AC00098E09093D0078093CF078091CF07909163 |
:106AD000D0078050984F34F480E098EF9093D0071F |
:106AE0008093CF0780916207992780FFD9C040919A |
:106AF000940381FF0EC0423310F58091640490919D |
:106B0000650444979093670480936604109251043F |
:106B100019C020919F033091A003240F311D809153 |
:106B200067079927AC01249FC001259F900D349FD2 |
:106B3000900D11244497909367048093660481E03C |
:106B40008093510480915004882321F010926704AF |
:106B500010926604209164043091650440916604AB |
:106B600050916704421753070CF09AC0809151046A |
:106B7000882309F495C0241B350B80919503992730 |
:106B8000BC01269FC001279F900D369F900D1124B8 |
:106B900060E170E00E94004609811A81061B170B14 |
:106BA0002091E2033091E303809193039927DC0164 |
:106BB0002A9FC0012B9F900D3A9F900D112468E0F1 |
:106BC00070E00E940046061B170B6091460470910E |
:106BD0004704809148049091490420E032E040E06D |
:106BE00050E00E943546CA01B9012091960333272F |
:106BF000442755270E94C14520E230E040E050E0A4 |
:106C00000E943546BFEF2E3C3B0714F42EEC3FEFBD |
:106C100080919C0490919D04AC0164E0440F551F49 |
:106C20006A95E1F7481B590B2333310514F022E331 |
:106C300030E0021B130BCA01800F911F60E170E06E |
:106C40000E94004670939D0460939C0480916307AA |
:106C50009927681779078CF4E981FA81E817F90711 |
:106C60002CF090939D0480939C0407C029813A8165 |
:106C700030939D0420939C040DC080919C049091BE |
:106C80009D0449815A814817590724F450939D0463 |
:106C900040939C0460919C0470919D047A83698365 |
:106CA00089819A819093E2068093E106E090CF0774 |
:106CB000F090D0070091B5041091B6042091B7046C |
:106CC0003091B8048091CE07482E5524A981BA810D |
:106CD00054971CF41C821B8229C089819A8162E02E |
:106CE00070E00E9400469701201B310BCB01261754 |
:106CF00037070CF4C901709561957F4F68177907C4 |
:106D00000CF4BC01C201E981FA818E1B9F0B68174C |
:106D100079070CF4CB0129813A81241935093C8388 |
:106D20002B832817390714F49C838B832091AA079F |
:106D30003091AB0780905D0490905E048091CD040B |
:106D40009091CE04881A990A281939093093B60708 |
:106D50002093B50720E030E040E050E069857A8577 |
:106D60008B859C850E9409458823F1F1E0900E04F3 |
:106D7000F0900F0400911004109111046091BD0473 |
:106D80007091BE048091BF049091C0040E94FF44A2 |
:106D90005B016C01C801B7010E94FF4429853A8557 |
:106DA0004B855C850E9479457B018C01B401882765 |
:106DB00077FD8095982F0E94FF449B01AC01C8018C |
:106DC000B7010E9459449B01AC01C601B5010E9464 |
:106DD0005A440E94E2446093BD047093BE048093C1 |
:106DE000BF049093C0041CC02091B5073091B60732 |
:106DF000442737FD4095542F8091BD049091BE04E7 |
:106E0000A091BF04B091C004820F931FA41FB51FAF |
:106E10008093BD049093BE04A093BF04B093C004BC |
:106E20008091BD049091BE04A091BF04B091C004B4 |
:106E3000181619061A061B0624F40297A109B109AF |
:106E400003C00296A11DB11D8093BD049093BE04A2 |
:106E5000A093BF04B093C0048091BD049091BE0480 |
:106E6000A091BF04B091C00481383EE3930730E0A5 |
:106E7000A30730E0B3072CF080E89EE3A0E0B0E089 |
:106E800009C08058914CAF4FBF4F64F480E891EC3B |
:106E9000AFEFBFEF8093BD049093BE04A093BF04F7 |
:106EA000B093C0046091B5077091B60780918F03CD |
:106EB00090919003A0919103B09192038D839E8352 |
:106EC000AF83B887882777FD8095982F0E94FF446D |
:106ED0007B018C016091BD047091BE048091BF0460 |
:106EE0009091C0040E94FF449B01AC016D817E81A2 |
:106EF0008F8198850E9479459B01AC01C801B7013B |
:106F00000E945A440E94E2443B014C016B01809173 |
:106F10009E03E82EFF24002711278B819C8197FF79 |
:106F200003C0909581959F4F62E070E00E940046FB |
:106F30009B01A981BA812A0F3B1F442737FD409549 |
:106F4000542FC801B7010E94C14520E430E040E061 |
:106F500050E00E9435461901C216D3060CF4930185 |
:106F60006624772462187308A301621673060CF472 |
:106F7000A90189819A81EB81FC818E0F9F1F840F6B |
:106F8000951F97FF03C020E030E005C092018415F3 |
:106F900095050CF49C018091AC07882E9924C401BE |
:106FA000821693060CF4C9018093A40789819A8103 |
:106FB000841B950B2B813C81820F931F97FF03C08D |
:106FC00020E030E005C09201841595050CF49C0189 |
:106FD000C401821693060CF4C9018093A90720917D |
:106FE000A2073091A30740915F0450916004809103 |
:106FF000CF049091D004481B590B5C8B4B8B241B06 |
:10700000350B3093A1072093A00720E030E040E04B |
:1070100050E069857A858B859C850E940945882387 |
:1070200009F440C0E0901604F09017040091180491 |
:10703000109119046091B9047091BA048091BB0455 |
:107040009091BC040E94FF445B016C01C801B70130 |
:107050000E94FF4429853A854B855C850E947945CD |
:107060007B018C01AB89BC89BD01882777FD8095A8 |
:10707000982F0E94FF449B01AC01C801B7010E94F8 |
:1070800059449B01AC01C601B5010E945A440E94BB |
:10709000E2446093B9047093BA048093BB04909364 |
:1070A000BC041CC02091A0073091A107442737FDE4 |
:1070B0004095542F8091B9049091BA04A091BB04DB |
:1070C000B091BC04820F931FA41FB51F8093B90415 |
:1070D0009093BA04A093BB04B093BC048091B9040C |
:1070E0009091BA04A091BB04B091BC041816190683 |
:1070F0001A061B0624F40297A109B10903C00296DF |
:10710000A11DB11D8093B9049093BA04A093BB0450 |
:10711000B093BC048091B9049091BA04A091BB04CF |
:10712000B091BC048138EEE39E07E0E0AE07E0E0FA |
:10713000BE072CF080E89EE3A0E0B0E009C08058D4 |
:10714000914CAF4FBF4F64F480E891ECAFEFBFEFCD |
:107150008093B9049093BA04A093BB04B093BC0489 |
:107160006091A0077091A107882777FD8095982FDF |
:107170000E94FF447B018C016091B9047091BA04B4 |
:107180008091BB049091BC040E94FF449B01AC0120 |
:107190006D817E818F8198850E9479459B01AC012C |
:1071A000C801B7010E945A440E94E244910162154D |
:1071B00073050CF49B01C301621673060CF4C9013C |
:1071C00049815A81480F591F2B813C81421B530B27 |
:1071D00057FF03C060E070E005C0B20144155505DB |
:1071E0000CF4BA01A401861697060CF4AB01409387 |
:1071F000C90729813A81281B390B4B815C81241BEB |
:10720000350B37FF03C040E050E005C0A201241554 |
:1072100035050CF4A901C401841695060CF0D9C0FB |
:10722000CA01D7C020917C0430917D04C90113E0CC |
:10723000880F991F1A95E1F7821B930B68E070E0A5 |
:107240000E9400468B0170937D0460937C0440E0B3 |
:1072500050E00C94DB2880916C04882311F40C948A |
:10726000502B0C94462B60910E0470910F0480916A |
:10727000100490911104A0906E07BB24CC24DD244F |
:10728000E090CC07F090CD07A60195010E9435460D |
:107290000027F7FC0095102F2E193F09400B510BCA |
:1072A000CA01B90120E130E040E050E00E943546DB |
:1072B00039014A01609116047091170480911804F5 |
:1072C00090911904E090D607F090D707A601950198 |
:1072D0000E9435460027F7FC0095102F2E193F0914 |
:1072E000400B510BCA01B90120E130E040E050E011 |
:1072F0000E94354679018A0161E2661671048104B3 |
:10730000910414F40C94FA2BB0E26B2E712C812CA6 |
:10731000912C0C940B2C10921E0410921F041092AE |
:10732000200410922104109222041092230410923F |
:107330002404109225041092B7071092B8071092F7 |
:10734000B9071092BA071092BB071092BC071092AF |
:10735000BD071092BE071092AF071092B0071092AF |
:10736000B1071092B2071092A5071092A6071092CB |
:10737000A7071092A80780912E0490912F04A09146 |
:107380003004B09131048093320490933304A0937D |
:107390003404B09335048091360490913704A09161 |
:1073A0003804B091390480933A0490933B04A0933D |
:1073B0003C04B0933D041092E5031092E403109254 |
:1073C0006B0410926A0410926904109268040C9481 |
:1073D0004B2C8093C50766960FB6F894DEBF0FBEA0 |
:1073E000CDBFDF91CF911F910F91FF90EF90DF9074 |
:1073F000CF90BF90AF909F908F907F906F905F9055 |
:107400004F903F902F9008951092D2041092D10483 |
:107410001092380810923708109271081092700874 |
:1074200010922308109205081092820810923608D4 |
:1074300010924B08109269081092CE041092CD045D |
:107440001092D0041092CF0410926F0810926E0820 |
:1074500010925308109252081092100810920F08C0 |
:10746000109255081092540808958091230888239B |
:1074700019F481E090E0089580918208882309F44E |
:107480008CC080910508882309F487C08091760814 |
:1074900099278370907002970CF474C080917708DC |
:1074A00080FF70C0609115087091160880911708D0 |
:1074B000909118082AE030E040E050E00E94354604 |
:1074C0002093390830933A0840933B0850933C0886 |
:1074D0006091190870911A0880911B0890911C08FE |
:1074E0002AE030E040E050E00E94354620933D081D |
:1074F00030933E0840933F085093400860911D0828 |
:1075000070911E0880911F08909120082AE030E0B9 |
:1075100040E050E00E9435462093410830934208F5 |
:1075200040934308509344086091F5077091F60723 |
:107530008091F7079091F8072AE030E040E050E0B2 |
:107540000E9413462093450830934608409347080D |
:10755000509348086091F9077091FA078091FB07F2 |
:107560009091FC0720EA36E841E050E00E94354661 |
:1075700030934A082093490881E080934B0880E0CB |
:1075800090E004C010924B0882E090E01092230833 |
:107590001092820810920508089581E090E0089505 |
:1075A0000E94353A181619060CF44CC08091540804 |
:1075B0009091550821E08039920730F4845D9E4F08 |
:1075C0009093550880935408809136088823B1F130 |
:1075D0008091390890913A0820912408309125082B |
:1075E000821B930B909364088093630880913D08FD |
:1075F00090913E082091280830912908821B930B16 |
:1076000090936608809365088091410890914208A4 |
:1076100020912C0830912D08821B930B90936808C1 |
:107620008093670881E08093690881E090E09093FF |
:107630006F0880936E0880E090E0089510926908CA |
:1076400082E090E008950E94353A892B99F5809167 |
:10765000390890913A08A0913B08B0913C0880937A |
:10766000240890932508A0932608B09327088091BA |
:107670003D0890913E08A0913F08B091400880934A |
:10768000280890932908A0932A08B0932B0880918A |
:10769000410890914208A0914308B091440880931A |
:1076A0002C0890932D08A0932E08B0932F0881E00A |
:1076B000809336080895482F2091D1043091D20448 |
:1076C0002530310509F49AC0263031058CF421307B |
:1076D000310529F1223031051CF4232BD1F003C1EF |
:1076E0002230310571F12330310509F0FCC02FC083 |
:1076F0002730310509F4E2C0273031050CF490C081 |
:107700002830310509F4E5C02930310509F0EBC016 |
:10771000A2C0853B09F0E7C081E090E0D5C0823689 |
:1077200039F482E090E09093D2048093D10404C0B5 |
:107730001092D2041092D1041092E7041092E8043F |
:107740000895813009F0CFC083E090E0BDC088305B |
:1077500031F0823151F1833009F044C013C023E28B |
:1077600038E03093F6042093F504809123088823B1 |
:10777000C9F5225130403093F4042093F3042E5E77 |
:107780003F4F25C022E838E03093F6042093F504FB |
:1077900080918208882331F5205130403093F404E1 |
:1077A0002093F304205F3F4F12C025E038E0309370 |
:1077B000F6042093F50480910508882399F4245257 |
:1077C00030403093F4042093F3042C5D3F4F30930A |
:1077D000EC042093EB0485E090E09093D204809336 |
:1077E000D10404C01092D2041092D104842F8F5F70 |
:1077F0008093E7048F5F8093E8040895992790931E |
:10780000EA048093E9049091E704940F9093E704CD |
:107810008091E804890F8093E80486E090E054C0EA |
:10782000282F3327322F22278091E9049091EA04F0 |
:10783000820F931F9093EA048093E9049091E704E8 |
:10784000940F9093E7048091E804890F8093E804F3 |
:1078500089E090E039C06091E9047091EA04611513 |
:10786000710509F440C0E091F304F091F4048083C1 |
:107870008091E704840F8093E7049091E804980FC7 |
:107880009093E804CB0101979093EA048093E90474 |
:10789000892B89F08091EB049091EC048E179F075F |
:1078A00050F03196F093F404E093F3043093D20453 |
:1078B0002093D104089587E090E006C08091E7040A |
:1078C000481789F488E090E09093D2048093D10423 |
:1078D00008958091E804481731F4E091F504F0919F |
:1078E000F60481E080831092D2041092D1040895AE |
:1078F0002F923F924F925F926F927F928F929F92C0 |
:10790000AF92BF92CF92DF92EF92FF920F931F93AD |
:10791000CF93DF933C018330910509F4C4C08430D8 |
:10792000910521F0892B09F422C1BAC020913708B2 |
:1079300030913808C9010197029708F435C1809148 |
:10794000E5049091E60401969093E6048093E504A3 |
:10795000855F914008F4FBC51092E6041092E5049F |
:107960001092EE041092ED041092F0041092EF04C5 |
:107970001092F2041092F1041092E4041092E304C5 |
:107980001092E2041092E10410926B0810926A08BF |
:1079900010926D0810926C081092DE041092DD04B3 |
:1079A0001092E0041092DF041092D8041092D704D1 |
:1079B0001092D6041092D5041092DC041092DB04CD |
:1079C0001092DA041092D90410924C0810924D08CB |
:1079D00010924E0810924F081092D4041092D304C3 |
:1079E000109271081092700880916908882309F438 |
:1079F00051C0809163089091640890935D088093D2 |
:107A00005C08609165087091660870935F086093E8 |
:107A10005E0821E02093620890930908809308088B |
:107A200070930B0860930A0820930E087095619577 |
:107A30007F4F909581959F4F0E94BF429C019093EC |
:107A4000510880935008E0915C08F0915D08F7FFC1 |
:107A500003C08AE590E002C08EE091E0821B930BA8 |
:107A600090935108809350084091500850915108CC |
:107A700060915E0870915F08CF010E94F943709396 |
:107A800059086093580882E090E0909338088093FA |
:107A9000370860C5109262081092380810923708B3 |
:107AA00082E090E059C5809137089091380801979D |
:107AB00009F4FAC18091E5049091E604019690934F |
:107AC000E6048093E504855F914008F440C5109278 |
:107AD000E6041092E50480916908882309F444C003 |
:107AE0001092F0041092EF041092F2041092F1043C |
:107AF0001092E4041092E3041092E2041092E10464 |
:107B000010926B0810926A0810926D0810926C081F |
:107B10001092DE041092DD041092E0041092DF0453 |
:107B20001092D8041092D7041092D6041092D50463 |
:107B30001092DC041092DB041092DA041092D90443 |
:107B400080916308909164089093090880930808D5 |
:107B5000809165089091660890930B0880930A08BD |
:107B600081E080930E089DC110920E0895CF10926F |
:107B7000E6041092E5041092CE041092CD04109207 |
:107B8000D0041092CF041092530810925208109211 |
:107B9000100810920F08109271081092700810923D |
:107BA000380810923708D6C42130310509F47CC159 |
:107BB0002230310541F0232B09F06ECF1092E604FC |
:107BC0001092E504C7C480916208882309F464CF49 |
:107BD00080916E0890916F08181619060CF061C11B |
:107BE0008091700890917108099709F45AC18091A9 |
:107BF000ED049091EE0401969093EE048093ED04D1 |
:107C00006091080870910908809163089091640858 |
:107C10006B01C81AD90AD7FE04C0D094C194D10808 |
:107C2000D394E0910A08F0910B0880916508909137 |
:107C30006608DF01A81BB90BB7FF03C0B095A1957B |
:107C4000BF4F20914C0830914D0840914E08509103 |
:107C50004F088091580890915908821B930B8333E9 |
:107C600091050CF444C08CE3C816D1042CF5DC97C4 |
:107C70001CF58091D3049091D4048C3091052CF4A0 |
:107C800001969093D4048093D3048091D30490916F |
:107C9000D404AA2797FDA095BA2F280F391F4A1F91 |
:107CA0005B1F20934C0830934D0840934E0850932F |
:107CB0004F0883E090E041C08091D3049091D404B8 |
:107CC000823091052CF001979093D4048093D304D3 |
:107CD0002F5F3F4F4F4F5F4F20934C0830934D081D |
:107CE00040934E0850934F0884E090E026C04F9791 |
:107CF0000CF484C098E2C916D1048CF498977CF4F3 |
:107D00002A5F3F4F4F4F5F4F20934C0830934D08F1 |
:107D100040934E0850934F0885E090E00EC02F5FCF |
:107D20003F4F4F4F5F4F20934C0830934D08409387 |
:107D30004E0850934F0886E090E09093710880932E |
:107D400070081092F2041092F10481E090E0909398 |
:107D5000F0048093EF0460904C0870904D08809080 |
:107D60004E0890904F0880915008909151080E94C1 |
:107D70009B437C0120904C0830904D0840904E0869 |
:107D800050904F0880915008909151080E94F14303 |
:107D90005C010027F7FC0095102FC401B301A80176 |
:107DA00097010E94C14528EE33E040E050E00E9478 |
:107DB000354680915C0890915D08820F931F9093E7 |
:107DC000090880930808CC24B7FCC094DC2CC201BD |
:107DD000B101A60195010E94C14528EE33E040E0C3 |
:107DE00050E00E94354680915E0890915F08820FB6 |
:107DF000931F90930B0880930A0853C028E2C21681 |
:107E0000D1040CF048C098970CF045C087E090E092 |
:107E100090937108809370081092F0041092EF0410 |
:107E20001092F2041092F104633071051CF063505B |
:107E3000704006C03FEF6E3F730734F46D5F7F4FB5 |
:107E40007093090860930808E330F10514F0339744 |
:107E500005C04FEFEE3FF4072CF43396F0930B0878 |
:107E6000E0930A0880910808909109080396079703 |
:107E7000C0F480910A0890910B080396079788F444 |
:107E8000109209081092080810920B0810920A0824 |
:107E900089E090E002C088E090E0909371088093C0 |
:107EA000700881E090E0F1CD80916E0890916F08AC |
:107EB000181619060CF046C310926F0810926E083F |
:107EC0002091DD043091DE044091DF045091E00404 |
:107ED000A0900808B0900908809163089091640808 |
:107EE000A81AB90AB092DE04A092DD04C0910A0873 |
:107EF000D0910B088091650890916608C81BD90B3A |
:107F0000D093E004C093DF04C090E304D090E40475 |
:107F1000CA0CDB1CD092E404C092E3040091E1049B |
:107F20001091E2040C0F1D1F1093E2040093E10472 |
:107F3000F501E21BF30BF093DC04E093DB047E011C |
:107F4000E41AF50AF092DA04E092D9048091EF0481 |
:107F50009091F0042091D7043091D8048090D504FA |
:107F60009090D60418161906FCF4C901880F991FC1 |
:107F700063E070E00E9400469B01CF0163E070E087 |
:107F80000E940046260F371F3093D8042093D70451 |
:107F9000C401880F991F63E070E00E9400469B01B6 |
:107FA000C70163E070E022C0C90164E070E00E9494 |
:107FB00000469B01CF01880F991F8E0F9F1F64E021 |
:107FC00070E00E940046260F371F3093D80420939C |
:107FD000D704C40164E070E00E9400469B01C70121 |
:107FE000880F991F8E0D9F1D64E070E00E9400466F |
:107FF000260F371F3093D6042093D504C601D7FE31 |
:1080000004C0882799278C199D098153954754F4FA |
:10801000C80117FF04C088279927801B910B815343 |
:10802000954764F0CA18DB08D092E404C092E304D8 |
:108030000C1B1D0B1093E2040093E1048091F104EA |
:108040009091F2041816190644F41092E404109268 |
:10805000E3041092E2041092E104B501B7FE03C0FC |
:10806000709561957F4FCE01D7FF03C090958195A4 |
:108070009F4F0E94BF426091DF047091E004AC0109 |
:108080008091DD049091DE040E94F9439B01AC01D4 |
:108090008091EF049091F004892B81F4CA01B90119 |
:1080A00023E030E040E050E00E943546E9012A96A6 |
:1080B000C531D10594F0C4E1D0E00FC0CA01B901C7 |
:1080C0002AE030E040E050E00E943546E9012A967F |
:1080D000C031D10514F0CFE0D0E0E0907304FF246C |
:1080E000002711276091E3047091E404882777FD4D |
:1080F0008095982FA80197010E94C14520E031E0AA |
:1081000040E050E00E94354659016A016091E10467 |
:108110007091E204882777FD8095982FA801970138 |
:108120000E94C14520E031E040E050E00E94354629 |
:108130003093E2042093E10430E6A3163FEFB30648 |
:108140003FEFC3063FEFD30644F460E6A62E6FEF81 |
:10815000B62E6FEFC62E6FEFD62E98018701003630 |
:108160004FEF14074FEF24074FEF340724F400E6D6 |
:108170001FEF2FEF3FEF80917204869586958695CD |
:10818000E82EFF2480917404869586958695882E26 |
:10819000992451EAA516B104C104D1042CF050EA87 |
:1081A000A52EB12CC12CD12C8091DD049091DE0440 |
:1081B000880F991FAC01E49EC001E59E900DF49ECE |
:1081C000900D112460E170E00E940046FB01EA0D71 |
:1081D000FB1D8091D7049091D804AC01849EC0010E |
:1081E000859E900D949E900D1124AC01C49FC001FA |
:1081F000C59F900DD49F900D11246AE070E00E94FD |
:108200000046E60FF71FF0936B08E0936A085801E9 |
:108210006901013A1105210531052CF030EAA32E40 |
:10822000B12CC12CD12C8091DF049091E004880FF7 |
:10823000991F9C01E29EC001E39E900DF29E900D5D |
:10824000112460E170E00E9400469B012A0D3B1D55 |
:108250008091D5049091D604AC01849EC001859E86 |
:10826000900D949E900D1124AC01C49FC001C59F38 |
:10827000900DD49F900D11246AE070E00E9400469A |
:10828000260F371F30936D0820936C08B901CF017A |
:108290000E94BF429C0190935B0880935A08009112 |
:1082A0006A0810916B0817FD03C08AE590E002C0D0 |
:1082B0008EE091E0821B930B90935B0880935A08A9 |
:1082C0006091DD077091DE078091DF079091E007F4 |
:1082D000C0915A08D0915B0822EE34E040E050E0B3 |
:1082E0000E943546CE01821B930B9C019093070898 |
:1082F00080930608853B91057CF0C43BD1051CF0BA |
:10830000285631400FC088E691E0821B930B909372 |
:108310000708809306080AC09FEF2C34390734F40D |
:1083200028593E4F3093070820930608C0906C08E8 |
:10833000D0906D08980117FF04C022273327201B17 |
:10834000310BC601D7FE04C0882799278C199D09D7 |
:108350008217930754F4CE010E949B437C01B8011D |
:10836000882777FD8095982F09C0CE010E94F143A0 |
:108370007C01B601882777FD8095982F28EE33E0A1 |
:1083800040E050E00E94C1450027F7FC0095102F07 |
:10839000A80197010E943546B90137FF03C07095C7 |
:1083A00061957F4F5B01CC24B7FCC094DC2CB0926C |
:1083B0005708A092560880910608909107080E94DD |
:1083C0009B439C01442737FD4095542FC601B501BE |
:1083D0000E94C14528EE33E040E050E00E9435465F |
:1083E0003093D0042093CF04809106089091070821 |
:1083F0000E94F1439C01442737FD4095542FC6014C |
:10840000B5010E94C14528EE33E040E050E00E94F3 |
:108410003546309521953F4F3093CE042093CD04BF |
:108420008091CF049091D00441E0813494071CF0F6 |
:1084300080E491E005C0805C9E4F34F480EC9EEFB8 |
:108440009093D0048093CF0481E0213438071CF04E |
:1084500080E491E005C0205C3E4F34F480EC9EEF58 |
:108460009093CE048093CD048091CF049091D0045A |
:108470000AE510E09C01209FC001219F900D309FD4 |
:10848000900D112460E471E00E940046CB010E942F |
:108490009B43AA2797FDA095BA2FBC01CD0129E1E6 |
:1084A00030E040E050E00E9435463093D004209305 |
:1084B000CF048091CD049091CE04AC01409FC001C7 |
:1084C000419F900D509F900D112460E471E00E9437 |
:1084D0000046CB010E949B43AA2797FDA095BA2F87 |
:1084E000BC01CD0129E130E040E050E00E9435467A |
:1084F0003093CE042093CD048091DD049091DE046E |
:1085000097FF03C0909581959F4F8159914064F4E6 |
:108510008091DF049091E00497FF03C090958195CE |
:108520009F4F815991404CF01092D0041092CF048B |
:108530001092CE041092CD04AFCA34E063167104D9 |
:1085400049F4A1CA44E06416710421F49CCA81E094 |
:1085500090E002C080E090E0DF91CF911F910F91F9 |
:10856000FF90EF90DF90CF90BF90AF909F908F9053 |
:108570007F906F905F904F903F902F900895EF9273 |
:10858000FF920F931F93CF93DF938C01EB019C011C |
:1085900097FF04C022273327281B390BCE01D7FFB2 |
:1085A00004C0882799278C1B9D0B821793073CF4E6 |
:1085B000CE01E8018C01B1E0EB2EF12C02C0EE24DB |
:1085C000FF24209741F40115110529F461E070E0C2 |
:1085D00080E090E024C0B801882777FD8095982F2F |
:1085E00028EE33E040E050E00E94C1459E01442760 |
:1085F00037FD4095542F0E943546B90137FF03C01F |
:10860000709561957F4F882777FD8095982F6D3005 |
:1086100021E0720720E0820720E0920704F524E6BB |
:1086200030E040E050E00E94C1452CE031E040E005 |
:1086300050E00E943546CA01B901A4E0660F771FD9 |
:10864000881F991FAA95D1F7621B730B840B950B9A |
:1086500024E630E040E050E00E94354653C06334E9 |
:1086600022E0720720E0820720E0920734F524E63A |
:1086700030E040E050E00E94C145605B78468040B9 |
:10868000904026E331E040E050E00E943546CA01C8 |
:10869000B901F4E0660F771F881F991FFA95D1F78B |
:1086A000621B730B840B950B24E630E040E050E036 |
:1086B0000E943546215F3F4F25C022E330E040E075 |
:1086C00050E00E94C145645E70478040904026EAB9 |
:1086D00031E040E050E00E943546CA01B901E4E0D3 |
:1086E000660F771F881F991FEA95D1F7621B730BDE |
:1086F000840B950B22E330E040E050E00E943546C9 |
:10870000225E3F4FEF2829F48AE590E0821B930B0D |
:108710009C0117FD03C0D7FF06C002C0D7FD03C0F0 |
:10872000309521953F4FC901DF91CF911F910F9156 |
:10873000FF90EF900895FC01F7FF04C08827992768 |
:108740008E1B9F0B8856914034F0CF0168E671E094 |
:108750000E940046FC01F7FD03C041E050E005C067 |
:10876000F095E195FF4F4FEF5FEFCF018B559040B4 |
:108770008A35910530F484EB90E08E1B9F0BFC0151 |
:108780000FC0CF01855B90408A35910518F4E45BFA |
:10879000F0400EC0CF018F5091408A35910518F0FE |
:1087A00021E030E007C088E691E08E1B9F0BFC01C2 |
:1087B0002FEF3FEFEE0FFF1FEF5DFB4F8591949181 |
:1087C000BC01629FC001639F900D729F900D1124A8 |
:1087D0009C01429FC001439F900D529F900D112418 |
:1087E00008952AE530E0281B390BC9010E949B43FC |
:1087F0000895EF92FF920F931F93CF93DF93EA01B7 |
:10880000AC0197FF04C044275527481B590B9B0117 |
:1088100077FF04C022273327261B370B2417350781 |
:1088200094F49C01B901882777FD8095982F28EE54 |
:1088300033E040E050E00E94C1457B018C01CE0155 |
:108840000E949B430FC0882777FD8095982F28EEC4 |
:1088500033E040E050E00E94C1457B018C01CE0135 |
:108860000E94F1439C01442737FD4095542FC801D5 |
:10887000B7010E943546B90137FF03C07095619575 |
:108880007F4F882777FD8095982FDF91CF911F919B |
:108890000F91FF90EF900895FC014150504030F04F |
:1088A00001900616D1F73197CF01089588279927AF |
:1088B00008955058192EEFD001D0D2C0BA176207D0 |
:1088C000730784079507B1F188F40EF410940B2E0A |
:1088D000BA2FA02D062E622F202D072E732F302D9C |
:1088E000082E842F402D092E952F502DFF2755231C |
:1088F000B9F0591B49F0573E98F0469537952795A2 |
:10890000A795F0405395C9F776F0BA0F621F731F11 |
:10891000841F30F4879577956795B795F0409395C8 |
:1089200017FA0F2E0895BF1BBB27BA0B620B730BF0 |
:10893000840BF6CFDEF6DBC0AED001D091C055235C |
:1089400059F0992369F09F575F57951B33F442F410 |
:10895000903811F4915805C09BC091589F3F09F47D |
:10896000C6C0BB27112462177307840730F4660F53 |
:10897000771F881FBB1F915098F311D00F920FD013 |
:108980000F920DD0A0E82617370748071B0609F0FD |
:10899000A048BA2F602D7F918F9100240895A0E800 |
:1089A0000024621773078407B10528F0621B730B5C |
:1089B000840BB1090A2A660F771F881FBB1FA69573 |
:1089C00081F7089597FB73D09F3738F0FEE9F91BC4 |
:1089D000982F872F762F6B2F05C086C09695879589 |
:1089E00077956795F150D0F73EF490958095709506 |
:1089F00061957F4F8F4F9F4F0895E89403C097FB79 |
:108A00000EF4F3DFB62F672F782F892F9EE900240D |
:108A100027C00ED05EF004C00BD026F001C008D0F5 |
:108A200019F020F48FEF089580E0089581E0089513 |
:108A300097FB092E052600F8689430D0E89407FCCF |
:108A400007C0621773078407950721F008F40094A4 |
:108A50000794989408959A95BB0F661F771F881FF7 |
:108A600011249923A1F08823B2F79F3F59F0BB0F3F |
:108A700048F421F4002011F460FF04C06F5F7F4FC1 |
:108A80008F4F9F4F881F9795879597F908952CC012 |
:108A90009FEF80EC0895052E092607FA440F551F15 |
:108AA0005F3F79F0AA27A51708F051E04795880F96 |
:108AB000991F9F3F31F0BB27B91708F091E08795C8 |
:108AC00008959F919F911124E3CF97FB880F991FE1 |
:108AD0009F3F31F0BB27B91708F091E087950895C3 |
:108AE0009F919F911124D4CF6627772788279927B4 |
:108AF0000895D1DF01D0B4CF992339F0552329F05F |
:108B00009F575F57950F13F49AF1F1CF91589F3FFC |
:108B1000E1F3629FA12D0F92BB27639FA00DB11DB2 |
:108B2000EE27729FA00DB11DEE1FAF93AA27649F81 |
:108B3000B00DE11D739FB00DE11DAA1F6627829F36 |
:108B4000B00DE11DA61F5527749FE00DA11D551FF7 |
:108B5000839FE00DA11D561F849FA00D511D852FE1 |
:108B60007A2F6E2F1F900F9088231AF4939539F463 |
:108B70008FCF000C111CBB1F661F771F881F012899 |
:108B80000895629FD001739FF001829FE00DF11D57 |
:108B9000649FE00DF11D929FF00D839FF00D749F77 |
:108BA000F00D659FF00D9927729FB00DE11DF91F23 |
:108BB000639FB00DE11DF91FBD01CF011124089580 |
:108BC000991B79E004C0991F961708F0961B881F1F |
:108BD0007A95C9F780950895AA1BBB1B51E107C080 |
:108BE000AA1FBB1FA617B70710F0A61BB70B881F3D |
:108BF000991F5A95A9F780959095BC01CD010895CC |
:108C000097FB092E07260AD077FD04D0E5DF06D0B2 |
:108C100000201AF4709561957F4F0895F6F79095AE |
:108C200081959F4F0895A1E21A2EAA1BBB1BFD013F |
:108C30000DC0AA1FBB1FEE1FFF1FA217B307E4073B |
:108C4000F50720F0A21BB30BE40BF50B661F771F93 |
:108C5000881F991F1A9469F7609570958095909573 |
:108C60009B01AC01BD01CF01089597FB092E05269C |
:108C70000ED057FD04D0D7DF0AD0001C38F4509531 |
:108C80004095309521953F4F4F4F5F4F0895F6F730 |
:108C900090958095709561957F4F8F4F9F4F089568 |
:108CA000F999FECFB2BDA1BDF89A119600B408950E |
:108CB000F999FECFB2BDA1BD00BC11960FB6F894D4 |
:0A8CC000FA9AF99A0FBE0895FFCF4B |
:108CCA000A01FF64496E74656772616C4E69636B71 |
:108CDA0020202020496E74656772616C526F6C6C3B |
:108CEA00202020204163634E69636B2020202020CE |
:108CFA0020202020416363526F6C6C2020202020AA |
:108D0A00202020204779726F476965722020202031 |
:108D1A0020202020486F6568656E57657274202090 |
:108D2A00202020204163635A202020202020202058 |
:108D3A00202020204761732020202020202020206E |
:108D4A00202020204B6F6D7061737356616C7565BE |
:108D5A002020202045727361747A6B6F6D70617385 |
:108D6A00732020205573725F5061723120202020B9 |
:108D7A00202020205573725F7061723320202020DA |
:108D8A00202020204D6F746F725F566F726E6520BF |
:108D9A00202020204D6F746F725F48696E74656E73 |
:108DAA00202020204D6F746F725F4C696E6B7320A8 |
:108DBA00202020204D6F746F725F52656368747350 |
:108DCA0020202020496E6465782020202020202041 |
:108DDA00202020205542617420202020202020209D |
:108DEA00202020204D657373776572745F4E696326 |
:108DFA006B2020204D657373776572745F526F6CB8 |
:108E0A006C2020204D657373776572745F476965BE |
:108E1A0072202020537469636B5F4E69636B202054 |
:108E2A0020202020537469636B5F526F6C6C202082 |
:108E3A0009200000537469636B5F476965722020DB |
:108E4A00202020204750535F4E69636B202020204A |
:108E5A00202020204750535F526F6C6C2020202026 |
:108E6A002020202075746D5F656173742020202096 |
:108E7A002020202075746D5F6E6F72746820202028 |
:108E8A002020202075746D5F616C742020202020C2 |
:108E9A00202020206770735F73746174652020201E |
:108EAA0020202020492D4C616765526F6C6C202070 |
:108EBA0020202020537469636B526F6C6C20202031 |
:108ECA0020202020FFFF0A016400007D0000FF032C |
:108EDA000102030405060708090A48616C6C6F2041 |
:108EEA0057656C74000000000000000000000000DC |
:108EFA000000000000000000000000000000000068 |
:108F0A000000000000000000000000000000000057 |
:108F1A000000000000000000000000000000000047 |
:108F2A00000000000000000000000A0142656769B5 |
:108F3A006E6E657200004E6F726D616C0000537048 |
:108F4A006F72740000640090D0030090D003001781 |
:108F5A00B7D13830FB103A409696020A644664EC60 |
:028F6A00FF0006 |
:00000001FF |
/branches/salvo_gps/Basis_v0067g/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/Settings.h |
---|
--- tags/v0001/_Settings.h (nonexistent) |
+++ tags/v0001/_Settings.h (revision 553) |
@@ -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/tags/v0001/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/tags/v0001/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/tags/v0001/eeprom.c |
---|
0,0 → 1,183 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + 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.Stick_D = 4; //8 // Wert : 0-64 Salvo |
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/tags/v0001/fc.c |
---|
0,0 → 1,1309 |
/*####################################################################################### |
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; |
//Salvo 11.12.2007 |
w = (abs(Mittelwert_AccNick)); |
v = (abs(Mittelwert_AccRoll)); |
if ((w < ACC_WAAGRECHT_LIMIT) && (v < ACC_WAAGRECHT_LIMIT)) // Gyro nur in wwagrechter Lage nachtrimmen |
{ |
if(cnt > EE_Parameter.Driftkomp) cnt = EE_Parameter.Driftkomp; |
if(IntegralFehlerNick > FEHLER_LIMIT) AdNeutralNick += cnt; |
if(IntegralFehlerNick < -FEHLER_LIMIT) AdNeutralNick -= cnt; |
} |
//Salvo End |
// 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; |
} |
//Salvo 11.12.2007 |
w = (abs(Mittelwert_AccNick)); |
v = (abs(Mittelwert_AccRoll)); |
if ((w < ACC_WAAGRECHT_LIMIT) && (v < ACC_WAAGRECHT_LIMIT)) // Gyro nur in wwagrechter Lage nachtrimmen |
{ |
if(cnt > EE_Parameter.Driftkomp) cnt = EE_Parameter.Driftkomp; |
if(IntegralFehlerRoll > FEHLER_LIMIT) AdNeutralRoll += cnt; |
if(IntegralFehlerRoll < -FEHLER_LIMIT) AdNeutralRoll -= cnt; |
} |
//Salvo End |
//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/tags/v0001/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/tags/v0001/flightctrl.aws |
---|
0,0 → 1,0 |
<AVRWorkspace><IOSettings><CurrentRegisters><JTAG><register register="OCDR" group="JTAG" display="1" locked="0"/></JTAG><JTAG><register register="MCUCR" group="JTAG" display="1" locked="0"/></JTAG><JTAG><register register="MCUSR" group="JTAG" display="1" locked="0"/></JTAG></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="310 159 1284 621" LineCol="6 0" 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="978 0" State="Maximized"/><File00005 Name="G:\Mikrokopter\Flight_Crtl\v0067g\eeprom.c" Position="262 71 1402 774" LineCol="36 45" State="Maximized"/></Files></AVRWorkspace> |
/branches/salvo_gps/Basis_v0067g/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001/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/tags/v0001 |
---|
Property changes: |
Added: svn:ignore |
+*.bak |
+*.aps |
+*.elf |
+*.sym |
+*.map |
+*.lss |
+*.eep |
+*.txt |
/branches/salvo_gps/Basis_v0067g/trunk/Flight-Ctrl_MEGA644_V0_01a.hex |
---|
0,0 → 1,2321 |
:100000000C946C020C9489020C9489020C94890261 |
:100010000C9489020C9489020C9489020C94890234 |
:100020000C9489020C94890C0C9489020C9489021A |
:100030000C949B150C9489020C9489020C948902EF |
:100040000C9489020C9489020C94920B0C948902F2 |
:100050000C94BA070C9489020C94D2040C94890273 |
:100060000C94850D0C9489020C94D0140C94890284 |
: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 |
:1004E000DEBFCDBF13E0A0E0B1E0E2E4FEE802C071 |
:1004F00005900D92A23AB107D9F718E0A2EAB3E04D |
:1005000001C01D92AB38B107E1F70E94C8020C94FC |
:1005100020470C94000022E030E0D9010E940C47F3 |
:10052000802D863028F082E0D901082E0E941447E1 |
:1005300099270895FB01282F863008F025E0842FA5 |
:100540009927429FD0011124AC59BF4F019724F045 |
:1005500001900E941447FACFA2E0B0E0022E0E9460 |
:1005600014470895CF93DF93FB01C42FDD27863016 |
:1005700008F085E0489FD0011124AC59BF4F219766 |
:1005800024F00E940C470192FACFDF91CF91089599 |
:100590001F93CF93DF9314B815B8189B02C08BE05C |
:1005A00001C08AE0809300018DEC87B98FEF88B994 |
:1005B0008BE184B981E085B98EE38AB9579A87EFD8 |
:1005C0008BB984B7877F84BF8091600088618093F6 |
:1005D00060001092600080ED97E09093C5038093D7 |
:1005E000C4031092640410926304109235071092B1 |
:1005F0003407109262041092610410926004109209 |
:100600005F04809100018A3011F4289801C0289A73 |
:100610000E94300D0E940D060E9486150E947F0DDB |
:100620000E94B61478941092330681E080933406C9 |
:1006300087E0809335062091000181E690E09F934A |
:100640008F9381E090E09F938F931F921F92822F50 |
:100650006AE00E949C46892F99279F938F93822F4F |
:100660000E949C4699279F938F938CE391E09F93E0 |
:100670008F931F920E94F0088BE191E09F938F93DC |
:100680001F920E94F008299AA1E0B0E00E940C4756 |
:10069000802D2DB73EB7205F3F4F0FB6F8943EBF79 |
:1006A0000FBE2DBF843409F43FC08CEE90E09F93C1 |
:1006B0008F931F920E94F0080E94E12310E00F9098 |
:1006C0000F900F90123049F40E94502347E46EE5DA |
:1006D00077E082E00E949A0202C0133051F40E9437 |
:1006E000C02247E46EE577E083E00E949A0214E0BE |
:1006F00002C0143010F00E94502347E46EE577E00A |
:10070000812F0E949A021F5F1630E0F283E022E000 |
:1007100030E0D901082E0E94144784E42150304073 |
:10072000D901082E0E941447C4E0D0E0DE010E94E7 |
:100730000C47802D853050F083ED90E09F938F9390 |
:100740001F920E94F0080F900F900F902297DE01E9 |
:100750000E940C47802D863028F082E0DE01082EB2 |
:100760000E94144747E46EE577E00E94B202DE0182 |
:100770000E940C47802D863028F082E0DE01082E92 |
:100780000E94144799279F938F9388EB90E09F9343 |
:100790008F931F920E94F008809166070F900F9030 |
:1007A0000F900F900F9080FD03C0C8EED3E020C0E3 |
:1007B0008BE990E09F938F931F920E94F00888EE40 |
:1007C00093E00E94740CEC010E9421100F900F9096 |
:1007D0000F90CE010E947D0C8823D9F386E990E02A |
:1007E0009F938F931F920E94F0080F900F900F908D |
:1007F0000E943221809100018A3011F4289801C0B2 |
:10080000289A469880ED97E09093C5038093C4039F |
:1008100088EE93E090932E0680932D0685E58093D5 |
:10082000280688E890E09F938F931F920E94F0081B |
:10083000809166070F900F900F9082FF03C08CE7A6 |
:1008400090E002C084E790E09F938F931F920E94F4 |
:10085000F0080F900F900F9080E790E09F938F9398 |
:100860001F920E94F0080E94651088E893E190931F |
:100870008603809385030F900F900F908091C103A2 |
:10088000882309F462C01092C1030E9471240E945F |
:10089000EB20209100012A3011F4289801C0289AF9 |
:1008A00080910301882321F081508093030110C0BF |
:1008B0001092B2031092B30310927F0410927E0440 |
:1008C000109281041092800410928304109282048A |
:1008D00080915E04882329F080915E04815080938A |
:1008E0005E048091850390918603892B01F585E054 |
:1008F00090E090938603809385030E946015809119 |
:100900000403909105038F5F9F4FF9F48091650474 |
:100910008823D9F080E197E29093C5038093C403C4 |
:1009200080E890E090930503809304030EC08091CB |
:1009300085039091860301979093860380938503A6 |
:100940002A3011F4289801C0289A0E9428060E9493 |
:10095000C106CE010E947D0C882309F48FCF20911F |
:1009600008033091090380917607992728173907E2 |
:100970009CF480910403909105038F5F9F4F61F475 |
:1009800080E797E19093C5038093C40380E093E0F0 |
:10099000909305038093040384E690E00E94740C16 |
:1009A000EC016CCF1F920F920FB60F9211248F9310 |
:1009B0009F93EF93FF93809101018823E1F480914D |
:1009C000BD039091BE0301969093BE038093BD0337 |
:1009D000FC01E650FB4FE081ED3019F086399105BE |
:1009E00039F41092BE031092BD0381E0809301019F |
:1009F000E093C60004C01092BE031092BD03FF91A5 |
:100A0000EF919F918F910F900FBE0F901F901895AF |
:100A1000DC0120E030E040E050E0EAEFF4E005C027 |
:100A20008191280F311D4F5F5F4F4A175B07C1F758 |
:100A30003F70C90136E0969587953A95E1F7835C5A |
:100A4000FD01E650FB4F808311962F73235CFD015F |
:100A5000E650FB4F2083A550BB4F8DE08C93109246 |
:100A600001018091FA048093C6000895EF92FF92ED |
:100A70000F931F93CF93DF937A01722F93E290939A |
:100A8000FA046093FB048093FC0403E010E060E050 |
:100A9000ADEFB4E046C0F701E60FF11D90816F5F46 |
:100AA000715019F4E0E040E00FC0F701E60FF11DCE |
:100AB00040816F5F715011F4E0E006C0F701E60F6E |
:100AC000F11DE0816F5F7150892F86958695835C5B |
:100AD0008C935527892F99278370907024E0880F75 |
:100AE000991F2A95E1F79A0194E0369527959A95F2 |
:100AF000E1F7822B835CED0189834F705070440FC6 |
:100B0000551F440F551F8E2F8295869586958370AD |
:100B1000842B835C8A83EF73E35CEB830C5F1F4F52 |
:100B20001496772309F0B7CFC8010E940805DF911A |
:100B3000CF911F910F91FF90EF9008950F931F9306 |
:100B4000CF93DF93EC01062F70E0A22FBB27129703 |
:100B50004AC0E42FFF27E35CF94F30814F5FE42F59 |
:100B6000FF27E35CF94F50814F5FE42FFF27E35CE1 |
:100B7000F94F10814F5FE42FFF27E35CF94F20818D |
:100B80004F5F842F9927A817B90784F1701771F167 |
:100B90005D53FE01E70FF11D3D53330F330F852FDA |
:100BA00082958F70382B3083613001F1912F9D53E6 |
:100BB0007F5FFE01E70FF11D71505295507F892F25 |
:100BC00086958695582B508363506F3F79F07E5FF2 |
:100BD000FE01E70FF11D9295990F990F907C2D530F |
:100BE000922B90837F5F662309F0B3CFDF91CF9183 |
:100BF0001F910F9108951F93182F8A3019F48DE0DB |
:100C00000E94FB058091C00085FFFCCF1093C600B9 |
:100C100080E090E01F9108950895E1ECF0E088E114 |
:100C20008083A0ECB0E08C9182608C93808180689E |
:100C300080838081806480838AE28093C40088EC12 |
:100C400090E00E94740C90932706809326060895E6 |
:100C500080910101882309F493C08091A203882325 |
:100C600071F080910101882351F02BE048E256E0B9 |
:100C70006091F90487E40E9436051092A2038091E6 |
:100C80002606909127060E947D0C882321F48091EE |
:100C9000A4038823F9F0809101018823D9F022E48C |
:100CA00043ED56E06091F90484E40E943605109209 |
:100CB000A4038091B5039091B60301969093B60377 |
:100CC0008093B5038AEF90E00E94740C90932706FE |
:100CD00080932606609102016F3F89F0462F5527C9 |
:100CE00034E0440F551F3A95E1F74C5F5E4F605D6D |
:100CF00020E181E40E9436058FEF8093020180910C |
:100D0000A303882359F180910101882339F10E94BE |
:100D10006E101092A3033091AC03932F9F5F9093BA |
:100D2000AC03943021F08091AD03882359F026E183 |
:100D300040E357E060E084E30E9436058FEF809344 |
:100D4000AC030CC044E1949FA0011124465E5C4FAB |
:100D500024E160E0832F8F5C0E9436058091A5031B |
:100D6000882371F080910101882351F02AE043E348 |
:100D700056E06091F90486E50E9436051092A503BD |
:100D800008951F93CF93DF93CDB7DEB722970FB6A9 |
:100D9000F894DEBF0FBECDBF8091A703882309F46E |
:100DA000DFC08FEF8093030180913F068B3609F4FB |
:100DB0005EC08C3678F4833629F1843620F481368F |
:100DC00009F0CCC013C0873609F45EC0883609F03C |
:100DD000C5C02BC0813709F45BC0813708F480C0DF |
:100DE0008437F1F1863709F0B9C04AC02091AA03CF |
:100DF00043E062E0CE0101960E949E0589818093C6 |
:100E00000201ACC02091AA0343E06BE088E296E0C7 |
:100E10000E949E058091F10390912A06892B809370 |
:100E2000F10381E08093A40399C02091AA0343E0D9 |
:100E300062E0CE0101960E949E058091F1039981A6 |
:100E4000892B8093F1038A818F3F21F481E0809385 |
:100E5000AD0302C01092AD0381E08093A3037EC076 |
:100E60002091AA0343E064E08EEA93E006C020915B |
:100E7000AA0343E063E082EB93E00E949E056EC00C |
:100E800081E08093A5036AC081E08093A20366C0DD |
:100E90002091AA0343E062E0CE0101960E949E05E4 |
:100EA00089818F3F89F0863010F085E0898347E49F |
:100EB0006EE577E089810E94B202898127E44EE5E0 |
:100EC00057E06091F90408C01091F9040E948B0268 |
:100ED00027E44EE557E0612F855B0E9436053EC052 |
:100EE0002091AA0343E067E48EE597E00E949E0507 |
:100EF00080913F0647E46EE577E08B560E949A02A8 |
:100F000080913F068B56A2E0B0E0082E0E94144765 |
:100F10006091890777278827992724EC39E040E0FA |
:100F200050E00E947D46609387037093880380930E |
:100F3000890390938A0360918A07772788279927E6 |
:100F40000E947D4660938B0370938C0380938D0386 |
:100F500090938E030E948B020E94D6201092A703CA |
:100F600022960FB6F894DEBF0FBECDBFDF91CF91B2 |
:100F70001F9108951F920F920FB60F9211242F9375 |
:100F80003F934F935F936F937F938F939F93AF9311 |
:100F9000BF93CF93DF93EF93FF938091C60080932D |
:100FA000A6038091A6030E94173C4091B8034639DE |
:100FB00010F01092B7038091A6038D3009F05DC048 |
:100FC0008091B703823009F058C01092B703A42F64 |
:100FD000BB27FD01E55CF94F3081ED01C45CD94FC1 |
:100FE00028818091BB039091BC03831B9109821BD4 |
:100FF00091099F709093BC038093BB039C016894FC |
:1010000015F8369527951694E1F7235C2093BA03DB |
:10101000982F9F73935C9093B9038081281729F4CC |
:101020008881981711F491E006C08091A9038F5F21 |
:101030008093A90390E08091A703882309F064C0FE |
:10104000992309F461C081E08093A7034093AA0328 |
:10105000A35CB94F8DE08C9380913F06823509F0F7 |
:1010600053C088E190E02CE00FB6F894A8958093E7 |
:1010700060000FBE2093600047C08091B7038130AD |
:10108000D9F0813018F08230E9F530C08091A603A4 |
:10109000833239F48091A703882319F481E0809387 |
:1010A000B7038091A60380933D0681E08093B80347 |
:1010B0008091A603992715C082E08093B703E42F9F |
:1010C000FF278091A603E35CF94F80834F5F409335 |
:1010D000B8032091A6038091BB039091BC03820FBB |
:1010E000911D9093BC038093BB030EC0E42FFF2798 |
:1010F0008091A603E35CF94F8083463938F3109260 |
:10110000B703E7CF1092B703FF91EF91DF91CF9133 |
:10111000BF91AF919F918F917F916F915F914F910F |
:101120003F912F910F900FBE0F901F901895982F01 |
:1011300080911507813069F48091F003E82FFF2733 |
:10114000E65EFC4F90838F5F8093F00321E030E0F8 |
:1011500005C0892F0E94FB05282F3327C901089558 |
:101160001F93182F04C080E30E9497081150111696 |
:10117000D4F31F9108951F93182F04C080E20E949A |
:10118000970811501116D4F31F9108950F931F93D0 |
:10119000CF93DF938C01EB0108C0F8010F5F1F4F65 |
:1011A000E4918E2F0E94970821972097B1F7DF9145 |
:1011B000CF911F910F9108950F931F93CF93DF93BA |
:1011C0008C01EB0106C0F80181918F010E94970804 |
:1011D00021972097C1F7DF91CF911F910F9108952B |
:1011E0002F923F924F925F926F927F928F929F9237 |
:1011F000AF92BF92CF92DF92EF92FF920F931F9325 |
:10120000CF93DF93CDB7DEB7E3970FB6F894DEBF89 |
:101210000FBECDBF29968FAD299780931507CE01BC |
:10122000855B9F4F9D838C832B968EAD9FAD2B97B7 |
:101230009FA78EA722243324210102C01301240179 |
:101240000EA51FA502C00F5F1F4FF801F490FF20ED |
:1012500019F0F5E2FF16B9F7B8018EA59FA5681B36 |
:10126000790B11F00E94C608FF2009F442C20F5FFB |
:101270001F4F1FA70EA71982AC81BD811BAA1AAAF6 |
:101280009FEF99ABEEA5FFA5CF0101969FA78EA773 |
:10129000B49095E7B91621F08B2D8062883789F4D8 |
:1012A000EBA9E0FF07C02D903D904D905C90139707 |
:1012B000149607C08D919C9111971C0144245524CC |
:1012C0001296F0E2BF1621F489818823D9F685C0F1 |
:1012D00083E2B81609F483C09AE2B91621F0EDE270 |
:1012E000BE1669F408C0FD011296E081EAABE7FF83 |
:1012F000C9CFE195EAABFBA9F061FF7D72C08BE23B |
:10130000B81609F46AC09EE2B916B1F52EA53FA53C |
:101310002F5F3F4FEEA5FFA584918A3221F0B82EB2 |
:1013200020E030E01BC0FD0112964081518157FF43 |
:1013300002C04FEF5FEF49AB3FA72EA7A3CFC90174 |
:1013400003E0880F991F0A95E1F7220F331F280F3A |
:10135000391F2B0D311D20533040B49031968B2D09 |
:1013600080538A3060F3FFA7EEA7A90137FF02C0C0 |
:101370004FEF5FEF49AB8DCFF0E3BF1631F48BA990 |
:1013800084FD80CF80628BAB7DCF8B2D81538930E4 |
:10139000E8F420E030E0C901F3E0880F991FFA95E6 |
:1013A000E1F7220F331F280F391F2B0D311D20535A |
:1013B0003040EEA5FFA5CF0101969FA78EA7B49060 |
:1013C0008B2D80538A3038F32AAB63CF98E6B91659 |
:1013D00051F4EBA9E460EBAB55CFB98253CFFBA935 |
:1013E000F860FBAB4FCF8CE6B81621F49BA9916057 |
:1013F0009BAB48CFBD83AC83E3E6BE1639F41296AF |
:10140000BD83AC8312978C918E8318C1F4E4BF1610 |
:1014100039F084E6B81639F099E6B91659F503C0E3 |
:10142000EBA9E160EBABFBA9F0FF08C01496BD830C |
:10143000AC835E904E903E902E900AC01296BD8373 |
:10144000AC839E918E911C01442437FC4094542C13 |
:1014500057FC03C08AE088AB92C05094409430940B |
:101460002094211C311C411C511C8DE289839AE07F |
:1014700098AB85C0EFE4BE1629F0FFE6BF1639F43D |
:1014800088E061C09BA991609BABE8E056C0F0E7A3 |
:10149000BF1671F41296BD83AC839E918E911C0190 |
:1014A000442455248BA980648BAB78E7B72E5EC0AB |
:1014B000E3E7BE16D9F51296BD83AC83DE90CE90DD |
:1014C000C114D10489F488E28E838EE68F8385E788 |
:1014D00088878CE689878A8789E28B871C8666E005 |
:1014E000C62ED12CCC0EDD1EF9A9F7FD13C04F2F4F |
:1014F000552747FD509560E070E0C6010E94084501 |
:10150000009711F419A90DC08C1919A981174CF471 |
:10151000182F07C0F60101900020E9F731971E2F20 |
:101520001C1919824201310140E094C085E5B816CA |
:1015300031F095E7B91649F4EAE0E8AB1FC0FBA922 |
:10154000F160FBAB8AE088AB19C098E5B91621F0D1 |
:10155000E8E7BE1609F06EC0FBA9F3FD02C080E10A |
:10156000F2CF211431044104510419F490E198ABF5 |
:1015700005C0EBA9E064EBABF0E1F8AB198289A9F7 |
:1015800087FD03C09BA99F7D9BAB211431044104BF |
:10159000510461F4E9A9EE2349F466247724430158 |
:1015A0005EE2C52ED12CCC0EDD1E3EC04EE2C42E16 |
:1015B000D12CCC0EDD1EF8A9EF2EFF240027112719 |
:1015C000C201B101A80197010E94CF466A3020F400 |
:1015D00030E3A32EA60E08C027E5A22EA60E88E5AE |
:1015E000B81611F49FEDA922F601A2926F01C20173 |
:1015F000B101A80197010E94CF4639014A012E147A |
:101600003F044006510618F019012A01D9CFF8A964 |
:10161000F83051F48BA983FF07C090E3A91621F09D |
:1016200080E3F60182936F01CE018C19182F125DB1 |
:1016300049A910C0BB2009F45CC0BE8219824201D6 |
:10164000310100E096E0C92ED12CCC0EDD1E11E058 |
:1016500021E005C0212F042F011B07FD00E0898137 |
:10166000882319F0812F8F5F07C09BA996FD02C0C8 |
:10167000812F02C0822F8E5FA82EA00EEBA9EE2E26 |
:10168000FF2480E3482E512C4E205F20411451044A |
:1016900021F48AA98A190E94BB088981882329F02C |
:1016A00061E070E0CE01019609C0E6FE09C080E36A |
:1016B0008A83BB8262E070E0CE0102960E94DC0861 |
:1016C000F0E24F16510421F48AA98A190E94B00849 |
:1016D000802F0E94B008612F772767FD7095C601A3 |
:1016E0000E94DC08E4FEAACD8AA98A190E94BB08E0 |
:1016F000A5CDE3960FB6F894DEBF0FBECDBFDF9148 |
:10170000CF911F910F91FF90EF90DF90CF90BF90FE |
:10171000AF909F908F907F906F905F904F903F9091 |
:101720002F9008951F920F920FB60F9211242F93AE |
:101730003F935F936F937F938F939F93AF93BF93E9 |
:101740008091CD0381508093CD038F3F11F580911F |
:10175000CB039091CC03009729F001979093CC0391 |
:101760008093CB0389E08093CD03809107038F5F43 |
:10177000817080930703882319F481E08093C1036B |
:101780008091BF039091C00301969093C003809312 |
:10179000BF038091C4039091C5030297B8F0809174 |
:1017A000C4039091C50301979093C5038093C4032C |
:1017B0008091C4039091C5032091040330910503E7 |
:1017C00082239323892B09F07BC006C08FEF9FEF04 |
:1017D0009093050380930403809100018A3039F4CB |
:1017E00004C05A9A05C0479A03C05A9801C0479846 |
:1017F000349B0AC08091C2039091C30301969093D9 |
:10180000C3038093C20362C08091C2039091C3035B |
:10181000892BC1F18091C2039091C303805A9F40EC |
:1018200088F58FEF90E09093CC038093CB03809169 |
:10183000C2039091C3038758904090934B048093C8 |
:101840004A0480914A0490914B0497FF0AC080910A |
:101850004A0490914B0488599E4F90934B04809377 |
:101860004A0480914A0490914B048856914054F068 |
:1018700080914A0490914B048856914090934B0478 |
:1018800080934A0480914A0490914B0420914C0427 |
:1018900030914D04821B930B845E9D4F68E671E08E |
:1018A0000E94BC46845B904090934F0480934E040A |
:1018B00081E08093C8031092C3031092C20306C054 |
:1018C000809100018A3009F08ECF8BCFBF91AF910C |
:1018D0009F918F917F916F915F913F912F910F9089 |
:1018E0000FBE0F901F9018952091BF033091C00339 |
:1018F0002F5F3F4F820F931F08952091BF033091B8 |
:10190000C003821B930B892F992786958074992792 |
:1019100008951F920F920FB60F921124EF92FF922B |
:101920000F931F932F933F934F935F936F937F93E7 |
:101930008F939F93AF93BF93CF93DF93EF93FF93D7 |
:10194000809106038150809306038F3F09F06DC09C |
:1019500083E88093B00080919C03C82FDD27D0934B |
:10196000C703C093C60380919307E090800780FF70 |
:101970001EC060910E0470910F048091100490912C |
:101980001104FF240027112720E830E040E050E058 |
:101990000E94F146C801B7010E947D4620E032E076 |
:1019A00040E050E00E94F146C20FD31F1DC060917D |
:1019B0000E0470910F048091100490911104FF2483 |
:1019C0000027112720E830E040E050E00E94F14677 |
:1019D000C801B7010E947D4620E032E040E050E0BF |
:1019E0000E94F146C21BD30BD093C703C093C6031A |
:1019F0002091C6033091C70380918107992728174A |
:101A0000390734F08091820799278217930724F4CD |
:101A10009093C7038093C6038091C6038093B3005D |
:101A2000809183078093060304C083E08093B00015 |
:101A30005F98FF91EF91DF91CF91BF91AF919F910F |
:101A40008F917F916F915F914F913F912F911F9156 |
:101A50000F91FF90EF900F900FBE0F901F90189571 |
:101A60008091BF039091C0030B969093CF03809316 |
:101A7000CE0382E085BD83EA84BD17BC88E788BDBC |
:101A800096E096BD83EC8093B0009093B100E0E7C0 |
:101A9000F0E0808182608083EEE6F0E0808181600A |
:101AA00080838AE08093B3001092B2000895209161 |
:101AB000BF033091C0032F5F3F4F280F391F4FEEF8 |
:101AC00002C040937A008091BF039091C003B90196 |
:101AD000681B790B77FFF5CF08952091BF033091F4 |
:101AE000C0032F5F3F4F280F391F8091BF03909194 |
:101AF000C003A901481B590B57FFF7CF0895109257 |
:101B00007C008FEE80937A0008951F920F920FB69B |
:101B10000F921124DF92EF92FF920F931F932F9356 |
:101B20003F934F935F936F937F938F939F93AF9365 |
:101B3000BF93CF93DF93EF93FF9310927A0080913E |
:101B4000EC03D82ED394D092EC03853009F484C0F2 |
:101B5000863090F4823009F440C0833030F488231A |
:101B6000F1F0813009F04FC22FC0833009F43FC03B |
:101B7000843009F048C258C0883009F4C0C08930A8 |
:101B800038F4863009F481C0873009F03CC29AC02D |
:101B9000893009F4D1C08A3009F035C2B1C18091D1 |
:101BA0007800909179009093EB038093EA0381E0B1 |
:101BB0008093ED038091E4039091E5030196909367 |
:101BC000E5038093E40315C2809178009091790039 |
:101BD0009093E9038093E80390C0809178009091FE |
:101BE00079009093E7038093E60384E086C14091F7 |
:101BF00008035091090380917800909179009A012F |
:101C0000220F331F240F351F63E070E00E94A846A7 |
:101C1000260F371F3695279536952795309309035C |
:101C20002093080386E069C180910604909107041F |
:101C30002091780030917900821B930B90931707C5 |
:101C40008093160780911607909117079093D703FA |
:101C50008093D60387E051C18091780090917900FC |
:101C60002091040430910504821B930B909322076A |
:101C70008093210780912107909122079093D903A7 |
:101C80008093D8031092ED03B4C18091000120919C |
:101C9000EA033091EB038A3049F480917800909107 |
:101CA0007900820F931F9695879506C080917800E2 |
:101CB00090917900820F931F9093D5038093D40362 |
:101CC00081E01BC1809100012091E8033091E9037C |
:101CD0008A3049F48091780090917900820F931FA7 |
:101CE0009695879506C08091780090917900820F33 |
:101CF000931F9093D3038093D20382E0FEC0809120 |
:101D000000012091E6033091E7038A3049F4809185 |
:101D1000780090917900820F931F9695879506C061 |
:101D20008091780090917900820F931F9093D10356 |
:101D30008093D00385E0E1C06091780070917900D4 |
:101D4000E0900804F090090400910A0410910B043B |
:101D5000882777FD8095982F0E94BB45A8019701A1 |
:101D60000E9415450E949E457093DB036093DA0341 |
:101D70002091DA033091DB03E0911607F091170709 |
:101D8000809121079091220797FF03C0909581953C |
:101D90009F4F64E070E00E94BC46EB01CF01F7FF6B |
:101DA00003C0909581959F4F64E070E00E94BC460F |
:101DB000260F371F2C0F3D1F3093DB032093DA03D0 |
:101DC0008091DA039091DB03029704F1609108049B |
:101DD0007091090480910A0490910B0420E030E096 |
:101DE00048E454E40E94C54588230CF03CC060914F |
:101DF00008047091090480910A0490910B042AE070 |
:101E000037ED43EA5CE30E94164525C08091DA0372 |
:101E10009091DB038F5F9F4F34F5609108047091C0 |
:101E2000090480910A0490910B0420E030E046E11F |
:101E300054E40E94C8451816B4F4609108047091E7 |
:101E4000090480910A0490910B042AE037ED43EADB |
:101E50005CE30E9415456093080470930904809325 |
:101E60000A0490930B0481E08093E1038091780051 |
:101E70009091790090931907809318072091460458 |
:101E80003091470440914804509149048091DA030D |
:101E90009091DB03AA2797FDA095BA2F280F391F31 |
:101EA0004A1F5B1F20934604309347044093480425 |
:101EB00050934904E0904604F09047040091480490 |
:101EC0001091490460914604709147048091480440 |
:101ED0009091490420E034E040E050E00E94F14657 |
:101EE000E21AF30A040B150BE0924604F092470441 |
:101EF000009348041093490483E08093ED0379C074 |
:101F000080912607909127072091780030917900E1 |
:101F1000820F931F909327078093260780911E07B7 |
:101F20008F5F80931E0780911E07853008F46BC079 |
:101F3000809178009091790090930F0380930E0325 |
:101F400010921E0780911A0790911B072091260777 |
:101F500030912707821B930B209166043091670410 |
:101F6000821B930B9093E3038093E2036091260717 |
:101F700070912707E0900A03F0900B0300910C0387 |
:101F800010910D03882777FD8095982FA801970160 |
:101F9000220F331F441F551F2E0D3F1D401F511F81 |
:101FA000620F731F841F951F24E030E040E050E073 |
:101FB0000E94F14620930A0330930B0340930C03D5 |
:101FC00050930D0320911A0730911B0780910A034B |
:101FD00090910B03A0910C03B0910D03281B390BBA |
:101FE0003093670420936604109227071092260707 |
:101FF0000AC08091ED0380937C00DD2051F08FEECC |
:1020000080937A0006C01092ED031092EC031092B8 |
:102010007C00FF91EF91DF91CF91BF91AF919F91A4 |
:102020008F917F916F915F914F913F912F911F9170 |
:102030000F91FF90EF90DF900F900FBE0F901F90C9 |
:102040001895CF93DF93A3E0B0E00E940C47802D5A |
:10205000C82FDD27C531D10508F02A97C7BD84E612 |
:1020600090E00E94570D80910E0390910F038255CE |
:102070009340D0F4C0E0D0E017C0C7BD82E390E049 |
:102080000E94570D80E791E09F938F931F920E94CB |
:10209000F00880910E0390910F030F900F900F9016 |
:1020A0008458934020F02196CA3FD10530F3A3E035 |
:1020B000B0E00C2E0E941447C09323078CE291E0FD |
:1020C0000E94570DDF91CF910895EAE1F3E080E29D |
:1020D000819393E0EA36F907D9F70895FF920F93B9 |
:1020E0001F938091F103282F3327C90181709070CD |
:1020F000682F8823A9F08091F203882311F0815082 |
:1021000002C080916A038093F203EAE1F3E080E287 |
:10211000819393E0EA36F907D9F78FEF8093AC0308 |
:10212000A9014270507021FF10C08091F2038F5FAF |
:102130008093F203EAE1F3E080E2819393E0EA36F0 |
:10214000F907D9F78FEF8093AC03662321F0452B75 |
:1021500011F01092F20381E18093F0038091F20379 |
:1021600099279F938F938CE194E09F938F9311E035 |
:10217000F12EFF920E94F0080091F2030F900F9051 |
:102180000F900F900F90053009F4FCC1063090F4C9 |
:10219000023009F4CCC0033030F40023F1F00130F8 |
:1021A00009F0D9C361C0033009F416C1043009F045 |
:1021B000D2C365C1083009F416C3093038F40630BB |
:1021C00009F499C2073009F0C6C3EAC2093009F41C |
:1021D00047C30A3009F0BFC381C31092F0038AE0FD |
:1021E00094E09F938F93FF920E94F00884E1809384 |
:1021F000F0032091000181E690E09F938F9381E0AE |
:1022000090E09F938F931F921F92822F6AE00E940B |
:102210009C46892F99279F938F93822F0E949C46DB |
:1022200099279F938F9385EF93E09F938F93FF92CE |
:102230000E94F00888E28093F0030E948B029927A5 |
:102240009F938F9388EE93E09F938F93FF920E94CA |
:10225000F0088CE38093F00388ED93E09F938F93D5 |
:10226000FF920E94F00898C28091660780FF47C0E5 |
:102270001092F00380916604909167049F938F936E |
:1022800089EC93E09F938F930F930E94F00884E171 |
:102290008093F00380916804909169049F938F93D9 |
:1022A0008AEB93E09F938F930F930E94F00888E24C |
:1022B0008093F00380910E0390910F039F938F936F |
:1022C0008BEA93E09F938F930F930E94F0088CE327 |
:1022D0008093F0038091230799279F938F938CE934 |
:1022E00093E09F938F930F930E94F0088DB79EB752 |
:1022F00044960FB6F8949EBF0FBE8DBF31C384E1E4 |
:102300008093F00385E993E09F938F930F930E944E |
:10231000F00888E28093F00387E893E09F938F931F |
:102320000F930E94F0088DB79EB70696E2CF1092E9 |
:10233000F0038DE793E09F938F93FF920E94F00844 |
:1023400084E18093F00360910E0470910F048091FA |
:1023500010049091110420E034E040E050E00E942D |
:10236000F1465F934F933F932F938EE693E09F93B5 |
:102370008F93FF920E94F00888E28093F0036091AF |
:10238000160470911704809118049091190420E0AC |
:1023900034E040E050E00E94F1465F934F933F935A |
:1023A0002F938FE593E09F938F93FF920E94F00805 |
:1023B0008CE38093F00380914A0490914B049F93A7 |
:1023C0008F9380E593E09F938F93FF920E94F00894 |
:1023D0008DB79EB746968DCF1092F003809134074B |
:1023E0009091350720913207309133079F938F9357 |
:1023F0003F932F9380E493E09F938F93FF920E94EB |
:10240000F00884E18093F0038091380790913907B8 |
:1024100020913607309137079F938F933F932F93E7 |
:1024200080E393E09F938F93FF920E94F00888E2ED |
:102430008093F00380913C0790913D0720913A07EB |
:1024400030913B079F938F933F932F9380E293E0CC |
:102450009F938F93FF920E94F0088CE38093F00388 |
:10246000809140079091410720913E0730913F07AE |
:102470009F938F933F932F9380E193E07AC01092C4 |
:10248000F003E0915F07FF27EE0FFF1FE05DF84FBD |
:1024900020813181E0915E07FF27EE0FFF1FE05D95 |
:1024A000F84F808191813F932F939F938F9380E08A |
:1024B00093E09F938F93FF920E94F00884E18093B2 |
:1024C000F003E0916107FF27EE0FFF1FE05DF84F7B |
:1024D00020813181E0916007FF27EE0FFF1FE05D53 |
:1024E000F84F808191813F932F939F938F9380EF3B |
:1024F00092E09F938F93FF920E94F00888E280936E |
:10250000F003E0916307FF27EE0FFF1FE05DF84F38 |
:1025100020813181E0916207FF27EE0FFF1FE05D10 |
:10252000F84F808191813F932F939F938F9380EEFB |
:1025300092E09F938F93FF920E94F0088CE3809328 |
:10254000F003E0916507FF27EE0FFF1FE05DF84FF6 |
:1025500020813181E0916407FF27EE0FFF1FE05DCE |
:10256000F84F808191813F932F939F938F9380EDBC |
:1025700092E09F938F93FF920E94F0088DB79EB7D1 |
:102580004C96B7CE1092F00382EC92E09F938F931B |
:10259000FF920E94F0080F900F900F908091000121 |
:1025A0008A3009F04AC084E18093F0034091FA0335 |
:1025B0005091FB038091D0039091D1032091FA03B5 |
:1025C0003091FB035F934F93821B930B9F938F93E9 |
:1025D00083EB92E09F938F93FF920E94F00888E232 |
:1025E0008093F0034091FC035091FD038091D2034E |
:1025F0009091D3032091FC033091FD035F934F939F |
:10260000821B930B9F938F9384EA92E09F938F9307 |
:10261000FF920E94F0088CE38093F0038091FE0308 |
:102620009091FF032091D7073091D8079F938F9304 |
:102630003F932F9385E992E055C084E18093F003A6 |
:102640008091FA039091FB032091D0033091D10344 |
:10265000E091FA03F091FB0362E070E00E94BC4657 |
:102660007F936F932E1B3F0B3F932F9386E892E04F |
:102670009F938F93FF920E94F00888E28093F0036B |
:102680008091FC039091FD032091D2033091D303FC |
:10269000E091FC03F091FD0362E070E00E94BC4613 |
:1026A0007F936F932E1B3F0B3F932F9387E792E00F |
:1026B0009F938F93FF920E94F0088CE38093F00326 |
:1026C0008091FE039091FF032091D7073091D807A6 |
:1026D00062E070E00E94BC467F936F933F932F931C |
:1026E00088E692E09F938F93FF920E94F0088DB747 |
:1026F0009EB74596FECD1092F0038BE592E09F9336 |
:102700008F93FF920E94F00884E18093F003809100 |
:102710000404909105042091D8033091D9039F932C |
:102720008F933F932F938CE492E09F938F93FF922C |
:102730000E94F00888E28093F00380910604909153 |
:1027400007042091D6033091D7039F938F933F9333 |
:102750002F938DE392E09F938F93FF920E94F00856 |
:102760008CE38093F00360910804709109048091D8 |
:102770000A0490910B040091B7071091B8070E94CA |
:102780009E457F936F931F930F938EE292E09F93EA |
:102790008F93FF920E94F0088DB79EB74896A9CDFF |
:1027A00084E18093F00380910803909109039F9343 |
:1027B0008F938FE192E09F938F93FF920E94F00896 |
:1027C00088E28093F00380915E0499279F938F9312 |
:1027D00080E192E09F938F93FF920E94F0088DB763 |
:1027E0009EB70A9686CD1092F00381E092E09F9307 |
:1027F0008F93FF920E94F00884E18093F003809110 |
:102800004E0490914F049F938F9382EF91E09F939A |
:102810008F93FF920E94F00888E28093F0038091EA |
:102820004A0490914B049F938F9383EE91E09F9382 |
:102830008F93FF920E94F0088CE38093F0038091C5 |
:102840004C0490914D049F938F9384ED91E09F935E |
:102850008F93FF920E94F0088DB79EB7429649CDA4 |
:102860001092F00380915604909157049F938F9398 |
:1028700088EC91E09F938F93FF920E94F00884E18F |
:102880008093F00380915804909159049F938F9303 |
:102890008CEB91E09F938F93FF920E94F00888E267 |
:1028A0008093F00380915A0490915B049F938F93DF |
:1028B00080EB91E09F938F93FF920E94F0088CE34E |
:1028C0008093F00380915C0490915D049F938F93BB |
:1028D00084EA91E09F938F93FF9206CD1092F003CC |
:1028E0008CE991E09F938F93FF920E94F00884E11E |
:1028F0008093F00380919C0399279F938F938EE898 |
:1029000091E09F938F93FF920E94F00888E280935A |
:10291000F0038091C6039091C7039F938F9380E843 |
:1029200091E09F938F93FF920E94F0088CE3809335 |
:10293000F0038091820799279F938F93809181075D |
:1029400099279F938F9382E791E09F938F93FF92B4 |
:102950000E94F008CBCC015000936A031092F2035E |
:102960001092F1031F910F91FF9008951092B900FA |
:102970008AE28093B800089585EA8093BC0080E0E5 |
:1029800090E0089584E98093BC0008951092B90006 |
:102990008093BB0085E88093BC0080E090E00895C0 |
:1029A0001F920F920FB60F9211248F939F93EF9364 |
:1029B000FF938091F3038F5F8093F3038150833003 |
:1029C000A9F1843028F4813091F0823008F50AC0F2 |
:1029D000853089F18530B8F18630A9F1873009F06A |
:1029E00061C045C08091F403880F8E5A09C0809160 |
:1029F000F4038F5F8093F403815027C08091A80770 |
:102A00001092B9008093BB0085E88093BC004AC057 |
:102A100084E98093BC008091F403843018F4109210 |
:102A2000F30302C01092F40385EAEFCF8091F5031F |
:102A3000880F8D5AE5CF8091BB00E091F503FF2709 |
:102A4000E85DF84F80838091F503813039F0813063 |
:102A5000A8F2823031F0833029F506C08091AD07AD |
:102A6000CFCF8091CD07CCCF8091D107C9CF8091B6 |
:102A7000F5039091BB00E82FFF27E85DF84F9483A2 |
:102A80008F5F8093F503843010F01092F50384E992 |
:102A90008093BC008AE090E0909386038093850346 |
:102AA0001092F3038091BC0080688093BC00FF917A |
:102AB000EF919F918F910F900FBE0F901F901895DF |
:102AC0004CEB50E084E9DA018C931092F3032BEB8A |
:102AD00030E0F90180811092F40380E88C93109229 |
:102AE000BD001092BA001082E9EBF0E01082A8EB72 |
:102AF000B0E01C9210828AE28C9385EADA018C9312 |
:102B00001082F901108285E88C93089583EC8093FC |
:102B10008100EFE6F0E08081806280831092FF0305 |
:102B20001092FE031092FD031092FC031092FB031F |
:102B30001092FA0308951F920F920FB60F9211246C |
:102B40000F931F932F933F934F935F936F937F93B5 |
:102B50008F939F93AF93BF93CF93DF93EF93FF93A5 |
:102B600020918600309187008091F8039091F903BD |
:102B7000281B390B80918600909187009093F90370 |
:102B80008093F803C9018D549440C091F603D0910D |
:102B9000F703835F9A4158F4249714F010926B0363 |
:102BA00081E090E09093F7038093F60363C0CA300E |
:102BB000D1050CF05FC0C9018B5F9040845B9140F0 |
:102BC00008F040C0A901425D5140FE01EE0FFF1F19 |
:102BD000E05DF84F80819181FA01E81BF90BCF018C |
:102BE000F7FF03C0909581959F4F06974CF4809115 |
:102BF0005E04883C28F480915E04865F80935E04C6 |
:102C0000FE01EE0FFF1F8F01005D184FD8012D91BF |
:102C10003C91C901880F991F820F931F840F951F44 |
:102C200064E070E00E94BC46D8018D919C911197A0 |
:102C30009B01281B390BEA5BF84F318320831196E7 |
:102C40007C936E93FE013196F093F703E093F603C5 |
:102C5000E530F10519F45D9A5C980BC05D98E6309B |
:102C6000F10511F45C9A05C05C98379711F45B9AF2 |
:102C700001C05B98FF91EF91DF91CF91BF91AF9130 |
:102C80009F918F917F916F915F914F913F912F9184 |
:102C90001F910F910F900FBE0F901F9018952F92BC |
:102CA0003F924F925F926F927F928F929F92AF92DC |
:102CB000BF92CF92DF92EF92FF920F931F93CF9329 |
:102CC000DF93CDB7DEB722970FB6F894DEBF0FBE05 |
:102CD000CDBF8091FE039091FF032091D4033091EA |
:102CE000D503821B930B9093D8078093D7078091CD |
:102CF000D2039091D3032091FC033091FD03821BFA |
:102D0000930B9093A7078093A6078091D00390918F |
:102D1000D1032091FA033091FB03821B930B909314 |
:102D2000AF078093AE076091D4077091D5072091CB |
:102D3000D8033091D903882777FD8095982F4427B1 |
:102D400037FD4095542F04E0220F331F441F551FB9 |
:102D50000A95D1F7620F731F841F951F22E030E0A0 |
:102D600040E050E00E94F1463093D5072093D4070D |
:102D70006091DE077091DF072091D6033091D70371 |
:102D8000882777FD8095982F442737FD4095542F4D |
:102D900014E0220F331F441F551F1A95D1F7620FFD |
:102DA000731F841F951F22E030E040E050E00E9436 |
:102DB000F1463093DF072093DE076091B7077091EB |
:102DC000B8072091DA033091DB03882777FD8095DF |
:102DD000982F442737FD4095542F620F731F841F8F |
:102DE000951F22E030E040E050E00E94F146309331 |
:102DF000B8072093B70720911E0430911F0440911B |
:102E00002004509121048091D8039091D903B4E01B |
:102E1000880F991FBA95E1F7AA2797FDA095BA2FB9 |
:102E2000280F391F4A1F5B1F20931E0430931F0475 |
:102E300040932004509321042091220430912304D4 |
:102E400040912404509125048091D6039091D7039A |
:102E5000A4E0880F991FAA95E1F7AA2797FDA095EE |
:102E6000BA2F280F391F4A1F5B1F2093220430936B |
:102E70002304409324045093250460912604709108 |
:102E800027048091280490912904E0901807F0907D |
:102E90001907A0900804B0900904C0900A04D090CB |
:102EA0000B040E94BB453B014C010027F7FC009539 |
:102EB000102FC801B7010E94BB45A60195010E94D1 |
:102EC00015459B01AC01C401B3010E9416450E9447 |
:102ED0009E45609326047093270480932804909362 |
:102EE00029042091D7073091D807442737FD409512 |
:102EF000542F8091E5079091E607A091E707B091E4 |
:102F0000E807820F931FA41FB51F8093E5079093D6 |
:102F1000E607A093E707B093E8072091D707309121 |
:102F2000D807442737FD4095542F8091B9079091D9 |
:102F3000BA07A091BB07B091BC07820F931FA41FD3 |
:102F4000B51F8093B9079093BA07A093BB07B093BE |
:102F5000BC0720913E0430913F04409140045091C1 |
:102F600041048091D7079091D807AA2797FDA09593 |
:102F7000BA2F280F391F4A1F5B1F20933E0430933E |
:102F80003F04409340045093410420914204309107 |
:102F9000430440914404509145048091D707909197 |
:102FA000D807AA2797FDA095BA2F280F391F4A1FC7 |
:102FB0005B1F209342043093430440934404509396 |
:102FC000450420916E042A83222309F06BC080916E |
:102FD0006F04882309F066C08091660786FF62C08F |
:102FE00060912E0470912F048091300490913104EF |
:102FF000E090D707F090D807A0907C04BB24CC24A5 |
:10300000DD2420E030E140E050E00E94F14600275E |
:10301000F7FC0095102FCA01B901A80197010E9481 |
:103020007D46A60195010E947D4620E038E040E003 |
:1030300050E00E94F1462093C7043093C8044093A7 |
:10304000C9045093CA04609136047091370480918A |
:10305000380490913904E090D707F090D80720E029 |
:1030600030E140E050E00E94F1460027F7FC009577 |
:10307000102FCA01B901A80197010E947D46A6013F |
:1030800095010E947D4620E038E040E050E00E943B |
:10309000F1462093C3043093C4044093C504509375 |
:1030A000C60410C01092C3041092C4041092C50448 |
:1030B0001092C6041092C7041092C8041092C9045A |
:1030C0001092CA048091A6079091A7072090C70488 |
:1030D0003090C8044090C9045090CA04820D931DDA |
:1030E0009093A7078093A6070091A6071091A707C2 |
:1030F000A090C304B090C404C090C504D090C6048E |
:1031000080917D04682E772488249924C601B50116 |
:10311000A40193010E947D4620E032E040E050E0AF |
:103120000E94F146020F131F1093A7070093A607F2 |
:1031300020913A0430913B0440913C0450913D046D |
:103140008091A6079091A707AA2797FDA095BA2F6F |
:10315000280F391F4A1F5B1F20933A0430933B040A |
:1031600040933C0450933D04209136043091370441 |
:1031700040913804509139048091A6079091A70797 |
:1031800060916A0470916B04861B970BAA2797FDC8 |
:10319000A095BA2F280F391F4A1F5B1F20933604B2 |
:1031A00030933704409338045093390480913604A7 |
:1031B00090913704A0913804B0913904E0908B03CA |
:1031C000F0908C0300918D0310918E03E816F906A0 |
:1031D0000A071B0704F580E197E2A0E0B0E08E1932 |
:1031E0009F09A00BB10B8093360490933704A093F2 |
:1031F0003804B09339048091360490913704A0913B |
:103200003804B091390480933A0490933B04A0931E |
:103210003C04B0933D042091360430913704409132 |
:1032200038045091390488279927DC018E199F09A9 |
:10323000A00BB10B281739074A075B0704F580EF8D |
:1032400098EDAFEFBFEFE80EF91E0A1F1B1FE092CB |
:103250003604F092370400933804109339048091B7 |
:10326000360490913704A0913804B09139048093CA |
:103270003A0490933B04A0933C04B0933D048091A6 |
:10328000D2039091D3030F9734F488E19CEF90938D |
:10329000A7078093A6078091D2039091D303079745 |
:1032A00034F480E398EF9093A7078093A60790915A |
:1032B000000199839A30A9F48091D2039091D303AD |
:1032C000835F934034F088EE93E09093A707809358 |
:1032D000A6078091D2039091D3038A5F9340DCF0DC |
:1032E00014C08091D2039091D303855E974034F04F |
:1032F00088EE93E09093A7078093A6078091D2036E |
:103300009091D303835F974034F080ED97E09093E2 |
:10331000A7078093A6078091AE079091AF078A19FF |
:103320009B099093AF078093AE070091AE07109171 |
:10333000AF07C201B101A40193010E947D4620E0C4 |
:1033400032E040E050E00E94F146021B130B109364 |
:10335000AF070093AE0720913204309133044091BF |
:103360003404509135048091AE079091AF07AA279D |
:1033700097FDA095BA2F280F391F4A1F5B1F209376 |
:103380003204309333044093340450933504209135 |
:103390002E0430912F0440913004509131048091DB |
:1033A000AE079091AF0760916C0470916D04861B1D |
:1033B000970BAA2797FDA095BA2F280F391F4A1FF0 |
:1033C0005B1F20932E0430932F04409330045093BE |
:1033D000310480912E0490912F04A0913004B0917B |
:1033E0003104E0908703F0908803009189031091E5 |
:1033F0008A03E816F9060A071B0704F580E197E23D |
:10340000A0E0B0E08E199F09A00BB10B80932E04B1 |
:1034100090932F04A0933004B093310480912E0434 |
:1034200090912F04A0913004B09131048093320424 |
:1034300090933304A0933404B093350420912E0468 |
:1034400030912F04409130045091310488279927FE |
:10345000DC018E199F09A00BB10B281739074A0709 |
:103460005B0704F580EF98EDAFEFBFEFE80EF91EB4 |
:103470000A1F1B1FE0922E04F0922F0400933004C9 |
:103480001093310480912E0490912F04A091300468 |
:10349000B09131048093320490933304A0933404A8 |
:1034A000B09335048091D0039091D1030F9734F4F9 |
:1034B00088E19CEF9093AF078093AE078091D00393 |
:1034C0009091D103079734F480E398EF9093AF077E |
:1034D0008093AE0799819A30A9F48091D00390919E |
:1034E000D103835F934034F088EE93E09093AF076D |
:1034F0008093AE078091D0039091D1038A5F93406F |
:10350000DCF014C08091D0039091D103855E974088 |
:1035100034F088EE93E09093AF078093AE078091EC |
:10352000D0039091D103835F974034F080ED97E012 |
:103530009093AF078093AE078FEE80937A008091CF |
:103540003E0490913F04A0914004B09141048093C7 |
:103550002A0490932B04A0932C04B0932D04809103 |
:103560002E0490912F04A0913004B09131048093E7 |
:103570000E0490930F04A0931004B0931104809153 |
:10358000360490913704A0913804B09139048093A7 |
:10359000160490931704A0931804B0931904809113 |
:1035A000320490913304A0913404B0913504809397 |
:1035B000120490931304A0931404B0931504809103 |
:1035C0003A0490913B04A0913C04B0913D04809357 |
:1035D0001A0490931B04A0931C04B0931D048091C3 |
:1035E000660787FF6BC02A81222309F067C080919C |
:1035F0006F04882309F062C08091AE079091AF07F5 |
:10360000893C91057CF02091AE073091AF07809105 |
:10361000AE079091AF07880F991F880F991F20520E |
:10362000334015C08091AE079091AF0788539F4FEC |
:10363000A4F42091AE073091AF078091AE0790912E |
:10364000AF07880F991F880F991F205E3C4F820F8C |
:10365000931F9093AF078093AE078091A607909138 |
:10366000A707893C91057CF02091A6073091A70718 |
:103670008091A6079091A707880F991F880F991F1F |
:103680002052334015C08091A6079091A707885318 |
:103690009F4FA4F42091A6073091A7078091A60719 |
:1036A0009091A707880F991F880F991F205E3C4FA4 |
:1036B000820F931F9093A7078093A607209156042B |
:1036C0003091570480916207E82FFF27EE0FFF1F0C |
:1036D000E05DF84F8081918182599F4F281739070B |
:1036E0001CF42F5F3F4F0CC08081918182599F4F06 |
:1036F000821793074CF42115310531F021503040E9 |
:103700003093570420935604209158043091590463 |
:1037100080916307E82FFF27EE0FFF1FE05DF84F52 |
:103720008081918182599F4F281739071CF42F5FA0 |
:103730003F4F0CC08081918182599F4F8217930720 |
:103740004CF42115310531F02150304030935904AB |
:103750002093580420915A0430915B0480916407AF |
:10376000E82FFF27EE0FFF1FE05DF84F808191816A |
:1037700082599F4F281739071CF42F5F3F4F0CC009 |
:103780008081918182599F4F821793074CF42115B4 |
:10379000310531F02150304030935B0420935A04BE |
:1037A00020915C0430915D0480916507E82FFF272C |
:1037B000EE0FFF1FE05DF84F8081918182599F4F8E |
:1037C000281739071CF42F5F3F4F0CC0808191816F |
:1037D00082599F4F821793074CF42115310531F020 |
:1037E0002150304030935D0420935C048091560456 |
:1037F0009091570497FF05C01092570410925604F9 |
:103800000AC08F3F910539F034F08FEF90E090932C |
:10381000570480935604809158049091590497FF5F |
:1038200005C010925904109258040AC08F3F9105A8 |
:1038300039F034F08FEF90E090935904809358045E |
:1038400080915A0490915B0497FF05C010925B042D |
:1038500010925A040AC08F3F910539F034F08FEF6F |
:1038600090E090935B0480935A0480915C04909163 |
:103870005D0497FF05C010925D0410925C040AC0BD |
:103880008F3F910539F034F08FEF90E090935D0415 |
:1038900080935C0422960FB6F894DEBF0FBECDBFB6 |
:1038A000DF91CF911F910F91FF90EF90DF90CF901C |
:1038B000BF90AF909F908F907F906F905F904F9050 |
:1038C0003F902F90089510927A008091D0039091AC |
:1038D000D1039093AF078093AE078091D20390916C |
:1038E000D3039093A7078093A6078091D403909168 |
:1038F000D5039093D8078093D7078091D8039091F0 |
:10390000D903AA2797FDA095BA2F74E0880F991FB5 |
:10391000AA1FBB1F7A95D1F79093D5078093D40740 |
:103920008091D6039091D703AA2797FDA095BA2F2F |
:1039300064E0880F991FAA1FBB1F6A95D1F7909367 |
:10394000DF078093DE078091DA039091DB03909389 |
:10395000B8078093B7078FEE80937A0020915604C2 |
:103960003091570480916207E82FFF27EE0FFF1F69 |
:10397000E05DF84F8081918182599F4F2817390768 |
:103980001CF42F5F3F4F0CC08081918182599F4F63 |
:10399000821793074CF42115310531F02150304046 |
:1039A00030935704209356042091580430915904C1 |
:1039B00080916307E82FFF27EE0FFF1FE05DF84FB0 |
:1039C0008081918182599F4F281739071CF42F5FFE |
:1039D0003F4F0CC08081918182599F4F821793077E |
:1039E0004CF42115310531F0215030403093590409 |
:1039F0002093580420915A0430915B04809164070D |
:103A0000E82FFF27EE0FFF1FE05DF84F80819181C7 |
:103A100082599F4F281739071CF42F5F3F4F0CC066 |
:103A20008081918182599F4F821793074CF4211511 |
:103A3000310531F02150304030935B0420935A041B |
:103A400020915C0430915D0480916507E82FFF2789 |
:103A5000EE0FFF1FE05DF84F8081918182599F4FEB |
:103A6000281739071CF42F5F3F4F0CC080819181CC |
:103A700082599F4F821793074CF42115310531F07D |
:103A80002150304030935D0420935C0480915604B3 |
:103A90009091570497FF05C0109257041092560456 |
:103AA0000AC08F3F910539F034F08FEF90E090938A |
:103AB000570480935604809158049091590497FFBD |
:103AC00005C010925904109258040AC08F3F910506 |
:103AD00039F034F08FEF90E09093590480935804BC |
:103AE00080915A0490915B0497FF05C010925B048B |
:103AF00010925A040AC08F3F910539F034F08FEFCD |
:103B000090E090935B0480935A0480915C049091C0 |
:103B10005D0497FF05C010925D0410925C040AC01A |
:103B20008F3F910539F034F08FEF90E090935D0472 |
:103B300080935C046091890777278827992724EC74 |
:103B400039E040E050E00E947D4660938703709327 |
:103B500088038093890390938A0360938B03709307 |
:103B60008C0380938D0390938E0308951F9380910F |
:103B700069078B3F98F08B3F19F4809156040EC073 |
:103B80008C3F19F48091580409C08D3F19F480913D |
:103B90005A0404C08E3F21F480915C048093940306 |
:103BA00080919403882319F41092940304C08F3FEA |
:103BB00011F480939403809168078B3F98F08B3FBA |
:103BC00019F4809156040EC08C3F19F4809158046A |
:103BD00009C08D3F19F480915A0404C08E3F21F42E |
:103BE00080915C048093930380919303882319F45C |
:103BF0001092930305C0843618F084E680939303F3 |
:103C000080916A078B3F98F08B3F19F4809156049E |
:103C10000EC08C3F19F48091580409C08D3F19F4EF |
:103C200080915A0404C08E3F21F480915C048093FB |
:103C3000950380919503882319F41092950305C08C |
:103C4000843618F084E68093950380916C078B3F4F |
:103C500098F08B3F19F4809156040EC08C3F19F4F4 |
:103C60008091580409C08D3F19F480915A0404C012 |
:103C70008E3F21F480915C0480939603809196039B |
:103C8000882319F41092960304C08F3F11F4809397 |
:103C90009603809173078B3F98F08B3F19F48091C6 |
:103CA00056040EC08C3F19F48091580409C08D3F12 |
:103CB00019F480915A0404C08E3F21F480915C0471 |
:103CC0008093970380919703882319F410929703A8 |
:103CD00004C08F3F11F480939703809174078B3F4A |
:103CE00098F08B3F19F4809156040EC08C3F19F464 |
:103CF0008091580409C08D3F19F480915A0404C082 |
:103D00008E3F21F480915C04809398038091980306 |
:103D10008B3010F48AE002C08F3F11F48093980337 |
:103D2000809175078B3F98F08B3F19F48091560472 |
:103D30000EC08C3F19F48091580409C08D3F19F4CE |
:103D400080915A0404C08E3F21F480915C048093DA |
:103D5000990380919903882319F41092990304C060 |
:103D60008F3F11F48093990380917A078B3F98F0ED |
:103D70008B3F19F4809156040EC08C3F19F480914A |
:103D8000580409C08D3F19F480915A0404C08E3F35 |
:103D900021F480915C0480939B0380919B03882392 |
:103DA00019F410929B0304C08F3F11F480939B037E |
:103DB00080917B078B3F98F08B3F19F480915604DC |
:103DC0000EC08C3F19F48091580409C08D3F19F43E |
:103DD00080915A0404C08E3F21F480915C0480934A |
:103DE000740480917404882319F41092740404C03C |
:103DF0008F3F11F48093740480917C078B3F98F07F |
:103E00008B3F19F4809156040EC08C3F19F48091B9 |
:103E1000580409C08D3F19F480915A0404C08E3FA4 |
:103E200021F480915C04809375048091750488234B |
:103E300019F41092750404C08F3F11F48093750437 |
:103E400080917D078B3F98F08B3F19F48091560449 |
:103E50000EC08C3F19F48091580409C08D3F19F4AD |
:103E600080915A0404C08E3F21F480915C048093B9 |
:103E7000760480917604882319F41092760404C0A5 |
:103E80008F3F11F48093760480917E078B3F98F0EA |
:103E90008B3F19F4809156040EC08C3F19F4809129 |
:103EA000580409C08D3F19F480915A0404C08E3F14 |
:103EB00021F480915C0480937704809177048823B7 |
:103EC00019F41092770404C08F3F11F480937704A3 |
:103ED00080918E078B3F98F08B3F19F480915604A8 |
:103EE0000EC08C3F19F48091580409C08D3F19F41D |
:103EF00080915A0404C08E3F21F480915C04809329 |
:103F0000780480917804882319F41092780404C00E |
:103F10008F3F11F48093780480918F078B3F98F046 |
:103F20008B3F19F4809156040EC08C3F19F4809198 |
:103F3000580409C08D3F19F480915A0404C08E3F83 |
:103F400021F480915C048093790480917904882322 |
:103F500019F41092790404C08F3F11F4809379040E |
:103F6000809190078B3F98F08B3F19F48091560415 |
:103F70000EC08C3F19F48091580409C08D3F19F48C |
:103F800080915A0404C08E3F21F480915C04809398 |
:103F90007A0480917A04882319F410927A0404C078 |
:103FA0008F3F11F480937A04809191078B3F98F0B2 |
:103FB0008B3F19F4809156040EC08C3F19F4809108 |
:103FC000580409C08D3F19F480915A0404C08E3FF3 |
:103FD00021F480915C0480937B0480917B0488238E |
:103FE00019F410927B0404C08F3F11F480937B047A |
:103FF00080917F078B3F98F08B3F19F48091560496 |
:104000000EC08C3F19F48091580409C08D3F19F4FB |
:1040100080915A0404C08E3F21F480915C04809307 |
:104020009C0380919C03882319F410929C0304C084 |
:104030008F3F11F480939C03809184078B3F98F00D |
:104040008B3F19F4809156040EC08C3F19F4809177 |
:10405000580409C08D3F19F480915A0404C08E3F62 |
:1040600021F480915C0480939D0380919D038823BB |
:1040700019F410929D0304C08F3F11F480939D03A7 |
:10408000809187078B3F98F08B3F19F480915604FD |
:104090000EC08C3F19F48091580409C08D3F19F46B |
:1040A00080915A0404C08E3F21F480915C04809377 |
:1040B0007C0480917C04882319F410927C0404C051 |
:1040C0008F3F11F480937C04809188078B3F98F098 |
:1040D0008B3F19F4809156040EC08C3F19F48091E7 |
:1040E000580409C08D3F19F480915A0404C08E3FD2 |
:1040F00021F480915C0480937D0480917D04882369 |
:1041000019F410927D0404C08F3F11F480937D0454 |
:1041100080918D078B3F98F08B3F19F48091560466 |
:104120000EC08C3F19F48091580409C08D3F19F4DA |
:1041300080915A0404C08E3F21F480915C048093E6 |
:104140009E0380919E03882319F410929E0304C05D |
:104150008F3F11F480939E0310919B03612F77276B |
:1041600067FD7095872F972F0E94BB4517FF06C0EC |
:1041700020E030E040E853E40E94164527E137EBA9 |
:1041800041ED58E30E94354660938F03709390038E |
:104190008093910390939203809171078093D60747 |
:1041A000809170078093B0071F9108951F93182F77 |
:1041B0000EC080916504882361F484E690E09093BA |
:1041C000C5038093C4038AEF90E00E946D0D1150E7 |
:1041D00080F71F91089580916504882301F510925E |
:1041E000AD071092A8071092CD071092D1078091C9 |
:1041F000AE03882311F08093A8078091AF03882332 |
:1042000011F08093AD078091B003882311F0809363 |
:10421000D1078091B103882311F08093CD0780915D |
:10422000A80799279093EE068093ED068091AD073D |
:1042300099279093F0068093EF068091D1079927F4 |
:104240009093F2068093F1068091CD079927909381 |
:10425000F4068093F3061092F3031092F4030E9485 |
:10426000BC140895469A109205041092040410920A |
:1042700007041092060480E090E0A0E0B0E0809394 |
:10428000080490930904A0930A04B0930B041092BD |
:10429000FB031092FA031092FD031092FC0310929C |
:1042A000FF031092FE0310927C0410927D040E9482 |
:1042B000631C84E690E00E94570D0E94631C80916D |
:1042C000660780FF10C080910E0390910F03875BFB |
:1042D000934038F480910E0390910F038E5E9240CC |
:1042E00010F40E9421108091D0039091D1039093FB |
:1042F000FB038093FA038091D2039091D3039093B0 |
:10430000FD038093FC038091D4039091D503909397 |
:10431000FF038093FE038091FC039091FD03909333 |
:104320000104809300048091FA039091FB03909321 |
:1043300003048093020444E050E0DA010E940C4739 |
:10434000802D853038F18091DE079091DF0797FF4F |
:1043500003C0909581959F4F60E170E00E94BC463C |
:1043600070930704609306048091D4079091D50759 |
:1043700097FF03C0909581959F4F60E170E00E9488 |
:10438000BC46709305046093040460911807709113 |
:10439000190739C0DA010E940C47802D4F5F5F4F2B |
:1043A000DA010E940C47202D9927982F8827820F29 |
:1043B000911D90930504809304044F5F5F4FDA01D1 |
:1043C0000E940C47802D4F5F5F4FDA010E940C471F |
:1043D000202D9927982F8827820F911D90930704ED |
:1043E000809306044F5F5F4FDA010E940C47602DF7 |
:1043F0004F5F5F4FDA010E940C47202D7727762F01 |
:104400006627620F711D882777FD8095982F0E947F |
:10441000BB45609308047093090480930A04909349 |
:104420000B0410922E0410922F041092300410925C |
:10443000310410923204109233041092340410921A |
:1044400035041092360410923704109238041092FA |
:10445000390410923A0410923B0410923C041092DA |
:104460003D0410923E0410923F04109240041092BA |
:1044700041041092AF071092AE071092A707109256 |
:10448000A6071092D8071092D7071092B90710927A |
:10449000BA071092BB071092BC0780910A03909153 |
:1044A0000B03A0910C03B0910D0390931B07809315 |
:1044B0001A071092E3031092E2031092460410923E |
:1044C0004704109248041092490480914A04909144 |
:1044D0004B0490934D0480934C040E94C03A82E3B5 |
:1044E00090E09093C5038093C40360918907772778 |
:1044F0008827992724EC39E040E050E00E947D466F |
:1045000060938703709388038093890390938A0351 |
:1045100060918A077727882799270E947D466093B4 |
:104520008B0370938C0380938D0390938E03109272 |
:10453000A00310929F0320914A0430914B0484E120 |
:1045400095E0AC01249FC001259F900D349F900DF4 |
:104550001124AA2797FDA095BA2F8093E507909381 |
:10456000E607A093E707B093E8078EE190E0909309 |
:10457000CE048093CD049093CC048093CB04089513 |
:1045800081E080935E0752E050935F0743E04093E1 |
:10459000600774E07093610765E06093620786E0EE |
:1045A0008093630787E08093640798E090936507A2 |
:1045B00080EC809366078EE1809367078BEF809392 |
:1045C00069073AE030936A0722E320936807209353 |
:1045D0006C0750936B0740936D0710926E07909392 |
:1045E0006F078FE0809370078AEF809371078AE1ED |
:1045F0008093720780E88093730788EC8093740738 |
:104600008FEA8093750794E6909376078FE5809301 |
:1046100077078CE3809378071092790730937A07B5 |
:1046200080E580937B0710927C0710927D071092A3 |
:104630007E0710928E0710928F07109290071092AB |
:10464000910790937F0788E28093800710929307E9 |
:104650002093810786E980938207609383072093E4 |
:1046600084078AE580938507209386071092920736 |
:1046700090938707309388079093890790938A07D0 |
:1046800090938B0770938C0720938D07A8E9B7E070 |
:10469000ECE6F3E08CE001900D928150E1F7089593 |
:1046A00081E080935E0792E090935F0783E08093C0 |
:1046B000600744E04093610755E05093620786E04D |
:1046C0008093630787E08093640788E080936507A1 |
:1046D00080E4809366078EE1809367078BEF809379 |
:1046E00069073AE030936A0722E320936807209332 |
:1046F0006C0790936B0740936D0710926E07309391 |
:104700006F078FE0809370078AEF809371078AE1CB |
:104710008093720780E8809373078FEA8093740711 |
:104720008093750794E6909376078FE580937707DB |
:104730008CE3809378071092790780E280937A0760 |
:1047400080E580937B0710927C0710927D07109282 |
:104750007E0710928E0710928F071092900710928A |
:10476000910790937F0788E28093800710929307C8 |
:104770002093810786E980938207509383072093D3 |
:1047800084078AE580938507209386071092920715 |
:1047900090938707309388079093890790938A07AF |
:1047A00090938B0740938C078BE480938D07A8E947 |
:1047B000B7E0E6E7F3E08CE001900D928150E1F77D |
:1047C000089581E080935E0782E080935F0783E035 |
:1047D0008093600734E03093610765E0609362077F |
:1047E00086E08093630787E08093640788E0809386 |
:1047F000650780E4809366078EE1809367078BEFFF |
:10480000809369075AE050936A0722E32093680770 |
:1048100020936C0730936B0730936D0730936E07CE |
:104820008EE080936F078FE0809370078AEF80930C |
:1048300071078AE18093720780E88093730788E7A5 |
:104840008093740746E94093750794E69093760742 |
:104850008FE5809377078CE3809378071092790730 |
:1048600080E280937A0710927B0710927C07109267 |
:104870007D0710927E0710928E0710928F0710927C |
:1048800090071092910790937F0788E280938007AA |
:1048900010929307209381074093820760938307C8 |
:1048A000209384078AE580938507209386071092DA |
:1048B0009207909387075093880790938907909366 |
:1048C0008A0720938B0730938C0790938D07A8E974 |
:1048D000B7E0EEE7F3E08CE001900D928150E1F754 |
:1048E00008952F923F924F925F926F927F928F9294 |
:1048F0009F92AF92BF92CF92DF92EF92FF920F936F |
:104900001F93CF93DF93CDB7DEB766970FB6F894BA |
:10491000DEBF0FBECDBF0E944F1680915C08909104 |
:104920005D08009729F0019790935D0880935C08DB |
:104930000E948C3B892B39F4809100018A3011F45C |
:10494000289A01C02898299A299AE0916007FF27A0 |
:10495000EE0FFF1FE05DF84F0190F081E02DE85869 |
:10496000FF4F8091D607082F112704511040E01700 |
:10497000F1070CF48F012091080330910903809115 |
:1049800076079927029740918404509185048217F5 |
:104990009307ACF122E04D3B520714F110928504CD |
:1049A00010928404E091CB04F091CC042091CD04CA |
:1049B0003091CE04C901880F991F820F931F880F71 |
:1049C000991F880F991F6FE070E00E94BC466E1718 |
:1049D0007F0764F43197F093CC04E093CB0406C0D6 |
:1049E0004F5F5F4F50938504409384048091CB04C4 |
:1049F0009091CC0480179107F4F1C8013CC033E0DA |
:104A0000493E5307BCF02091CD043091CE04C9013A |
:104A100043E0880F991F4A95E1F7820F931F800F9B |
:104A2000911F6AE070E00E94BC467093CE046093D0 |
:104A3000CD0419C0CA010196909385048093840423 |
:104A40006AE070E00E94BC46892B89F48091CB0417 |
:104A50009091CC048017910734F401969093CC0484 |
:104A60008093CB0404C01093CC040093CB048091BA |
:104A7000CB049091CC049A83898397FF02C01A8259 |
:104A8000198280915E04843608F05DC08091030134 |
:104A9000882399F480910403909105038F5F9F4FC1 |
:104AA00061F488E99AE39093C5038093C40380E09E |
:104AB0009CE090930503809304038091A50490915A |
:104AC000A604009731F001979093A6048093A50463 |
:104AD00004C01092650410925004809100018A3045 |
:104AE00011F4289A01C028988091A0049091A10403 |
:104AF000815D974028F180917707682F77277A8327 |
:104B0000698381E080935004E0915E07FF27EE0FF8 |
:104B1000FF1FE05DF84F11821082E0915F07FF27D1 |
:104B2000EE0FFF1FE05DF84F11821082E0916107E8 |
:104B3000FF27EE0FFF1FE05DF84F118210826AC25F |
:104B40001092650467C280915E048D3808F462C2D9 |
:104B5000109250048091780722E3829FC0011124B3 |
:104B60009093A6048093A50489819A8189976CF01B |
:104B70008091A0049091A104AFEF8F3F9A0781F13B |
:104B800001969093A1048093A0048091A004909139 |
:104B9000A104883C910520F0E981FA81B89704F5D9 |
:104BA0001092BF041092C0041092C1041092C2046B |
:104BB0001092BB041092BC041092BD041092BE046B |
:104BC00010923E0410923F0410924004109241044F |
:104BD000109242041092430410924404109245042F |
:104BE00029813A81293C31050CF472C18091650418 |
:104BF000882309F00FC280916107E82FFF27EE0F8D |
:104C0000FF1FE05DF84F808191818C3491050CF499 |
:104C1000D5C08091A4048F5F8093A404893C08F4DC |
:104C2000F9C129980E943221109265041092A404BF |
:104C30001092A1041092A00480915E07282F3327C0 |
:104C4000F901EE0FFF1FE05DF84F808191818734FD |
:104C500091059CF4E0915F07FF27EE0FFF1FE05DD9 |
:104C6000F84F0190F081E02DF7FF03C0F095E1953A |
:104C7000FF4FE734F1050CF46CC080915F07682F9B |
:104C80007727DB01AA0FBB1FA05DB84F8D919C91C8 |
:104C90001197873491053CF0F901EE0FFF1FE05D9D |
:104CA000F84F808191818D919C918734910564F0BA |
:104CB000F901EE0FFF1FE05DF84F8081918187348D |
:104CC000910514F042E001C041E0FB01EE0FFF1F2F |
:104CD000E05DF84F80819181863491055CF4F901A3 |
:104CE000EE0FFF1FE05DF84F8081918187349105C1 |
:104CF0000CF043E0FB01EE0FFF1FE05DF84F8081F9 |
:104D000091818A5B9F4F5CF4F901EE0FFF1FE05D1C |
:104D1000F84F80819181873491050CF044E0660F53 |
:104D2000771F605D784FDB018D919C918A5B9F4F6F |
:104D30005CF4220F331F205D384FF901808191818F |
:104D4000863491050CF445E0A2E0B0E0042E0E9408 |
:104D500014470E948B0247E46EE577E00E94B2029E |
:104D60000E948B020E94D6208091660780FF10C0AF |
:104D700080910E0390910F03875B934038F48091EC |
:104D80000E0390910F038E5E924010F40E9421104A |
:104D90000E94DF3B80913E08882309F43BC188EEE6 |
:104DA00093E00E946D0D80ED97E09093C503809392 |
:104DB000C40384EF91E00E946D0D2CC1808191812C |
:104DC000855B9F4F0CF081C08091A4048F5F80931E |
:104DD000A404893C08F41EC129988FEF04E010E078 |
:104DE000D801082E0E941447109265041092A40462 |
:104DF0001092A1041092A0040E9432218091040418 |
:104E00009091050460E071E00E94BC46D801062E36 |
:104E10000E941447809104049091050460E071E0C1 |
:104E20000E94BC460F5F1F4FD801082E0E941447F6 |
:104E3000809106049091070460E071E00E94BC46F6 |
:104E40000F5F1F4FD801062E0E9414478091060461 |
:104E50009091070460E071E00E94BC460F5F1F4F15 |
:104E6000D801082E0E94144760910804709109042B |
:104E700080910A0490910B040E949E45DC01CB01B5 |
:104E800060E071E00E94BC460F5F1F4FD801062E04 |
:104E90000E941447609108047091090480910A04EB |
:104EA00090910B040E949E45DC01CB0160E071E013 |
:104EB0000E94BC460F5F1F4FD801082E0E94144766 |
:104EC0000E948B020E94D620A5C01092A404A2C00A |
:104ED000E981FA81B3970CF09DC080916107482F5A |
:104EE0005527FA01EE0FFF1FE05DF84F8081918199 |
:104EF000855B9F4F0CF06EC08091A3048F5F809301 |
:104F0000A304893C08F468C0469A88EC8093A30403 |
:104F100081E090E09093A1048093A00481E08093CD |
:104F200065041092B7041092B8041092B90410925C |
:104F3000BA0410923E0410923F0410924004109262 |
:104F400041041092420410924304109244041092BF |
:104F5000450410922E0410922F04109230041092E7 |
:104F600031041092360410923704109238041092D3 |
:104F7000390480910E0490910F04A0911004B09117 |
:104F800011048093320490933304A0933404B093BB |
:104F900035048091160490911704A0911804B091E3 |
:104FA000190480933A0490933B04A0933C04B0937B |
:104FB0003D041092BF041092C0041092C1041092DC |
:104FC000C2041092BB041092BC041092BD04109253 |
:104FD000BE0402C01092A304440F551F405D584FF9 |
:104FE000DA018D919C918C34910594F08091A2040A |
:104FF0008F5F8093A204893C68F046981092650404 |
:1050000088EC8093A2041092A1041092A00402C024 |
:105010001092A20480916B03815080936B03809166 |
:105020006B038F3F29F080915004882309F442C319 |
:105030000E94B61D80915E07682E7724D301AA0FC7 |
:10504000BB1FFD01E05DF84F0190F081E02DFC8B6E |
:10505000EB8B80916D07E82EFF24AA5BB84F0D9073 |
:10506000BC91A02DBA8BA98B80916E07C82EDD2430 |
:1050700080915F07882E9924C401880F991FDC0155 |
:10508000A05DB84F0D90BC91A02DB88BAF878A5B07 |
:10509000984FFC01A080B180E0916107AE2FBB2743 |
:1050A000AA0FBB1FA05DB84F0D90BC91A02DBE876D |
:1050B000AD8710919803612F772767FD7095872F33 |
:1050C000972F0E94BB4517FF06C020E030E040E864 |
:1050D00053E40E94164520E030E040E251E40E9493 |
:1050E000164520E030E040E85BE30E9435461B01B6 |
:1050F0002C016093D9077093DA078093DB079093B4 |
:10510000DC0710919903612F772767FD7095872F32 |
:10511000972F0E94BB4517FF06C020E030E040E813 |
:1051200053E40E94164520E030EE4BE257E40E9423 |
:1051300058456093C9077093CA078093CB07909333 |
:10514000CC072091B303222311F40C94CE398AE0CA |
:1051500090E09093C5038093C403E22FFF27E2FF02 |
:1051600009C080917404482F5527440F551F440FE0 |
:10517000551F10C0E3FD03C040E050E00BC080911C |
:1051800074049927880F991F880F991F4427552762 |
:10519000481B590B20917E0430917F04C901F3E034 |
:1051A000880F991FFA95E1F7821B930B840F951FC7 |
:1051B00068E070E00E94BC468B0170937F046093AE |
:1051C0007E04E4FF09C080917404482F5527440FE2 |
:1051D000551F440F551F0FC0E5FD02C00C94E33965 |
:1051E000809174049927880F991F880F991F44276D |
:1051F0005527481B590B2091800430918104C90127 |
:1052000063E0880F991F6A95E1F7821B930B840F67 |
:10521000951F68E070E00E94BC467E8B6D8B70939A |
:105220008104609380048091B203282F332723FFE9 |
:1052300003C082E390E004C022FF07C08EEC9FEF22 |
:10524000909383048093820404C01092830410928C |
:10525000820421FF09C080919F039091A0030196D1 |
:105260009093A00380939F0324FF09C080919F0324 |
:105270009091A00301979093A00380939F034B8983 |
:105280005C894E9D90014F9D300D5E9D300D112427 |
:1052900069897A896C9DC0016D9D900D7C9D900DF2 |
:1052A0001124280F391FC80168E070E00E94BC4635 |
:1052B000260F371F3C8B2B8B3093600420935F04A9 |
:1052C0008F8598898E9D80018F9D100D9E9D100D5C |
:1052D0001124AC9CC001AD9C900DBC9C900D112480 |
:1052E000080F191F8D899E8968E070E00E94BC46F6 |
:1052F000060F171F109362040093610480918204CB |
:1053000090918304AD85BE858A1B9B0B90936404AA |
:10531000809363048091660782FF0CC080E090E078 |
:10532000A0E0B0E08093C9079093CA07A093CB0791 |
:10533000B093CC0720E030E040E050E0C201B10182 |
:105340000E94C545882364F480E090E0A0E0B0E0CE |
:105350008093D9079093DA07A093DB07B093DC071B |
:1053600020E030E040E050E06091C9077091CA074A |
:105370008091CB079091CC070E94C545882364F4A7 |
:1053800080E090E0A0E0B0E08093C9079093CA0766 |
:10539000A093CB07B093CC0780919207682F772713 |
:1053A00034E0432E512C4622572262FDC5C063FDD6 |
:1053B000C3C080910E0490910F04A0911004B0918D |
:1053C000110481569A4EA040B0404CF1C70123E031 |
:1053D000880F991F2A95E1F7EB89FC89E81BF90BE7 |
:1053E000F0936004E0935F0480910E0490910F04A9 |
:1053F000A0911004B091110481589843A140B0408D |
:105400000CF441C0C701B4E0880F991FBA95E1F7C9 |
:10541000E81BF90BF0936004E0935F0434C08091C3 |
:105420000E0490910F04A0911004B0911104805AC1 |
:105430009541AF4FBF4F3CF59701A3E0220F331FBB |
:10544000AA95E1F74B895C89240F351F30936004DE |
:1054500020935F0480910E0490910F04A09110049A |
:10546000B091110481589843A140B04064F0C70145 |
:10547000F4E0880F991FFA95E1F7281B390B309358 |
:10548000600420935F048091160490911704A0910A |
:105490001804B091190481569A4EA040B040DCF037 |
:1054A000C701E3E0880F991FEA95E1F79801281BEF |
:1054B000390B30936204209361048091160490911B |
:1054C0001704A0911804B091190481589843A14081 |
:1054D000B04094F126C08091160490911704A091D9 |
:1054E0001804B0911904805A9541AF4FBF4F24F56D |
:1054F000970173E0220F331F7A95E1F7200F311FD8 |
:1055000030936204209361048091160490911704F3 |
:10551000A0911804B091190481589843A140B0405B |
:105520005CF054E0EE0CFF1C5A95E1F72E193F0990 |
:105530003093620420936104F401EE0FFF1FE05DDD |
:10554000F84F2081318180918507482F55274217D8 |
:10555000530734F4452821F081E08093700411C092 |
:10556000F401EE0FFF1FE05DF84F20813181809143 |
:105570008607DA01A81BB1092A173B0714F4109219 |
:105580007004F401EE0FFF1FE05DF84F8081918100 |
:10559000AA27BB27A41BB50B8A179B0734F463FF0C |
:1055A00004C081E08093710417C080917104882346 |
:1055B00099F0880C991CE0E3F7E08E0E9F1EF40131 |
:1055C00020813181809186079927841B950B821752 |
:1055D000930714F410927104F301EE0FFF1FE05DC6 |
:1055E000F84F808191814817590734F460FF04C057 |
:1055F00081E08093730415C080917304882389F03F |
:10560000F301EE0FFF1FE05DF84F208131818091A3 |
:105610008607FA01E81BF1092E173F0714F41092D0 |
:105620007304F301EE0FFF1FE05DF84F808191815D |
:105630008A179B0734F461FF04C081E080937204F1 |
:1056400017C080917204882399F0660C771C20E3C0 |
:1056500037E0620E731ED3012D913C918091860735 |
:105660009927841B950B8217930714F410927204E8 |
:1056700080917004882321F480917104882321F0A3 |
:1056800081E080936F0402C010926F0480917304D4 |
:10569000882321F480917204882351F081E0809363 |
:1056A0006E0410926F0410927004109271040EC078 |
:1056B00010926E0480916F04882311F40C94E739E2 |
:1056C00084E690E09093C5038093C403809184079F |
:1056D0009927E981FA818E179F0714F49A838983A9 |
:1056E00080915004882341F1109264041092630465 |
:1056F0001092600410925F04109262041092610490 |
:105700008DEC9CECACECBDE38093D9079093DA0769 |
:10571000A093DB07B093DC078AE097EDA3EABBE335 |
:105720008093C9079093CA07A093CB07B093CC0787 |
:1057300010926F0410926E048091BF079091C00781 |
:10574000A091C107B091C20720910E0430910F04BF |
:105750004091100450911104820F931FA41FB51F94 |
:105760008093BF079093C007A093C107B093C2076F |
:105770008091C3079091C407A091C507B091C60757 |
:105780002091160430911704409118045091190487 |
:10579000820F931FA41FB51F8093C3079093C40764 |
:1057A000A093C507B093C6078091B3079091B40743 |
:1057B000A091B507B091B60720911204309113045F |
:1057C0004091140450911504820F931FA41FB51F1C |
:1057D0008093B3079093B407A093B507B093B6072F |
:1057E0008091A9079091AA07A091AB07B091AC074F |
:1057F00020911A0430911B0440911C0450911D0407 |
:10580000820F931FA41FB51F8093A9079093AA0727 |
:10581000A093AB07B093AC0750906E04552011F0E5 |
:105820000C94473A80916F04882311F00C94473A06 |
:105830000C94EF39F0EE6F16FFEF7F06FFEF8F0647 |
:10584000FFEF9F0644F4E0EE6E2EEFEF7E2EEFEFBB |
:105850008E2EEFEF9E2E213231054105510534F099 |
:1058600070E2E72EF12C012D112D0DC0205E3F4F6F |
:105870004F4F5F4F44F460EEE62E6FEFF62E6FEF62 |
:10588000062F6FEF162F80912E0490912F04A09178 |
:105890003004B091310486199709A809B909809399 |
:1058A0002E0490932F04A0933004B0933104809180 |
:1058B000360490913704A0913804B09139048E19C0 |
:1058C0009F09A00BB10B8093360490933704A093EB |
:1058D0003804B09339048091E4039091E5038F3F3D |
:1058E000910509F008F4FCC4552009F031C48091F9 |
:1058F0006F04882309F02CC46091BF077091C00722 |
:105900008091C1079091C20720E031E040E050E073 |
:105910000E94F1462093BF073093C0074093C10710 |
:105920005093C2076091C3077091C4078091C50767 |
:105930009091C60720E031E040E050E00E94F1463F |
:105940002093C3073093C4074093C5075093C607FD |
:10595000E0907207FF240027112720911E04309148 |
:105960001F044091200450912104C801B7010E94F6 |
:105970007D4620E031E040E050E00E94F146209377 |
:105980001E0430931F04409320045093210420915F |
:105990002204309123044091240450912504C8012D |
:1059A000B7010E947D4620E031E040E050E00E94D7 |
:1059B000F14620932204309323044093240450930F |
:1059C0002504609126047091270480912804909109 |
:1059D000290420E031E040E050E00E94F1462093AD |
:1059E000260430932704409328045093290460919F |
:1059F000BF077091C0078091C1079091C2072091A5 |
:105A00001E0430911F044091200450912104E09025 |
:105A10008B07FF2400271127621B730B840B950B48 |
:105A2000A80197010E94F1462093980430939904AD |
:105A300040939A0450939B04CA01B90120E031E0DD |
:105A400040E050E00E94F146690130936D042093DC |
:105A50006C046091C3077091C4078091C507909151 |
:105A6000C6072091220430912304409124045091D0 |
:105A70002504621B730B840B950BA80197010E94F0 |
:105A8000F146CA01B90120E031E040E050E00E9457 |
:105A9000F146290130936B0420936A046091B307A7 |
:105AA0007091B4078091B5079091B60720E031E07E |
:105AB00040E050E00E94F1462093B3073093B407D2 |
:105AC0004093B5075093B6076091A9077091AA0754 |
:105AD0008091AB079091AC0720E031E040E050E0CE |
:105AE0000E94F1462093A9073093AA074093AB0781 |
:105AF0005093AC07E0901204F0901304009114044A |
:105B00001091150480910E0490910F04A09110043F |
:105B1000B0911104E81AF90A0A0B1B0BE092B304C6 |
:105B2000F092B4040093B5041093B60460901A0484 |
:105B300070901B0480901C0490901D0480911604AA |
:105B400090911704A0911804B0911904681A790A69 |
:105B50008A0A9B0A6092AF047092B0048092B104EA |
:105B60009092B204E092AB04F092AC040093AD04C6 |
:105B70001093AE046092A7047092A8048092A904C6 |
:105B80009092AA048091320490913304A09134043D |
:105B9000B09135048E199F09A00BB10B809332048C |
:105BA00090933304A0933404B093350480913A0465 |
:105BB00090913B04A0913C04B0913D048619970953 |
:105BC000A809B90980933A0490933B04A0933C043C |
:105BD000B0933D048091E5079091E607A091E70717 |
:105BE000B091E807803274E2970777E0A70770E08A |
:105BF000B70764F080529442A740B0408093E50715 |
:105C00009093E607A093E707B093E8078091E50734 |
:105C10009091E607A091E707B091E807B7FF0CC0A5 |
:105C2000805E9B4DA84FBF4F8093E5079093E6079A |
:105C3000A093E707B093E807809100018A3011F440 |
:105C4000289801C0289A81E090E090939304809373 |
:105C500092048091BF079091C007A091C107B091B5 |
:105C6000C20720918A0430918B0440918C0450919A |
:105C70008D04281B390B4A0B5B0B57FF07C050954F |
:105C80004095309521953F4F4F4F5F4F20523E44F6 |
:105C9000404050400CF0B9C091E0E91690E1F9069F |
:105CA00090E0090790E019070CF44EC08091910430 |
:105CB000882309F445C0D801C7015CE0B595A795D4 |
:105CC000979587955A95D1F7019690939304809371 |
:105CD0009204D801C70143E0B595A795979587959C |
:105CE0004A95D1F78093980490939904A0939A04CD |
:105CF000B0939B0489589341A040B04064F088E879 |
:105D000093E1A0E0B0E08093980490939904A0936D |
:105D10009A04B0939B0460919804709199048091C7 |
:105D20009A0490919B0420E031E040E050E00E9412 |
:105D3000F146C20ED31ED0926D04C0926C0462C0B4 |
:105D400081E0809391045EC010929104F0E0EF1620 |
:105D5000F0EFFF06FFEF0F07FFEF1F070CF052C039 |
:105D600080919004882309F449C088279927DC0191 |
:105D70008E199F09A00BB10B3CE0B595A79597959F |
:105D800087953A95D1F70196909393048093920466 |
:105D9000C801B70128E030E040E050E00E94F14641 |
:105DA000209398043093990440939A0450939B0451 |
:105DB00028573C4E4F4F5F4F64F488E79CEEAFEF9F |
:105DC000BFEF8093980490939904A0939A04B093A2 |
:105DD0009B04609198047091990480919A04909129 |
:105DE0009B0420E031E040E050E00E94F146C20E0A |
:105DF000D31ED0926D04C0926C040BC081E08093DE |
:105E0000900407C01092900404C010929304109262 |
:105E100092048091D4079091D5072091DE073091AC |
:105E2000DF0797FF03C0909581959F4F84369105BA |
:105E30000CF043C0C90137FF03C0909581959F4F77 |
:105E400084369105D4F580918C07282F33278091D3 |
:105E50009204909193042817390724F43093930403 |
:105E60002093920471E0E71674E0F70670E00707EC |
:105E700070E017075CF08091FA039091FB0320918A |
:105E8000920430919304820F931F13C080E0E816B0 |
:105E90008CEFF8068FEF08078FEF180774F48091E6 |
:105EA000FA039091FB032091920430919304821B9A |
:105EB000930B9093FB038093FA0381E090E090931F |
:105EC000930480939204109294041092950410927B |
:105ED0009604109297048091C3079091C407A091F3 |
:105EE000C507B091C6072091860430918704409180 |
:105EF000880450918904281B390B4A0B5B0B57FF10 |
:105F000007C050954095309521953F4F4F4F5F4FBB |
:105F100020523E44404050400CF0B9C0A1E06A1607 |
:105F2000A0E17A06A0E08A06A0E09A060CF44EC032 |
:105F300080918F04882309F445C0D401C3012CE06B |
:105F4000B595A795979587952A95D1F70196909342 |
:105F5000930480939204D401C30103E0B595A795FF |
:105F6000979587950A95D1F780939404909395041B |
:105F7000A0939604B093970489589341A040B040F1 |
:105F800064F088E893E1A0E0B0E0809394049093FB |
:105F90009504A0939604B093970460919404709133 |
:105FA0009504809196049091970420E031E040E0C0 |
:105FB00050E00E94F146420E531E50926B044092F4 |
:105FC0006A0462C081E080938F045EC010928F04E7 |
:105FD000F0E06F16F0EF7F06FFEF8F06FFEF9F06F2 |
:105FE0000CF052C080918E04882309F449C08827A0 |
:105FF0009927DC0186199709A809B9091CE0B5950C |
:10600000A795979587951A95D1F701969093930444 |
:1060100080939204C401B30128E030E040E050E0F6 |
:106020000E94F14620939404309395044093960483 |
:106030005093970428573C4E4F4F5F4F64F488E7C6 |
:106040009CEEAFEFBFEF8093940490939504A093E0 |
:106050009604B09397046091940470919504809194 |
:1060600096049091970420E031E040E050E00E94D7 |
:10607000F146420E531E50926B0440926A040BC0CC |
:1060800081E080938E0407C010928E0404C01092A9 |
:106090009304109292042091D4073091D50737FFD2 |
:1060A00003C0309521953F4F3093B2072093B1073D |
:1060B0008091DE079091DF0797FF03C0909581954F |
:1060C0009F4F9093D0078093CF07243631050CF073 |
:1060D00047C0843691050CF043C080918C07282F6F |
:1060E000332780919204909193042817390724F460 |
:1060F000309393042093920471E0671674E077065E |
:1061000070E0870670E097065CF08091FC03909148 |
:10611000FD032091920430919304820F931F13C0CA |
:1061200080E068168CEF78068FEF88068FEF980670 |
:10613000BCF48091FC039091FD0320919204309176 |
:106140009304821B930B9093FD038093FC0308C080 |
:1061500010926B0410926A0410926D0410926C04F9 |
:1061600020E030E040E050E06091C9077091CA073C |
:106170008091CB079091CC070E94C545882341F4BC |
:1061800010926B0410926A0410926D0410926C04C9 |
:106190008091BF079091C007A091C107B091C2073D |
:1061A00080938A0490938B04A0938C04B0938D0405 |
:1061B0008091C3079091C407A091C507B091C6070D |
:1061C0008093860490938704A0938804B0938904F5 |
:1061D00010921E0410921F041092200410922104A9 |
:1061E0001092220410922304109224041092250489 |
:1061F0001092260410922704109228041092290469 |
:106200001092BF071092C0071092C1071092C207E8 |
:106210001092C3071092C4071092C5071092C607C8 |
:106220001092B3071092B4071092B5071092B607F8 |
:106230001092A9071092AA071092AB071092AC0710 |
:106240001092E5031092E4038091660785FF3EC03B |
:10625000E0915E07FF27EE0FFF1FE05DF84F019012 |
:10626000F081E02DF7FF03C0F095E195FF4F79979E |
:106270006CF5E0915F07FF27EE0FFF1FE05DF84F21 |
:106280000190F081E02DF7FF03C0F095E195FF4FFD |
:106290007997E4F480915C0890915D08892BB1F0C6 |
:1062A0008091940390915304893C20F0933021F025 |
:1062B00084E006C0943019F41092530403C083E0C4 |
:1062C0008093530480915304992708C0809153040C |
:1062D000882331F01092530480E090E00E94343D16 |
:1062E0008091C803882309F461C11092C8032091EA |
:1062F000D4073091D50737FF03C0309521953F4F24 |
:106300003093B2072093B1078091DE079091DF07A9 |
:1063100097FF03C0909581959F4F9093D0078093EE |
:10632000CF07243631050CF02FC1843691050CF0CF |
:106330002BC120914A0430914B048091C903909164 |
:10634000CA03281B390B37FF03C0309521953F4FF7 |
:10635000263031050CF022C18091630490916404D1 |
:106360004396879708F084C0809154049091550417 |
:106370008F3F91052CF4019690935504809354041B |
:10638000809154049091550402970CF485C040917B |
:10639000B9075091BA076091BB077091BC07209173 |
:1063A0004A0430914B0480915C0790915D07281B53 |
:1063B000390B3093D0072093CF079FEF2C34390748 |
:1063C00034F428593E4F3093D0072093CF07809163 |
:1063D000CF079091D007853B910534F088569140C6 |
:1063E0009093D0078093CF07CB01BA0124E135E029 |
:1063F00040E050E00E94F1468091CF079091D00795 |
:10640000281B390B3093B2072093B1072530310593 |
:106410001CF084E090E006C0AFEF2C3F3A073CF45C |
:106420008CEF9FEF9093B2078093B10702C0232BAC |
:1064300099F11092B9071092BA071092BB07109207 |
:10644000BC0780914A0490914B0490935D07809320 |
:106450005C078091FE039091FF032091B10730917A |
:10646000B207821B930B9093FF038093FE0314C02B |
:1064700080914A0490914B0490935D0780935C0750 |
:1064800010925504109254041092B9071092BA0752 |
:106490001092BB071092BC0781E080935204609178 |
:1064A000E5077091E6078091E7079091E80724E1FE |
:1064B00035E040E050E00E94F1462093E50730933C |
:1064C000E6074093E7075093E80760914A0470910C |
:1064D0004B04621B730B7093B2076093B107CB013F |
:1064E0000197833B910588F0643B710534F4CB013F |
:1064F0008C549F4F843B910528F4215030404040FC |
:10650000504007C06C547F4F64F42F5F3F4F4F4F94 |
:106510005F4F2093E5073093E6074093E7075093DA |
:10652000E8078091E5079091E607A091E707B09111 |
:10653000E807B7FF0CC088599E4FAF4FBF4F8093FD |
:10654000E5079093E607A093E707B093E80760910B |
:10655000E5077091E6078091E7079091E80728E644 |
:1065600031E040E050E00E94F14624E135E040E0B7 |
:1065700050E00E947D466093E5077093E6078093A4 |
:10658000E7079093E8070AC0109252041092B907E7 |
:106590001092BA071092BB071092BC0780914A0470 |
:1065A00090914B049093CA038093C9034090630475 |
:1065B00050906404920157FE04C022273327241907 |
:1065C0003509253131053CF08091660784FD03C013 |
:1065D00081E080939C04E0906F075901CC24B7FCC4 |
:1065E000C094DC2CB201882777FD8095982F2E2D42 |
:1065F0003327442755270E947D469B01AC01C601E5 |
:10660000B5010E947D4620E032E040E050E00E946B |
:10661000F14689019A01FF24E49CC001E59C900D9C |
:10662000F49C900D112464E070E00E94BC46600F61 |
:10663000711F3B01882477FC8094982C6092B704EA |
:106640007092B8048092B9049092BA0480913E048A |
:1066500090913F04A0914004B0914104861997099C |
:10666000A809B90980933E0490933F04A093400485 |
:10667000B093410480913E0490913F04A091400466 |
:10668000B09141048155934CA040B04064F080E546 |
:1066900093ECA0E0B0E080933E0490933F04A0937D |
:1066A0004004B093410480913E0490913F04A09136 |
:1066B0004004B0914104805B9C43AF4FBF4F64F4F2 |
:1066C00080EB9CE3AFEFBFEF80933E0490933F04D9 |
:1066D000A0934004B093410480914A0490914B04EC |
:1066E000892B09F461C08091660783FF5DC08091AA |
:1066F000CB039091CC03892B09F456C02091CF078E |
:106700003091D0078091B1079091B207821793071B |
:1067100024F43093B2072093B1072091520422232E |
:1067200071F080919C04882351F080914A049091EB |
:106730004B0490934D0480934C0410929C048091E0 |
:106740009703482F55275093B2074093B10714166B |
:10675000150654F5222341F100913E0410913F04A7 |
:10676000209140043091410480914E0490914F0457 |
:10677000BC01649FC001659F900D749F900D112412 |
:1067800060E270E00E94BC46882777FD8095982FD4 |
:10679000060F171F281F391F00933E0410933F0454 |
:1067A000209340043093410480919D048150809354 |
:1067B0009D048F3F09F022C18091C4039091C503CD |
:1067C000209104033091050382239323892B29F41C |
:1067D00088B194E0892788B907C08091650488232F |
:1067E00011F0429A01C0429888E180939D04609123 |
:1067F0000E0470910F048091100490911104E090A8 |
:106800007207FF2400271127A80197010E94F14673 |
:106810003093D6062093D506609116047091170424 |
:106820008091180490911904A80197010E94F146E3 |
:106830003093D8062093D7068091D4079091D5073E |
:106840009093DA068093D9068091DE079091DF0756 |
:106850009093DC068093DB068091D7079091D80750 |
:106860009093DE068093DD06809166049091670424 |
:106870009093E0068093DF06609146047091470490 |
:10688000809148049091490420E032E040E050E0DB |
:106890000E94F1463093E2062093E10680914A047B |
:1068A00090914B049093E6068093E5066091E5078E |
:1068B0007091E6078091E7079091E80724E135E0C1 |
:1068C00040E050E00E94F1463093E8062093E7064E |
:1068D0008091B5039091B6039093F6068093F506E8 |
:1068E00080910803909109039093F8068093F7062E |
:1068F0008091AE079091AF079093FA068093F906C6 |
:106900008091A6079091A7079093FC068093FB06C1 |
:106910008091D7079091D8079093FE068093FD064B |
:1069200080915F0490916004909300078093FF062C |
:106930008091610490916204909302078093010713 |
:106940005092040740920307809174049927909312 |
:10695000EA068093E9068091760499279093EC06E5 |
:106960008093EB068091CF049091D004909306071A |
:10697000809305078091D1049091D20490930807E9 |
:106980008093070780916B0890916C086AE070E033 |
:106990000E94BC4670930A076093090780916D08B6 |
:1069A00090916E086AE070E00E94BC4670930C07FC |
:1069B00060930B0780916F08909170086AE070E017 |
:1069C0000E94BC4670930E0760930D0720915304FC |
:1069D00084E1289F90011124809178089091790892 |
:1069E000820F931F9093100780930F078091B90730 |
:1069F0009091BA07909314078093130780916E04C7 |
:106A00008823A9F06091AE077091AF07882777FDC2 |
:106A10008095982F0E94BB452091D9073091DA07C5 |
:106A20004091DB075091DC070E94354632C06091EF |
:106A30000E0470910F048091100490911104E09065 |
:106A4000AE07F090AF070E94BB452091C907309177 |
:106A5000CA074091CB075091CC070E9435465B0195 |
:106A60006C010027F7FC0095102FC801B7010E94A8 |
:106A7000BB452091D9073091DA074091DB0750914F |
:106A8000DC070E9435469B01AC01C601B5010E949E |
:106A900016450E949E457093AF076093AE078091A4 |
:106AA0006F048823A9F06091A6077091A707882733 |
:106AB00077FD8095982F0E94BB452091D907309192 |
:106AC000DA074091DB075091DC070E94354632C05F |
:106AD0006091160470911704809118049091190424 |
:106AE000E090A607F090A7070E94BB452091C90738 |
:106AF0003091CA074091CB075091CC070E94354690 |
:106B00005B016C010027F7FC0095102FC801B7014D |
:106B10000E94BB452091D9073091DA074091DB07ED |
:106B20005091DC070E9435469B01AC01C601B501BE |
:106B30000E9416450E949E457093A7076093A60782 |
:106B40006091D7077091D807E0902A04F0902B0449 |
:106B500000912C0410912D048091C9079091CA07CF |
:106B6000A091CB07B091CC0789879A87AB87BC8768 |
:106B7000882777FD8095982F0E94BB452091D907E3 |
:106B80003091DA074091DB075091DC070E943546CF |
:106B90005B016C01C801B7010E94BB4529853A859C |
:106BA0004B855C850E94354620E030E040E05FE3A5 |
:106BB0000E9435469B01AC01C601B5010E941645F5 |
:106BC0000E949E457093D8076093D7078091AE07C7 |
:106BD0009091AF078150984034F080E098E0909316 |
:106BE000AF078093AE078091AE079091AF078050BA |
:106BF000984F34F480E098EF9093AF078093AE07FE |
:106C00008091A6079091A7078150984034F080E0CA |
:106C100098E09093A7078093A6078091A60790918C |
:106C2000A7078050984F34F480E098EF9093A7071F |
:106C30008093A6078091D7079091D80781509840FC |
:106C400034F080E098E09093D8078093D707809144 |
:106C5000D7079091D8078050984F34F480E098EF90 |
:106C60009093D8078093D70780916607992780FF74 |
:106C7000D9C04091940381FF0EC0423310F580913A |
:106C80006604909167044497909369048093680424 |
:106C90001092510419C020919F033091A003240F3A |
:106CA000311D80916B079927AC01249FC001259F5E |
:106CB000900D349F900D1124449790936904809314 |
:106CC000680481E08093510480915004882321F06E |
:106CD0001092690410926804209166043091670450 |
:106CE0004091680450916904421753070CF09AC010 |
:106CF00080915104882309F495C0241B350B8091A1 |
:106D000095039927BC01269FC001279F900D369FB0 |
:106D1000900D112460E170E00E94BC4609811A8147 |
:106D2000061B170B2091E2033091E303809193033C |
:106D30009927DC012A9FC0012B9F900D3A9F900D4F |
:106D4000112468E070E00E94BC46061B170B60919E |
:106D5000460470914704809148049091490420E0D2 |
:106D600032E040E050E00E94F146CA01B9012091B2 |
:106D700096033327442755270E947D4620E230E0C2 |
:106D800040E050E00E94F146BFEF2E3C3B0714F478 |
:106D90002EEC3FEF80919E0490919F04AC0164E043 |
:106DA000440F551F6A95E1F7481B590B23333105F2 |
:106DB00014F022E330E0021B130BCA01800F911F75 |
:106DC00060E170E00E94BC4670939F0460939E0453 |
:106DD000809167079927681779078CF4E981FA8110 |
:106DE000E817F9072CF090939F0480939E0407C046 |
:106DF00029813A8130939F0420939E040DC0809195 |
:106E00009E0490919F0449815A814817590724F4A0 |
:106E100050939F0440939E0460919E0470919F0440 |
:106E20007A83698389819A819093E4068093E3064B |
:106E30000091D7071091D8078091D607482E552486 |
:106E4000A981BA8154971CF41C821B822BC08981B2 |
:106E50009A8162E070E00E94BC469B01B80166190D |
:106E60007709C901621773070CF4CB0166277727EE |
:106E7000621B730B681779070CF4BC01C201E9812E |
:106E8000FA818E1B9F0B681779070CF4CB012981BF |
:106E90003A81241935093C832B832817390714F4C8 |
:106EA0009C838B832091AE073091AF0780905F0465 |
:106EB000909060048091CF049091D004881A990A30 |
:106EC000281939093093BE072093BD0720E030E030 |
:106ED00040E050E069857A858B859C850E94C54598 |
:106EE0008823F1F1E0900E04F0900F04009110045B |
:106EF000109111046091BF047091C0048091C1048D |
:106F00009091C2040E94BB455B016C01C801B701AE |
:106F10000E94BB4529853A854B855C850E94354694 |
:106F20007B018C01B401882777FD8095982F0E9402 |
:106F3000BB459B01AC01C801B7010E9415459B01EF |
:106F4000AC01C601B5010E9416450E949E456093A2 |
:106F5000BF047093C0048093C1049093C2041CC00A |
:106F60002091BD073091BE07442737FD4095542F2F |
:106F70008091BF049091C004A091C104B091C2045B |
:106F8000820F931FA41FB51F8093BF049093C0046A |
:106F9000A093C104B093C2048091BF049091C00437 |
:106FA000A091C104B091C204181619061A061B0656 |
:106FB00024F40297A109B10903C00296A11DB11DD5 |
:106FC0008093BF049093C004A093C104B093C20403 |
:106FD0008091BF049091C004A091C104B091C204FB |
:106FE00081383EE3930730E0A30730E0B3072CF08D |
:106FF00080E89EE3A0E0B0E009C08058914CAF4F1C |
:10700000BF4F64F480E891ECAFEFBFEF8093BF0413 |
:107010009093C004A093C104B093C2046091BD07D3 |
:107020007091BE0780918F0390919003A09191037E |
:10703000B09192038D839E83AF83B887882777FDB5 |
:107040008095982F0E94BB457B018C016091BF0405 |
:107050007091C0048091C1049091C2040E94BB450C |
:107060009B01AC016D817E818F8198850E943546A0 |
:107070009B01AC01C801B7010E9416450E949E45C4 |
:107080003B014C016B0180919E03E82EFF240027F9 |
:1070900011278B819C8197FF03C0909581959F4F0D |
:1070A00062E070E00E94BC469B01A981BA812A0F70 |
:1070B0003B1F442737FD4095542FC801B7010E945C |
:1070C0007D4620E430E040E050E00E94F1461901A6 |
:1070D000C216D3060CF49301662477246218730851 |
:1070E000A301621673060CF4A90189819A81EB81D0 |
:1070F000FC818E0F9F1F840F951F97FF03C020E018 |
:1071000030E005C09201841595050CF49C01809136 |
:10711000B007882E9924C401821693060CF4C90185 |
:107120008093A80789819A81841B950B2B813C81D0 |
:10713000820F931F97FF03C020E030E005C092014B |
:10714000841595050CF49C01C401821693060CF479 |
:10715000C9018093AD072091A6073091A707409100 |
:107160006104509162048091D1049091D204481B33 |
:10717000590B5C8B4B8B241B350B3093A50720934D |
:10718000A40720E030E040E050E069857A858B85F7 |
:107190009C850E94C545882309F440C0E0901604F0 |
:1071A000F090170400911804109119046091BB0429 |
:1071B0007091BC048091BD049091BE040E94BB45B7 |
:1071C0005B016C01C801B7010E94BB4529853A8566 |
:1071D0004B855C850E9435467B018C01AB89BC895F |
:1071E000BD01882777FD8095982F0E94BB459B01A4 |
:1071F000AC01C801B7010E9415459B01AC01C60155 |
:10720000B5010E9416450E949E456093BB04709391 |
:10721000BC048093BD049093BE041CC02091A407BD |
:107220003091A507442737FD4095542F8091BB042A |
:107230009091BC04A091BD04B091BE04820F931F35 |
:10724000A41FB51F8093BB049093BC04A093BD04FE |
:10725000B093BE048091BB049091BC04A091BD0486 |
:10726000B091BE04181619061A061B0624F40297DC |
:10727000A109B10903C00296A11DB11D8093BB04F1 |
:107280009093BC04A093BD04B093BE048091BB0452 |
:107290009091BC04A091BD04B091BE048138EEE38E |
:1072A0009E07E0E0AE07E0E0BE072CF080E89EE33A |
:1072B000A0E0B0E009C08058914CAF4FBF4F64F4DC |
:1072C00080E891ECAFEFBFEF8093BB049093BC04D8 |
:1072D000A093BD04B093BE046091A4077091A5076C |
:1072E000882777FD8095982F0E94BB457B018C01F4 |
:1072F0006091BB047091BC048091BD049091BE0468 |
:107300000E94BB459B01AC016D817E818F81988578 |
:107310000E9435469B01AC01C801B7010E94164589 |
:107320000E949E459101621573050CF49B01C301F7 |
:10733000621673060CF4C90149815A81480F591F1E |
:107340002B813C81421B530B57FF03C020E030E0F0 |
:1073500005C09201441555050CF49A01A40182164A |
:1073600093060CF4A9014093D10729813A81281B87 |
:10737000390B4B815C81241B350B37FF03C040E088 |
:1073800050E005C0A201241535050CF4A901C40183 |
:10739000841695060CF0D9C0CA01D7C020917E048E |
:1073A00030917F04C90113E0880F991F1A95E1F706 |
:1073B000821B930B68E070E00E94BC468B017093C7 |
:1073C0007F0460937E0440E050E00C94FB288091A1 |
:1073D0006E04882311F40C94702B0C94662B60912E |
:1073E0000E0470910F048091100490911104A090EC |
:1073F0007207BB24CC24DD24E090D407F090D5079D |
:10740000A60195010E94F1460027F7FC0095102F78 |
:107410002E193F09400B510BCA01B90120E130E0A0 |
:1074200040E050E00E94F14639014A0160911604A3 |
:10743000709117048091180490911904E090DE0770 |
:10744000F090DF07A60195010E94F1460027F7FCA6 |
:107450000095102F2E193F09400B510BCA01B9019D |
:1074600020E130E040E050E00E94F14679018A01DD |
:1074700061E2661671048104910414F40C941A2CD0 |
:10748000B0E26B2E712C812C912C0C942B2C109231 |
:107490001E0410921F0410922004109221041092D6 |
:1074A00022041092230410922404109225041092B6 |
:1074B000BF071092C0071092C1071092C207109226 |
:1074C000C3071092C4071092C5071092C607109206 |
:1074D000B3071092B4071092B5071092B607109236 |
:1074E000A9071092AA071092AB071092AC078091DF |
:1074F0002E0490912F04A0913004B0913104809318 |
:10750000320490933304A0933404B09335048091F3 |
:10751000360490913704A0913804B09139048093D7 |
:107520003A0490933B04A0933C04B0933D04109222 |
:10753000E5031092E40310926D0410926C04109213 |
:107540006B0410926A040C946B2C8093CD076696A2 |
:107550000FB6F894DEBF0FBECDBFDF91CF911F9164 |
:107560000F91FF90EF90DF90CF90BF90AF909F90E2 |
:107570008F907F906F905F904F903F902F900895E5 |
:107580001092D4041092D3041092400810923F0835 |
:10759000109279081092780810922B0810920D081A |
:1075A00010928A0810923E081092530810927108A7 |
:1075B0001092D0041092CF041092D2041092D104F1 |
:1075C000109277081092760810925B0810925A0871 |
:1075D000109218081092170810925D0810925C081B |
:1075E000089580912B08882319F481E090E0089594 |
:1075F00080918A08882309F48CC080910D08882323 |
:1076000009F487C080917E08992783709070029753 |
:107610000CF474C080917F0880FF70C060911D08D9 |
:1076200070911E0880911F08909120082AE030E098 |
:1076300040E050E00E94F146209341083093420818 |
:1076400040934308509344086091210870912208A8 |
:1076500080912308909124082AE030E040E050E037 |
:107660000E94F1462093450830934608409347080E |
:10767000509348086091250870912608809127084A |
:10768000909128082AE030E040E050E00E94F14666 |
:107690002093490830934A0840934B0850934C0874 |
:1076A0006091FD077091FE078091FF07909100089F |
:1076B0002AE030E040E050E00E94CF4620934D08A1 |
:1076C00030934E0840934F08509350086091010842 |
:1076D00070910208809103089091040820EA36E82E |
:1076E00041E050E00E94F146309352082093510847 |
:1076F00081E08093530880E090E004C0109253082A |
:1077000082E090E010922B0810928A0810920D08E7 |
:10771000089581E090E008950E94F13A1816190644 |
:107720000CF44CC080915C0890915D0821E0803998 |
:10773000920730F4845D9E4F90935D0880935C08BF |
:1077400080913E088823B1F18091410890914208D0 |
:1077500020912C0830912D08821B930B90936C087C |
:1077600080936B08809145089091460820913008DD |
:1077700030913108821B930B90936E0880936D08B3 |
:107780008091490890914A08209134083091350839 |
:10779000821B930B9093700880936F0881E0809315 |
:1077A000710881E090E0909377088093760880E0FC |
:1077B00090E008951092710882E090E008950E9490 |
:1077C000F13A892B99F58091410890914208A09156 |
:1077D0004308B091440880932C0890932D08A093FF |
:1077E0002E08B0932F088091450890914608A091EB |
:1077F0004708B09148088093300890933108A093CF |
:107800003208B09333088091490890914A08A091BA |
:107810004B08B0914C088093340890933508A0939E |
:107820003608B093370881E080933E080895482FCA |
:107830002091D3043091D4042530310509F49AC045 |
:10784000263031058CF42130310529F12230310503 |
:107850001CF4232BD1F003C12230310571F1233008 |
:10786000310509F0FCC02FC02730310509F4E2C012 |
:10787000273031050CF490C02830310509F4E5C0FB |
:107880002930310509F0EBC0A2C0853B09F0E7C003 |
:1078900081E090E0D5C0823639F482E090E09093A8 |
:1078A000D4048093D30404C01092D4041092D3045F |
:1078B0001092E9041092EA040895813009F0CFC0D3 |
:1078C00083E090E0BDC0883031F0823151F18330E7 |
:1078D00009F044C013C02BE238E03093F804209341 |
:1078E000F70480912B088823C9F52251304030934A |
:1078F000F6042093F5042E5E3F4F25C02AE838E0B9 |
:107900003093F8042093F70480918A08882331F596 |
:10791000205130403093F6042093F504205F3F4F10 |
:1079200012C02DE038E03093F8042093F7048091E2 |
:107930000D08882399F4245230403093F6042093A4 |
:10794000F5042C5D3F4F3093EE042093ED0485E069 |
:1079500090E09093D4048093D30404C01092D40494 |
:107960001092D304842F8F5F8093E9048F5F8093FC |
:10797000EA04089599279093EC048093EB04909186 |
:10798000E904940F9093E9048091EA04890F8093AD |
:10799000EA0486E090E054C0282F3327322F2227B4 |
:1079A0008091EB049091EC04820F931F9093EC0470 |
:1079B0008093EB049091E904940F9093E9048091F3 |
:1079C000EA04890F8093EA0489E090E039C060916D |
:1079D000EB047091EC046115710509F440C0E0916D |
:1079E000F504F091F60480838091E904840F80937C |
:1079F000E9049091EA04980F9093EA04CB0101976F |
:107A00009093EC048093EB04892B89F08091ED0432 |
:107A10009091EE048E179F0750F03196F093F60484 |
:107A2000E093F5043093D4042093D304089587E0C1 |
:107A300090E006C08091E904481789F488E090E05E |
:107A40009093D4048093D30408958091EA04481756 |
:107A500031F4E091F704F091F80481E08083109212 |
:107A6000D4041092D30408952F923F924F925F92C4 |
:107A70006F927F928F929F92AF92BF92CF92DF923E |
:107A8000EF92FF920F931F93CF93DF933C018330CC |
:107A9000910509F4C4C08430910521F0892B09F4C3 |
:107AA00022C1BAC020913F0830914008C901019716 |
:107AB000029708F435C18091E7049091E80401969B |
:107AC0009093E8048093E704855F914008F4FBC538 |
:107AD0001092E8041092E7041092F0041092EF0460 |
:107AE0001092F2041092F1041092F4041092F30434 |
:107AF0001092E6041092E5041092E4041092E3045C |
:107B000010927308109272081092750810927408FF |
:107B10001092E0041092DF041092E2041092E1044B |
:107B20001092DA041092D9041092D8041092D7045B |
:107B30001092DE041092DD041092DC041092DB043B |
:107B40001092540810925508109256081092570837 |
:107B50001092D6041092D5041092790810927808E9 |
:107B600080917108882309F451C080916B0890912D |
:107B70006C08909365088093640860916D0870911B |
:107B80006E08709367086093660821E020936A0886 |
:107B90009093110880931008709313086093120853 |
:107BA00020931608709561957F4F909581959F4F12 |
:107BB0000E947B439C019093590880935808E09160 |
:107BC0006408F0916508F7FF03C08AE590E002C001 |
:107BD0008EE091E0821B930B909359088093580894 |
:107BE0004091580850915908609166087091670853 |
:107BF000CF010E94B544709361086093600882E0F1 |
:107C000090E09093400880933F0860C510926A0806 |
:107C10001092400810923F0882E090E059C5809190 |
:107C20003F0890914008019709F4FAC18091E70458 |
:107C30009091E80401969093E8048093E704855FAF |
:107C4000914008F440C51092E8041092E704809136 |
:107C50007108882309F444C01092F2041092F104D0 |
:107C60001092F4041092F3041092E6041092E504CA |
:107C70001092E4041092E3041092730810927208B8 |
:107C800010927508109274081092E0041092DF04AC |
:107C90001092E2041092E1041092DA041092D904D6 |
:107CA0001092D8041092D7041092DE041092DD04D2 |
:107CB0001092DC041092DB0480916B0890916C08A8 |
:107CC000909311088093100880916D0890916E0830 |
:107CD000909313088093120881E0809316089DC149 |
:107CE0001092160895CF1092E8041092E7041092B3 |
:107CF000D0041092CF041092D2041092D1041092AA |
:107D00005B0810925A0810921808109217081092E7 |
:107D10007908109278081092400810923F08D6C453 |
:107D20002130310509F47CC12230310541F0232B8B |
:107D300009F06ECF1092E8041092E704C7C4809156 |
:107D40006A08882309F464CF8091760890917708B7 |
:107D5000181619060CF061C1809178089091790885 |
:107D6000099709F45AC18091EF049091F0040196AB |
:107D70009093F0048093EF046091100870911108C3 |
:107D800080916B0890916C086B01C81AD90AD7FED4 |
:107D900004C0D094C194D108D394E0911208F0911A |
:107DA000130880916D0890916E08DF01A81BB90B34 |
:107DB000B7FF03C0B095A195BF4F209154083091F3 |
:107DC000550840915608509157088091600890914D |
:107DD0006108821B930B833391050CF444C08CE340 |
:107DE000C816D1042CF5DC971CF58091D504909130 |
:107DF000D6048C3091052CF401969093D604809390 |
:107E0000D5048091D5049091D604AA2797FDA0951A |
:107E1000BA2F280F391F4A1F5B1F20935408309335 |
:107E20005508409356085093570883E090E041C0AE |
:107E30008091D5049091D604823091052CF0019761 |
:107E40009093D6048093D5042F5F3F4F4F4F5F4FE1 |
:107E50002093540830935508409356085093570880 |
:107E600084E090E026C04F970CF484C098E2C916D5 |
:107E7000D1048CF498977CF42A5F3F4F4F4F5F4FAB |
:107E80002093540830935508409356085093570850 |
:107E900085E090E00EC02F5F3F4F4F4F5F4F209324 |
:107EA000540830935508409356085093570886E07D |
:107EB00090E090937908809378081092F4041092DF |
:107EC000F30481E090E09093F2048093F1046090D9 |
:107ED00054087090550880905608909057088091EB |
:107EE0005808909159080E9457447C0120905408EA |
:107EF0003090550840905608509057088091580887 |
:107F0000909159080E94AD445C010027F7FC009550 |
:107F1000102FC401B301A80197010E947D4628EEED |
:107F200033E040E050E00E94F14680916408909177 |
:107F30006508820F931F9093110880931008CC243A |
:107F4000B7FCC094DC2CC201B101A60195010E94CE |
:107F50007D4628EE33E040E050E00E94F1468091FB |
:107F6000660890916708820F931F9093130880937F |
:107F7000120853C028E2C216D1040CF048C09897EA |
:107F80000CF045C087E090E09093790880937808E2 |
:107F90001092F2041092F1041092F4041092F3047F |
:107FA000633071051CF06350704006C03FEF6E3FB8 |
:107FB000730734F46D5F7F4F70931108609310085E |
:107FC000E330F10514F0339705C04FEFEE3FF407AF |
:107FD0002CF43396F0931308E09312088091100864 |
:107FE0009091110803960797C0F480911208909120 |
:107FF00013080396079788F410921108109210083E |
:10800000109213081092120889E090E002C088E0F4 |
:1080100090E0909379088093780881E090E0F1CD2A |
:108020008091760890917708181619060CF046C3CF |
:1080300010927708109276082091DF043091E004C6 |
:108040004091E1045091E204A0901008B090110812 |
:1080500080916B0890916C08A81AB90AB092E0045C |
:10806000A092DF04C0911208D091130880916D088E |
:1080700090916E08C81BD90BD093E204C093E10421 |
:10808000C090E504D090E604CA0CDB1CD092E60454 |
:10809000C092E5040091E3041091E4040C0F1D1F4D |
:1080A0001093E4040093E304F501E21BF30BF09357 |
:1080B000DE04E093DD047E01E41AF50AF092DC04AC |
:1080C000E092DB048091F1049091F2042091D904B4 |
:1080D0003091DA048090D7049090D80418161906CD |
:1080E000FCF4C901880F991F63E070E00E94BC4650 |
:1080F0009B01CF0163E070E00E94BC46260F371F52 |
:108100003093DA042093D904C401880F991F63E0E7 |
:1081100070E00E94BC469B01C70163E070E022C092 |
:10812000C90164E070E00E94BC469B01CF01880F4A |
:10813000991F8E0F9F1F64E070E00E94BC46260FBF |
:10814000371F3093DA042093D904C40164E070E04F |
:108150000E94BC469B01C701880F991F8E0D9F1D71 |
:1081600064E070E00E94BC46260F371F3093D804AD |
:108170002093D704C601D7FE04C0882799278C19FD |
:108180009D098153954754F4C80117FF04C08827FF |
:108190009927801B910B8153954764F0CA18DB081F |
:1081A000D092E604C092E5040C1B1D0B1093E4046E |
:1081B0000093E3048091F3049091F40418161906D7 |
:1081C00044F41092E6041092E5041092E404109234 |
:1081D000E304B501B7FE03C0709561957F4FCE01F2 |
:1081E000D7FF03C0909581959F4F0E947B4360917C |
:1081F000E1047091E204AC018091DF049091E0040D |
:108200000E94B5449B01AC018091F1049091F2046D |
:10821000892B81F4CA01B90123E030E040E050E04D |
:108220000E94F146E9012A96C531D10594F0C4E1D6 |
:10823000D0E00FC0CA01B9012AE030E040E050E0D0 |
:108240000E94F146E9012A96C031D10514F0CFE031 |
:10825000D0E0E0907504FF24002711276091E50429 |
:108260007091E604882777FD8095982FA8019701E3 |
:108270000E947D4620E031E040E050E00E94F1465F |
:1082800059016A016091E3047091E404882777FD45 |
:108290008095982FA80197010E947D4620E031E04B |
:1082A00040E050E00E94F1463093E4042093E30460 |
:1082B00030E6A3163FEFB3063FEFC3063FEFD3060A |
:1082C00044F460E6A62E6FEFB62E6FEFC62E6FEF6A |
:1082D000D62E9801870100364FEF14074FEF240781 |
:1082E0004FEF340724F400E61FEF2FEF3FEF8091AC |
:1082F0007404869586958695E82EFF2480917604F1 |
:10830000869586958695882E992451EAA516B104FE |
:10831000C104D1042CF050EAA52EB12CC12CD12CD3 |
:108320008091DF049091E004880F991FAC01E49ED6 |
:10833000C001E59E900DF49E900D112460E170E067 |
:108340000E94BC46FB01EA0DFB1D8091D90490916F |
:10835000DA04AC01849EC001859E900D949E900D20 |
:108360001124AC01C49FC001C59F900DD49F900DF6 |
:1083700011246AE070E00E94BC46E60FF71FF093FC |
:108380007308E093720858016901013A110521054B |
:1083900031052CF030EAA32EB12CC12CD12C8091C8 |
:1083A000E1049091E204880F991F9C01E29EC001B4 |
:1083B000E39E900DF29E900D112460E170E00E940A |
:1083C000BC469B012A0D3B1D8091D7049091D80497 |
:1083D000AC01849EC001859E900D949E900D112449 |
:1083E000AC01C49FC001C59F900DD49F900D112476 |
:1083F0006AE070E00E94BC46260F371F3093750874 |
:1084000020937408B901CF010E947B439C01909393 |
:10841000630880936208009172081091730817FD39 |
:1084200003C08AE590E002C08EE091E0821B930BCE |
:108430009093630880936208C0916208D0916308AA |
:108440006091E5077091E6078091E7079091E80752 |
:1084500024E135E040E050E00E94F146CE01821B6D |
:10846000930B9C0190930F0880930E08853B910518 |
:108470007CF0C43BD1051CF0285631400FC088E683 |
:1084800091E0821B930B90930F0880930E080AC013 |
:108490009FEF2C34390734F428593E4F30930F089E |
:1084A00020930E08C0907408D0907508980117FFAB |
:1084B00004C022273327201B310BC601D7FE04C07E |
:1084C000882799278C199D098217930754F4CE01A8 |
:1084D0000E9457447C01B801882777FD8095982F2A |
:1084E00009C0CE010E94AD447C01B601882777FD0A |
:1084F0008095982F28EE33E040E050E00E947D46C2 |
:108500000027F7FC0095102FA80197010E94F14663 |
:10851000B90137FF03C0709561957F4F5B01CC2493 |
:10852000B7FCC094DC2CB0925F08A0925E088091EA |
:108530000E0890910F080E9457449C01442737FD74 |
:108540004095542FC601B5010E947D4628EE33E0C8 |
:1085500040E050E00E94F1463093D2042093D104D1 |
:1085600080910E0890910F080E94AD449C01442711 |
:1085700037FD4095542FC601B5010E947D4628EE77 |
:1085800033E040E050E00E94F146309521953F4FA6 |
:108590003093D0042093CF048091D1049091D204E1 |
:1085A00041E0813494071CF080E491E005C0805CD8 |
:1085B0009E4F34F480EC9EEF9093D2048093D104CC |
:1085C00081E0213438071CF080E491E005C0205C94 |
:1085D0003E4F34F480EC9EEF9093D0048093CF0410 |
:1085E0008091D1049091D2040AE510E09C01209F73 |
:1085F000C001219F900D309F900D112460E471E027 |
:108600000E94BC46CB010E945744AA2797FDA09523 |
:10861000BA2FBC01CD0129E130E040E050E00E94DA |
:10862000F1463093D2042093D1048091CF049091ED |
:10863000D004AC01409FC001419F900D509F900D10 |
:10864000112460E471E00E94BC46CB010E945744B3 |
:10865000AA2797FDA095BA2FBC01CD0129E130E0F2 |
:1086600040E050E00E94F1463093D0042093CF04C4 |
:108670008091DF049091E00497FF03C0909581956D |
:108680009F4F8159914064F48091E1049091E204FC |
:1086900097FF03C0909581959F4F815991404CF071 |
:1086A0001092D2041092D1041092D0041092CF04F0 |
:1086B000AFCA34E06316710449F4A1CA44E06416F9 |
:1086C000710421F49CCA81E090E002C080E090E057 |
:1086D000DF91CF911F910F91FF90EF90DF90CF909E |
:1086E000BF90AF909F908F907F906F905F904F90D2 |
:1086F0003F902F900895EF92FF920F931F93CF9387 |
:10870000DF938C01EB019C0197FF04C022273327E4 |
:10871000281B390BCE01D7FF04C0882799278C1B53 |
:108720009D0B821793073CF4CE01E8018C01B1E068 |
:10873000EB2EF12C02C0EE24FF24209741F401150A |
:10874000110529F461E070E080E090E024C0B801F8 |
:10875000882777FD8095982F28EE33E040E050E0A1 |
:108760000E947D469E01442737FD4095542F0E946C |
:10877000F146B90137FF03C0709561957F4F882797 |
:1087800077FD8095982F6D3021E0720720E08207F9 |
:1087900020E0920704F524E630E040E050E00E943B |
:1087A0007D462CE031E040E050E00E94F146CA01F5 |
:1087B000B901A4E0660F771F881F991FAA95D1F70A |
:1087C000621B730B840B950B24E630E040E050E015 |
:1087D0000E94F14653C0633422E0720720E0820712 |
:1087E00020E0920734F524E630E040E050E00E94BB |
:1087F0007D46605B78468040904026E331E040E073 |
:1088000050E00E94F146CA01B901F4E0660F771FFB |
:10881000881F991FFA95D1F7621B730B840B950B78 |
:1088200024E630E040E050E00E94F146215F3F4FF7 |
:1088300025C022E330E040E050E00E947D46645EC7 |
:1088400070478040904026EA31E040E050E00E94CE |
:10885000F146CA01B901E4E0660F771F881F991F2E |
:10886000EA95D1F7621B730B840B950B22E330E082 |
:1088700040E050E00E94F146225E3F4FEF2829F48D |
:108880008AE590E0821B930B9C0117FD03C0D7FF84 |
:1088900006C002C0D7FD03C0309521953F4FC901E6 |
:1088A000DF91CF911F910F91FF90EF900895FC0100 |
:1088B000F7FF04C0882799278E1B9F0B885691408D |
:1088C00034F0CF0168E671E00E94BC46FC01F7FD80 |
:1088D00003C041E050E005C0F095E195FF4F4FEF38 |
:1088E0005FEFCF018B5590408A35910530F484EBD2 |
:1088F00090E08E1B9F0BFC010FC0CF01855B904069 |
:108900008A35910518F4E45BF0400EC0CF018F501A |
:1089100091408A35910518F021E030E007C088E6E3 |
:1089200091E08E1B9F0BFC012FEF3FEFEE0FFF1F1F |
:10893000EF5DFB4F85919491BC01629FC001639FE5 |
:10894000900D729F900D11249C01429FC001439F86 |
:10895000900D529F900D112408952AE530E0281BB8 |
:10896000390BC9010E9457440895EF92FF920F936B |
:108970001F93CF93DF93EA01AC0197FF04C0442714 |
:108980005527481B590B9B0177FF04C0222733272B |
:10899000261B370B2417350794F49C01B90188274F |
:1089A00077FD8095982F28EE33E040E050E00E945C |
:1089B0007D467B018C01CE010E9457440FC0882761 |
:1089C00077FD8095982F28EE33E040E050E00E943C |
:1089D0007D467B018C01CE010E94AD449C01442761 |
:1089E00037FD4095542FC801B7010E94F146B901E7 |
:1089F00037FF03C0709561957F4F882777FD80957D |
:108A0000982FDF91CF911F910F91FF90EF900895D4 |
:108A1000FC014150504030F001900616D1F73197DB |
:108A2000CF0108958827992708955058192EEFD01F |
:108A300001D0D2C0BA176207730784079507B1F156 |
:108A400088F40EF410940B2EBA2FA02D062E622F50 |
:108A5000202D072E732F302D082E842F402D092E08 |
:108A6000952F502DFF275523B9F0591B49F0573E3C |
:108A700098F0469537952795A795F0405395C9F7F7 |
:108A800076F0BA0F621F731F841F30F487957795B5 |
:108A90006795B795F040939517FA0F2E0895BF1B71 |
:108AA000BB27BA0B620B730B840BF6CFDEF6DBC071 |
:108AB000AED001D091C0552359F0992369F09F574A |
:108AC0005F57951B33F442F4903811F4915805C068 |
:108AD0009BC091589F3F09F4C6C0BB271124621761 |
:108AE0007307840730F4660F771F881FBB1F9150F0 |
:108AF00098F311D00F920FD00F920DD0A0E8261747 |
:108B0000370748071B0609F0A048BA2F602D7F9150 |
:108B10008F9100240895A0E800246217730784074A |
:108B2000B10528F0621B730B840BB1090A2A660F8A |
:108B3000771F881FBB1FA69581F7089597FB73D0F9 |
:108B40009F3738F0FEE9F91B982F872F762F6B2F70 |
:108B500005C086C09695879577956795F150D0F7B3 |
:108B60003EF490958095709561957F4F8F4F9F4F04 |
:108B70000895E89403C097FB0EF4F3DFB62F672F38 |
:108B8000782F892F9EE9002427C00ED05EF004C004 |
:108B90000BD026F001C008D019F020F48FEF089513 |
:108BA00080E0089581E0089597FB092E052600F8DE |
:108BB000689430D0E89407FC07C0621773078407F5 |
:108BC000950721F008F400940794989408959A95D5 |
:108BD000BB0F661F771F881F11249923A1F08823DC |
:108BE000B2F79F3F59F0BB0F48F421F4002011F475 |
:108BF00060FF04C06F5F7F4F8F4F9F4F881F979517 |
:108C0000879597F908952CC09FEF80EC0895052E65 |
:108C1000092607FA440F551F5F3F79F0AA27A517C9 |
:108C200008F051E04795880F991F9F3F31F0BB270F |
:108C3000B91708F091E0879508959F919F911124AD |
:108C4000E3CF97FB880F991F9F3F31F0BB27B917E0 |
:108C500008F091E0879508959F919F911124D4CFBA |
:108C600066277727882799270895D1DF01D0B4CFC9 |
:108C7000992339F0552329F09F575F57950F13F427 |
:108C80009AF1F1CF91589F3FE1F3629FA12D0F928E |
:108C9000BB27639FA00DB11DEE27729FA00DB11DD4 |
:108CA000EE1FAF93AA27649FB00DE11D739FB00D17 |
:108CB000E11DAA1F6627829FB00DE11DA61F552743 |
:108CC000749FE00DA11D551F839FE00DA11D561F30 |
:108CD000849FA00D511D852F7A2F6E2F1F900F900E |
:108CE00088231AF4939539F48FCF000C111CBB1F05 |
:108CF000661F771F881F01280895629FD001739F08 |
:108D0000F001829FE00DF11D649FE00DF11D929F27 |
:108D1000F00D839FF00D749FF00D659FF00D992766 |
:108D2000729FB00DE11DF91F639FB00DE11DF91F8A |
:108D3000BD01CF0111240895991B79E004C0991F4A |
:108D4000961708F0961B881F7A95C9F780950895A5 |
:108D5000AA1BBB1B51E107C0AA1FBB1FA617B70761 |
:108D600010F0A61BB70B881F991F5A95A9F780957D |
:108D70009095BC01CD01089597FB092E07260AD0D6 |
:108D800077FD04D0E5DF06D000201AF470956195D8 |
:108D90007F4F0895F6F7909581959F4F0895A1E232 |
:108DA0001A2EAA1BBB1BFD010DC0AA1FBB1FEE1F65 |
:108DB000FF1FA217B307E407F50720F0A21BB30BB0 |
:108DC000E40BF50B661F771F881F991F1A9469F72C |
:108DD00060957095809590959B01AC01BD01CF0188 |
:108DE000089597FB092E05260ED057FD04D0D7DF36 |
:108DF0000AD0001C38F450954095309521953F4F8E |
:108E00004F4F5F4F0895F6F7909580957095619557 |
:108E10007F4F8F4F9F4F0895F999FECFB2BDA1BDEF |
:108E2000F89A119600B40895F999FECFB2BDA1BD8C |
:108E300000BC11960FB6F894FA9AF99A0FBE0895ED |
:028E4000FFCF62 |
:108E42000A01FF64496E74656772616C4E69636BF7 |
:108E520020202020496E74656772616C526F6C6CC1 |
:108E6200202020204163634E69636B202020202054 |
:108E720020202020416363526F6C6C202020202030 |
:108E8200202020204779726F4769657220202020B8 |
:108E920020202020486F6568656E57657274202017 |
:108EA200202020204163635A2020202020202020DF |
:108EB20020202020476173202020202020202020F5 |
:108EC200202020204B6F6D7061737356616C756545 |
:108ED2002020202045727361747A6B6F6D7061730C |
:108EE200732020205573725F506172312020202040 |
:108EF200202020205573725F706172332020202061 |
:108F0200202020204D6F746F725F566F726E652045 |
:108F1200202020204D6F746F725F48696E74656EF9 |
:108F2200202020204D6F746F725F4C696E6B73202E |
:108F3200202020204D6F746F725F526563687473D6 |
:108F420020202020496E64657820202020202020C7 |
:108F52002020202055426174202020202020202023 |
:108F6200202020204D657373776572745F4E6963AC |
:108F72006B2020204D657373776572745F526F6C3E |
:108F82006C2020204D657373776572745F47696545 |
:108F920072202020537469636B5F4E69636B2020DB |
:108FA20020202020537469636B5F526F6C6C202009 |
:108FB20009200000537469636B5F47696572202062 |
:108FC200202020204750535F4E69636B20202020D1 |
:108FD200202020204750535F526F6C6C20202020AD |
:108FE2002020202075746D5F65617374202020201D |
:108FF2002020202075746D5F6E6F727468202020AF |
:109002002020202075746D5F616C74202020202048 |
:10901200202020206770735F7374617465202020A4 |
:1090220020202020492D4C616765526F6C6C2020F6 |
:10903200202020204779726F476965725F436F6D08 |
:1090420070202020FFFF0A016400007D0000FF0362 |
:109052000102030405060708090A48616C6C6F20C7 |
:1090620057656C7400000000000000000000000062 |
:1090720000000000000000000000000000000000EE |
:1090820000000000000000000000000000000000DE |
:1090920000000000000000000000000000000000CE |
:1090A200000000000000000000000A01426567693C |
:1090B2006E6E657200004E6F726D616C00005370CF |
:1090C2006F72740000640090D0030090D003001708 |
:1090D200B7D13830FB103A409696020A644664ECE7 |
:0290E200FF008D |
: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 12.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, 0 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 |
---|
--- trunk/_Settings.h (nonexistent) |
+++ trunk/_Settings.h (revision 553) |
@@ -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,183 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + 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.Stick_D = 4; //8 // Wert : 0-64 Salvo |
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,1363 |
/*####################################################################################### |
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 15.12.2007 Ersatzkompass und Giergyrokompensation |
long GyroKomp_Int; |
long int GyroGier_Comp; |
int GyroKomp_Value; // Der ermittelte Kompasswert aus Gyro und Magnetkompass |
short int cnt_stickgier_zero =0; |
int gyrogier_kompass; |
// 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; |
GyroGier_Comp =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 += (long)MesswertGier; |
GyroGier_Comp += (long)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; |
//Salvo 11.12.2007 |
w = (abs(Mittelwert_AccNick)); |
v = (abs(Mittelwert_AccRoll)); |
if ((w < ACC_WAAGRECHT_LIMIT) && (v < ACC_WAAGRECHT_LIMIT)) // Gyro nur in wwagrechter Lage nachtrimmen |
{ |
if(cnt > EE_Parameter.Driftkomp) cnt = EE_Parameter.Driftkomp; |
if(IntegralFehlerNick > FEHLER_LIMIT) AdNeutralNick += cnt; |
if(IntegralFehlerNick < -FEHLER_LIMIT) AdNeutralNick -= cnt; |
} |
//Salvo End |
// 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; |
} |
//Salvo 11.12.2007 |
w = (abs(Mittelwert_AccNick)); |
v = (abs(Mittelwert_AccRoll)); |
if ((w < ACC_WAAGRECHT_LIMIT) && (v < ACC_WAAGRECHT_LIMIT)) // Gyro nur in wwagrechter Lage nachtrimmen |
{ |
if(cnt > EE_Parameter.Driftkomp) cnt = EE_Parameter.Driftkomp; |
if(IntegralFehlerRoll > FEHLER_LIMIT) AdNeutralRoll += cnt; |
if(IntegralFehlerRoll < -FEHLER_LIMIT) AdNeutralRoll -= cnt; |
} |
//Salvo End |
//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; |
// 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 |
} |
} |
} // Ende Abgleich |
// Salvo Ersatzkompass und Giergyrokompensation 15.12.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 und Giergyro nur mit Magnetkompass aktualisieren wenn alles ok |
{ |
if ((abs(KompassValue - Kompass_Value_Old)) <= 5) // Aufeinanderfolgende Werte duerfen nur minimal abweichen |
{ |
if ((abs(StickGier) < 20)) //Giergyroabgleich mit Kompass |
{ |
if (cnt_stickgier_zero < 255) cnt_stickgier_zero += 1; |
if (cnt_stickgier_zero > 1) // nur Abgleichen wenn keine Stickbewegung da |
{ |
w = (int) (GyroGier_Comp/(long)GYROKOMP_INC_GRAD_DEFAULT); |
v = KompassValue - gyrogier_kompass; // realen Drehwinkel seit letztem Ruecksetzen von GyroGier_Comp bestimmen |
if (v <-180) v +=360; // Uberlaufkorrektur |
if (v > 180) v -=360; // Uberlaufkorrektur |
w = w -v; //Differenz Gyro zu Kompass ist der Driftfehler |
#define GIER_COMP_MAX 4 |
if (w > GIER_COMP_MAX) w= GIER_COMP_MAX; |
if (w < -GIER_COMP_MAX) w= - GIER_COMP_MAX; |
if (!(w == 0)) |
{ |
GyroGier_Comp = 0; |
gyrogier_kompass = KompassValue; // Kompasswert merken |
AdNeutralGier -= w; |
} |
} |
} |
else |
{ |
gyrogier_kompass = KompassValue; // Kompasswert merken |
cnt_stickgier_zero = 0; |
GyroGier_Comp = 0; |
} |
magkompass_ok = 1; // Flag dass Magnetkompass stabil arbeitet |
GyroKomp_Int = (GyroKomp_Int )/(long)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 + 360L; |
GyroKomp_Int = (GyroKomp_Int%360L) * (long)GYROKOMP_INC_GRAD_DEFAULT; // An Magnetkompasswert annaehern |
} |
} |
else |
{ |
magkompass_ok = 0; |
GyroGier_Comp = 0; |
} |
Kompass_Value_Old = KompassValue; |
} |
// Salvo End ************************* |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// 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; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// 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--) |
{ |
// Salvo 13.12.2007 Beleuchtung steuern |
if (!(beeptime & BeepMuster)) LED_J16_FLASH; |
else if (MotorenEin) LED_J16_ON; |
else LED_J16_OFF; |
// Salvo End |
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[31] = (int) GyroGier_Comp; |
/* 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,163 |
/*####################################################################################### |
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 di; Werte ueber Zeit und Temperatur sehr stabil. |
#define GYROKOMP_INC_GRAD_DEFAULT 1300 // 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 long GyroKomp_Int; |
extern long int GyroGier_Comp; |
extern int GyroKomp_Inc_Grad; |
extern 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="87 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="310 159 1284 621" LineCol="6 0" State="Maximized"/><File00003 Name="G:\Mikrokopter\Flight_Crtl\v0067g\main.c" Position="332 188 1306 650" LineCol="244 0" State="Maximized"/><File00004 Name="G:\Mikrokopter\Flight_Crtl\v0067g\fc.c" Position="262 71 1402 774" LineCol="1072 48" 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,254 |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + 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 = 0xCD; // SCL und PC2,PC3, 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,112 |
#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 |
#define LED_J16_ON PORTC |= 0x04 |
#define LED_J16_OFF PORTC &= ~0x04 |
#define LED_J16_FLASH PORTC ^= 0x04 |
//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 |
"GyroGier_Comp " |
}; |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//++ 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 |