{"id":417486,"date":"2024-06-30T01:35:43","date_gmt":"2024-06-30T01:35:43","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=417486"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-30T01:35:43","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=417486","title":{"rendered":"<span>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0440\u043e\u043d\u0430 (\u0427\u0430\u0441\u0442\u044c 2 \u2014 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/343\/783\/194\/343783194078607e30f9643c729fa413.png\" width=\"1024\" height=\"807\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/343\/783\/194\/343783194078607e30f9643c729fa413.png\"\/><\/figure>\n<p><strong>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p>\u0412\u0438\u0434\u0435\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Geoscan Pioneer max (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043d\u0435 \u0432\u0441\u0435\u043c)<\/p>\n<\/li>\n<\/ol>\n<h3>\u0412\u0438\u0434\u0435\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0438\u0437 <a href=\"https:\/\/habr.com\/ru\/articles\/751236\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0440\u043e\u043d\u0430 (\u0427\u0430\u0441\u0442\u044c 1 \u2014 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f) \/ \u0425\u0430\u0431\u0440 (habr.com)<\/a>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u0445 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c, \u043c\u044b \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u043b\u0438 \u043d\u0430\u0448\u0438 \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u043a \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u043e\u043a\u043d\u0430 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043e\u0442 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043e \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430 (\u0432\u0435\u0442\u0435\u0440 \u043d\u0438 \u043a\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b; \u0434\u0440\u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u044d\u043a\u0441\u0442\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u043d\u0451\u0432\u0440\u0430). \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0441\u043b\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0451\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u043c \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 (\u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043f\u043e 16 \u0441\u0435\u043a\u0443\u043d\u0434 (\u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u043e\u043b\u0451\u0442), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0438 \u0432\u0438\u0434\u0435\u043e):<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/64c914ebbfcc2c144f380a04\" data-style=\"\" id=\"64c914ebbfcc2c144f380a04\" width=\"\"><\/div>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0451\u0442\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0443 \u0441\u043b\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u043f\u0440\u0438 \u0437\u0430\u043b\u0451\u0442\u0435 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0443 (\u0440\u0435\u0448\u0435\u043d\u0438\u0435-\u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438)<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0435\u0449\u0451 \u043d\u0430 15 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442 \u0441\u0442\u0435\u043d\u044b (\u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f\u0441\u044c, \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u043e \u043f\u043e\u0434\u043b\u0435\u0442\u0430\u0435\u0442 \u043a \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438, \u0438 \u043c\u0430\u043b\u0435\u0439\u0448\u0438\u0439 \u0432\u0435\u0442\u0435\u0440\u043e\u043a \u043f\u0440\u0438\u0436\u043c\u0451\u0442 \u0435\u0433\u043e \u043a \u0441\u0442\u0435\u043d\u0435\/\u043e\u043a\u043d\u0443)<\/p>\n<\/li>\n<\/ol>\n<h3>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438<\/h3>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0451\u0442\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f &#171;\u0442\u0443\u043f\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b&#187;. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u043d\u0443\u043b\u044f \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0440\u043e\u043d\u0430 Geoscan Pioneer max, \u043e\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e \u043d\u0430\u043c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043f\u043e \u0434\u0432\u0443\u043c \u0432\u0432\u043e\u0434\u0438\u043c\u044b\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u043f\u043e\u0441\u0430\u0434\u043a\u0438 (\u0442\u0440\u0435\u0442\u044c\u044f &#8212; \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u0430).<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c (\u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb9\/559\/1ee\/cb95591ee7d2c70c9d8cca0c2b1637b2.png\" width=\"1046\" height=\"878\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cb9\/559\/1ee\/cb95591ee7d2c70c9d8cca0c2b1637b2.png\"\/><\/figure>\n<h3>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Geoscan Pioneer max, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f Rapberry (\u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c), \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c Raspberry \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0442\u0430\u0451\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u0443\u0434\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u043e \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0433\u0435\u043e\u0441\u043a\u0430\u043d\u0430) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0438\u043d\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u0440\u0435\u0434\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0438\u043d GPIO25. \u041d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e Ground \u0438 Power.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/3f7\/165\/188\/3f71651886fc4e574aad8901f85a955f.jpg\" alt=\"\" title=\"\" width=\"848\" height=\"702\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3f7\/165\/188\/3f71651886fc4e574aad8901f85a955f.jpg\" data-blurred=\"true\"\/><\/figure>\n<h4>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b API \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Lua <\/h4>\n<p><code>Uart.new<\/code>(<em>num<\/em>,\u00a0<em>rate<\/em>,\u00a0<em>parity<\/em>,\u00a0<em>stopBits<\/em>) &#8212; \u0441\u043e\u0437\u0434\u0430\u0442\u044c Uart \u043d\u0430 \u043f\u043e\u0440\u0442\u0435 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<\/th>\n<td>\n<p align=\"left\"><strong>num<\/strong>\u00a0\u2013 \u043d\u043e\u043c\u0435\u0440 UART;<strong>rate<\/strong>\u00a0\u2013 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c;<strong>parity<\/strong>\u00a0\u2013 Uart.PARITY_NONE, Uart.PARITY_EVEN, Uart.PARITY_ODD, \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Uart.PARITY_NONE;<strong>stopBits<\/strong>\u00a0\u2013 Uart.ONE_STOP, Uart.TWO_STOP, \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Uart.ONE_STOP.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><code>Uart.read<\/code>(<em>self<\/em>,\u00a0<em>size<\/em>) &#8212; \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c\u00a0<code>size<\/code>\u00a0\u0431\u0430\u0439\u0442.<\/p>\n<p><code>Uart.write<\/code>(<em>self<\/em>,\u00a0<em>data<\/em>,\u00a0<em>size<\/em>) &#8212; \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 (data) \u0434\u043b\u0438\u043d\u043e\u0439 (size).<\/p>\n<p><code>Uart.bytesToRead<\/code>(<em>self<\/em>) &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434 \u0432 \u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0442\u043e \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u0432\u0443\u0445\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044f\u044f \u0441\u0432\u044f\u0437\u044c, \u041d\u041e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 31 \u0441\u0438\u043c\u0432\u043e\u043b, \u0432\u0441\u0451 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 (<a href=\"https:\/\/docs.geoscan.aero\/ru\/master\/programming\/lua\/lua_main.html\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 Lua \u2014 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Pioneer December update 2022 (geoscan.aero)<\/a>), \u041d\u041e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>-----------------Lua \u043a\u043e\u0434, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u043e\u043d \u0447\u0435\u0440\u0435\u0437 Pioneer station----------- local uart = Uart.new(4, 57600) -- \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c uart \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 pyhon \u043a\u043e\u0434\u043e\u043c local servo_stat = 'o'    -- \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 'o'(\u043e\u0442\u043a\u0440\u044b\u0442\u043e),'c'(\u0437\u0430\u043a\u0440\u044b\u0442\u043e)) local rc = Sensors.rc     -- \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0443\u043b\u044c\u0442 local inp = ''            -- \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043d\u0430 Python local rec = ''            -- \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430(\u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f)  local function rotate_servo_open() -- \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430   servo_stat='o' end  local function rotate_servo_close() -- \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430   servo_stat='c' end  local function main()               -- \u0446\u0438\u043a\u043b   rc_chans = table.pack(rc())     -- \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441 \u043f\u0443\u043b\u044c\u0442\u0430   if rc_chans[8] &lt; -0.8 then      --\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 (\u043a\u0430\u043d\u0430\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438 \u043d\u0430 \u043f\u0443\u043b\u044c\u0442\u0435)     rotate_servo_open()   elseif rc_chans[8] > 0.8 then   --\u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 (\u043a\u0430\u043d\u0430\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438 \u043d\u0430 \u043f\u0443\u043b\u044c\u0442\u0435)     rotate_servo_close()   end   inp = servo_stat..'\\n' -- \u043f\u0443\u0441\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c '\\n'   uart:write(inp, #inp)  -- \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 Python   rec = uart:read(uart:bytesToRead())    -- \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 Python end  t = Timer.new(0.08, main) --\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0446\u0438\u043a\u043b\u0430 ---!\u0412\u0420\u0415\u041c\u042f \u0421\u0418\u041d\u0425\u0420\u041e\u041d\u0418\u0417\u0410\u0426\u0418\u0418 \u0414\u041e\u041b\u0416\u041d\u041e \u0411\u042b\u0422\u042c \u041e\u0414\u0418\u041d\u0410\u041a\u041e\u0412\u041e \u041d\u0410 LUA \u0438 PYTHON! t:start() -- \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0446\u0438\u043a\u043b ----------!!!\u041a\u041e\u0412\u042b\u0427\u041a\u0418 \u041e\u0414\u0418\u041d\u0410\u0420\u041d\u042b\u0415 \u041e\u0411\u042f\u0417\u0410\u0422\u0415\u041b\u042c\u041d\u041e, \u0418\u041d\u0410\u0427\u0415 \u0420\u0410\u0411\u041e\u0422\u0410\u0422\u042c \u041d\u0415 \u0411\u0423\u0414\u0415\u0422 !!!---------------<\/code><\/pre>\n<pre><code>##########################Python \u043a\u043e\u0434, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 Raspberry######################## import serial             # \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f from time import sleep    # \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 import RPi.GPIO as GPIO   # \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f ser = serial.Serial(\"\/dev\/ttyS0\", 57600, timeout=5) # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442, \u0431\u0435\u0437\u0434\u0443\u043c\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0439 GPIO.setmode(GPIO.BCM)    # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c GPIO.setup(25, GPIO.OUT)  # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c sg = GPIO.PWM(25, 50)     # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434 sg.start(8.06)            # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0434\u0430\u0451\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0433\u043e\u043b servo_opened = True       # \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0430\u043c\u043e\u043a \u043e\u0442\u043a\u0440\u044b\u0442  def uart_read():          # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0441 Lua   data = ser.readline().decode().replace('\\n', \"\") # \u0447\u0438\u0442\u0430\u0435\u043c, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c, \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u0443\u0441\u043e\u0440   if ser.in_waiting &amp;gt; 20:      # \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0430\u043b\u043e, \u0431\u0435\u0437\u0434\u0443\u043c\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0439       ser.reset_input_buffer() # \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0430\u043b\u043e, \u0431\u0435\u0437\u0434\u0443\u043c\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0439    print('Read data: ')   print(data)             return data  def uart_write(answer): # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0434\u043b\u044f Lua   ser.write(answer.encode()) # \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c, \u043f\u0438\u0448\u0435\u043c   print('UART writed')  def servo_control(event): # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c   global servo_opened   # \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435   global sg             # \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435   if event == \"c\" and servo_opened: # \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 'c'       sg.ChangeDutyCycle(2.5)       servo_opened = False       print('closed')      elif event == \"o\" and not (servo_opened): # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 'o'       sg.ChangeDutyCycle(8.06)       servo_opened = True       print('opened')  def auto_p_control(data):   servo_event = data[0]   servo_control(servo_event) # \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430    print(\"ANS : \" + str(ans))   uart_write(ans)  # \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Lua   sleep(0.08)  # \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f  while True: # \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b   uart_data = uart_read() # \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0447\u0442\u0435\u043d\u0438\u044f   if uart_data != ['']:  #\u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u0443\u0441\u0442\u044b\u0435       auto_p_control(uart_data) # \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u0432\u0435\u0442\u0430  <\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Geoscan Pioneer max, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0451\u0442\u0430 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0440\u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">MCE_PREFLIGHT  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ENGINES_DISARM  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">MCE_LANDING  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043f\u043e\u0441\u0430\u0434\u043a\u0443  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">MCE_TAKEOFF  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0432\u0437\u043b\u0435\u0442  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <\/p>\n<p><code>ap.push<\/code>(<em>Event<\/em>)<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<\/th>\n<td>\n<p align=\"left\"><strong>Event<\/strong>\u00a0\u2013 \u043d\u043e\u043c\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u00a0<code>Ev.<\/code>MCE_LANDING  ).<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041d\u043e \u0442\u0430\u043a \u0436\u0435 \u0434\u0440\u043e\u043d \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<p><code>function callback(event) - \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430.<\/code><\/p>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043e\u0442 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ENGINES_STARTED<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">COPTER_LANDED<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043f\u0442\u0435\u0440 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b \u043f\u043e\u0441\u0430\u0434\u043a\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">TAKEOFF_COMPLETE<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043f\u0442\u0435\u0440 \u0434\u043e\u0441\u0442\u0438\u0433 \u0432\u044b\u0441\u043e\u0442\u044b \u0432\u0437\u043b\u0435\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">POINT_REACHED<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043f\u0442\u0435\u0440 \u0434\u043e\u0441\u0442\u0438\u0433 \u0442\u043e\u0447\u043a\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">POINT_DECELERATION<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043f\u0442\u0435\u0440 \u043d\u0430\u0447\u0430\u043b \u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u0434\u043b\u0451\u0442\u0435 \u043a \u0442\u043e\u0447\u043a\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">LOW_VOLTAGE1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0438\u0437\u043a\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u043c\u043e\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">LOW_VOLTAGE2<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0438\u0437\u043a\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c \u043f\u043e\u0441\u0430\u0434\u043a\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">SYNC_START<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">SHOCK<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CONTROL_FAIL<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0433\u043e\u043b \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043a\u043e\u043f\u0442\u0435\u0440\u0430 \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ENGINE_FAIL<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u0430\u0437 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>TAKEOFF_COMPLETE<\/p>\n<\/li>\n<li>\n<p>POINT_REACHED<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043c\u0435\u0442\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430:<\/p>\n<p><code>ap.goToLocalPoint<\/code>(<em>x<\/em>,\u00a0<em>y<\/em>,\u00a0<em>z<\/em>,\u00a0<em>time<\/em>) &#8212; \u0434\u043b\u044f \u043f\u043e\u043b\u0451\u0442\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<\/th>\n<td>\n<p align=\"left\"><strong>x<\/strong>\u00a0\u2013 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e \u043e\u0441\u0438\u00a0x, \u0432 \u043c\u0435\u0442\u0440\u0430\u0445;<strong>y<\/strong>\u00a0\u2013 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e \u043e\u0441\u0438\u00a0y, \u0432 \u043c\u0435\u0442\u0440\u0430\u0445;<strong>z<\/strong>\u00a0\u2013 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e \u043e\u0441\u0438\u00a0z, \u0432 \u043c\u0435\u0442\u0440\u0430\u0445;<strong>time<\/strong>\u00a0\u2013 \u0432\u0440\u0435\u043c\u044f, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043f\u0442\u0435\u0440 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u043e\u043f\u0442\u0435\u0440 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u0442\u043e\u0447\u043a\u0435 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430.<\/p>\n<p>\u0412\u043e\u0437\u044c\u043c\u0451\u043c \u0437\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430:<\/p>\n<pre><code>-----------------Lua \u043a\u043e\u0434, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u043e\u043d \u0447\u0435\u0440\u0435\u0437 Pioneer station----------- local rc = Sensors.rc     -- \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0443\u043b\u044c\u0442 local lpsPosition = Sensors.lpsPosition -- \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c steamVR \u0441\u0442\u0430\u043d\u0446\u0438\u044e (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0438\u043d\u0430\u0447\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439)  local points = {         {-0.6, 0.3, 0.2},         {0.6, 0.3,  0.2},         {0, 0, 0.5},         {0.6, -0.3, 0.2} }  local curr_point = 1  local function nextPoint()     if(#points >= curr_point) then         ap.goToLocalPoint(points[curr_point][1], points[curr_point][2], points[curr_point][3]         curr_point = curr_point + 1     else         ap.push(Ev.MCE_LANDING)     end end  function callback(event)     if (event == Ev.TAKEOFF_COMPLETE) then         nextPoint()     end     if (event == Ev.POINT_REACHED) then         nextPoint()     end end local function main()               -- \u0446\u0438\u043a\u043b   rc_chans = table.pack(rc())     -- \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441 \u043f\u0443\u043b\u044c\u0442\u0430   lpsX, lpsY, lpsZ = lpsPosition() -- \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e steamVR \u0441\u0442\u0430\u043d\u0446\u0438\u0438 end  t = Timer.new(0.05, main) --\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0446\u0438\u043a\u043b\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 0.05 \u0441\u0435\u043a\u0443\u043d\u0434\u044b) t:start() -- \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0446\u0438\u043a\u043b  ap.push(Ev.MCE_PREFLIGHT) -- \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 Timer.callLater(1, function() ap.push(Ev.MCE_TAKEOFF) end)  -- \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0432 \u0432\u043e\u0437\u0434\u0443\u0445 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u043c \u0441\u0430\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0438 (\u0434\u0432\u0435) \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434, \u0442\u043e \u0431\u0435\u0440\u0451\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443:<\/p>\n<pre><code>uart = Uart.new(4, 57600) servo_stat = 'o' send_auto = '0'  inp = '' rc = Sensors.rc autopilot = False auto_pilot_ret = False flight_loaded = False point = [             [0, 0, 0],             [0, 0, 0],             [0, 0, 0],             [''],             [0, 0, 0],             [0, 0, 0],             [0, 0, 0],             [''],             [0, 0, 0],             [0, 0, 0],             [0, 0, 0],             ['']         ]  point_upploaded = [0,0,0],[0,0,0],[0,0,0]] point_dx = 1 lock = False point_now = 1 rec = ''   ENGINES_STARTED=False TAKEOFF_COMPLETE=False POINT_REACHED=False LOW_VOLTAGE1=False SHOCK=False  lpsPosition = Sensors.lpsPosition  leds = Ledbar.new(4) for i = 0, 3, 1 do     leds:set(i, 0, 0, 0)   def indication(r,g,b)     for i = 0, 4, 1 do         leds:set(i, r, g, b)    def info_light()     for i=0,1,0.1 do         indication(i,i,i)         indication(1,1,1)      indication(0,0,0)    def round(num, step)     return num - num % step   def rotate_servo_open()     indication(0,1,0)     indication(0,0,0)     servo_stat='o'   def rotate_servo_close()     #\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u044f[     indication(1,0,0)     indication(0,0,0)     #\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u044f]      servo_stat='c'   def autopilot_on_to_off()     autopilot = False     indication(1, 1, 1)   def autopilot_off_to_on()  # \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442     if point_dx == 3 :  # \u043d\u0435 \u0434\u0430\u0441\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0434\u0432\u0435 \u0442\u043e\u0447\u043a\u0438         point_upploaded[3][1] = round(posX_now, 0.01)         point_upploaded[3][2] = round(posY_now, 0.01)         point_upploaded[3][3] = round(posZ_now, 0.01)                  point = [[point_upploaded[3][1], point_upploaded[3][2], point_upploaded[3][3]+0.5],                  [point_upploaded[1][1], point_upploaded[1][2], point_upploaded[1][3]+0.5],                  [point_upploaded[1][1], point_upploaded[1][2], point_upploaded[1][3]+0.3],                  ['land'],                  [point_upploaded[1][1], point_upploaded[1][2], point_upploaded[1][3]+0.5],                  [point_upploaded[2][1], point_upploaded[2][2], point_upploaded[2][3]+0.5],                  [point_upploaded[2][1], point_upploaded[2][2], point_upploaded[2][3]+0.3],                  ['land'],                  [point_upploaded[2][1], point_upploaded[2][2], point_upploaded[2][3]+0.5],                  [point_upploaded[3][1], point_upploaded[3][2], point_upploaded[3][3]+0.5],                  [point_upploaded[3][1], point_upploaded[3][2], point_upploaded[3][3]+0.1],                  ['land']                 ]          autopilot = True         flight_loaded = True          auto_pilot_ret = False         point_now = 1  def autopilot_point_add()     if point_dx &lt; 3 :         point_upploaded[point_dx][1] = round(posX_now, 0.01)         point_upploaded[point_dx][2] = round(posY_now, 0.01)         point_upploaded[point_dx][3] = round(posZ_now, 0.01)         point_dx = point_dx + 1         indication(1, 0, 0)         send_auto = 'a'         lock = True  def autopilot_point_clear()     point_upploaded[1] = [0,0,0]     point_upploaded[2] = [0,0,0]     point_upploaded[3] = [0,0,0]     point_dx = 1     flight_loaded = False     indication(0, 1, 0)     lock = True          send_auto = 'c'  def next_targer()     if point_now == 1 :         Timer.callLater(2, ap.push(Ev.MCE_TAKEOFF))      elif point_now == 4 :         Timer.callLater(2, ap.push(Ev.MCE_LANDING))         Timer.callLater(4, rotate_servo_open())         Timer.callLater(6, ap.push(Ev.MCE_PREFLIGHT))         Timer.callLater(8, ap.push(Ev.MCE_TAKEOFF))      elif point_now == 8 :         Timer.callLater(2, ap.push(Ev.MCE_LANDING))         Timer.callLater(4, rotate_servo_close())         Timer.callLater(6, ap.push(Ev.MCE_PREFLIGHT))         Timer.callLater(8, ap.push(Ev.MCE_TAKEOFF))      elif point_now == 12 :         ap.push(Ev.MCE_LANDING)         Timer.callLater(2, rotate_servo_open())         Timer.callLater(4, ap.push(Ev.ENGINES_DISARM))         autopilot = False         auto_pilot_ret = False    # \u0417\u0430\u0432\u0435\u0440\u0448\u0438\u043b, \u0430 \u043f\u043e\u0447\u0435\u043c\u0443 0?       Timer.callLater(14, function()         if auto_pilot_ret and not(point[point_now][1]=='land') :             indication(1, 0, 1)             ap.goToLocalPoint(point[point_now][1], point[point_now][2], point[point_now][3])             indication(0, 0, 1)          point_now = point_now + 1    )  \u041f\u0440\u0438\u0451\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430[ def callback(event)        #\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430.     if(event == Ev.ENGINES_STARTED) :         ENGINES_STARTED=True    #\u0414\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b      if(event == Ev.TAKEOFF_COMPLETE) :         TAKEOFF_COMPLETE=True  #\u041a\u043e\u043f\u0442\u0435\u0440 \u0434\u043e\u0441\u0442\u0438\u0433 \u0432\u044b\u0441\u043e\u0442\u044b \u0432\u0437\u043b\u0435\u0442\u0430         # Timer.callLater(6, ap.goToLocalPoint(point[3][1], point[3][2], point[3][3]))      if(event == Ev.POINT_REACHED) :         POINT_REACHED=True      #\u041a\u043e\u043f\u0442\u0435\u0440 \u0434\u043e\u0441\u0442\u0438\u0433 \u0442\u043e\u0447\u043a\u0438         next_targer()         #  Timer.callLater(6, ap.push(Ev.MCE_LANDING))      if(event == Ev.LOW_VOLTAGE1) :         LOW_VOLTAGE1=True      if(event == Ev.SHOCK) :         SHOCK=True         autopilot = False  def float_cut(x, num)     str = string.sub(tostring(x), 1, string.find(tostring(x), '.') + num)     return str    def main()     rc_chans = table.pack(rc())      if rc_chans[8] &lt; -0.8 :         rotate_servo_open()     elif rc_chans[8] > 0.8 :                 rotate_servo_close()      if not autopilot :         if (rc_chans[1] &lt; -0.8) and (rc_chans[2] &lt; -0.8) and (rc_chans[3] > 0.8) and (rc_chans[4] &lt; -0.8) and not lock :             indication(0,0,4)             indication(0,0,0)             autopilot_point_add()         elif (rc_chans[1] > 0.8) and (rc_chans[2] &lt; -0.8) and (rc_chans[3] > 0.8) and (rc_chans[4] > 0.8) and not lock :             indication(0,0,4)             indication(0,0,0)             autopilot_point_clear()         elif (rc_chans[1] > -0.8) and (rc_chans[2] > -0.8) :             lock = False             send_auto = '0'       if rc_chans[6] &lt;= 0 and not autopilot :         autopilot_off_to_on()     elif rc_chans[6] > 0.8 and autopilot :         autopilot_on_to_off()       posX_now, posY_now, posZ_now = lpsPosition()     inp = servo_stat+','+point_upploaded[3][1]+','+tostring(point_now)+','+Ev.POINT_REACHED+'\\n'      uart:write(inp, len(inp))  # \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c          if autopilot and flight_loaded and not auto_pilot_ret :         auto_pilot_ret = True         indication(1, 0, 0)         indication(0, 0, 0)                  ap.push(Ev.MCE_PREFLIGHT)         next_targer()  t = Timer.new(0.08, main) t:start()<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/04b\/cbb\/d2a\/04bcbbd2a6cdb014c41479eb5a400dda.jpg\" alt=\"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u043b\u0430\u043d \u043f\u043e\u043b\u0451\u0442\u0430\" title=\"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u043b\u0430\u043d \u043f\u043e\u043b\u0451\u0442\u0430\" width=\"450\" height=\"427\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/04b\/cbb\/d2a\/04bcbbd2a6cdb014c41479eb5a400dda.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u043b\u0430\u043d \u043f\u043e\u043b\u0451\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/bd7\/89c\/ad7\/bd789cad7ce2eed6bac34051352c7a35.jpg\" alt=\"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0442\u043e\u0447\u043a\u0443 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0430\u043a\u0441 = 2)\" title=\"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0442\u043e\u0447\u043a\u0443 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0430\u043a\u0441 = 2)\" width=\"450\" height=\"427\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd7\/89c\/ad7\/bd789cad7ce2eed6bac34051352c7a35.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0442\u043e\u0447\u043a\u0443 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0430\u043a\u0441 = 2)<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u043d\u0443\u044e \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u044e, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0442\u043e \u043c\u043e\u0440\u0433\u043d\u0451\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0439, \u0435\u0441\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u043b\u0438 \u043f\u043b\u0430\u043d \u043f\u043e\u043b\u0451\u0442\u0430, \u0442\u043e \u043c\u043e\u0440\u0433\u043d\u0451\u0442 \u0437\u0435\u043b\u0451\u043d\u044b\u0439, \u0435\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0430, \u0442\u043e \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0433\u0435\u043e\u0441\u043a\u0430\u043d\u0430:<\/p>\n<p><a href=\"https:\/\/docs.geoscan.aero\/ru\/master\/programming\/lua\/lua.html#id3\" rel=\"noopener noreferrer nofollow\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API \u2014 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Pioneer December update 2022 (geoscan.aero)<\/a>  <\/p>\n<hr\/>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/751236\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0440\u043e\u043d\u0430 (\u0427\u0430\u0441\u0442\u044c 1 \u2014 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f) \/ \u0425\u0430\u0431\u0440 (habr.com)<\/a>  <\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/758572\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0440\u043e\u043d\u0430 (\u0427\u0430\u0441\u0442\u044c 3 \u2014 \u0437\u0430\u043c\u043e\u043a) \/ \u0425\u0430\u0431\u0440 (habr.com)<\/a>  <\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/751342\/\"> https:\/\/habr.com\/ru\/articles\/751342\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p><strong>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p>\u0412\u0438\u0434\u0435\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Geoscan Pioneer max (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043d\u0435 \u0432\u0441\u0435\u043c)<\/p>\n<\/li>\n<\/ol>\n<h3>\u0412\u0438\u0434\u0435\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0438\u0437 <a href=\"https:\/\/habr.com\/ru\/articles\/751236\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0440\u043e\u043d\u0430 (\u0427\u0430\u0441\u0442\u044c 1 \u2014 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f) \/ \u0425\u0430\u0431\u0440 (habr.com)<\/a>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u0445 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c, \u043c\u044b \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u043b\u0438 \u043d\u0430\u0448\u0438 \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u043a \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u043e\u043a\u043d\u0430 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043e\u0442 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043e \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430 (\u0432\u0435\u0442\u0435\u0440 \u043d\u0438 \u043a\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b; \u0434\u0440\u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u044d\u043a\u0441\u0442\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u043d\u0451\u0432\u0440\u0430). \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0441\u043b\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0451\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u043c \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 (\u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043f\u043e 16 \u0441\u0435\u043a\u0443\u043d\u0434 (\u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u043e\u043b\u0451\u0442), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0438 \u0432\u0438\u0434\u0435\u043e):<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/64c914ebbfcc2c144f380a04\" data-style=\"\" id=\"64c914ebbfcc2c144f380a04\" width=\"\"><\/div>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0451\u0442\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0443 \u0441\u043b\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u043f\u0440\u0438 \u0437\u0430\u043b\u0451\u0442\u0435 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0443 (\u0440\u0435\u0448\u0435\u043d\u0438\u0435-\u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438)<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0435\u0449\u0451 \u043d\u0430 15 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442 \u0441\u0442\u0435\u043d\u044b (\u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f\u0441\u044c, \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u043e \u043f\u043e\u0434\u043b\u0435\u0442\u0430\u0435\u0442 \u043a \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438, \u0438 \u043c\u0430\u043b\u0435\u0439\u0448\u0438\u0439 \u0432\u0435\u0442\u0435\u0440\u043e\u043a \u043f\u0440\u0438\u0436\u043c\u0451\u0442 \u0435\u0433\u043e \u043a \u0441\u0442\u0435\u043d\u0435\/\u043e\u043a\u043d\u0443)<\/p>\n<\/li>\n<\/ol>\n<h3>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438<\/h3>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0451\u0442\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f &#171;\u0442\u0443\u043f\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b&#187;. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u043d\u0443\u043b\u044f \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0440\u043e\u043d\u0430 Geoscan Pioneer max, \u043e\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e \u043d\u0430\u043c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043f\u043e \u0434\u0432\u0443\u043c \u0432\u0432\u043e\u0434\u0438\u043c\u044b\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u043f\u043e\u0441\u0430\u0434\u043a\u0438 (\u0442\u0440\u0435\u0442\u044c\u044f &#8212; \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u0430).<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c (\u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e):<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Geoscan Pioneer max, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f Rapberry (\u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c), \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c Raspberry \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0442\u0430\u0451\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u0443\u0434\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u043e \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0433\u0435\u043e\u0441\u043a\u0430\u043d\u0430) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0438\u043d\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u0440\u0435\u0434\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0438\u043d GPIO25. \u041d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e Ground \u0438 Power.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h4>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b API \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Lua <\/h4>\n<p><code>Uart.new<\/code>(<em>num<\/em>,\u00a0<em>rate<\/em>,\u00a0<em>parity<\/em>,\u00a0<em>stopBits<\/em>) &#8212; \u0441\u043e\u0437\u0434\u0430\u0442\u044c Uart \u043d\u0430 \u043f\u043e\u0440\u0442\u0435 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<\/th>\n<td>\n<p align=\"left\"><strong>num<\/strong>\u00a0\u2013 \u043d\u043e\u043c\u0435\u0440 UART;<strong>rate<\/strong>\u00a0\u2013 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c;<strong>parity<\/strong>\u00a0\u2013 Uart.PARITY_NONE, Uart.PARITY_EVEN, Uart.PARITY_ODD, \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Uart.PARITY_NONE;<strong>stopBits<\/strong>\u00a0\u2013 Uart.ONE_STOP, Uart.TWO_STOP, \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Uart.ONE_STOP.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><code>Uart.read<\/code>(<em>self<\/em>,\u00a0<em>size<\/em>) &#8212; \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c\u00a0<code>size<\/code>\u00a0\u0431\u0430\u0439\u0442.<\/p>\n<p><code>Uart.write<\/code>(<em>self<\/em>,\u00a0<em>data<\/em>,\u00a0<em>size<\/em>) &#8212; \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 (data) \u0434\u043b\u0438\u043d\u043e\u0439 (size).<\/p>\n<p><code>Uart.bytesToRead<\/code>(<em>self<\/em>) &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434 \u0432 \u043e\u0434\u043d\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0442\u043e \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u0432\u0443\u0445\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044f\u044f \u0441\u0432\u044f\u0437\u044c, \u041d\u041e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 31 \u0441\u0438\u043c\u0432\u043e\u043b, \u0432\u0441\u0451 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 (<a href=\"https:\/\/docs.geoscan.aero\/ru\/master\/programming\/lua\/lua_main.html\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 Lua \u2014 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Pioneer December update 2022 (geoscan.aero)<\/a>), \u041d\u041e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>-----------------Lua \u043a\u043e\u0434, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u043e\u043d \u0447\u0435\u0440\u0435\u0437 Pioneer station----------- local uart = Uart.new(4, 57600) -- \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c uart \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 pyhon \u043a\u043e\u0434\u043e\u043c local servo_stat = 'o'    -- \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 'o'(\u043e\u0442\u043a\u0440\u044b\u0442\u043e),'c'(\u0437\u0430\u043a\u0440\u044b\u0442\u043e)) local rc = Sensors.rc     -- \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0443\u043b\u044c\u0442 local inp = ''            -- \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043d\u0430 Python local rec = ''            -- \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430(\u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f)  local function rotate_servo_open() -- \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430   servo_stat='o' end  local function rotate_servo_close() -- \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430   servo_stat='c' end  local function main()               -- \u0446\u0438\u043a\u043b   rc_chans = table.pack(rc())     -- \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441 \u043f\u0443\u043b\u044c\u0442\u0430   if rc_chans[8] &lt; -0.8 then      --\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 (\u043a\u0430\u043d\u0430\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438 \u043d\u0430 \u043f\u0443\u043b\u044c\u0442\u0435)     rotate_servo_open()   elseif rc_chans[8] > 0.8 then   --\u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 (\u043a\u0430\u043d\u0430\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438 \u043d\u0430 \u043f\u0443\u043b\u044c\u0442\u0435)     rotate_servo_close()   end   inp = servo_stat..'\\n' -- \u043f\u0443\u0441\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c '\\n'   uart:write(inp, #inp)  -- \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 Python   rec = uart:read(uart:bytesToRead())    -- \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 Python end  t = Timer.new(0.08, main) --\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0446\u0438\u043a\u043b\u0430 ---!\u0412\u0420\u0415\u041c\u042f \u0421\u0418\u041d\u0425\u0420\u041e\u041d\u0418\u0417\u0410\u0426\u0418\u0418 \u0414\u041e\u041b\u0416\u041d\u041e \u0411\u042b\u0422\u042c \u041e\u0414\u0418\u041d\u0410\u041a\u041e\u0412\u041e \u041d\u0410 LUA \u0438 PYTHON! t:start() -- \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0446\u0438\u043a\u043b ----------!!!\u041a\u041e\u0412\u042b\u0427\u041a\u0418 \u041e\u0414\u0418\u041d\u0410\u0420\u041d\u042b\u0415 \u041e\u0411\u042f\u0417\u0410\u0422\u0415\u041b\u042c\u041d\u041e, \u0418\u041d\u0410\u0427\u0415 \u0420\u0410\u0411\u041e\u0422\u0410\u0422\u042c \u041d\u0415 \u0411\u0423\u0414\u0415\u0422 !!!---------------<\/code><\/pre>\n<pre><code>##########################Python \u043a\u043e\u0434, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 Raspberry######################## import serial             # \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f from time import sleep    # \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 import RPi.GPIO as GPIO   # \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f ser = serial.Serial(\"\/dev\/ttyS0\", 57600, timeout=5) # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442, \u0431\u0435\u0437\u0434\u0443\u043c\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0439 GPIO.setmode(GPIO.BCM)    # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c GPIO.setup(25, GPIO.OUT)  # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c sg = GPIO.PWM(25, 50)     # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434 sg.start(8.06)            # \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0434\u0430\u0451\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0433\u043e\u043b servo_opened = True       # \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0430\u043c\u043e\u043a \u043e\u0442\u043a\u0440\u044b\u0442  def uart_read():          # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0441 Lua   data = ser.readline().decode().replace('\\n', \"\") # \u0447\u0438\u0442\u0430\u0435\u043c, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c, \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u0443\u0441\u043e\u0440   if ser.in_waiting &amp;gt; 20:      # \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0430\u043b\u043e, \u0431\u0435\u0437\u0434\u0443\u043c\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0439       ser.reset_input_buffer() # \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0430\u043b\u043e, \u0431\u0435\u0437\u0434\u0443\u043c\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0439    print('Read data: ')   print(data)             return data  def uart_write(answer): # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0434\u043b\u044f Lua   ser.write(answer.encode()) # \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c, \u043f\u0438\u0448\u0435\u043c   print('UART writed')  def servo_control(event): # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c   global servo_opened   # \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435   global sg             # \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435   if event == \"c\" and servo_opened: # \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 'c'       sg.ChangeDutyCycle(2.5)       servo_opened = False       print('closed')      elif event == \"o\" and not (servo_opened): # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 'o'       sg.ChangeDutyCycle(8.06)       servo_opened = True       print('opened')  def auto_p_control(data):   servo_event = data[0]   servo_control(servo_event) # \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430    print(\"ANS : \" + str(ans))   uart_write(ans)  # \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Lua   sleep(0.08)  # \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f  while True: # \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b   uart_data = uart_read() # \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0447\u0442\u0435\u043d\u0438\u044f   if uart_data != ['']:  #\u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u0443\u0441\u0442\u044b\u0435       auto_p_control(uart_data) # \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u0432\u0435\u0442\u0430  <\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Geoscan Pioneer max, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0451\u0442\u0430 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0440\u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">MCE_PREFLIGHT  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ENGINES_DISARM  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">MCE_LANDING  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043f\u043e\u0441\u0430\u0434\u043a\u0443  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">MCE_TAKEOFF  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0432\u0437\u043b\u0435\u0442  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <\/p>\n<p><code>ap.push<\/code>(<em>Event<\/em>)<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<\/th>\n<td>\n<p align=\"left\"><strong>Event<\/strong>\u00a0\u2013 \u043d\u043e\u043c\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u00a0<code>Ev.<\/code>MCE_LANDING  ).<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041d\u043e \u0442\u0430\u043a \u0436\u0435 \u0434\u0440\u043e\u043d \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<p><code>function callback(event) - \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430.<\/code><\/p>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043e\u0442 \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ENGINES_STARTED<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">COPTER_LANDED<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043f\u0442\u0435\u0440 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b \u043f\u043e\u0441\u0430\u0434\u043a\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">TAKEOFF_COMPLETE<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043f\u0442\u0435\u0440 \u0434\u043e\u0441\u0442\u0438\u0433 \u0432\u044b\u0441\u043e\u0442\u044b \u0432\u0437\u043b\u0435\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">POINT_REACHED<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043f\u0442\u0435\u0440 \u0434\u043e\u0441\u0442\u0438\u0433 \u0442\u043e\u0447\u043a\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">POINT_DECELERATION<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043f\u0442\u0435\u0440 \u043d\u0430\u0447\u0430\u043b \u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u0434\u043b\u0451\u0442\u0435 \u043a \u0442\u043e\u0447\u043a\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">LOW_VOLTAGE1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0438\u0437\u043a\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u043c\u043e\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">LOW_VOLTAGE2<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0438\u0437\u043a\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c \u043f\u043e\u0441\u0430\u0434\u043a\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">SYNC_START<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">SHOCK<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CONTROL_FAIL<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0433\u043e\u043b \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043a\u043e\u043f\u0442\u0435\u0440\u0430 \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ENGINE_FAIL<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0442\u043a\u0430\u0437 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>TAKEOFF_COMPLETE<\/p>\n<\/li>\n<li>\n<p>POINT_REACHED<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043c\u0435\u0442\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430:<\/p>\n<p><code>ap.goToLocalPoint<\/code>(<em>x<\/em>,\u00a0<em>y<\/em>,\u00a0<em>z<\/em>,\u00a0<em>time<\/em>) &#8212; \u0434\u043b\u044f \u043f\u043e\u043b\u0451\u0442\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<\/th>\n<td>\n<p align=\"left\"><strong>x<\/strong>\u00a0\u2013 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e \u043e\u0441\u0438\u00a0x, \u0432 \u043c\u0435\u0442\u0440\u0430\u0445;<strong>y<\/strong>\u00a0\u2013 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e \u043e\u0441\u0438\u00a0y, \u0432 \u043c\u0435\u0442\u0440\u0430\u0445;<strong>z<\/strong>\u00a0\u2013 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e \u043e\u0441\u0438\u00a0z, \u0432 \u043c\u0435\u0442\u0440\u0430\u0445;<strong>time<\/strong>\u00a0\u2013 \u0432\u0440\u0435\u043c\u044f, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043f\u0442\u0435\u0440 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u043e\u043f\u0442\u0435\u0440 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u0442\u043e\u0447\u043a\u0435 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u0430.<\/p>\n<p>\u0412\u043e\u0437\u044c\u043c\u0451\u043c \u0437\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430:<\/p>\n<pre><code>-----------------Lua \u043a\u043e\u0434, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u043e\u043d \u0447\u0435\u0440\u0435\u0437 Pioneer station----------- local rc = Sensors.rc     -- \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0443\u043b\u044c\u0442 local lpsPosition = Sensors.lpsPosition -- \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c steamVR \u0441\u0442\u0430\u043d\u0446\u0438\u044e (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0438\u043d\u0430\u0447\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439)  local points = {         {-0.6, 0.3, 0.2},         {0.6, 0.3,  0.2},         {0, 0, 0.5},         {0.6, -0.3, 0.2} }  local curr_point = 1  local function nextPoint()     if(#points >= curr_point) then         ap.goToLocalPoint(points[curr_point][1], points[curr_point][2], points[curr_point][3]         curr_point = curr_point + 1     else         ap.push(Ev.MCE_LANDING)     end end  function callback(event)     if (event == Ev.TAKEOFF_COMPLETE) then         nextPoint()     end     if (event == Ev.POINT_REACHED) then         nextPoint()     end end local function main()               -- \u0446\u0438\u043a\u043b   rc_chans = table.pack(rc())     -- \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441 \u043f\u0443\u043b\u044c\u0442\u0430   lpsX, lpsY, lpsZ = lpsPosition() -- \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e steamVR \u0441\u0442\u0430\u043d\u0446\u0438\u0438 end  t = Timer.new(0.05, main) --\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0446\u0438\u043a\u043b\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 0.05 \u0441\u0435\u043a\u0443\u043d\u0434\u044b) t:start() -- \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0446\u0438\u043a\u043b  ap.push(Ev.MCE_PREFLIGHT) -- \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 Timer.callLater(1, function() ap.push(Ev.MCE_TAKEOFF) end)  -- \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0432 \u0432\u043e\u0437\u0434\u0443\u0445 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u043c \u0441\u0430\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0438 (\u0434\u0432\u0435) \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434, \u0442\u043e \u0431\u0435\u0440\u0451\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443:<\/p>\n<pre><code>uart = Uart.new(4, 57600) servo_stat = 'o' send_auto = '0'  inp = '' rc = Sensors.rc autopilot = False auto_pilot_ret = False flight_loaded = False point = [<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-417486","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/417486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=417486"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/417486\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=417486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=417486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=417486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}