{"id":216,"date":"2017-03-26T10:48:07","date_gmt":"2017-03-26T10:48:07","guid":{"rendered":"https:\/\/verysmart.ch\/wp\/?page_id=216"},"modified":"2017-03-27T19:16:58","modified_gmt":"2017-03-27T19:16:58","slug":"flight-controller-sw-design","status":"publish","type":"page","link":"https:\/\/verysmart.ch\/wp\/flight-control-basics\/flight-controller-sw-design\/","title":{"rendered":"FC SW design"},"content":{"rendered":"<p>The basic SW design is shown here:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-224 aligncenter\" src=\"https:\/\/verysmart.ch\/wp\/wp-content\/uploads\/2017\/03\/Folie1-3-300x169.jpg\" alt=\"\" width=\"1012\" height=\"570\" srcset=\"https:\/\/verysmart.ch\/wp\/wp-content\/uploads\/2017\/03\/Folie1-3-300x169.jpg 300w, https:\/\/verysmart.ch\/wp\/wp-content\/uploads\/2017\/03\/Folie1-3-768x432.jpg 768w, https:\/\/verysmart.ch\/wp\/wp-content\/uploads\/2017\/03\/Folie1-3-1024x576.jpg 1024w, https:\/\/verysmart.ch\/wp\/wp-content\/uploads\/2017\/03\/Folie1-3.jpg 1280w\" sizes=\"auto, (max-width: 1012px) 100vw, 1012px\" \/><\/p>\n<p>The loop statistics looks like this:<\/p>\n<p>&nbsp;<\/p>\n<p>The timing is shown here:<\/p>\n<p>Right after the new data available interrupt (yellow), the MPU9250 (first accelerometer, the gyro and the magnetometer; the pressure sensor xyz will be read (blue) every xxx time (because of his data update rate of &#8230;..). The double calculations (scaling, Madgwick quaternions and PID controller) need only about 360 \u03bcs (hardware floating point unit on the STM32F4 chip; very nice!). After that the 4 CAN messages are send to the BLDC motor controllers (magenta). Since the\u00a0CAN mailbox only takes three\u00a0messages at once the main loop will be blocked until the first message has been send.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-237\" src=\"https:\/\/verysmart.ch\/wp\/wp-content\/uploads\/2017\/03\/SCR02.bmp\" alt=\"\" width=\"747\" height=\"607\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The basic SW design is shown here: The loop statistics looks like this: &nbsp; The timing is shown here: Right after the new data available interrupt (yellow), the MPU9250 (first accelerometer, the gyro and the magnetometer; the pressure sensor xyz will be read (blue) every xxx time (because of his data update rate of &#8230;..). [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":23,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-fullwidth.php","meta":{"footnotes":""},"class_list":["post-216","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/pages\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":10,"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/pages\/216\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/pages\/216\/revisions\/246"}],"up":[{"embeddable":true,"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/pages\/23"}],"wp:attachment":[{"href":"https:\/\/verysmart.ch\/wp\/wp-json\/wp\/v2\/media?parent=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}