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

哪些是+joomla做的网站杭州网站免费制作

哪些是+joomla做的网站,杭州网站免费制作,济南建设银行,抖音代运营培训目录 文章目录 目录摘要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.hrbkazy.com/news/34229.html

相关文章:

  • 凡科做网站怎么样江门seo网站推广
  • 做外汇的国外新闻网站网络营销是学什么的
  • 湛江做网站苏州厂商深圳市龙华区
  • 网站开发加盟商怎么做客户引流推广方案
  • 有做兼职赚钱的网站吗百度怎么搜索网址打开网页
  • 做电影网站 资源怎么存放怎么做一个网站页面
  • 临夏网站建设寻找客户的渠道和方法
  • b2c网站建设平台客户管理系统
  • 英国零售电商网站开发海外推广营销系统
  • 企业网站需求方案软文代写平台有哪些
  • 连云港网站建设 连云港网站制作如何自己搭建一个网站
  • 网站建设网站软件有哪些方面seo优化排名是什么
  • 如何查询网站建设时间橙子建站怎么收费
  • 培训网站建设公司排名现在最火的推广平台有哪些
  • 免费电商网站建设平台千锋教育介绍
  • 威联通nas 做网站河南整站百度快照优化
  • 门户网站建设情况简介seo 360
  • 现代网站开发技术打开全网搜索
  • 站长之家网页模板宣传网页制作
  • 有网站专门做效果图高端网站建设南宁
  • 上海网站建设千元漂亮公关负面处理公司
  • 兼职做网站 深圳2023年新闻热点事件摘抄
  • 学生创业做网站制作设计北京网站推广排名外包
  • 成都网站营销seo多少费用搜索引擎优化是什么工作
  • 黄骅做网站_黄骅昊信科技|黄骅网站|黄骅网站开发|黄骅微信|黄骅全域seo
  • 精彩网站制作珠海seo推广
  • 时时彩网站开发需要多少钱网络广告设计
  • 纪实摄影网站推荐微信营销案例
  • 不一样维度的网站电商平台怎么注册
  • 网站的层次轻松seo优化排名 快排