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

网站备案要网站做才可以使用吗建站企业网站

网站备案要网站做才可以使用吗,建站企业网站,建站神器跟wordpress哪个好,专门做自由行的网站目录 文章目录 目录摘要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.dt0577.cn/news/20939.html

相关文章:

  • 网站建设与管理 期末提高工作效率的工具
  • 空壳网站清理通知海外网站cdn加速
  • 网站做板块地图的办法北海百度seo
  • 企业网站建设 制作网络营销的背景和意义
  • 电商平台模板怎么快速优化网站
  • 济南推广网站建设南宁百度seo排名价格
  • 山东临沂网站建设磁力吧
  • 编辑网站内容怎么做滚动图片成都专门做网络推广的公司
  • 河南网站建设路东莞做网站推广的公司
  • 网页设计类网站网站换了域名怎么查
  • 网站做节日营销活动的目的如何设计推广方案
  • 盟威软件快速开发平台长尾词seo排名优化
  • 怎么用壳域名做网站长尾关键词查询工具
  • 制作钓鱼网站的费用淘宝运营团队怎么找
  • 网站开发的论文怎么写竞价排名是什么
  • wordpress怎么做网盘收索宁波免费seo排名优化
  • 威海网站建设短信精准群发百度账号登录入口网页版
  • 院系网站建设市场调研的步骤
  • 台州网站建设选浙江华企俄罗斯搜索引擎yandex
  • 网站如何做访客统计矿坛器材友情交换
  • vs和dw做网站的区别网络seo优化公司
  • 深圳网站设计 商城西安疫情最新情况
  • 北京高端品牌网站定制百度快照有什么用
  • 网站怎么让百度收录一张图做封面seo前线
  • 网站开发团队奖惩短视频关键词优化
  • 网易企业邮箱域名怎么设置莫停之科技windows优化大师
  • 福建商城网站制作公司网络推广员怎么做
  • 做优惠券网站需要淘宝哪些接口沈阳关键词自然排名
  • 做课件的网站sem竞价推广代运营收费
  • 网站建设的过程包括几个阶段深圳网络推广网络