当前位置: 首页 > news >正文

哪些是+joomla做的网站西安做网站哪家好

哪些是+joomla做的网站,西安做网站哪家好,网站建设规划方案ppt模板,做宣传册参考的网站目录 文章目录 目录摘要1.源码1.1源码路径1.2源码程序1.3源码功能 2.源码分析 摘要 本节主要记录PX4姿态误差计算过程,欢迎批评指正。 1.源码 1.1源码路径 PX4-Autopilot/src/modules/mc_att_control/AttitudeControl/AttitudeControl.cpp1.2源码程序 matrix::…

目录

文章目录

  • 目录
  • 摘要
  • 1.源码
    • 1.1源码路径
    • 1.2源码程序
    • 1.3源码功能
  • 2.源码分析

摘要

本节主要记录PX4姿态误差计算过程,欢迎批评指正。

1.源码

1.1源码路径

PX4-Autopilot/src/modules/mc_att_control/AttitudeControl/AttitudeControl.cpp

1.2源码程序

matrix::Vector3f AttitudeControl::update(const Quatf &q) const
{Quatf qd = _attitude_setpoint_q;// calculate reduced desired attitude neglecting vehicle's yaw to prioritize roll and pitchconst Vector3f e_z = q.dcm_z();const Vector3f e_z_d = qd.dcm_z();Quatf qd_red(e_z, e_z_d);if (fabsf(qd_red(1)) > (1.f - 1e-5f) || fabsf(qd_red(2)) > (1.f - 1e-5f)){// In the infinitesimal corner case where the vehicle and thrust have the completely opposite direction,// full attitude control anyways generates no yaw input and directly takes the combination of// roll and pitch leading to the correct desired yaw. Ignoring this case would still be totally safe and stable.qd_red = qd;} else{// transform rotation from current to desired thrust vector into a world frame reduced desired attitudeqd_red *= q;}// mix full and reduced desired attitudeQuatf q_mix = qd_red.inversed() * qd;q_mix.canonicalize();// catch numerical problems with the domain of acosf and asinfq_mix(0) = math::constrain(q_mix(0), -1.f, 1.f);q_mix(3) = math::constrain(q_mix(3), -1.f, 1.f);qd = qd_red * Quatf(cosf(_yaw_w * acosf(q_mix(0))), 0, 0, sinf(_yaw_w * asinf(q_mix(3))));// quaternion attitude control law, qe is rotation from q to qdconst Quatf qe = q.inversed() * qd;// using sin(alpha/2) scaled rotation axis as attitude error (see quaternion definition by axis angle)// also taking care of the antipodal unit quaternion ambiguityconst Vector3f eq = 2.f * qe.canonical().imag();// calculate angular rates setpointVector3f rate_setpoint = eq.emult(_proportional_gain);// Feed forward the yaw setpoint rate.// yawspeed_setpoint is the feed forward commanded rotation around the world z-axis,// but we need to apply it in the body frame (because _rates_sp is expressed in the body frame).// Therefore we infer the world z-axis (expressed in the body frame) by taking the last column of R.transposed (== q.inversed)// and multiply it by the yaw setpoint rate (yawspeed_setpoint).// This yields a vector representing the commanded rotatation around the world z-axis expressed in the body frame// such that it can be added to the rates setpoint.if (std::isfinite(_yawspeed_setpoint)){rate_setpoint += q.inversed().dcm_z() * _yawspeed_setpoint;}// limit ratesfor (int i = 0; i < 3; i++){rate_setpoint(i) = math::constrain(rate_setpoint(i), -_rate_limit(i), _rate_limit(i));}return rate_setpoint;
}

1.3源码功能

实现姿态误差计算,得到目标角速度。

2.源码分析

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

对应的PDF下载地址:
下载地址

http://www.tj-hxxt.cn/news/98943.html

相关文章:

  • 长沙诚信做网站网站加速器
  • 此网站域名三天更换太原百度seo排名软件
  • 哪种浏览器什么网站都可以进关联词有哪些三年级
  • 成都网站建设维护站长工具综合查询官网
  • 做导航网站用什么cms搜索引擎营销的方法包括
  • 有哪些网站做的好关键词优化外包
  • 怎么修改网站的关键词衡阳seo
  • 织梦网站首页在哪里改外包推广公司
  • 甘肃省城乡建设网站免费发外链的网站
  • wordpress去掉导航框seo图片优化
  • 深圳较便宜的网站建设百度seo优化价格
  • 网站建设与规划心得旺道seo软件技术
  • 浙江专业网站建设商城报价韩国最新新闻
  • 郴州 网站建设seo优化的基本流程
  • wordpress 页面下载企业网站优化的三层含义
  • 优化网站费用微博推广费用一般多少
  • 电子商务网站建设与运营方向免费生成短链接
  • 苏州网站设计哪家好百度免费建网站
  • 建设交友网站的好处优化一下
  • 高端企业网站 程序抖音搜索seo软件
  • win7 asp.net网站架设网络营销技巧和营销方法
  • 亚马逊网站特点近期重大新闻事件
  • 上海住房和城乡建设委员会官方网站可以做产品推广的软件有哪些
  • 做网站都要掌握什么软件站内推广和站外推广的区别
  • 重庆社区官网seo网站推广
  • 网站建设画册bing搜索引擎
  • 好的版式设计网站中文搜索引擎大全
  • 手机可以建设网站吗seo排名赚app多久了
  • 怎么样做网站的目录结构友情链接页面
  • 怎么做自己的优惠券网站百度搜索关键词优化