{"id":468,"date":"2021-12-11T10:15:17","date_gmt":"2021-12-11T10:15:17","guid":{"rendered":"https:\/\/med.upc.edu\/team5-2021\/?p=468"},"modified":"2021-12-11T14:49:57","modified_gmt":"2021-12-11T14:49:57","slug":"activity-13-interacting-with-the-real-autopilot","status":"publish","type":"post","link":"https:\/\/med.upc.edu\/team5-2021\/2021\/12\/11\/activity-13-interacting-with-the-real-autopilot\/","title":{"rendered":"Activity #13 Interacting with the real autopilot"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this activity we will learn how to receive information from the real autopilot through the Telem 2 serial port. To do this, we will follow these steps in order to make the connection correctly:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Connect your computer with the autopilot via USB (as usual) and also to Telem2 using the cable in figure 2.<\/li><li>Identify in your computer the port where Telem2 has been connected Figure 3.1<\/li><li>In Mission Planner set SERIAL2_BAUD to 115. This will be the speed for the connection.<\/li><li>Reboot the autopilot: DATA -&gt; Actions -&gt; Preflight_Reboot<\/li><li>Prepare a simple program in Python like the one shown in the figure.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"576\" height=\"602\" src=\"https:\/\/med.upc.edu\/team5-2021\/wp-content\/uploads\/sites\/6\/2021\/11\/activity_13_.png\" alt=\"\" class=\"wp-image-384\" srcset=\"https:\/\/med.upc.edu\/team5-2021\/wp-content\/uploads\/sites\/6\/2021\/11\/activity_13_.png 576w, https:\/\/med.upc.edu\/team5-2021\/wp-content\/uploads\/sites\/6\/2021\/11\/activity_13_-287x300.png 287w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><figcaption>  Figure 1: <em>Code and getting telemetry through Telem2.<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As it can be seen, in the command window of our script, we were getting telemetry trhough the port COM11, that is the Telem 2 port.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But why we need this method to obtain the telemetry if we had another two ports to connect the Autopilot with our computer?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, to verify if through the USB port the telemetry can be sent, we just changed the port number and run again the program, and this was the results:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"576\" height=\"616\" src=\"https:\/\/med.upc.edu\/team5-2021\/wp-content\/uploads\/sites\/6\/2021\/11\/activity_13__.png\" alt=\"\" class=\"wp-image-385\" srcset=\"https:\/\/med.upc.edu\/team5-2021\/wp-content\/uploads\/sites\/6\/2021\/11\/activity_13__.png 576w, https:\/\/med.upc.edu\/team5-2021\/wp-content\/uploads\/sites\/6\/2021\/11\/activity_13__-281x300.png 281w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><figcaption>  Figure 2: <em>Code and connection with Mission Planner.<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As it can be seen in the command window, we are not getting the telemetry trhough this port, the USB port. The reason is not clear but it seems that there is a limitation in the Mavlink protocol in this port that limitates the telemetry.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, we have verified that through the Telem ports 1 and 2 if the telemetry of the real autopilot can be obtained<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this activity we will learn how to receive information from the real autopilot through the Telem 2 serial port. To do this, we will follow these steps in order to make the connection correctly: Connect your computer with the autopilot via USB (as usual) and also to Telem2 using [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":366,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[16],"class_list":["post-468","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-phase-2","tag-python"],"_links":{"self":[{"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/posts\/468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/comments?post=468"}],"version-history":[{"count":2,"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/posts\/468\/revisions"}],"predecessor-version":[{"id":500,"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/posts\/468\/revisions\/500"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/media\/366"}],"wp:attachment":[{"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/media?parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/categories?post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/med.upc.edu\/team5-2021\/wp-json\/wp\/v2\/tags?post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}